MQTT Broker gateway
-
I have a next problem:
OpenHAB (192.168.1.3) <-> Arduino GW mqtt (192.168.1.234:1883)<-> Arduino TEMP (DHT)org.eclipse.paho.client.mqttv3.MqttException: ═х єфрхЄё яюфъы■ўшЄ№ё ъ ёхЁтхЁє
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNet
workModule.java:75)
at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(Cli
entComms.java:538)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNet
workModule.java:66)
at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(Cli
entComms.java:538)
at java.lang.Thread.run(Unknown Source)with ping everything is ok.
test -
This post is deleted!
-
I just wanted to say hello again to everyone. I had to disappear for a while. Just had too much for my brain to handle. So all my automation project were on halt but will be continued again.
I know there are lot of bugs in this GW and I will hopefullt start developing soon again. Just write your experience you had so far and I'll try to keep up :)
//Damme
-
I just wanted to say hello again to everyone. I had to disappear for a while. Just had too much for my brain to handle. So all my automation project were on halt but will be continued again.
I know there are lot of bugs in this GW and I will hopefullt start developing soon again. Just write your experience you had so far and I'll try to keep up :)
//Damme
@Damme I tried today the mysensor 1.4.1 library, uploaded with Arduino 1.5.8 to UNO with Ethernet Shield (W5100) and an NRF24L01+pa+lna. Compilation and upload worked fine.
I can ping the IP address defined in the MQTTGateway.ino sketch.
I maintained on my RPI the openhab.cfg file with the url and port number from the gateway.
When starting the openhab it shows:
... - MQTT Service initialization completed.
... - Starting MQTT broker connection 'mysensor'.Then a couple of message later:
...Mqtt Exception
Caused by: java.net.SocketTimeoutException: connect timed outAny suggestion what I could look at.
I also tried to work with the development library of Mysensors but did not get very far with that. My ultimate goal is to something like a moteino with the RFM69HW radio module in connection with either openhab or pidome.
I have a quite a bit of hardware lying around here so I am happy to do any testing if somebody gives me some guidance.
Thanks. -
@Damme I tried today the mysensor 1.4.1 library, uploaded with Arduino 1.5.8 to UNO with Ethernet Shield (W5100) and an NRF24L01+pa+lna. Compilation and upload worked fine.
I can ping the IP address defined in the MQTTGateway.ino sketch.
I maintained on my RPI the openhab.cfg file with the url and port number from the gateway.
When starting the openhab it shows:
... - MQTT Service initialization completed.
... - Starting MQTT broker connection 'mysensor'.Then a couple of message later:
...Mqtt Exception
Caused by: java.net.SocketTimeoutException: connect timed outAny suggestion what I could look at.
I also tried to work with the development library of Mysensors but did not get very far with that. My ultimate goal is to something like a moteino with the RFM69HW radio module in connection with either openhab or pidome.
I have a quite a bit of hardware lying around here so I am happy to do any testing if somebody gives me some guidance.
Thanks.This post is deleted! -
Thanks for the mqtt broker. Just a tip to people who might fall in to the same pit as I:
The mqtt broker gateway doesn't distribute node ids unless you're connected to it using a mqtt client. I.e. if you did what I did, installed the gateway and wanted to test that the sensors found the gateway and was distributing the code then it doesn't work until you've connected to it. I had to go through the source code to figure it out.
If you don't have openhab or simply want to test, this is what I did on my raspberry (but should work similarly on others)
// install mosquitto client
sudo apt-get install mosquitto-clients// Start the client, replace the 10.0.0.200 with your ip. The port will default to 1883
mosquitto_sub -h 10.0.0.200 -d -t hello/world -v
You should be able to see messages:
Received PUBLISH (d0, q0, r0, m0, 'MyMQTT/20/0/V_LIGHT_LEVEL', ... (2 bytes)) -
Hi All
Just a simple question:
Are there any limitation in how many MQTT connections/sessions the MQTT Gateway can handle?
If so, can this be changed?
-
Hello. I am new to Mysensors, openhab and mosquitto.. I have a working knowledge of arduino and nrf24l01, and currently am running a wireless(nrf) twitter controlled heating scheduler, and am sending multiple temp (ds18b20) sensors to Xively feed.
I am really hooked on the idea of mqtt and openhab, and i thought that mysensors seemed like a good solution for implementing that idea.
My progress so far is to install the DallasTemperatureSensor by MySensors node to one nano, and the ethernet gateway sketc as a first step, and now i have installed the mqttgateway again from the build page, and i have a working install of mosquitto and openhab on a rasp pi b+.
I am just having difficulty getting it all stuck together. I have created the sitemap items and transform files as above and can access the openhab sitemap for the above configuration. i just don't know if i need to configure other items? how can i test each step? and can i use mosquitto with the setup that i have outlined. There seems to be conflicting info about what can and cannot be done with mosquitto and mysensors.
1 do i need to modify the sketch of the temp node? i have some output from the serial that suggests that it is communicating with the gateway.
2 do i need to modify the gateway with info of the mosquitto server?
3 what can i do to test each step of the transit from temp sensor to openhab?Thanks for any and all responses.
-
Hi Simon,
I had the same problem
I tried several time clean Eeprom and flash sketch again but with no results
Only after cleaning of Eeprom with the following scratch my sensor is starting work correctly
I recommend to try it:
Clearing EEPROMIgor
-
Hi All
Just a simple question:
Are there any limitation in how many MQTT connections/sessions the MQTT Gateway can handle?
If so, can this be changed?
-
@Gambituk To connect to a external MQTT server (mosquitto) use this MQTT gateway version:
http://forum.mysensors.org/topic/524/mqtt-client-gateway/ -
Thanks @celonunes I eventually found that version of gateway via somebody else. i have another post with some issues i found with that version. http://forum.mysensors.org/topic/921/strange-value-being-sent-from-controller-using-mixed-temp-relay-node it's not really resolved, but i have some kind of workaround.
-
@mwhansen @alexeinz The MQTT gateway can handle up to four simultaneous socket connections, this is the limit of Arduino ethernet shield (Wiznet W5100).
The problem is that openhab don't get along with the way the gateway handles multiple client packages. I will send a fix for this problem in the next few days.
-
@mwhansen @alexeinz The MQTT gateway can handle up to four simultaneous socket connections, this is the limit of Arduino ethernet shield (Wiznet W5100).
The problem is that openhab don't get along with the way the gateway handles multiple client packages. I will send a fix for this problem in the next few days.
-
Those are the most recent changes to MQTT gateway:
- Fixed node id distribution by the gateway (reported by @viking)
- Fixed the problem with openhab and multiple MQTT clients
- Fixed the appearance of garbage in messages sent from MQTT to a node