[SOLVED] ESP8266 MQTT with RM69HW



  • I would like to begin that i had a working sketch from raw library + my own code (no ESP8266<->Radio but using Pro mini in between), but i decided to use Mysensors since it has community support and it does exactly what i need.

    in ESP8266 (havin wemos D1 mini) i connected the gray cable (IRQ ?) to D2 accordnig to link text

    the ESP8266 shows RADIO OK even if the radio is not powered and the sensor node still looking for Address:

    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:

    am sure am using enough power supply, i changed the HW define and Frequency to suite my needs)
    any ideas ?

    question, if sensor node takes address from GW, where does the GW gets its address from ? is it by default 1 ?



  • i just realized that node address requires a controller, so i decided specifying static addresses for the moment:

    still the RADIO shows OK even if it is unplugged, is verifying RFM69 running functions working ok ?

    while #define MY_NODE_ID worked for the sensor node, it didn't work for the gateway, any ideas ?


  • Mod

    @Meshx86 the gateway always has node id 0



  • How does that help in case of RFM69 ? how do you specify node id for RFM69 as the range for that is 1-254 ? i thought when creating an instance of RFM69 it get the ID from MySensors Node ID


  • Mod

    @Meshx86 said:

    still the RADIO shows OK even if it is unplugged, is verifying RFM69 running functions working ok ?

    No, it's not implemented: https://github.com/mysensors/MySensors/blob/development/core/MyTransportRFM69.cpp#L60
    Also, you're referring to the nRF24 wiring instructions, which say to leave the IRQ unconnected, but apparently you figured that out yourself.


  • Mod

    @Meshx86 the radio itself does not have a node ID. A gateway always has node id 0, regardless which communication method it is using. If you create another node (that isn't a gateway), that node will have a node id that is not 0.

    https://www.mysensors.org/about/network describes the different types of nodes and how they communicate.



  • @mfalkvidd am talking about this:

    bool transportInit() {
    	// Start up the radio library (_address will be set later by the MySensors library)
    	if (_radio.initialize(MY_RFM69_FREQUENCY, _address, MY_RFM69_NETWORKID)) {
    
    

    i believe the _address will be equal to the node ID (which either statically defined or obtained from controller),i am wondering with GW address is always 0 how the Radio will operate since valid "RFM69 Addresses" range is 1-254



  • @Yveaux i referred to nRF24 wiring since there isn't any reference wiring for ESP8266<->RFM69


  • Mod

    @Meshx86 I see. Good question. I didn't know that the rfm69 protocol doesn't support address 0.


  • Hardware Contributor

    rfm and nrf works the same in Mysensors if i remember.
    But let's go back to your problem :)
    So you don't have communication between GW and a node with Mysensors?
    I think your node or GW does not receive ACK. It can be power issue (but you're saying it's ok), or it could be bad defines for CS or especially IRQ pin as RFM69 rely on this pin.
    I have a working nodemcu with rfm69hw, mqtt too ;) maybe not exactly same pin mapping with wemos.

    I hope this helps.


  • Mod

    If nrf and rfm work the same, then id 0 is possible. My nrf gateway has id 0 and it works fine.



  • yea my bad, i just tried ID 0 in the RFM69 library Gateway-Node example and it worked, still can't understand the logic behind it since i know logical AND is done on the addresses but nvm..

    I am trying to get the Gateway Example of Original RFM69 (by Felix) to run on Wemos D1 Mini but i gets WDT reset, am trying to build up the gateway step by step to narrow down the problem.

    any idea if any modifications were done to the original RFM69 library to run on ESP8266 chips ?


  • Hero Member

    I tested a ESP8266 GW with an RFM69 radio today an I finally managed to get it to work when I reasigned the radio IRQ pin to GPIO4 on the ESP.



  • @korttoma isn't GPIO4 = D2 ?



  • @Meshx86 damn, i just connected it to D3 on Wemos D1 mini and it started working ..


  • Hero Member

    I am using an ESP-07 so your device is probably different, nice that you got it working.



  • cheers, The D1 mini is a mini wifi board based on ESP-8266EX according to their website.

    still the whole thing is flakey, sometimes it got stuck and won't reset (even from onboard reset button) until i disconnect all the wires, are i only connect the RFM69 pins specified in here should other on used pins be grounded ?


  • Hero Member

    Hi @Meshx86 ,
    I realized that I also have some of the WeMoS D1 minis and I tried to create a RFM69 WiFi Gateway with one.
    I am having the same experience as you and can not seem to get it working reliably.
    Let me know if you find a working solution and I will do the same if I find a working solution.



  • @korttoma

    on the RFM69 Gateway-Node Example by Felix i managed to get Wemos to talk to Arduino Pro mini by changing IRQ_PIN and IRQ_NUM to 4 both send & receive

    now on the MySensors example, i can see the gateway (Wemos running MQTT gateway example) receiving the broadcast from the Arduino Pro Mini Node, and it replies to it, but the Arduino isn't receiving anything.

    I am not sure if it is wiring, or something with the node/gateway code



  • i just remembered i need a controller to distribute ID's for the nodes, i installed MyController.org and it works fine


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.