@mbj Thanks, I will give the MQTT Client sketch a go soon.
Cheers,
@mbj Thanks, I will give the MQTT Client sketch a go soon.
Cheers,
Matt,
No worries, this is what I am using. It plugs into a rule that energises the relay for 3 seconds and then turns off to open/close the garage door.
Currently I am using the MQTT Broker sketch from main branch along with the standard relay sketch.
Config file,
mqtt:mysensors.url=tcp://192.168.0.50:1883
mqtt:mysensors.clientId=openHAB
Items file,
Switch GD "Garage Door" {mqtt=">[mysensors:MyMQTT/23/1/V_LIGHT:command:ON:0],>[mysensors:MyMQTT/23/1/V_LIGHT:command:OFF:1]"}
I will give the MQTT Client sketch a go again soon however last time I tried it, it locked up on me every day or so and I had to restart it. Reliability is important and for the last few weeks my set up has been working perfectly.
Cheers,
George
Thanks, I reloaded the nano with the sketch and it is working ok.
Regards
George
Gday,
Does anyone have a relay node connected to openHab via the MQTT Broker gateway?
Could you point me in the right direction with the code to send to turn it on/off.
But I can't seem to understand what to send to turn the relay node on or off.
I have this but it is not working,
Switch TestGD "Test GD" {mqtt=">[mysensors:MyMQTT/52/1/V_LIGHT:command:ON:1],>[mysensors:MyMQTT/52/1/V_LIGHT:command:OFF:0]"}
This is from the serial monitor,
send: 52-52-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:0
send: 52-52-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=ok:1.5.4
send: 52-52-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
read: 0-0-52 s=255,c=3,t=6,pt=0,l=1,sg=0:M
repeater started, id=52, parent=0, distance=1
send: 52-52-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=ok:0
send: 52-52-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,st=ok:1.5.4
send: 52-52-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=ok:0
read: 0-0-52 s=255,c=3,t=6,pt=0,l=1,sg=0:M
sensor started, id=52, parent=0, distance=1
send: 52-52-0-0 s=255,c=3,t=11,pt=0,l=5,sg=0,st=ok:Relay
send: 52-52-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0
send: 52-52-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=ok:
Regards,
George
@hek
Thanks for that.
I switched back to the MQTT Broker Gateway as the client gateway seemed to lock up every no and then.
Could you let me know the command for the broker gateway?
Thanks again
Regards
George
Gday,
I hope someone can help, I am trying to get a relay node working.
Gateway: MQTT Broker Gateway
Relay Node sketch is: 0_1456304097597_RelayActuator.ino
The only thing I changed was a fixed Node ID of 52.
Could someone let me know what is the correct MQTT message is to send to turn it on and off?
Regards,
George
Greg,
I have loaded the current 1.5 Latest Release sketch and just added a static Node ID.
Regards
George
Gday,
I have been trying to connect to a new relay node via openhab.
The relay node is set to Node 52 and seems to be connected to the gateway ok. (MQTT Client gateway)
I have a Switch item,
Switch TestGD "Test GD" {mqtt=">[mosquitto:mygateway1-in/52/255/3/0/6:command:ON:1],>[mosquitto:mygateway1-in/52/255/3/0/6:command:OFF:0]"}
When I hit the switch in openHab it does send the MQTT message,
The relay does not switch on or off from the MQTT message.
Could someone point me in the right direction?
Regards,
George
@sundberg84 Fantastic thanks for that it worked perfectly.
Cheers,
George
I am looking at the development version of the MotionSensor sketch and can not seem to find a gw.begin
Regards,
George
Ok thanks for that.
Where should I put that code in the sketch?
Cheers,
Gday,
I have the MQTT Client gateway running and the existing nodes are ok however a new motion sensor node I just built does not seem to be working.
Could someone let me know how you set a static node ID.
Regards,
George
Fantastic thanks for the tips and direction.
While it may not look look like much... It works!
And after a quick update to the openHAB items file they update just the same as the MQTT broker gateway.
Now time to build it into a nice plastic box and figure out how to send it data for a relay.
Thanks again.
Cheers,
George
Great thanks for the pointers.
Samuel, it would be great to double check your pin outs.
Thanks again.
Cheers,
Great thanks for that guys.
I have got the MQTT gateway working well, it was dropping out every two minutes in openHAB however I noticed that only occurred when I had MQTTlens connected. So solved that small problem.
I am keen to give the MQTT Client gateway a go. I just wanted to double check the wiring connections.
So basically just wire it up as per the Ethernet gateway and load the dev MQTT Client sketch on?
Regards,
George
Gday,
I am going to have a go at the MQTT Client gateway. Does it only work with the esp8266? The sketch seems to point to the esp8266.
I would like to use a Arduino UNO? (only because I have one here)
How would this be wired up?
Could someone point me in the right direction.
Cheers,
@DerPest great thanks for that.
Yes I will give the MQTT client gateway a try tomorrow.
Thanks.
Regards,
George
@gregl thanks for that I will give the MQTT client gateway a try.
Yes it makes sense now why I can't see the MQTT gateway in the router, quite new to this so it a bit of a learning curve.
Thanks again.
Regards,
George
@Yveaux Thanks for you help. I was just looking around and saw this article.
I just cant seem to find any setting in openHAB that can be adjusted for testing.
Does anyone else run the MQTT gateway with openHAB 1.x have any drop outs?
Cheers,
George
@Yveaux said:
cting to Mosquitto passes a keep-alive time during the connec
That sounds like it could be the problem, do you happen to know where that setting might be? I had a look in the config file but there does not seem to be a mention there.
Regards,
George
@Yveaux I initially thought the same thing, I will have another look. But I also have mosquitto running on the same win7 box for OwnTracks and that one seems to stay connected without any drop outs.
Regards,
George
Gday,
Well I have managed to set up a Mysensors MQTT gateway which I was quite pleased with and have a PIR & distance sensor connected too it and it works!
When I look to openHAB I noticed that every 2 minutes (almost exactly) the broker connection was lost.
Is there are setting or reason this would occur? (MQTTlens seems to stay connected ok)
It is openHAB 1.8 running on a Windows 7 box.
Has this happened to anyone else? Could someone point me in the right direction with this?
A grab from the log below.
Regards,
George
2016-02-06 23:31:36.661 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to broker was lost
org.eclipse.paho.client.mqttv3.MqttException: Unexpected error
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:115) ~[na:na]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_71]
2016-02-06 23:31:41.403 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to 'mysensors' was lost: Unexpected error : ReasonCode 6 : Cause : Unknown
2016-02-06 23:31:41.403 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mysensors'
2016-02-06 23:31:51.419 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mysensors'
2016-02-06 23:33:36.663 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to broker was lost
org.eclipse.paho.client.mqttv3.MqttException: Unexpected error
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:115) ~[na:na]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_71]
2016-02-06 23:33:42.785 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to 'mysensors' was lost: Unexpected error : ReasonCode 6 : Cause : Unknown
2016-02-06 23:33:42.786 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mysensors'
2016-02-06 23:33:52.787 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mysensors'
2016-02-06 23:35:36.661 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to broker was lost
org.eclipse.paho.client.mqttv3.MqttException: Unexpected error
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:115) ~[na:na]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_71]
2016-02-06 23:35:40.080 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to 'mysensors' was lost: Unexpected error : ReasonCode 6 : Cause : Unknown
2016-02-06 23:35:40.080 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mysensors'
2016-02-06 23:35:50.082 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mysensors'
Greg,
Thanks for that.
Interestingly the gateway does not show up in the router listing however it appears to be working quite ok.
I have managed to get MQTTlens connected and can see my PIR sensor tripping! Now to see if I can get openHAB talking to it.
Just another couple of questions.
Does it matter if I turn on the gateway before or after turning on the sensor/s?
Would it be best to persevere with the MQTT gateway (I think I read support for it might end soon?) or try to fire up the MQTT client gateway?
Thanks again.
Kind Regards,
George
Gday,
Am quite the beginner and I am having some trouble getting the MQTT gateway working.
So far I have wired up the UNO with the radio & W5100, changed the MyConfig H file to uncomment out the softspi, uploaded the sketch with the only change to the IP (192.168.0.100).
I used the 1.5.3 version of sketches.
When I go to the router page to see if it is connected it does not appear.
Of course I can not connect with MQTTlens to check the messages.
Could someone help me figure this out?
Regards,
George
Thanks for that, I uploaded the sketch.
It did note, "WARNING: Category '' in library UIPEthernet is not valid. Setting to 'Uncategorized'" Is this a problem?
After uploading I am having trouble finding the MQTT broker. It does not seem to connect to the netgear router on the IP I set, 192, 168, 0, 100. The IP range is ok.
I built it inline with the instructions and there are flashing lights on the W5100. Could someone point me in the right direction?
Cheers,
George
Gday,
I am new here and just got delivery of some parts. I managed to build a simple motion sensor and load the sketch which I think works.
I have built the MQTT gateway with a UNO & Ethernet W5100 + radio. When I try to upload the sketch (with just changing the IP) I get an error compiling on both the IDE & website via codebender plugin.
Could someone point me in the right direction?
I am intending to use it with openhab.
Cheers,
George
I