MQTT with NodeRED & Conduit
Home › Forums › Conduit: AEP Model › MQTT with NodeRED & Conduit
- This topic has 5 replies, 3 voices, and was last updated 8 years, 12 months ago by
Jeff Hatch.
-
AuthorPosts
-
May 5, 2016 at 1:31 pm #12404
Adrian Mitevski
ParticipantI’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.
May 5, 2016 at 2:26 pm #12405Bryan Tran
ModeratorAdrian,
Does your Conduit have a connection to the internet ? You can check it by ssh into the Conduit and issue the following command:
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
May 5, 2016 at 2:57 pm #12406Adrian Mitevski
ParticipantThanks 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?
-
This reply was modified 8 years, 12 months ago by
Adrian Mitevski.
May 5, 2016 at 3:25 pm #12408Bryan Tran
ModeratorAdrian,
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
May 5, 2016 at 3:39 pm #12409Adrian Mitevski
ParticipantThank 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!
May 5, 2016 at 3:44 pm #12410Jeff Hatch
KeymasterAdrian,
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
-
This reply was modified 8 years, 12 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.