Node red to MQTT broker

Home Forums Conduit: AEP Model Node red to MQTT broker

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #16530
    laurent brunet
    Participant

    Hello,

    I’m trying to use a mDot to communicate to a Conduit : AEP Model. I then want to send this data over to an android application using MQTT.

    I can already communicate with the gateway and have the data appear in my debug so that part is done.

    I also have already tested that my app is receiving data from the right subscribed MQTT topic. That part is done too.

    I now need to combine those 2 together but I am kind of lost when it comes to the communication between my gateway and the MQTT broker. I have set up node-red to take an incoming LoRa message and send it to an MQTT output, this output is linked to the right MQTT broker and topic.

    I have only tested incoming messages to the gateway in the default settings of the gateway, going to 192.168.2.1 while being part of the same sub network. I guess the next step is to connect the gateway via WAN or LAN to my router with ethernet instead of to my PC.

    What settings do I need to change for this and how can I continue to use the GUI I’m currently using to setup the gateway and Node-Red.

    Sorry if this seems like a straightforward thing to do for you, I’ve never really done anything that has to do with networks.

    Thanks a lot!

    #16538
    Jeff Hatch
    Keymaster

    Laurent,

    To set up your eth0 as a LAN or WAN with a gateway you can log into the Web UI and in Setup->Network Interfaces you can configure the eth0 interface. If you have a WAN already configured there may be some battling over the default gateway setting, but if eth0 is your only WAN or LAN with a default gateway you should be able to get Internet access through that if it is connected to your network.

    You can also use the Network Interfaces eth0 configuration to configure the eth0 to use DHCP to get it’s address and gateway.

    Jeff

    #16539
    laurent brunet
    Participant

    Thank you for the quick answer Jeff.

    So if I go into setup-> network interfaces -> configure eth0 to DHCP client and then reset my gateway and connect it to my network with the ethernet port, it will now have internet access?

    I have 2 more questions from there.

    Is the node-red flow that was on the gateway prior to the reset going to be running right away after the reset?

    Is it still possible to access the web UI after this change?

    Thanks again, I’m excited to get this working!

    #16540
    Jeff Hatch
    Keymaster

    Laurent,

    If the DHCP server gives out an address and gateway information along with DNS you should be able to get Internet access.

    The Node-RED flow will be started automatically after the reboot. One thing to note is that Node-RED is a little slow coming up on the Conduit so it may not respond right away. This is due to the limited resources on the Conduit.

    You should be able to access the Web UI on the address that the Conduit gets from DHCP. One way to determine this is to log in to the debug/device console on the Conduit, execute an ifconfig command, and look at what address is assigned to the eth0 interface.

    Jeff

    #16541
    laurent brunet
    Participant

    Jeff,

    This was exactly the little bit of information that I was missing. I managed to connect through the address found with ifconfig, start node-red and wait for it to be fully loaded. The whole design works perfectly fine, thanks again!

    Laurent

    #16542
    Jeff Hatch
    Keymaster

    Laurent,

    Glad to hear that!

    Cheers,

    Jeff

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.