embyt / enocean-mqtt

Receives messages from an enOcean serial interface (USB) and provides selected messages to an MQTT broker.
GNU General Public License v3.0
42 stars 21 forks source link

sent mqtt message not received #13

Closed gijbelsy closed 4 years ago

gijbelsy commented 4 years ago

the debug log shows me 2020-03-16 20:54:15,975 DEBUG: enocean/switch1: Sent MQTT: {"R1": 0, "EB": 0, "R2": 0, "SA": 0, "T21": true, "NU": false} But the messages are never received by the mqtt broker. I've checked the config, and the mqtt settings seem OK, also MQTT IP address is pingable from device. What can be wrong?

romor commented 4 years ago

Some suggestions to go on:

2018-10-30 23:55:35,084 INFO: Authenticating: username
2018-10-30 23:55:35,113 INFO: Succesfully connected to MQTT broker.
gijbelsy commented 4 years ago

I don't see any information about the mqtt connection in the --debug output. Only when I uncomment just the user (or pwd) field in the config file, --debug promts me that there is a config error (so config file is read). I don't use ssl neither pass / username I did some further testing: When I set the parameter mqtt_keepalive = 0 to mqtt_keepalive = 1 it works. Also I need log_learn = 1 otherwise I get the 'teach' command issue. Strange because the switch has a F6-02-02 profile, which is standard.

romor commented 4 years ago

I don't see any information about the mqtt connection in the --debug output.

If you do not use authentication, you should still see a resulting message whether connection was established successfully or not.

I did some further testing: When I set the parameter mqtt_keepalive = 0 to mqtt_keepalive = 1 it works.

This defines the timeout in seconds, allowed between communications with the broker. It can be turned off by setting the interval to 0.

Potentially your mqtt broker does not support this? What mqtt broker to you use?

Also I need log_learn = 1 otherwise I get the 'teach' command issue. Strange because the switch has a F6-02-02 profile, which is standard.

In my perspective, this is an issue in the enocean library, which this is based on.

gijbelsy commented 4 years ago

What mqtt broker to you use? Mosquito on Windows server

In my perspective, this is an issue in the enocean library, which this is based on. Why is this still giving me the teach issue. The F6 02 02 is listed in the EEP.xml?

romor commented 4 years ago

Why is this still giving me the teach issue. The F6 02 02 is listed in the EEP.xml?

Please see #1 and the corresponding issues in the encoean lib, e.g. #53, #66, where this has been discussed.