Via the XML-RPC api it's possible to switch on and off devices, which are not enabled for switching.
if I do a device.listswitch I get a list of devices which are switchable, that works ok.
example:
Vaatwasser On
Mechanische Ventilatie On
Lampjes buffetkast Off
If I try switching one of these with device.setdevice, no problem also.
but I am also able to do a device.setdevice on any of my other devices, even though they are not in the list of switchable devices.
I'm assuming this is not intentional?
Should I see if I can fix up a patch for this one?
W.
Switching non-switchable devices
Moderator: RDNZL
- RDNZL
- Forum Moderator
- Posts: 1008
- Joined: Sun Sep 24, 2006 1:45 pm
- Location: Dordrecht, The Netherlands
- Contact:
Re: Switching non-switchable devices
We should create a sub Devices.DeviceIsControlable() returning boolean TRUE if a device is switchable or dimable,
and call that early in Devices.SetDevice, return with FALSE if they aren't dim/switchable, let Devices.Setdevice() return FALSE too in that case so XMLRPC knows it failed.
and call that early in Devices.SetDevice, return with FALSE if they aren't dim/switchable, let Devices.Setdevice() return FALSE too in that case so XMLRPC knows it failed.
Regards, Ron.