Modify device state

Posted on
Sun Jan 23, 2022 12:38 pm
SMUSEBY offline
Posts: 512
Joined: Sep 16, 2009
Location: California

Modify device state

I have an RFID key fob reader, which has a Custom State, 'currentTag'. I need to delete the value to avoid random failures in which my door opens (with the help of a strong wind).
Is it possible to use python to modify a Custom State of a device? If so, given my very limited python expertise, could someone please help with the code?
Thanks,
Bob

Posted on
Sun Jan 23, 2022 2:16 pm
matt (support) offline
Site Admin
User avatar
Posts: 21434
Joined: Jan 27, 2003
Location: Texas

Re: Modify device state

Updating of device states via Python API is restricted to the plugin type that defines the device (in your case probably the RFID plugin).

If this is something you just need to do once, then you could make a backup of Indigo's database file (just for safety) then open it in a raw text editor and make the change manually. If it something you need to happen programmatically from Indigo, then it will require a modification to the plugin to add a new action that resets the state. Not terribly difficult to do, but it does require some Python and XML knowledge.

Image

Posted on
Sun Jan 23, 2022 5:18 pm
SMUSEBY offline
Posts: 512
Joined: Sep 16, 2009
Location: California

Re: Modify device state

The custom state requires resetting after each entry, and with virtually no python, and zero XML, I guess I'm stuck.
Thanks for helping me avoid fruitless rabbit holes.

Posted on
Sun Jan 23, 2022 6:25 pm
matt (support) offline
Site Admin
User avatar
Posts: 21434
Joined: Jan 27, 2003
Location: Texas

Re: Modify device state

Which plugin is it? The developer might be able to help you out.

Image

Posted on
Sun Jan 23, 2022 6:50 pm
SMUSEBY offline
Posts: 512
Joined: Sep 16, 2009
Location: California

Re: Modify device state

Phidgets. I think he has abandoned it.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests