Skip to content
Advertisement

Tag: mqtt

Mqtt publish each element of an array using nodejs

I have a Mqtt client. I need it to publish each element with 5 seconds interval and receive each in on_message callback. But my code publishes each element with same no of times as array length. Example – My code Result – But I need – Answer Your set Interval and subscribe are in the forEach loop. This means you

Increment 2 variables in paralell Node-RED

I am trying to create a script that creates 2 variables, and increments each one of them based on a condition. The actualNetWeight is received in real-time with a MQTT connection to a server and the values are displayed in a line chart. When this value is over or equals to 0.500, I have to count that item entry as

Mosquitto and simple Paho JS Client

I am trying to get a simple mqtt broker set up and access it from a web page. I have had pretty much 0 luck. I’ve got mosquitto 2.0.14 downloaded and running. Here’s my configuration file: This generates the following log when I run mosquitto -c mosquitto_conf -v Here’s my html file, which I simply open in the browser. It

Advertisement