-
-
Notifications
You must be signed in to change notification settings - Fork 20
node red
Åke Hedman edited this page Aug 17, 2021
·
21 revisions
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.
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