Closed AnhDuc85 closed 5 years ago
same issue here, wanted to move my smarthome installation to another box and followed the wiki to compile ebusd with mqtt option. I'm running latest debian and mosquitto version, the "old" ebusd from the old machine can connect and is pushing, but the new compiled ebusd doesnt push any message. i tried to run ebusd --scanconfig -f -d 192.168.255.70:5000 --enablehex --mqtthost=192.168.99.19 --mqtttopic=ebusd/%circuit/%name --mqttchanges --latency=10000 --receivetimeout=100000 --sendretries=3 -p 8888 -l /var/log/ebusd.log but i did not receive any message on the mqtt server
what is the version of libmosquitto-dev? what does ebusd report regarding mqtt? any errors?
libmosquitto-dev/stable,stable,now 1.4.10-3+deb9u2 amd64 [installed]
absolutely no errors from ebusd, working without problem and receiving messages from the device, gaebus (FHEM) is connecting and working, but nothing pushed to mqtt. But i have the same issue with the docker container. looking in the mosquitto log i cant see any connection, not even an error, testing with mosquitto_pub and sub verify that mqtt is working and i can see the connections in the logfile
same here: 1.4.10-3+deb9u2 grep 'mqtt' ebusd.log -> [mqtt notice] connection established thats all regarding mqtt
does your MQTT server require authentication or TLS?
not in my case, no tls, no authentication. just checked my old server installed 2years or so ago is using 2018-12-15 14:19:48.159 [main notice] ebusd 3.0pre.15d5500 started, same config, is working
new server
root@hal9000tng:~# cat /var/log/ebusd.log |grep connec
2018-12-16 12:35:17.572 [mqtt notice] connection established
2018-12-16 12:40:45.377 [mqtt notice] connection established
2018-12-16 12:46:08.441 [mqtt notice] connection established
2018-12-16 12:51:32.900 [mqtt notice] connection established
2018-12-16 13:00:11.737 [mqtt notice] connection established
2018-12-16 14:35:41.459 [mqtt notice] connection established
root@hal9000tng:~# cat /var/log/ebusd.log |grep started
2018-12-16 12:32:08.314 [main notice] ebusd 3.2.v3.2-21-g7d10104 started with auto scan
2018-12-16 12:32:08.535 [bus notice] bus started with own address 31/36
2018-12-16 12:35:17.308 [main notice] ebusd 3.2.v3.2-21-g7d10104 started with auto scan
2018-12-16 12:35:17.560 [bus notice] bus started with own address 31/36
I guess it is related to the mqtt server or library version. since you seem to have both available, please check the versions and also check if the new server maybe has some firewall active. can you publish/subscribe directly from the ebusd host by using mosquitto tools?
I've install mosquitto tools on my pi zero where I'm running the ebusd and no problem to publish a message with this command:
mosquitto_pub -h 192.168.2.80 -m "TEST" -t ebusd/global/running -u ebusd -P PASSWORD
My broker receives the message.
No firewall, no TLS, just user and password.
old server hal9000 192.168.99.9 new server hal9000tng 192.168.99.19
new server: no firewall, Verfied -> mosquitto_pub and mosquitto_sub is working local and from remote machine. versions: libmosquitto-dev/stable,stable,now 1.4.10-3+deb9u2 amd64 [installed] libmosquitto1/stable,stable,now 1.4.10-3+deb9u2 amd64 [installed,automatic]
starting ebus on the new server connecting to mqtt on old server: ebusd --scanconfig -f -d 192.168.255.70:5000 --enablehex --mqtthost=192.168.99.9 --mqtttopic=ebusd/%circuit/%name --mqttchanges --latency=10000 --receivetimeout=100000 --sendretries=3 -p 8888 --loglevel=info -l --configpath=http://ebusd.eu/config/ -l /var/log/ebusd.log
no messages.
start ebus from old server to mqtt on new server: root 4964 1 0 19:56 ? 00:00:00 /usr/bin/ebusd --pidfile /var/run/ebusd.pid --scanconfig -d 192.168.255.70:5000 --mqtthost=192.168.255.19 --enablehex --mqttport=1883 --mqtttopic=ebusd/%circuit/%name --latency=10000 --receivetimeout=100000 --sendretries=3 -p 8888 -l /var/log/ebusd.log
old ebusd is publishing on old and new server new ebusd is doing neither
not sure if I understand your comment thoroughly. you write "i can see the messages on the new mqtt server" so does that mean it works or what?
No, doesnt work, i mean the ebusd daemon on the old server can publish to the new server as well,but the new ebusd on the new server doesnt publish anyhing, neither the new server nor the old server i even cannot see any traffic with tcpdump. Just wanted to clearify if the issue is with the mqtt server on the new server, which is not the case.
thank you, works like a charm
Hi, ebusd has been built by using the wiki page including libmosquitto-dev. Whenever I start ebusd with mqtt options:
ebusd -d /dev/ttyebus -p 8888 --loglevel=info -l /var/log/ebusd.log --scanconfig --configpath=http://ebusd.eu/config/ --httpport=8080 --mqttport=1883 --mqttjson --mqtthost=192.168.2.80 --mqtttopic=ebusd/%circuit/%name --mqttuser=ebusd --mqttpass=PASSWORD --foreground
...all I receive on my mqtt host is: "false" on ebusd/global/running. There's no problem when running ebusd from the docker image. Any idea?Here's the output of ./autogen.sh:
I receive
2018-12-16 11:39:50.210 [mqtt notice] connection established
when I start ebusd.Any idea?