I started using node-red last week. I’m still learning and having some problems, but THIS would be really cool. I hope youre going to create some sort of tutorial.
your approach sounded really good and I kept thinking about it … have now implemented basic messaging via telegram … and works perfectly!
Thanks a lot for your inspiration !!
So I finally finished reinventing (better, if I say so myself) in Node Red the Xiaomi dimming mechanism here: Finally - a cheap WIRELESS switch that dims! Xiaomi Switch Gen1
You hold down the button and the light dims/brightens gracefully (it transitions over 0.5s intervals, with fibonacci increments/decrements). The longer you hold the button down, the faster it dims/brightens. It alternates dimming and brightening. If the light is off, and you hold the button, it will brighten slowly from 1%.
I have tested it with LIFX and Lightify bulbs (single and groups) with satisfactory results.
Are you going to post your flow?
Well I’m using a different fork. It should be backwards compatible with upstream, but in case it doesn’t work, that may be why. Are you able to access msg.data.attributes.* from a current state node (override ticked) in the normal fork?
You will need:
- https://flows.nodered.org/node/node-red-contrib-traffic
- https://flows.nodered.org/node/node-red-contrib-msg-router
- https://flows.nodered.org/node/node-red-contrib-counter
Flow: https://www.hastebin.com/lalahibimo.json
Also, I modified it a bit. It will pause just under two seconds before the light turns off in order to give you a little reaction time if you want to leave the light at the dimmest point. I also added some comments in case you’re interested. Also look at “IMPORTANT” if you have anything other than LIFX lights.
At the end of this flow I also plan to turn on a “Manual Override” input_boolean for each light. I use motion sensors and Flux and if anyone alters the brightness I want the lights to respect that until sunrise.
FYI, posted a short HowTo using a Telegram-bot in Node-Red:
Anyone notice some lag - 3-5 seconds for lights and such to go on after a motion is triggered? I’m using the Hue component to manage all my motions, bulbs and remotes. They’ve always been pretty instant, but since moving the community Node-Red from the notorious version, things have become more delayed.
I’m using the proper URL for the Home Assistant server in the configuration node field: http://hassio/homeassistant
Any ideas?
I had a similar experience, it was actually so slow that my wife rendered it unusable. This combined with some reliability problems moved me to appdaemon which in my case is a lot quicker to respond. I do like the way flows work in Node Red so if the speed at anytime improves I might give it a second try.
Thanks for the reply. I have so much in Node-Red, it would take a lot to move to something else.
Just curious why it’s so much slower. Anyway, hopeful future updates make things better!
Thanks again!
I have as well migrated all my automation onto Node-Red and have now much more complex flows than ever been possible with the HA automation.
I as well have noticed that sometimes the Node-red response is getting much slower. I have now scheduled a daily reboot of HA and the responses are as good as with the HA automation.
However, I don’t want to have the dependency between HA and Node-Red and currently testing to migrate to a dedicated Node-Red RPI. First trials are showing very quick responses, even faster than HA but I have to migrate all my flows before going for a final verdict.
Anybody else migrated Node-Red to a dedicated RPI ? … Andy advise/tips ?
Hi,
Im all so want to move node-red to a dedicated RPI.
Please let me know how it works for you if it get slower or stays fast.
I have it now running on dedicated RPI and it is much faster for my setup.
When I click my Xiaomi buttons the light gets on without any recognizable delay … even my wife realized that all the lights and sonos announcement (e.g. doorbell) is much faster.
My Hass.io is setup with Duckdns and I have to reference HA with my external https://mydomain.duckdns.org and all my Node-red traffic is currently passed through internet but I’m going to fix this shortly with the use of PIHole.
I have documented the entire Node-Red setup process and will share shortly as there are a few key things required to get it all working.
Thanks for this. Will wait for your documentation about howto use pihole to make node red local and not via internet
If you’re planning to share, can you make it via a new post to keep the thread and follow-up questions the focus of your setup. Thanks!
I have done such a thing and the speed of automations is awesome. Nothing really to fear from going down this route you could even export your flows directly in if you wanted but I started a fresh.
I’m still experimenting , but PIHole was not the solution due to the requirement of a local SSL … I keep trying
At moment I start to think it is not worth having the remote access directly for HA as it limits the internal usage/access dramatically.
Sounds like you just need to figure out how a dns call works and configure a local dns server…
Its an impressive setup. But how do you dare to relay so much on sd cards?
What nonsense.
Regular Snapshots are you’re best friend plus I use the more expensive multiple read sd cards designed for security cameras.