python-daly-bms icon indicating copy to clipboard operation
python-daly-bms copied to clipboard

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

Open byte4geek opened this issue 1 year ago • 2 comments

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 avatar Apr 29 '24 09:04 byte4geek

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 '#'

byte4geek avatar Apr 29 '24 09:04 byte4geek

I think you're missing the --mqtt argument.

Try running it like this: daly-bms-cli -d /dev/ttyUSB0 --soc --mqtt --mqtt-hass --mqtt-broker 192.168.1.2 --mqtt-user mqttuser --mqtt-password xxxxxxx

mjrsnyder avatar Feb 21 '25 23:02 mjrsnyder