Huemagic - cache current value and restore it after some time

Hi :slight_smile:

how is it possible to get the current state of all wanted hue elements (in my situation, there are only hue light bulbs) and store these information in a cache?

get the status should be the msg.payload = any right? but how can i save these values to restore it later again?

i'm a voluntary firefighter and i did my pager a bit smart :wink: - the charger has a relay output. as soon as the pager is in the charger and trips, the relay output closes and starts an automation like (at night) turning on lights (red, 30% brightness) and turning them off after 30s for example.

now i want that the old values (which got cached) will be restored again after the light got switched off (because i had left the house :wink: ). how will this be possible?

Are you familiar with using context variables? Global, specific flow, etc? Sounds like you should just use a flow variable to hold the value or values until needed (again).

Check out...

thank you :slight_smile:

i'm completly new with node-red i'm glad to have understand how i have to set up huemagic :wink: - but i will see what you linked :wink:

Sure, as you learn and have more questions, just ask.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.