Modify device state

Discussion of the extending and hacking of the various Indigo components.
SMUSEBY
Posts: 524
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Modify device state

Post by SMUSEBY »

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
User avatar
matt (support)
Site Admin
Posts: 21450
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Modify device state

Post by matt (support) »

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
SMUSEBY
Posts: 524
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Re: Modify device state

Post by SMUSEBY »

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.
User avatar
matt (support)
Site Admin
Posts: 21450
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Modify device state

Post by matt (support) »

Which plugin is it? The developer might be able to help you out.
Image
SMUSEBY
Posts: 524
Joined: Wed Sep 16, 2009 9:38 pm
Location: California

Re: Modify device state

Post by SMUSEBY »

Phidgets. I think he has abandoned it.
Post Reply

Return to “Hacking”