A Python client that connects Meshtastic radios via MQTT to Home Assistant (Hass).
Project description
Meshtastic to Home Assistant (Hass)
A Python client for use with Meshtastic devices. The client connects to a mesh radio via USB serial port. Telemetry and position messages from the mesh are published to an MQTT broker and further into Home Assistant. All MQTT entities will by auto discovered in Home Assistant.
Usage
usage: meshtastic2hass [-h] [--config CONFIG] [--dev DEV] [--mqtt-host MQTT_HOST] [--mqtt-port MQTT_PORT] [--mqtt-user MQTT_USER]
[--mqtt-password MQTT_PASSWORD] [--mqtt-topic-prefix MQTT_TOPIC_PREFIX] [--use-network USE_NETWORK]
[--hostname HOSTNAME] [--version]
Connects Meshtastic radios via MQTT to Home Assistant (Hass).
options:
-h, --help show this help message and exit
--config CONFIG Path to configuration file in TOML format.
--dev DEV The device the Meshtastic device is connected to, i.e. /dev/ttyUSB0
--mqtt-host MQTT_HOST
The MQTT broker host name or IP.
--mqtt-port MQTT_PORT
The MQTT broker port.
--mqtt-user MQTT_USER
The MQTT broker user name.
--mqtt-password MQTT_PASSWORD
The MQTT broker password.
--mqtt-topic-prefix MQTT_TOPIC_PREFIX
The MQTT topic prefix
--use-network USE_NETWORK
Use network connection to Meshtastic interface instead of serial
--hostname HOSTNAME Meshtastic interface network hostname or IP
--version show programs version number and exit
Node Filter
By default all received Meshtastic nodes will create entities in Home Assistant.
This might be an undesired behavior when only some nodes are of interest. A node filter can be defined in config.toml.
filter_nodes = []
takes a set of Meshtastic nodes short names to be includes in filter. Only these nodes will be forwarded to home assistant via MQTT topic, hence creating entities. Keep empty to forward all nodes.
Receiving channels text from nodes is not filtered at all.
Install packages with pip and requirements.txt
The following command installs packages in bulk according to the configuration file, requirements.txt. In some environments, use pip3 instead of pip.
pip install -r requirements.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file meshtastic2hass-1.0.14.tar.gz
.
File metadata
- Download URL: meshtastic2hass-1.0.14.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a69f2d56ffc3b78fc5cc8a74e1927feea519041c6a8da3f48ec9cd5e5f48c1f |
|
MD5 | 216f4e6aea35540211afae7f20c04c55 |
|
BLAKE2b-256 | bb185f99a53749eb9726f73a55ca73f715f3bcd009d864da1462c438704a834e |
File details
Details for the file meshtastic2hass-1.0.14-py3-none-any.whl
.
File metadata
- Download URL: meshtastic2hass-1.0.14-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acccf816d0287fe3b8ff553b25d6390b2fef57d04d0a904a0ab345dea1f5c879 |
|
MD5 | e05e58d252afc9bcea94640c89b30a0d |
|
BLAKE2b-256 | c55701d48e4b09db6b4d609467d0611d8ce8b73e5ced6139e24a24c1c2a3404f |