I purchased a Hubitat last year and setup some lights. Nothing fancy and I didn't play with it anymore afterwards. I created a simple lighting to turn them on at sunset and then reverse it at sunrise.
Does it work? Yes and no.
I suffer from power cuts constantly. In summer, it can be at least twice a week. This is creating constant problems because when the power goes out, and it comes back, the lights turn on in the middle of the day. It seems afterwards this creates some issue with the rule since the status is changed.
Is there a quick way to solve this? Maybe a rule that checks if they are on the day and if yes, turn them off again?
But here comes the biggest problem. After a short brief power loss, lets say 10 minutes, Hubitat loses its time. I'm sure this was not true when I purchased it but lately its happening. I check my Hubitat the time is off by several hours, even when the power loss was only a few minutes.
I'm actually surprised there is no way to configure the time manually on the device. The only option I see is Sync with Browser. Should the device not sync the time once it connects to the Internet? It seems my device is not doing that at all. Otherwise I don't understand why the hours would off by that much time for a few minutes.
The problem is hubitat tries to update the time as it reboots and your modem probably hasn't reconnected to the internet to allow it to do it. The hub then defaults to a standard time which throws your time out for any rules you have. I'm sure someone has an app that can schedule a sync with a NTP server to update the time periodically maybe.
Save your Hub before it gets corrupted or bricked, because of not being shut down correctly as you say it happen often (one time is really too many times).
And invest into a (*)Battery Back-Up System. This way if the power goes out, the hub will not lose power.
There are also a few apps for the HE hub that will tell the hub to shut down correctly because of the loss of power when it's connected to a Battery Back-Up System.
Definitely put the hub on a UPS. There are a few threads on here talking about options. I use this simple/cheap one with a bettery. It works perfectly.
Also regarding hub start-up, you can create a little rule that gets executed when the hub starts up, to check a few things like mode and then sets lights etc accordingly. It's a bit hidden, but you will find it (systemStart) under Location I recall in custom actions.
I did not see this answer. The cause is the default mode of the devices on power restore. This is typical (but not always true) for bulbs. Without changing lights, you are stuck with the default settings. A rule could be set up in RM to solve this. A matter of fact, there are numerous ways to address you desires. One example:
Set my phone up as a presence sensor
Set up HSM for Home / Away based on the phone status.
Create a rule with the following:
Trigger: HSM of HOME AND between two times AND a seldom used switch turns ON.
Actions: Turn off all the switches (lights).
(The use of HSM is optional. The only difference is if you are home, there may be a reason for the light to turn on.)
Yes, step 2 was to put it behind the UPS but I still find it strange that it will not try to update its time setting from an NTP server time when it is connected to the Internet. That would be pretty easy to implement.
Either way, I guess UPS will solve that issue.
So if I create a rule when it boots up, it will try to apply all the rules it missed before?
Actually this is preferred (I think). The lights turning on by default. The reason I say this is that if power is lost at night, and it comes back, they will turn on. If it was the opposite, you would be in the dark. The lights are for outside, so having them turned on the day is still preferable then having them not turned at night.
I guess bulbs by default are set to go ON just like water valves by default would fail in the locked position and not open. I have no idea if that is true, as these are my first zigbee bulbs.
HSM is unknown on my Hubitat. I have no idea what HSM is, sorry, I will check the documentation. Like I said, I'm very, very new to the system and probably don't know how anything works yet.
That's not the only alternative, though. Some bulbs/devices have the option to return to their previous state.
I think the main benefit of having a bulb always switch on after a power cut, would be if that bulb is also connected to a physical switch, and you want the bulb to come on every time the switch is flicked on, like a normal bulb.
As explained above, time synchronization is built in. It only runs at reboot. So if there are no time servers found upon reboot, like your modem or router taking longer to boot than Hubitat, you will get this effect.
It could also happen if (like my ISP) the internet goes out with utility power. My provider does not have battery backup for their big neighborhood "routers" if you will. So their equipment goes offline the same as everyone else in a power outage, and it takes a bit to reboot all of their stuff. I have a generator so I don't lose power, but I cannot connect to the internet due to their lack of battery backup.
The larger issue is the unexpected power losses. You are headed for disaster if you don't find a way to prevent those. I am surprised you haven't had more issues until now with that frequency of power cuts.
I have 1 - C4 hub, 2 - C5 hubs, 1 - Lutron, 1 - Phillip's Hue and an 8 port Switch with a couple step down to 5V converters all connected. I was power testing the setup the other day and let it run for 7 hours which was probably close to 2 lights on but still showing 3, I forgot to check up again until 9 hours had passed. At this point I had 2 lights left on the battery status of the 4.
Very few smart bulbs have the ability for the user to select what happens when they receive power. Recent Philips Hue bulbs, paired to the Hue bridge directly, got a firmware update over the past few months that allow the user to choose the behavior in the Hue app on your phone.
I am not aware of any Zigbee bulbs, when paired directly to the Hubitat Hub, that have this feature.
A few Z-Wave bulbs might have this feature.
If you let us know what type of bulbs you have (brand and model), the community will help to explain special features, if any are available.