Where should a plugin store custom device data?

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
jbjalling
Posts: 19
Joined: Tuesday 09 February 2016 23:19
Target OS: Linux
Domoticz version:
Contact:

Where should a plugin store custom device data?

Post by jbjalling »

Hello,

I'm developing a hardware plugin, using the pTypeGeneralSwitch and pTypeGeneral device types. I would like to store a device serial number for each device, but where should I store this information? Is the solution to store it in a new table in the database, or does a table for this already exist?
I assume that DeviceStatus is not the correct place for this.
The serial number is a 64bit int.

Thanks in advance.
BR Jonas
User avatar
Dnpwwo
Posts: 819
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Where should a plugin store custom device data?

Post by Dnpwwo »

@jbjalling,

The Options field in DeviceStatus is probably the best place. The core Domoticz functionality doesn't do anything (that I know of) with it.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
jbjalling
Posts: 19
Joined: Tuesday 09 February 2016 23:19
Target OS: Linux
Domoticz version:
Contact:

Re: Where should a plugin store custom device data?

Post by jbjalling »

Excellent, thank you - that'll be the solution for now.

BR Jonas
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest