-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no data receive in mqtt #14
Comments
It seems like that your enocean interface is running well but the connection to the MQTT broker is not established. On successful connection you will get a log entry like this, which is not present in your log:
I suggest testing the mqtt connection first, e.g. using the
Is this working? |
Hi @romor , It's working. I have install mosquitto client on docker :
For information I override entrypoint :
Ansible deployment configuration :
|
From your debug it looks like SSL is enabled. Try commenting out the line:
in your configuration. The way the test is coded right now, if that option is present (irrespective of what the value is set to) then the client will try to connect via SSL, which does not appear to be desired in your case. |
Same :/
I have try with :
I never have :'( |
Do you have the MQTT password surrounded by quotes? Try removing the quotes. I believe ConfigParser returns the value after the |
It's strange that you also don't get the warning message that is printed if the MQTT server disconnects due to either bad protocol or bad password:
The lack of that message would normally imply that the MQTT server is not responding to the connection requests due to a firewall and/or a network routing issue. In order to get more insight into the problem, you could try enabling the Paho MQTT client level debugging. That might give you more clues as to why you MQTT client is not connecting. To enable client logging, add the following line to the installed copy of
On my systems running Python 3.7 this file is installed at: Alternatively you could analyse a packet capture either at the client or the server end. |
I have add line to /enoceanmqtt/communicator.py in docker and now i have :
I can increase verbosity? |
That's as much verbosity as you will get from the MQTT client. Either it could not resolve the broker name, or could not establish the TCP connection to the broker because the broker rejected the connection (there are only 4 and 8 seconds between connection attempts.) I think it gives you the unexpected disconnect message mentioned above rather than the retry message if you are trying to connect to the broker via SSL, but it is not configured for SSL (and vice versa). Make sure that you have commented out the Also check that MQTT and firewall ACLs are allowing connections. You could also add another line just before the connect_async() line to dump the connection hostname and port to verify that the config is being read correctly:
Beyond that I can only suggest exec into the container and double checking that you can resolve the broker name via |
Interesting, I noticed that setting the keepalive to 0, the value in |
Umh, when i have set to keepalive at 60 Thx for your helping ;) |
It's work but now i'm regularly disconnect :/
Normal ? |
No, not normal. It disconnects after 15 seconds. Is this the |
I set keepalive to 60 and mosquitto have default conf (just add passwd file) |
I'd suggest re-enabling MQTT client debugging and see what MQTT packets are being sent and received, now that you have established a TCP connection to the broker. (I intend to create a PR to enable this through either a command line switch or a config file option.) BTW the keepalive=0 issue has been reported upstream at eclipse-paho/paho.mqtt.python#473. |
I have found, i have 2 client with same id :) Thx for your help :) |
Hi,
I don't receive ny message in mqtt while I have a lot of data going back from my sensors.
Any idea why ?
Thx
Debug log :
My config :
The text was updated successfully, but these errors were encountered: