Page 1 of 1

Log All States for specific Device(s)

PostPosted: Sat Dec 12, 2020 8:13 am
by autolog
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.

Re: Log All States for specific Device(s)

PostPosted: Sat Dec 12, 2020 1:16 pm
by matt (support)
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.

Re: Log All States for specific Device(s)

PostPosted: Wed Dec 23, 2020 5:23 pm
by matt (support)
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)