Skip to main content
16-Pearl
Apr 21, 2023 11:04 AM UTC
Question

Trigger logged property saving with a service

I use logged property functionality to save history change of the value, very fast to use.

On the advanced settings it's possible to set the "data change type" (and thresold if needed)

 

is it possible to disable the "automatic" logging, but trigger it with a service call?

 

It would really useful for example to save the value every 1 hour (timer subscription+service_call), but keep the current live value to change normally. This would save unnecessary data logging ... because for historycal analysis may be a point every 1 hour is enough.

3 replies

22-Sapphire I
Apr 21, 2023 1:48 PM UTC

If you wanted to keep history at only once an hour, you probably would set up a separate service to read your value once an hour and then write it to a stream vs. valuestream.

Not all that much harder to do.

Translate
17-Peridot
Apr 21, 2023 1:58 PM UTC

You could call service 'AddNumberValueStreamEntry' (or String,...) on your thing for your property which you have defined as not 'logged'.

While this does work, I am not sure if it should be done 😉 Maybe an own (Value)Stream may be more "offical".

Translate