Settting up gateway to internet using "is connected" module

I am trying to setup a gateway. There is a new module for ‘isconnected’ , but doesn’t seem to connect to internet even though the gateway is on the internet router.

I can access the gateway settings page and it shows that’s it is online.

Also, where do I configure the MQTT information?

Hi @danempiric Sure, we have updated both the flow and the article that monitors the successful delivery of messages sent via MQTT. The current flow you have sends an HTTP request to a server at regular intervals, which may not be the most efficient method. I encourage you to review the article and the updated flow in the repository.

Now the flow checks whether messages are successfully sent to MQTT. If not, the flow stores the messages in a local backlog on the Enterprise IIoT Gateway. This new approach eliminates the need for continuous monitoring of the internet connection.

Regarding the nodes “Wireless Gateway (simulation),” ncd-internet-monitor, ncd-isonline, MQTT complete, and MQTT status, you can now remove them from your flow.

Please take a look, and feel free to let me know if you have any questions or if I can assist further.
Thank you,
Eduardo M.

Hi, I’ve got those new nodes installed but still can’t get the mqtt broker setup.

Would you be able to walk me through it real quick?

Hi @danempiric Sure, to better understand the situation, could you please clarify the following:

  1. What is the main issue you are currently facing? Could you describe it in more detail?
  2. Have you verified the performance of your MQTT broker with any other client? I recommend using this tool to help assess the broker’s performance.
  1. Are there any error messages in the Node-RED debug window?
  2. Could you please share screenshots of your current flow?

Thank you in advance for the additional information.
Eduardo M.

Hi,

It doesn’t look like my MQTT credentials are working.
We have confirmed the MQTT broker works with other gateways and devices.

I’m unclear where to put the credentials.
“Error: ENOENT: no such file or directory, open ‘path/to/myDeviceCertificate.crt’”

image

Hi @danempiric thank you for the info, okay let me explain you, to configure the MQTT credentials within the “Out to MQTT” node, you must double-click on the node to access its properties. First, you need to set the Topic to publish to property.

Then, click on the “Edit MQTT-broker config node” icon to configure the MQTT parameters.

image

Once you access these properties, you will see a window similar to the following:

You should set the address (local or remote) where the MQTT server is located, followed by the communication port configured in the MQTT broker. You can also define the MQTT version (3.1, 3.1.1, or 5). This will depend on the MQTT broker you are working with. Additionally, you will find the Security and Messages tabs, in case the broker incorporates extra layers of security.

I recommend reading an article where we explain how to send data to AWS IoT Core using MQTT. Focus on Section 7 and 8, where each of the parameters of the MQTT nodes within Node-RED is explained in detail. I believe it will be quite useful.

Please take a look at this and feel free to let us know if you have any questions.
Thank you,
Eduardo M.

Thanks! got it working. There was also something funny going on with the ability to push data out from the gateway from my network because I have a nested network. I got it to work perfectly now.

@danempiric Great! Please feel free to let me know if you need further assistance, don’t hesitate to reach out.

Thank you,
Eduardo M.

Hi,

Following back up on this, I was testing the local storage backup by disconnecting the network and waiting for the switchover. Once I did this, I was hoping to get the historical data back. However it seems like I’m just getting error codes now.

Please advise.

Hi @danempiric It’s possible that some sensor or gateway messages from the Wireless Gateway node were stored locally before you added the ‘sensor_data’ node (some modem_mac, sensor_mode, etc). The flow is designed to process ‘sensor_data’ messages, which is likely why the issue is occurring within the ‘Extract Failed Line’ node.

To verify this, before I provide you with a flow to delete the backlog file, could you please send me a screenshot of the configuration inside your ‘sensor_data’ switch node?

Thank you,
Eduardo M.

Hi,

Hi @danempiric I highly recommend reviewing this article to learn about the different types of NCD sensor messages in Node-RED and become familiar with them.

In the switch node, you will need to filter only ‘sensor_data’ messages, as shown in the following image:


To do this, you can delete the ‘addr’ and ‘battery_percent’ rules by clicking the delete button (x) located on the right side.

Afterward, you will need to import the following flow into your workspace:

[{"id":"1c66d34f4837ccb0","type":"exec","z":"adcae456bdd7867d","command":" ","addpay":"payload","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"exec","x":630,"y":800,"wires":[["dbe362702c2b7126"],["dbe362702c2b7126"],["dbe362702c2b7126"]]},{"id":"65d4cd7400b6789b","type":"inject","z":"adcae456bdd7867d","name":"delete backlog file","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":290,"y":800,"wires":[["fb05069e5ec17bde"]]},{"id":"dbe362702c2b7126","type":"debug","z":"adcae456bdd7867d","name":"debug 146","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":790,"y":800,"wires":[]},{"id":"fb05069e5ec17bde","type":"function","z":"adcae456bdd7867d","name":"build command","func":"let filename = flow.get(\"log\");\nmsg.payload = \"rm \" + filename;\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":800,"wires":[["1c66d34f4837ccb0"]]}]

Then, click ‘Deploy,’ enable the ‘Delete Backlog File’ node, and proceed to delete the backlog file. Finally, you can run the test again.

Please give this a try and let us know the outcome.
Thank you,
Eduardo M.

Thanks! That works now, much appreciated. I actually switch the standard filter node with the NCD node, the preset filters seems to be a bit easier.

@danempiric Great! feel free to let us know if you have any questions.
Thank you,
Eduardo M.