Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


peejayw

1841 posts

Uber Geek


#289072 10-Aug-2021 20:06
Send private message

I am trying to set up what I thought would be a simple automation, have an external light turn on when a door is opened but only during the night. The automation works ( door open, light on) but when I add in the conditions of Before Sunrise and After Sunset it fails. Checking the Step Details I get "Executed: August 10, 2021, 7:51:56 PM
Result:wanted_time_before: '2021-08-09T19:08:08.262777+00:00' result: false"

 

I have my timezone set to Pacific/Auckland and my location is set on the map so why is my before sunrise time showing as 19:08:05.371491+00:00?

 

Thanks.





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2
allio
885 posts

Ultimate Geek


  #2758184 10-Aug-2021 20:20
Send private message

Those particular conditions are notoriously finicky in automations, particularly when created in the GUI. This is either a bug, poor documentation, confusing logic, or some combination of all three. Read through this thread and have your head explode.

 

Short answer: scrap that condition entirely, and replace it with a requirement that the state of sun.sun is below_horizon.




peejayw

1841 posts

Uber Geek


  #2758188 10-Aug-2021 20:25
Send private message

Thanks for that, I changed it to sun.sun below_horizon and that worked fine.





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


peejayw

1841 posts

Uber Geek


  #2758201 10-Aug-2021 20:50
Send private message

Thanks again, read the thread and head duly exploded :-)





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.




hairy1
3332 posts

Uber Geek

ID Verified
Trusted
Lifetime subscriber

  #2758267 11-Aug-2021 00:17
Send private message

Yeah, nah. That's why I just do it all in Node Red!

Glad you got it sorted.




My views (except when I am looking out their windows) are not those of my employer.


Ge0rge
2052 posts

Uber Geek

Trusted
Lifetime subscriber

  #2758279 11-Aug-2021 05:45
Send private message

Another vote for Node Red here, it's well worth the initial learning curve.

Out of curiosity, how are you telling HA that the door is open?

peejayw

1841 posts

Uber Geek


  #2758302 11-Aug-2021 07:40
Send private message

I'm just using a Sonoff DW2 Wifi door/window sensor, $11.70 on Banggood.





 I'm supposed to respect my elders, but it's getting harder and harder for me to find one now.


mattenz
190 posts

Master Geek


  #2758313 11-Aug-2021 08:16
Send private message

The Home Assistant automations interface is under pretty rapid development, it's already good enough that for simple automations it's not really worth maintaining a separate system.

 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.
chevrolux
4962 posts

Uber Geek
Inactive user


  #2758318 11-Aug-2021 08:29
Send private message

Just another vote for Node-RED. Waaaaaaay better and much more powerful than the HA automations gui.

 

Plus the fact it can just be installed as a simple add-on, so really no extra work to maintain at all.


  #2758345 11-Aug-2021 08:43
Send private message

Can you guys explain exactly how you are using NR with HA? I am heavily invested in openHAB but am building a new house and planning to rebuild everything from scratch, and am seriously considering dropping OH and switching to NR only... just haven't quite figured out things like how to keep track of device/object/entity state. Are you still using HA but just pushing all events out to MQTT for NR to soak up and run its logic on? Then pushing commands back into HA via MQTT again?


hairy1
3332 posts

Uber Geek

ID Verified
Trusted
Lifetime subscriber

  #2758351 11-Aug-2021 09:06
Send private message

The Node Red add-on has native integration with all entities. When an entity changes state Node-Red is notified and kicks off automations. Really easy.

 

I am using a 433MHz switch below (which is recognised as a light). When someone presses it Node red picks up the state change and starts the automation.

 

 

 





My views (except when I am looking out their windows) are not those of my employer.


chevrolux
4962 posts

Uber Geek
Inactive user


  #2758353 11-Aug-2021 09:07
Send private message

If you install the Node-RED add-on, it makes NR available within the HA dashboard. It also installs the HA nodes pack in to NR. NR then syncs all your HA entities so you can just drop a "entity" block in to NR and do what you'd normally do with say an MQTT input. Then there's blocks for events, state queries, HA webhooks.

 

It does all that with the HA API, so no need to involve anything like MQTT, or manually keeping things sync'd up and all that. Extremely easy.

 

edit: @hairy1 beat me to it haha.

 

one more edit: I used to run only Node-RED. But nowadays, the Dashboard side of things just isn't on par with what HA can do (and yes I know you can customise the NR dash, but its a bit of work). Plus HA is sooooo easy to get working nowadays too.


  #2758356 11-Aug-2021 09:12
Send private message

Thanks both - that does sound pretty easy!


  #2758357 11-Aug-2021 09:13
Send private message

I am running everything in Docker containers here - in a swarm. So NodeRed is a separate stack to openHAB (and HA if I spun it up). I wonder how easy it is to get that nice tight integration in a separated environment like that. Any clues?


hairy1
3332 posts

Uber Geek

ID Verified
Trusted
Lifetime subscriber

  #2758365 11-Aug-2021 09:28
Send private message

@SumnerBoy Have you ever fired up HA? I think you would be pleasantly surprised how quick it would be to setup and add the Node Red add-on directly to it.





My views (except when I am looking out their windows) are not those of my employer.


  #2758368 11-Aug-2021 09:29
Send private message

I have a few times, it has never grabbed me enough to warrant migrating my extensive setup from openHAB.

 

And I have other uses for NodeRED so need a standalone instance. I guess I could run two instances if I really had to.


 1 | 2
View this topic in a long page with up to 500 replies per page Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.