Skip to main content
16-Pearl
April 21, 2023
Question

Trigger logged property saving with a service

  • April 21, 2023
  • 1 reply
  • 1151 views

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.

1 reply

22-Sapphire I
April 21, 2023

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.

16-Pearl
April 21, 2023

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".