Log All States for specific Device(s)

Posted on
Sat Dec 12, 2020 8:13 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Log All States for specific Device(s)

I have the SQL Logger configured to log Changed States Only.

This is obviously a good idea for the majority of devices.

However, it would be useful to be able select specific devices to log all states on any change of state.

My use case is that the WeatherLink plugin is updating its weather states and I want to be able to export the data over a fixed time period and to be able to graph it. To be able to do this I need all the states to be present and not Null.

Is it possible to do this in some way?
If not can it be added to the feature request list - thanks. :)

I can obviously use the workaround of logging all data but that is not ideal.

Posted on
Sat Dec 12, 2020 1:16 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Log All States for specific Device(s)

Hi Jon,

That isn't currently possible, but we do have some customization available via dev.sharedProps that let's you define device states that are ignored and never cause a new row to be inserted. That isn't what you want, but I think we can add a similar override for your use case. We'll look into it.

Image

Posted on
Wed Dec 23, 2020 5:23 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Log All States for specific Device(s)

I know you already know about this one, but Indigo 7.5 is now available and includes support for a device level sqlLoggerForceStoreAllStates shared property that can be used to force all states to be written for table updates, overriding the Store only changed states setting on a device level.

To use install the Global Property Manager plugin to define a new key (sqlLoggerForceStoreAllStates) setting the value to True, or to change via a plugin/script:

Code: Select all
sharedProps = dev.sharedProps
sharedProps["sqlLoggerForceStoreAllStates"] = True
dev.replaceSharedPropsOnServer(sharedProps)

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest