MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69
-
Hello to all,
Some years ago I've tried to setup a MQTTClient on the following hardware:
- Arduino UNO
- Ethernet Shield WIZ5100
- RFM69
Here my last thread about:
https://forum.mysensors.org/topic/4199/arduino-uno-and-rfm69-level-converter/I was not able to accomplish the above steps so I moved to serial Gateway. It works with a level converter, but now I need to move the gateway and it would be great if it would be in IP, not serial.
I know I could try by myself, but actually I'm away, so I would like to know if there are some news on this thema, before I'll back home to try.
I've seen there is an Example in the library "GatewayW5100MQTTClient" which includes the possibility to select now more radio:
// Enables and select radio type (if attached) #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 //#define MY_RADIO_RFM95
So is there someone with experiences on this setup or have an idea?
Even other IP solutions would be great!
Thanks!
Simon
-
Do you have a raspberry PI around?
-
My controller is based on Banana-Pi, which is very similar to Raspberry.
BTW, looking why I've choosen to use MQTT in the past, it was because OpenHAB was able to comunicate with MySensors gateway only via MQTT. I've started using Mysensors on version 1.5.
Now, reading the API, since 2.0, OpenHAB is compatible with Serial and Ethernet Gateway as well. So, if the above hardware is compatible for a MQTTClient gateway or for a Ethernet Gateway, that would be for me the same.
Does it work?
Until now It was working as Serial Gateway, but would like to stop usng serial between my arduino and the Openhab controller.Thanks for the help!
Simon
-
You can use either Ethernet or MQTT, give it a try. I asked for raspberry because you can use it as a gateway without the need of an arduino.
I don't know if it is the same but maybe you can make it work on your hardware -> https://www.mysensors.org/build/orange
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
You can use either Ethernet or MQTT, give it a try. I asked for raspberry because you can use it as a gateway without the need of an arduino.
I don't know if it is the same but maybe you can make it work on your hardware -> https://www.mysensors.org/build/orangeHello @gohan !
Thanks for the quick response. The solution on RPi seems interesting as well.
For now I would like to test first the Arduino, then maybe move the radio on my BPi. Having the Arduino alread ready, it's easier.
BTW, I've read on the forum issues about Ethernet Shield W5100 and the radio RFM69, sharing the same SPI, but cannot find informations on the actual 2.2 version of the mysensors api.
Was that solved without implementing external github modifications (they would invalidate future upgrades of the API) or editing too much ".h" files around?
I'll try them in the next days, but if there are some hints, that's time I can spend form some beers instead driving me crazy because there are hidden workaroundsThanks a lot!!
Simon
-
Actually I didn't try that setup since the RPI gateway was a much cleaner solution for me. But isn't softSPI needed when using the W5100 ?
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
Actually I didn't try that setup since the RPI gateway was a much cleaner solution for me. But isn't softSPI needed when using the W5100 ?
Well, I've read mainly this post:
https://forum.mysensors.org/post/56273Seems that I've to change many files and was interesting to know if on API2.2 it's not needed anymore. Maybe @Tris or @abrasha or @Jonathan-Caes or @Frรฉdรฉric-Grandjean or @korttoma could give me some hints as well
MQTTClient or Ethernet Gateway would be perfect. I need to move away from SerialThanks!!!
Simon
-
I've tried but it doesn't work
I've used the suggestions provided here:https://forum.mysensors.org/topic/5351/solved-w5100-ethernet-gateway-with-rfm69-radio-fails-at-init/
I've tried first without the patch, but no way...
Ideas?
Thanks, Simon
-
I got it to work using Leonardo, but the same process would work for Uno I think:
https://forum.mysensors.org/topic/6249/mqtt-ethernet-gateway-using-leonardo-32u4-w5100-rfm69h-hard-spi
-
@carywin said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
I got it to work using Leonardo, but the same process would work for Uno I think:
https://forum.mysensors.org/topic/6249/mqtt-ethernet-gateway-using-leonardo-32u4-w5100-rfm69h-hard-spiHello @Carywin !
Thanks for your suggestion!
I'm not totally sure about your setup, so, to be sure:- you have NOT edited and library file by yourself (i.e. the ethernet library ad discussed here: https://forum.mysensors.org/topic/5351/solved-w5100-ethernet-gateway-with-rfm69-radio-fails-at-init/7)
- you have replaced the whole RFM69 library using the one taken from Github
Then, could you explain me more in detail your wiring setup? Seems it's different from the default, but don't know if because it's due the Leonardo, the library or why.
I'm using an Arduino uno with on that the Etnernet Shield. The connections to the radio should then start from the ethernet shield to the radio.
Meanwhile I'm trying to compile it without the hardware here, but get compilation issues. I've replaced the RFM69 library into Mysensors\drivers\RFM69 and changed the name so that it matched the filenames "old/RFM*_old.*".
After that It's able to find all needed files but I get different errors like:...arduino-1.8.5\libraries\MySensors/MyConfig.h:729:25: error: 'DEFAULT_RFM69_CS_PIN' was not declared in this scope #define MY_RFM69_CS_PIN DEFAULT_RFM69_CS_PIN ...arduino-1.8.5\libraries\MySensors/hal/transport/MyTransportRFM69.cpp:156:14: note: in expansion of macro 'MY_RFM69_CS_PIN' RFM69 _radio(MY_RFM69_CS_PIN, MY_RFM69_IRQ_PIN, MY_RFM69HW, MY_RFM69_IRQ_NUM); ...arduino-1.8.5\libraries\MySensors/MyConfig.h:703:26: error: 'DEFAULT_RFM69_IRQ_PIN' was not declared in this scope #define MY_RFM69_IRQ_PIN DEFAULT_RFM69_IRQ_PIN
(...)
It's due API version 2.2?
Thanks a lot!!
Simon
-
Hello @Carywin
Hello,
I think it's not working anymore on API 2.2...
Im getting a lot of compilation errors due includes non having the required functions. Seems RFM69 on MySensors are updatedb since API 2.2...Look at 2.1:
https://github.com/mysensors/MySensors/blob/2.1.1/drivers/RFM69/RFM69.hCompared to the 2.2:
https://github.com/mysensors/MySensors/blob/development/drivers/RFM69/old/RFM69_old.hThe name is changed as well RF69 to RFM69...
I'm trying to correct the RFM69 library taken from https://github.com/kiwisincebirth/RFM69 suggested by you.
Some new functions were included as well.
Then I'll give a try.
Let e know for the above doubts.Thanks, Simon
-
library 2.2 has a new driver for RFM69 if you want to use it and it is used by raspberry gateway.
-
Hello @gohan
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
library 2.2 has a new driver for RFM69 if you want to use it and it is used by raspberry gateway.
Well, then I'm correcting the right old/RFM69_old.h + old/RFM69_old.cpp + old/RFM69registers_old.h to apply the differences between this version (https://github.com/kiwisincebirth/RFM69) and the original one from Mysensors.
I've overwritten the above files taken the version from 'kiwisincebirth' and added the missing functiond like sanityCheck, powerUp, powerDown, ... and correcting the variable definition from RF69_* to RFM69_*.Now it compiles correctly, but I don't have my board here.
Another story is to understand if that will work on the board.As written by @Carywin in the thread suggested by him, I'll use his sketch and connect the radio over the Wiz5100 shield on my Arduino UNO using as CS digital PIN6 instead of PIN10. All via Level Converter. The remaining pins on the radio will maintain the same connections as default. Hope I've understood all correctly and that will work...
Simon
-
I am just curious, but don't you have a raspberry pi?
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
I am just curious, but don't you have a raspberry pi?
Eheh, not really.
I've a BananaPi board, which is mainly the same ARM board, with some differences. I was trying to follow the OrangePi HowTo but noticed that my Armbian version installed on the board is hidding me the /boot/script.bin... so I cannot proceed. On an old version it was available... Of course I've opened a thread on their forum... https://forum.armbian.com/topic/6430-armbianbananapi-scriptbin-missing/I'm waiting for answers. Still requested again
Simon
-
I'd consider gettin a RPI3, there are so many working solutions that can simplify al lot of things instead of the other various "fruits" PIs that are indeed cheaper but they don't have the same community support as the raspberry.
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
I'd consider gettin a RPI3, there are so many working solutions that can simplify al lot of things instead of the other various "fruits" PIs that are indeed cheaper but they don't have the same community support as the raspberry.
Absolutely true! Btw years ago I've helped in implementing the vdpau drivers, testing xbmc (now kodi) and hw acceleration so I got 5 boards for free for the tests. That's the reason why I'm using it
One is for Openhab (the one that has armbian without /boot/script.bin), one used with Octoprint on my 3d printer, another in a kiosk for my MAME emulation station
If I cannot get any support with the Armbian version, maybe I'll get an RPi.
-
To me having the radio directly on the RPI is a much cleaner solutions, with less wires around and it is easier to update gw software remotely
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
To me having the radio directly on the RPI is a much cleaner solutions, with less wires around and it is easier to update gw software remotely
Could you add the nRF24L01+ as well? I have both radios around!
-
Yes, there is a open topic on the forum "dual spi radio", I have them both running on my RPI
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
Yes, there is a open topic on the forum "dual spi radio", I have them both running on my RPI
Hello @gohan !
I'm trying to move on that way.
You have installed boh radios on RPi. Was a Level Converter required?Thanks!
Simon
-
NO level converter since RPI is 3.3v but I had tu use sockets with voltage regulators for the radios because I used the high power versions
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
NO level converter since RPI is 3.3v but I had tu use sockets with voltage regulators for the radios because I used the high power versions
You mean the RFM69HW ?
Ok, in that case it's not the own I have, so I expect to connect both radios directly on the board (as soon I get one )
-
@gohan hello again!
Iโm testing the RFM69 on RPi and seems working well. The only doubt is about the range. Seems previous Arduino-RFM69-serial setup was better. Maybe only placed better.
Btw Iโm thinking to increase the range using the RFM69HW version.Is the HW the better version that is using more power?
What have you done for connect it then on the RPi?
Actually Iโm using RFM69H(not W). If all are 868Mhz, are they compatible with HW version?
If all will work stable, Iโll migrate the nRF24L01+ as well. What have you done for handle power on this? On my Arduino Iโm using a capacitor, nothing more.
Thanks for you help as always!!
Simon
-
HW version is just a regular W version with an extra power amplifier on the TX side. To use them i got some of those nrf24 sockets with voltage regulator and I soldered the radio module on the nrf2rfm pcb adapter that you can find on openhardware.io
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
HW version is just a regular W version with an extra power amplifier on the TX side. To use them i got some of those nrf24 sockets with voltage regulator and I soldered the radio module on the nrf2rfm pcb adapter that you can find on openhardware.io
If the "HW" version has an amplifier on the TX side, do you think it's enough to have coverage gain on nodes that are only "W"?
I cannot find the nrf24 sockets with voltage regulator on openhardware.io
Do you apply it on both radios?
-
I am just referring to this https://www.mysensors.org/hardware/nrf2rfm69
The sockets you can find them on gearbest or aliexpress.
Of course the coverage gain is only within HW, but you can have closer nodes using normal W version.
-
@gohan said in MQTTClient - Arduino uno - Ethernet Shield WIZ5100 - RFM69:
I am just referring to this https://www.mysensors.org/hardware/nrf2rfm69
The sockets you can find them on gearbest or aliexpress.
Of course the coverage gain is only within HW, but you can have closer nodes using normal W version.
Ok, you use this adapter to place the RFM69 module on it and let it fit in something like that?
https://www.aliexpress.com/item//32741923288.htmlThen I could wire it as always or should it use the 5V in the RPi instead?
-
If you use that you will need to use the 5V because it has a regulator built in