...I need a Little help:
http://xxx.xxx.xxx.xxx:8083/ZAutomation ... command/on
starts a lightscene.
But what is the Syntax to do the same in a custom JavaScript??
Uwe
javascript: syntax to call a LightScene
javascript: syntax to call a LightScene
Z-Way v2.0.1-rc18 on Raspberry Pi
Re: javascript: syntax to call a LightScene
There is an object 'controller' created in z-way-server javascript.
This object is passed to the module on creation, or you can use a global 'controller' variable.
To run the command for ex. on ZWayVDev_zway_7-0-37
or you can test in a browser with
There are a lot of good references in automation/modules folder of z-way server.
This object is passed to the module on creation, or you can use a global 'controller' variable.
To run the command for ex. on ZWayVDev_zway_7-0-37
Code: Select all
controller.devices.get('ZWayVDev_zway_7-0-37').performCommand('on');
Code: Select all
[your razberry ip]:8083/JS/Run/controller.devices.get('ZWayVDev_zway_7-0-37').performCommand('on')
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test
Re: javascript: syntax to call a LightScene
thx
the code works 
But how could I find the number of my Scene? I only find LightScene_44 for example. But I could not find ZWayVDev_zway_x-0-xx - where is the assignment for this?
Is the documentation on my Raspberry in ...Automation/modules?? I see only a readme.md there.
Uwe
Code: Select all
[your razberry ip]:8083/JS/Run/controller.devices.get('ZWayVDev_zway_7-0-37').performCommand('on')

But how could I find the number of my Scene? I only find LightScene_44 for example. But I could not find ZWayVDev_zway_x-0-xx - where is the assignment for this?
Is the documentation on my Raspberry in ...Automation/modules?? I see only a readme.md there.
Uwe
Z-Way v2.0.1-rc18 on Raspberry Pi
Re: javascript: syntax to call a LightScene
You can list all your virtual devices with /JS/Run/controller.devices, 'id' property is a name for device that you can use to perform command on.
Razberry B+ 2.0.1-rc25 on ZW500 + 15 devices / Razberry B 2.0.1-rc25 on ZW300 for test