MQTT with NodeRED & Conduit

Home Forums Conduit: AEP Model MQTT with NodeRED & Conduit

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12404
    Adrian Mitevski
    Participant

    I’m trying to use the iot.eclipse.org as a mqtt broker inside Node-RED on a Conduit.

    Settings of the mqtt module are:

    Broker: iot.eclipse.org Port: 1883
    Client ID:-
    Username:-
    Password:-

    topic:loratest

    I’m not able to connect the mqtt modul inside Node-RED.
    it always stays disconnected.

    What am I doing wrong?

    I tested the mqtt broker inside an Android App called myMQTT and there I used the same iot.eclipse.org and loratest topic. It works perfectly i can publish a message for the secific topic and I also receive the message.

    #12405
    Bryan Tran
    Moderator

    Adrian,

    Does your Conduit have a connection to the internet ? You can check it by ssh into the Conduit and issue the following command:

    ping http://www.google.com

    If not connects, please configure it.

    There are two ways to configure the Conduit to connect to the internet.

    a. Using SIM

    b. Using your Company/Home router. (You Conduit is sitting behind your Company/Home router)

    Using SIM:
    ———

    – Web into your Conduit and go to Cellular -> Cellular Configuration -> Enable.

    – APN: Enter you APN here.

    – Authentication: Select Authentication Type and Enter your Username/Password.

    – Click on ‘Submit’ button

    – Do a save and reboot.

    Using your Company/Home router:
    ——————————-

    Assuming you have a router that can access to the internet and the IP address is as the following:

    Router:
    ——-

    IP address: 192.168.2.254

    Conduit:
    ——-

    IP address: 192.168.2.3

    Gateway: 192.168.2.254 <–Point to your Router ethernet interface.

    Configure the Conduit Ethernet as a WAN interface.

    a. Go to FireWall -> Settings:

    * Inbound Filter rule: Allow Inbound Any 1-65535 TCP/UDP ACCEPT

    * Outbound Filter rule: Allow Outbout Any Any Any ACCEPT

    Click on ‘Submit’ button.

    b. Administration -> Access Configuration:

    * HTTP redirect to HTTPS: Enable all of the checkboxes.

    * HTTPS: Enable.

    * SSH: Enable all of the checkboxes.

    * ICMP: Enable all of the checkboxes.

    Click on ‘Submit’ button

    c. Administration -> Initial Setup -> Click Next

    * Choose Password -> Click Skip.

    * Time Configuration -> Next.

    * IP setup – Eth0:

    – Type: WAN

    – Mode: Static

    – IP address: 192.168.2.3 <–Set to your desire ip address

    – Mask: 255.255.255.0

    – Gateway: 192.168.2.254 <–Point to your company router ip address.

    – Primary DNS server:

    Click Next

    Click Next

    Click Finish

    Do a Save and Restart

    Thanks,

    BT

    #12406
    Adrian Mitevski
    Participant

    Thanks for your quick response.

    I’ve set up everthing as you described it. But it’s still disconnected.

    I guess my Router IP-Adress is 192.168.1.1 as this is the one I can enter inside the browser and access my router. And my Conduit has the ip 192.168.1.100

    Do I have to enter something here ” – Primary DNS server:????”
    You only mentioned it in your description but without any value to enter.

    Or are there any special router settings that should be set up or checked?

    #12408
    Bryan Tran
    Moderator

    Adrian,

    1. You can set the Primary DNS server with the value: 8.8.8.8 (Google DNS server) and see if it helps. You can web into the device and go to – Setup -> Network Interfaces -> Click on the pencil icon and put in the DNS server ip address. Click on ‘Submit’ button and do a save and reboot.

    2. If it is still not working for you, can you ssh into the Conduit and try to ping your router at 192.168.1.1 and do you get any replied ? If not check your Ethernet cable..etc..

    3. If you can ping your router at 192.168.1.1, then try to ping 8.8.8.8 and see if you are getting replied ? Then try to ping http://www.google.com.

    Thanks,

    BT

    #12409
    Adrian Mitevski
    Participant

    Thank you so much Bryan!

    I’ve just added 8.8.8.8 to the Primary DNS Server. Now the mqtt can connect and it works fine!

    #12410
    Jeff Hatch
    Keymaster

    Adrian,

    You will probably have to specify a DNS server if you are going to use the Ethernet LAN interface for your traffic. Otherwise, the hostname in the URL, iot.eclipse.org, will not get resolved and it will fail.

    Jeff

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