dreadnought / python-daly-bms

Python module for Daly BMS devices
MIT License
81 stars 37 forks source link

--mqtt-hass option do not send any messages to the mqtt broker #49

Open byte4geek opened 2 months ago

byte4geek commented 2 months ago

Hi,

i'm trying to send data to home assistant but when i run the script nothing are send to the mqtt broker, what i wrong? This is the command i run:

root@dockers-deb12:~/daly/python-daly-bms# daly-bms-cli -d /dev/ttyUSB0 --soc --mqtt-hass --mqtt-broker 192.168.1.2 --mqtt-user mqttuser --mqtt-password xxxxxxx
{
  "total_voltage": 54.0,
  "current": 47.3,
  "soc_percent": 35.7
}
byte4geek commented 2 months ago

i run the mosquittopub on home assistant to see if the messages are received:

mosquitto_sub -h 192.168.1.2 -d -v -u mqttuser -P xxxxxxx -t '#'