{"id":28541304,"url":"https://github.com/excieve/pinecil2mqtt","last_synced_at":"2026-04-18T00:32:01.850Z","repository":{"id":238343346,"uuid":"796360361","full_name":"excieve/pinecil2mqtt","owner":"excieve","description":"Pinecil V2 BLE to MQTT Gateway","archived":false,"fork":false,"pushed_at":"2024-05-08T18:21:32.000Z","size":193,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T10:37:10.054Z","etag":null,"topics":["ble","mqtt","pinecil","pinecil-v2","soldering"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/excieve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-05T17:57:09.000Z","updated_at":"2024-05-08T18:21:36.000Z","dependencies_parsed_at":"2024-05-06T19:04:44.338Z","dependency_job_id":null,"html_url":"https://github.com/excieve/pinecil2mqtt","commit_stats":null,"previous_names":["excieve/pinecil2mqtt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/excieve/pinecil2mqtt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excieve%2Fpinecil2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excieve%2Fpinecil2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excieve%2Fpinecil2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excieve%2Fpinecil2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/excieve","download_url":"https://codeload.github.com/excieve/pinecil2mqtt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/excieve%2Fpinecil2mqtt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31951284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ble","mqtt","pinecil","pinecil-v2","soldering"],"created_at":"2025-06-09T19:38:38.486Z","updated_at":"2026-04-18T00:32:01.829Z","avatar_url":"https://github.com/excieve.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pinecil V2 BLE to MQTT Gateway\n\n**This project has been barely tested and might not work as expected. Use at your own risk.**\n\n![Example Grafana dashboard](doc/grafana.png)\n\nThis project is a BLE to MQTT gateway for the [Pinecil V2](https://wiki.pine64.org/wiki/Pinecil) soldering irons.\nIt is based on the [Pinecil V2 BLE Services](https://github.com/Ralim/IronOS/blob/dev/Documentation/Bluetooth.md)\nfrom IronOS.\n\nWhile there are already [some excellent projects](#alternative-projects) that read data from the Pinecil V2 soldering\niron via BLE, this project aims to provide a more flexible and extensible solution by publishing the data to an MQTT\nbroker. From there, the data can be consumed by other applications or services (e.g. Home Assistant, Grafana).\n\n## Features\n\n- [x] Automatically discover and connect to the Pinecil V2 soldering iron via BLE\n- [x] Publish data provided by the soldering iron to an MQTT broker\n- [x] Optionally authenticate with the MQTT broker\n- [x] Transform raw data into human-readable values\n- [x] Can be run as a standalone binary or in a container\n\n## Pre-requisites\n\n- A Pinecil V2 soldering iron\n- IronOS firmware version 2.22 or later (might work on 2.21 but not tested)\n- A computer with Bluetooth Low Energy support\n- An MQTT broker (e.g. [Mosquitto](https://mosquitto.org/))\n\n## Installation\n\n### With containers\n\n1. Pull the image from Docker Hub:\n   ```shell\n   docker pull excieve/pinecil2mqtt:dev\n   ```\n2. Run the container (on a Linux machine) with the following command, replacing `mqtt.example.com` with your MQTT broker:\n   ```shell\n    docker run -d -e P2M_MQTT_HOST=mqtt.example.com -v /run/dbus/:/run/dbus excieve/pinecil2mqtt:dev\n   ```\n3. Enjoy!\n\n#### Caveats\n\nThe container needs access to the host's D-Bus socket to be able to communicate with BLE devices. This is\nachieved by mounting the host's D-Bus socket into the container. This might not work on all platforms. \n\nAdditionally, this image is built on an Alpine Linux base image, which is known to be particular about DNS resolution.\nIf you encounter issues with resolving your MQTT broker's hostname, you might need to use IP address instead. This might\nchange in the future.\n\n### From source\n\n1. Clone this repository\n2. Run `cargo build --release` to build the project\n3. Set up a configuration file or environment variables (see [Configuration](#configuration))\n4. Run the binary from the `target/release` directory\n5. Enjoy!\n\n## Configuration\n\nThe configuration file is a simple TOML file, path to which can be passed using the `--config` CLI argument:\n```shell\n./target/release/pinecil2mqtt --config /path/to/config.toml\n```\n\nSee `pinecil2mqtt --help` for more information on available CLI arguments.\n\nHere is an example configuration (username and password are optional):\n\n```toml\nloglevel = \"info\"\n\n[mqtt]\nhost = \"mqtt.example.com\"\nport = 1883\nusername = \"username\"\npassword = \"password\"\n```\n\nAlternatively, you can use environment variables to configure the application:\n```shell\nP2M_MQTT_HOST=mqtt.example.com P2M_LOGLEVEL=debug ./target/release/pinecil2mqtt\n```\n\nConfig file and environment variables are merged, with environment variables taking precedence.\n\n## MQTT Data Structure\n\nThe data is published every second to an MQTT topic that looks like `pinecil/\u003cdevice_id\u003e/bulk`, where `\u003cdevice_id\u003e` is\nthe unique ID of your Pinecil V2 soldering iron. The payload is a JSON object that looks like this:\n\n```json\n{\n  \"live_temp\": 22,\n  \"set_point\": 300,\n  \"voltage\": 51,\n  \"handle_temp\": 229,\n  \"power_level\": 0,\n  \"power_source\": 0,\n  \"tip_resistance\": 62,\n  \"uptime\": 57,\n  \"last_movement\": 56,\n  \"max_tip_temp\": 445,\n  \"tip_voltage\": 685,\n  \"hall_sensor\": 0,\n  \"operating_mode\": 0,\n  \"power\": 0,\n  \"timestamp\": 1715002904,\n  \"power_source_label\": \"DCIN\",\n  \"operating_mode_label\": \"Idle\"\n}\n```\n\n*Note*: This might change in the future with different versions of the firmware.\n\n# Roadmap\n\n- [ ] Write unit tests (I know, I know)\n- [ ] Add support for the settings service read characteristics\n- [ ] Add support for the settings service write characteristics via MQTT\n- [ ] Home Assistant integration\n- [ ] Multiple Pinecils support (might already work, but not tested)\n- [ ] Test on more platforms (currently only tested on Linux)\n\n# Alternative Projects\n\n- [PineSAM](https://github.com/builder555/PineSAM) — standalone Web UI with WebSocket server in Python\n- [Pinecil in-browser app](https://joric.github.io/pinecil/) — Web Bluetooth API-based implementation of a Web UI\n\n# License\n\nThis project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcieve%2Fpinecil2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexcieve%2Fpinecil2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexcieve%2Fpinecil2mqtt/lists"}