Nodered: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 78: | Line 78: | ||
return msg; | return msg; | ||
} | } | ||
msg.topic | |||
{"app":"DefaultMediaReceiver","type":"MEDIA","media":{"url":"https: //icecast-qmusicnl-cdp.triple-it.nl/Qmusic_nl_nonstop_high.aac","streamType":"LIVE"}} |
Revision as of 09:37, 6 January 2024
influxdb
127.0.0.1:8086
chronograph
http://127.0.0.1:8888/sources/1/dashboards/2?refresh=Paused&lower=now%28%29%20-%2024h
nodered
localhost:1880
Manage Palette
node-red-contrib-castv2 | 4.2.2 | ||
node-red-contrib-googlehome-actions-v2 | 0.0.7 | ||
node-red-contrib-huemagic-fork | 4.2.5 | ||
node-red-contrib-influxdb | 0.6.1 |
https://flows.nodered.org/node/node-red-contrib-googlehome-actions-v2
https://actions-on-google.github.io/actions-on-google-nodejs/2.12.0/index.html
Capture temperature from HUE function
On Message
var temperatur = msg.payload.celsius; msg.payload = {} msg.payload.temp = temperatur; return msg;
When movement is detected, turn on the light and make it red
On Message
var moved = msg.payload.motion; msg.payload = {} if (moved) { msg.payload.on = true; msg.payload.color = "red"; } else { msg.payload.on = true; msg.payload.color = "green"; } return msg;
After 20:00 or before 1:00 at night use a long press to turn off all lights
On Message
var pressed = msg.payload.button; msg.payload = {} var date = new Date(); var hour = date.getHours(); if (hour > 20 || hour < 1) { msg.payload.on = false; return msg; }
msg.topic {"app":"DefaultMediaReceiver","type":"MEDIA","media":{"url":"https: //icecast-qmusicnl-cdp.triple-it.nl/Qmusic_nl_nonstop_high.aac","streamType":"LIVE"}}