Node-Red Setup and Admin Notes

Note: Working Notes Node red uses a settings file called settings.js located in /usr/lib/node-modules/node-red/ folder by default. You can create your own settings file and customise it either by copying the existing file or using the file available from Github here. To use your own settings file use the -s switch when starting node-red e.g. node-red -s mysettingsfile.js If you place a settings.js in the .node-red folder that will be used by default.

Continue reading

Storing Data in Node-Red Variables

Node-red nodes pass the msg object between nodes. However this object is replaced by the next msg object. So how do you store data between node calls? Node-Red provides three mechanisms: The context object -stores data for a node The Flow object – stores data for a flow The global object -stores data for the canvas

Continue reading

Using The Python MQTT-SN Client

There is a Python client included with the RSMB src files. You can download the RSMB ( Really small message broker here here. The client is written in python2.7 and consists of 4 files. The MQTTSN.py handles the packet packing and unpacking, and you don’t need to edit this.

Continue reading

Understanding IP Multicasting

What is IP Multicasting? -IP multicasting allows a host to send a single packet to thousands of hosts across a routed network i.e. The Internet. It is used mainly for audio (radio) and video distribution. In Networking a packet can be sent to: A single host –Unicast = (TCP and UDP) All hosts -Broadcast – (UDP only) A group of hosts – Multicast -(UDP only)

Continue reading

Checking Active MQTT Client Connections

This tutorial is in response to a question I received on the client connections tutorial page: I’ve been struggling to find a real client connection status tool, dashboard or anything which will show a list of my clients and their connection status. Clearly the broker via the low-level protocol mechanics maintain an MQTT keepalive table for each client — that’s how Last Will and Testament (LWT) is triggered internally by the broker. However how does one display such table? The problem is that you have no way of accessing the connections table on the broker so the only way is to

Continue reading