Hi guys,
being quite new to Node-RED and having made just a few very simple flows yet I’m currently struggling with making a more complex flow (I think it’s gonna be more complex) for my coffee maker.
It’s a Siemens EQ.9 and I’m using the “Home Connect alt” integration in HA. This provides a sensor “Current Program Progress” that delivers a percentage number during a running program.
My goal is to display the percentage progress on one of my Ulanzi pixel displays (with Awtrix firmware) during the making of the beverage.
I have no problem in building the JSON for the custom Awtrix app and sending it via an MQTT out node. But I have a few obstacles to tackle.
-
The machine also spits out a percentage progress when it’s just rinsing after being switched on or before switching off. So I need a way to only create my JSON and send it to the Ulanzi when another entity, “Active Program” does not contain “rinsing”. Because my current idea is to use the state change of the “program progress” to trigger the flow and then build the JSON with that progress value I need to learn how to start the flow with this trigger but then check for the “active program” name (current state node) and if it doesn’t contain “rinsing” use the percentage value I got from the node before to build the JSON for the Awtrix app. How can I access the payload of a node I had two steps back in the flow? Can I set variables to save that payload to use it later in the flow? Never done such a thing. Or am I thinking too complicated?
-
I need to restore the Ulanzi display to the state it had before I displayed the coffee making progress. The display could have been in auto transition mode or not. If it was not in auto transition mode I need to display the app that was displayed before. I cannot use an Awtrix notification (instead of an app) for the coffee progress because then I’d need to send a new notification every time the percentage value changes and sending a new notification with the same animated icon restarts the icon animation every time. So I need to send a custom app instead which does not restart the icon animation every time it’s sent to the Ulanzi. – And, of course, I want to use an animated coffee cup during the process.
So the first thing needs to be: send the custom app. Then: switch the Ulanzi to display this new app. This has to be done just once but after the app was first sent (otherwise we can’t switch to it; it won’t be there). For any further sendings of the app to the Ulanzi this switching to this app should not happen.
After the program progress reached 100% the app should stay for a few seconds on the display and then be removed from the Ulanzi.
After that the previous state of the AutoTransition switch should be restored and – if AutoTransition was off – the last app that was active should be switched to.
This all is far beyond my current Node-RED knowledge.
So I was hoping for any hints, tipps, thoughts, tutorials/videos I should study or even complete solutions.
Thanks so much in advance & cheers,
Stefan.