I don’t have any issues with Node-Red, been using it for a few months and it’s a fantastic product.
My question is really based around efficiency when creating nodes…
Should I be careful when writing a flow that polls (say) a battery powered Zigbee temp sensor ? Sometimes it’s easy to use an inject node to read values every minute or so. Other times a poll node which reports on a state change is more convenient.
Does frequent polling of a device using inject require more of the senors battery as it keeps waking it up ? Does a state change poll use less ? and the same question regarding the volume of network traffic generated and the overall load increase on the HA server.
Any pointers appreciated
Polling is always a bad idea. There is no good reason to use polling.
no… it’s not more convenient. You have a state and event based home automation platform right in front of you. It’s not more convenient.
I believe it doesn’t since Home Assistant is state based so you are just asking Home Assistant, not the device.
Think of it as you are the kid in the back seat “are we there yet”, “are we there yet”. The car doesn’t mind, but your parents (HA) goes crazy.
polling is wasteful and never a good idea. It can never outperform a state or event based system.
Yes it will. Remember the kid in the back seat…
Use HA as it was deigned to be used, with events and states.
If you can’t get an automation working with events or states then post here for help, don’t go for polling.
Thanks for the prompt and detailed reply.
That explains it all perfectly.
Many Thanks