Switching non-switchable devices

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
wwolkers
Member
Member
Posts: 273
Joined: Tue Sep 23, 2008 10:10 am
Location: Netherlands
Contact:

Switching non-switchable devices

Post by wwolkers »

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.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Switching non-switchable devices

Post by RDNZL »

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.
Regards, Ron.
Post Reply

Return to “DomotiGa Forum”