title: 'Smarthome Soldering Iron with Home Assistant and ESPHome (also: web GUIs for Pinecil)'
description: 'Learn how to create a smart soldering iron using Pinecil with Home Assistant and ESPHome, as well as explore the options for controlling and monitoring your Pinecil with Bluetooth'
date: 2023-03-28T19:01:25-04:00
draft: false
categories: [Home Automation, DIY, FOSS]
tags: [Pinecil, Home Assistant, DIY, RISC-V, Blisp, PineSAM, Pine64, esphome]
---
About a year ago, [wesdottoday](https://hachyderm.io/@wesdottoday) told me to
buy a Pinecil and, once they came back in stock before the holidays.. I did just
that... Fast forward a couple months and I've got a
[copr](https://copr.fedorainfracloud.org/coprs/neil/blisp/) for flashing the
Pinecil's firmware (IronOS), and am spending my weekends playing around with
Bluetooth Low Energy (BLE) and Home Assistant to automatically turn on my fan
when I start tinkering at my desk, lest my lungs die from the fumes.
<p>
{{<figuresrc="pinecil-esp32.jpg"alt="ESP-WROOM-32 Development MCU with a Pinecil v2 leaning on it"class="inline-40 left">}}
By popular demand, I'm writing a blog post about the Pinecil, how to flash the
latest firmware, and then what you can (currently) do with bidirectional
communication to your soldering iron.
</p>
We'll also go over two Pinecil community projects offering in-browser
experiences (PineSam and Joric's 'Pinecil'), and lastly some instructions on
using an [ESP32](https://www.espressif.com/en/products/socs/esp32) and
[ESPHome](https://esphome.io/) to send Pinecil data to
[HomeAssistant](https://home-assistant.io/) so you can do everything from
visualize your soldering statistics, to automatically turn on an exhaust fan
when you start working.
## The Pinecil
The [Pinecil](https://www.pine64.org/pinecil/) is an open-source soldering iron
based on the RISC-V architecture produced by Pine64. There are two versions of
Pinecil - v1 and v2. Pinecil v1 does not have a Bluetooth Low Energy (BLE) chip,
whereas Pinecil v2 does. In this blog post, we will focus on Pinecil v2. Pine64
does not distinguish between v1 and v2 except for on the PCB as a revision. If
you're buying a Pinecil in 2023 or beyond, and it's from an official source, it
is a v2.
You can find more information about the Pinecil in the links below, including
where to buy. Check the Pinecil Wiki for up-to-date information on where to buy
a genuine Pinecil, and how to avoid fakes.
### Links
- [Pine64.com](https://pine64.com/) - Offical store for Pine64 devices. Ships
from China and takes 3-4 weeks for delivery
- [Pine64.org](https://pine64.org) - The community associated with Pine64
devices. Check out the Discord/Telegram chat for a great group of tinkerers,
and if you have any trouble with your Pinecil or associated tools
- [Pinecil Wiki](https://wiki.pine64.org/wiki/Pinecil) - Lots of tips and
tricks, as well as up to date purchasing and troubleshooting information.
- Shout out to River-Mochi for their _awesome_ work on keeping this up to date
and useful
## Blisp
Blisp is a flashing tool used to flash ironOS on Pinecil v2 that stands for
'Bouffalo Labs In-System Programming'. It's used to flash the Bouffalo BL706 MCU
that was integrated on the v2 Pinecil. You can find the source code for Blisp on
[GitHub](https://github.com/pine64/blisp).
I also maintain a Fedora COPR respository for it
[here](https://copr.fedorainfracloud.org/coprs/neil/blisp/), where you can find
packages with precompiled binaries for Fedora and Enterprise Linux (8/9). I am
working with Pine64 to make it easier to get it packaged for Fedora and other
Linux distributions down the road.
### Flashing the beta firmware with blisp
Until version v2.21 of IronOS ships, a beta firmware is required to use the BLE
functionality of the Pinecil v2. There has been a significant amount of testing
and development on the BLE stack on the main tree in the last few months and the
developers have been making sure the BLE features are ready before they are
released to a much larger audience.
{{<figuresrc="blisp-flash.png"alt="Flashing the Pinecilv2 with blisp CLI"class="">}}
Once v2.21 is released, binaries can be retrieved from the