-
-
Notifications
You must be signed in to change notification settings - Fork 20
node red
To test VSCP with node-red you can use the VSCP demo server located at demo.vscp.org. This server has a MQTT broker active for public use at port 1883 which can be accessed with user="vscp" and password="secret". Also this server have websocket support on port 9001. The demo server is fully described here.
This is a simple flow that display the temperature in our kitchen. The temperature is displayed in a gauge as well as in a diagram and looks like this
VSCP event have date and time set in UTC to be universally usable. To get local time you have to convert this UTC time to a local time. But don't despair the conversion is easy.
Add a function node in the flow from the MQTT broker with the following content
var utcDate = msg.payload.vscpDateTime;
msg.payload.localtime = new Date(utcDate);
return msg;
you will now have the localtime in msg.payload.localtime and can
The VSCP Project (https://www.vscp.org) - Copyright © 2000-2024 Åke Hedman, the VSCP Project