PLCHome / node-red-contrib-velux

Provides nodes to talk to Velux® KLF-200 io-homecontrol® Gateway
9 stars 2 forks source link

Howto move a velux window? #3

Closed WoodyAtHome closed 5 years ago

WoodyAtHome commented 5 years ago

Hi,

I wrote an own program to move my velux windows via KLF200-API (V0.2.0.0.71). Everything worked and I could move the windows. So I'm sure to have right network and password settings.

Now I started with node red (I'm an absolute JS and Node Red beginner), I tested some other actors, everything fine.

But today I started to try to move the window by node red. I installed the node-red-contrib-velux package, but I don't get the idea what to do.

I tried this (of course with a correct password):

[{"id":"64dd8045.6c8e6","type":"Velux Nodes","z":"e112b063.e8f41","name":"Node 1","datasource":"1b1874f7.e936b3","index":"1","nodevalue":"TARGET","topic":"","x":403.5,"y":853,"wires":[["23f2ae32.0cbcb2"]]},{"id":"b652f1f0.6f0fe","type":"inject","z":"e112b063.e8f41","name":"","topic":"","payload":"5000","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":116.5,"y":852,"wires":[["64dd8045.6c8e6"]]},{"id":"23f2ae32.0cbcb2","type":"debug","z":"e112b063.e8f41","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":685.5,"y":854,"wires":[]},{"id":"1b1874f7.e936b3","type":"velux-connection","z":"","host":"192.168.178.21","password":"xxxx","monitor":"POLL300000"}]

Can anybody provide an example how to move a window (e.g. to pos 5000)?

Thanks!

WoodyAtHome commented 5 years ago

Ok, now I got it. This works for me with 3 windows:

[{"id":"3e43705b.eff5e","type":"Velux Nodes","z":"b8e4019f.23fb28","name":"check status","datasource":"77f3d9e8.26dd08","index":"-1","nodevalue":"CURRENTPOSITION","topic":"veluxfenster","x":438.5,"y":131,"wires":[["e87ff804.55ad5"]]},{"id":"e87ff804.55ad5","type":"debug","z":"b8e4019f.23fb28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":631.5,"y":131,"wires":[]},{"id":"a9916732.92ad78","type":"ui_numeric","z":"b8e4019f.23fb28","name":"win south center","label":"Fenster Süd Mitte","tooltip":"100=zu, 0=auf","group":"416f9119.aabec8","order":10,"width":0,"height":0,"passthru":false,"topic":"velux:write:id:0","format":"{{value}}","min":0,"max":"100","step":"10","x":174.5,"y":81,"wires":[["3e43705b.eff5e"]]},{"id":"1f90269a.0b4a71","type":"ui_numeric","z":"b8e4019f.23fb28","name":"win north center","label":"Fenster Nord Mitte","tooltip":"100=zu, 0=auf","group":"416f9119.aabec8","order":10,"width":0,"height":0,"passthru":false,"topic":"velux:write:id:1","format":"{{value}}","min":0,"max":"100","step":"10","x":163,"y":126,"wires":[["3e43705b.eff5e"]]},{"id":"1fb86257.7436be","type":"ui_numeric","z":"b8e4019f.23fb28","name":"win south east","label":"Fenster Süd Ost","tooltip":"100=zu, 0=auf","group":"416f9119.aabec8","order":10,"width":0,"height":0,"passthru":false,"topic":"velux:write:id:2","format":"{{value}}","min":0,"max":"100","step":"10","x":164,"y":168,"wires":[["3e43705b.eff5e"]]},{"id":"77f3d9e8.26dd08","type":"velux-connection","z":"","host":"192.168.178.21","password":"X","monitor":"POLL60000"},{"id":"416f9119.aabec8","type":"ui_group","z":"","name":"Wetter","tab":"8018103e.20af7","disp":true,"width":"6","collapse":true},{"id":"8018103e.20af7","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]