create on/off switch with type = security

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
davidevans
Posts: 3
Joined: Thursday 15 June 2017 18:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 5877
Contact:

create on/off switch with type = security

Post by davidevans »

There are some X10 devices on my system that have been detected as type "security" but I can't find a way to manually create something similar.

I want to create a virtual on/off switch that behaves in the same way as these real X10 magnetic thingies. I have tried selecting options for editing switch types in the web tool but without success. Neither have I managed to find a way of creating (any type of) virtual on/off switch using the API.

I have a development Domoticz deployment where I've played with the database to set DeviceStatus.type of an "ordinary" switch to be the same value (32) as a "security" switch. This changed the widget but didn't let me modify the state by clicking it ... it pops up a little box saying "Switching Alarm" but the widget icon and title don't change. Even if I could make somthing work with this backdoor approach I wouldn't want to do it for real unless I got confirmation it was OK from someone who knows what they're talking about :)

If it is possible to manually create such a device I would be grateful for some guidance as to how.

If it is not possible, here is why I am trying to create one - I would be grateful for any alternates you could suggest ...

I have a device where the normal state is "on" and the exception state is "off". I want to show this on the web dashboard but all of the device widgets I have looked at (other than X10 security) seem to associate the exception graphic with a positive word like "on" which would be confusing for my device. Oh, and I want to be a able to change the virtual device state by by manually clicking the web widget, from within a lua sctipt and via the API.

Thanks in advance

David
davidevans
Posts: 3
Joined: Thursday 15 June 2017 18:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 5877
Contact:

Re: create on/off switch with type = security

Post by davidevans »

I've found a simple way to do what I need.

There is published documentation (search for "domoticz custom icons for webinterface") which I read earlier but misunderstood. This procedure allows you to add an arbitrary extra line item to the drop-down of icons available for a simple on/off switch. I now have a simple virtual on/off switch with a friendly ON icon and a shouty OFF icon.

I'd still be interested to know whether or not it is possible to ceate a virtual on/off switch using the API - this was one of the options I explored earlier.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest