[New Node] node-red-contrib-drayton-wiser - for monitoring and controlling Wiser heating

Yes, I finally got round to actually publishing a node for this after my previous node.js module being around for ages on GitHub.

node-red-contrib-drayton-wiser (node) - Node-RED (nodered.org)

The new node uses the latest v2 API as well. This is an early release but it looks like the monitoring and event outputs all work as expected. At present, you can only set room temperature manual overrides but things like boosts and schedule changes will come eventually when time permits. Pester me if you need something specific :slight_smile:

I've only implemented heating at present. But I do now have a smartplug so that will also get implemented at some point.

Sorry, I should have added an example flow to the library but forgot so posing here:

[{"id":"56c2677b616156c7","type":"tab","label":"Wiser Tests","disabled":false,"info":"Tests the wiser and wiser-listen nodes.\r\n\r\nAll commands and listeners listed.","env":[]},{"id":"8865c3b74599c2be","type":"wiser","z":"56c2677b616156c7","name":"","x":230,"y":160,"wires":[["38b7111a229d10d8"]]},{"id":"9ce7a16e913a7aa1","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"success/get-all","x":770,"y":460,"wires":[["ed8e251ab2d3e664"]]},{"id":"ed8e251ab2d3e664","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":460,"wires":[]},{"id":"a584f83781e4b2d4","type":"wiser-listen","z":"56c2677b616156c7","name":"","eventname":"error/**","x":750,"y":760,"wires":[["adea1963686af340"]]},{"id":"adea1963686af340","type":"debug","z":"56c2677b616156c7","name":"error","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1030,"y":760,"wires":[]},{"id":"483f86cecd8ad4e2","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"debug","x":750,"y":200,"wires":[["74f05af675793bb2"]]},{"id":"74f05af675793bb2","type":"debug","z":"56c2677b616156c7","d":true,"name":"debug","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":200,"wires":[]},{"id":"49c9a59ee5a0dfd1","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"success/**","x":760,"y":540,"wires":[["ca65e2a3e48cef5a"]]},{"id":"ca65e2a3e48cef5a","type":"debug","z":"56c2677b616156c7","d":true,"name":"success","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1040,"y":540,"wires":[]},{"id":"14aebd51922d0485","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"**","x":730,"y":940,"wires":[["e4138d97afb6568e"]]},{"id":"e4138d97afb6568e","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":940,"wires":[]},{"id":"8dfcf7a2993ceb0a","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"success/room-map","x":790,"y":500,"wires":[["2cfd7d2da7f1c88e"]]},{"id":"2cfd7d2da7f1c88e","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":500,"wires":[]},{"id":"1ad642970f9bfce5","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"monitor-interval-removed","x":810,"y":360,"wires":[["e9942bd734261787"]]},{"id":"e9942bd734261787","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":360,"wires":[]},{"id":"92f6061750aa4519","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"monitor-interval","x":780,"y":400,"wires":[["9095e0ca25aade28"]]},{"id":"9095e0ca25aade28","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":400,"wires":[]},{"id":"7b4d27e6eb46147e","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"changes","x":750,"y":160,"wires":[["8725f428f6aa4805"]]},{"id":"8725f428f6aa4805","type":"debug","z":"56c2677b616156c7","d":true,"name":"changes","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1040,"y":160,"wires":[]},{"id":"38b7111a229d10d8","type":"debug","z":"56c2677b616156c7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":160,"wires":[]},{"id":"2095f5c1b0209c1e","type":"inject","z":"56c2677b616156c7","name":"Battery Levels","props":[{"p":"topic","vt":"str"},{"p":"request","v":"battery","vt":"str"},{"p":"somethingElse","v":"This is passed through to the output message","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Battery Levels","payloadType":"str","x":210,"y":260,"wires":[["1ba5d41fad8c0cb2"]]},{"id":"4ec920d45ab69ad9","type":"inject","z":"56c2677b616156c7","name":"Room Temperatures","props":[{"p":"topic","vt":"str"},{"p":"request","v":"temps","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Room Temperatures","x":190,"y":440,"wires":[["b8688eab2ef3599d"]]},{"id":"60fc5888af197e1e","type":"inject","z":"56c2677b616156c7","name":"List Available Events","props":[{"p":"topic","vt":"str"},{"p":"request","v":"event-names","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"List Available Events","payloadType":"str","x":190,"y":1020,"wires":[["0e8bc1adc29a353c"]]},{"id":"784edaef6fb7e7d3","type":"inject","z":"56c2677b616156c7","name":"List Available Requests","props":[{"p":"topic","vt":"str"},{"p":"request","v":"request-names","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"List Available Requests","payloadType":"str","x":180,"y":1060,"wires":[["0e8bc1adc29a353c"]]},{"id":"b4934fb94bc8363a","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"error/gateway-unreachable","x":810,"y":680,"wires":[["d87082f9cfd42173"]]},{"id":"d87082f9cfd42173","type":"debug","z":"56c2677b616156c7","d":true,"name":"error","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":680,"wires":[]},{"id":"aacaafd0ec7a036d","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"error/controller-unreachable","x":810,"y":720,"wires":[["e1babe7ecbcab512"]]},{"id":"e1babe7ecbcab512","type":"debug","z":"56c2677b616156c7","d":true,"name":"error","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":720,"wires":[]},{"id":"fa53fb8242144342","type":"wiser-listen","z":"56c2677b616156c7","name":"","eventname":"cloudConnection","x":780,"y":240,"wires":[["46fad279a1fca1cc"]]},{"id":"46fad279a1fca1cc","type":"debug","z":"56c2677b616156c7","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":240,"wires":[]},{"id":"07df730997bb90cc","type":"inject","z":"56c2677b616156c7","name":"Latest Data","props":[{"p":"topic","vt":"str"},{"p":"request","v":"latest","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"All Data","x":210,"y":840,"wires":[["92411600017bc67e"]]},{"id":"66a42c569085c948","type":"inject","z":"56c2677b616156c7","name":"Dead Batteries","props":[{"p":"topic","vt":"str"},{"p":"request","v":"battery","vt":"str"},{"p":"requestDetail","v":"Dead","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Battery Levels","x":200,"y":300,"wires":[["1ba5d41fad8c0cb2"]]},{"id":"904f54c6f589fcf0","type":"inject","z":"56c2677b616156c7","name":"Low Batteries","props":[{"p":"topic","vt":"str"},{"p":"request","v":"battery","vt":"str"},{"p":"requestDetail","v":"Low","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Battery Levels","x":210,"y":340,"wires":[["1ba5d41fad8c0cb2"]]},{"id":"1a050627aec7fcff","type":"inject","z":"56c2677b616156c7","name":"Dead & Low Batteries","props":[{"p":"topic","vt":"str"},{"p":"request","v":"battery","vt":"str"},{"p":"requestDetail","v":"[\"Dead\", \"Low\"]","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Battery Levels","payloadType":"str","x":180,"y":380,"wires":[["1ba5d41fad8c0cb2"]]},{"id":"d21218f6a6fcb797","type":"inject","z":"56c2677b616156c7","name":"Room Temperatures <18","props":[{"p":"topic","vt":"str"},{"p":"request","v":"temps","vt":"str"},{"p":"requestDetail","v":"[\"<\",18]","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Room Temperatures <18","payloadType":"str","x":170,"y":480,"wires":[["b8688eab2ef3599d"]]},{"id":"6fce96b20a9b547e","type":"wiser-listen","z":"56c2677b616156c7","name":"","eventname":"online","x":750,"y":280,"wires":[["bc89abee162171d1"]]},{"id":"bc89abee162171d1","type":"debug","z":"56c2677b616156c7","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":280,"wires":[]},{"id":"f365aaef54e01378","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"monitor-intervalmonitor-interval","x":820,"y":320,"wires":[["b6f5b6c087e05a15"]]},{"id":"b6f5b6c087e05a15","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":320,"wires":[]},{"id":"ecd375b467c3d1b1","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"error/get-all","x":760,"y":600,"wires":[["aaabb060730c7066"]]},{"id":"aaabb060730c7066","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":600,"wires":[]},{"id":"f53a9ec1ca92a66e","type":"wiser-listen","z":"56c2677b616156c7","d":true,"name":"","eventname":"error/room-map","x":780,"y":640,"wires":[["88a64d1153b2eee4"]]},{"id":"88a64d1153b2eee4","type":"debug","z":"56c2677b616156c7","d":true,"name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":640,"wires":[]},{"id":"2221c1bfdf777583","type":"inject","z":"56c2677b616156c7","name":"Is Online?","props":[{"p":"topic","vt":"str"},{"p":"request","v":"isonline","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Is Online?","x":220,"y":800,"wires":[["92411600017bc67e"]]},{"id":"77446f2be91d31bf","type":"inject","z":"56c2677b616156c7","name":"Room Temperatures >18","props":[{"p":"topic","vt":"str"},{"p":"request","v":"temps","vt":"str"},{"p":"requestDetail","v":"[\">\",18]","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Room Temperatures >18","x":170,"y":520,"wires":[["b8688eab2ef3599d"]]},{"id":"0e8bc1adc29a353c","type":"link out","z":"56c2677b616156c7","name":"","mode":"link","links":["9b2dcc64a34519c3"],"x":355,"y":1040,"wires":[]},{"id":"92411600017bc67e","type":"link out","z":"56c2677b616156c7","name":"","mode":"link","links":["9b2dcc64a34519c3"],"x":355,"y":760,"wires":[]},{"id":"b8688eab2ef3599d","type":"link out","z":"56c2677b616156c7","name":"","mode":"link","links":["9b2dcc64a34519c3"],"x":355,"y":480,"wires":[]},{"id":"1ba5d41fad8c0cb2","type":"link out","z":"56c2677b616156c7","name":"","mode":"link","links":["9b2dcc64a34519c3"],"x":355,"y":320,"wires":[]},{"id":"9b2dcc64a34519c3","type":"link in","z":"56c2677b616156c7","name":"To Wiser","links":["0e8bc1adc29a353c","1ba5d41fad8c0cb2","92411600017bc67e","b8688eab2ef3599d","c7a81ac08f1a45b3","69cd143b34347523","fe0c51208f079d88"],"x":135,"y":160,"wires":[["8865c3b74599c2be"]]},{"id":"60f7359cea088aa4","type":"inject","z":"56c2677b616156c7","name":"Offline Devices","props":[{"p":"topic","vt":"str"},{"p":"request","v":"offline-devices","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Offline Devices","x":200,"y":580,"wires":[["69cd143b34347523"]]},{"id":"12fae2ef1c50359f","type":"inject","z":"56c2677b616156c7","name":"System State","props":[{"p":"topic","vt":"str"},{"p":"request","v":"system-state","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"System State","x":210,"y":720,"wires":[["92411600017bc67e"]]},{"id":"2df668dfb0b84ac1","type":"inject","z":"56c2677b616156c7","name":"Set Office Temp (by room id)","props":[{"p":"topic","vt":"str"},{"p":"request","v":"set-room","vt":"str"},{"p":"requestDetail","v":"{\"room\":8,\"temp\":19}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Set Office Temp","x":160,"y":1160,"wires":[["c7a81ac08f1a45b3"]]},{"id":"c7a81ac08f1a45b3","type":"link out","z":"56c2677b616156c7","name":"","mode":"link","links":["9b2dcc64a34519c3"],"x":355,"y":1200,"wires":[]},{"id":"ac774c55f03343a2","type":"inject","z":"56c2677b616156c7","name":"Network","props":[{"p":"topic","vt":"str"},{"p":"request","v":"get-network","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Network","x":220,"y":760,"wires":[["92411600017bc67e"]]},{"id":"b4eeaedbcff5fe39","type":"wiser-listen","z":"56c2677b616156c7","name":"","eventname":"set/**","x":740,"y":840,"wires":[["e459340d59e717dd"]]},{"id":"e459340d59e717dd","type":"debug","z":"56c2677b616156c7","name":"set","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":840,"wires":[]},{"id":"1d2612a0b89ee4f6","type":"inject","z":"56c2677b616156c7","name":"Devices Last Seen","props":[{"p":"topic","vt":"str"},{"p":"request","v":"devices-last-seen","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Devices Last Seen","x":190,"y":620,"wires":[["69cd143b34347523"]]},{"id":"69cd143b34347523","type":"link out","z":"56c2677b616156c7","name":"","mode":"link","links":["9b2dcc64a34519c3"],"x":355,"y":600,"wires":[]},{"id":"033a702ad6fd0580","type":"inject","z":"56c2677b616156c7","name":"Devices->Room Map","props":[{"p":"topic","vt":"str"},{"p":"request","v":"device-roommap","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Devices->Room Map","x":180,"y":660,"wires":[["69cd143b34347523"]]},{"id":"4249815ddad2ff53","type":"inject","z":"56c2677b616156c7","name":"Set Office Temp (by room name)","props":[{"p":"topic","vt":"str"},{"p":"request","v":"set-room","vt":"str"},{"p":"requestDetail","v":"{\"room\":\"Office\",\"temp\":18}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Set Office Temp","x":170,"y":1200,"wires":[["c7a81ac08f1a45b3"]]},{"id":"ad0f0b417c1eb19f","type":"inject","z":"56c2677b616156c7","name":"Set Libby Bed Temp","props":[{"p":"topic","vt":"str"},{"p":"request","v":"set-room","vt":"str"},{"p":"requestDetail","v":"{\"room\":14,\"temp\":20}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Set Libby Bed Temp","x":190,"y":1240,"wires":[["c7a81ac08f1a45b3"]]},{"id":"bbeafe1a049b66a4","type":"inject","z":"56c2677b616156c7","name":"List Schedules","props":[{"p":"topic","vt":"str"},{"p":"request","v":"schedules","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"List Schedules","x":200,"y":920,"wires":[["fe0c51208f079d88"]]},{"id":"fe0c51208f079d88","type":"link out","z":"56c2677b616156c7","name":"","mode":"link","links":["9b2dcc64a34519c3"],"x":355,"y":940,"wires":[]},{"id":"cd4ad9f5615ee2b3","type":"inject","z":"56c2677b616156c7","name":"List Schedule 1 (by Sched ID)","props":[{"p":"topic","vt":"str"},{"p":"request","v":"schedules","vt":"str"},{"p":"requestDetail","v":"1","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"List Schedule 1","x":160,"y":960,"wires":[["fe0c51208f079d88"]]}]

Should show you most of the events and commands available so far.

You will need to find the controller details and get the controller token. Instructions are given on how to do that.

Check the changelog for what has been implemented and what still needs to be done.

Enjoy! As always, feedback welcome.

1 Like