MQTT Client Gateway with Uno?
-
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,
-
@George-Whitehouse - Take a read of http://www.mysensors.org/build/mqtt_gateway and it will point you to build it as an ethernet gateway with a few mods to it. If you remain to be stuck then let me know and i will help you. I'm running a Arduino Mega 2560 as a MQTT gateway for OpenHAB. Works perfect!
-
@George-Whitehouse The MQTT gateway from the current 1.5 master branch is a MQTT broker which will be obsolete in the next version of the software. Should work on an UNO, I have used it on a Nano without problems. Maybe not a good idea to start using something that will disappear.
Under the development branch you will find two MQTT clients, one based on Arduino and Ethernet (should work on an UNO, again I have tested it only on a Nano) and the other one is based on ESP8266. These two will be supported in the future it seems. Both are MQTT clients and need to talk to a broker. I currently use the the ESP8266 gateway + Mosquitto.
You will find more info here about the new gateways http://forum.mysensors.org/topic/2352/guide-setting-up-and-testing-mqtt-client-gateway .
Download of development (and master) branch is here https://github.com/mysensors/Arduino .
-
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
-
@George-Whitehouse - It would appear so yes. http://www.mysensors.org/build/mqtt_gateway
-
@George-Whitehouse There are pin-outs listed in the GatewayW5100MQTTClient.ino sketch. If I remember right these and up identical to what is used for a W5100 Ethernet gateway but pls check. Just remember to install the full libraries from the development branch, will not compile at all using 1.5 libs.
-
I will get my connection/oinout for you later if you want. Like i said i run a mega 2560 with the ethernet shield and mqtt client sketch.
-
Great thanks for the pointers.
Samuel, it would be great to double check your pin outs.
Thanks again.
Cheers,
-
Give me 2 hours and i'll be home thenbi will upload the info for you.
-
So here are a few pictures of my gateway.
Gnd and 3v
Then the rest of the inputs from the nRF
Excuse the 4 wires on the right as they're for my LEDs (debugging feature).
The connections are:
Arduino - nRF24
3v - vcc
Gnd - gnd
16 - miso
15 - mosi
14 - sck
2 - irq
5 - ce
6 - csPlease note that this pinout is using the soft spi enabled.
-
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