Home Assistant : Q&A, Tips & Tricks, Your Configs

ebendl

Expert Member
Joined
Sep 27, 2004
Messages
4,893
I have a question regarding a Sonoff Basic R2 I have.

It's currently set up to control the driveway lights. I have set it up using automatic scenes- lights on at sundown, lights off at dawn. I have also set it to remember the last power state should a power failure occur. So far, so good, it's working brilliantly.

But now, there is one instance that still requires manual intervention and I would like to know how to get around it. It sometimes happen that we get load shedding during the transition period for dusk / dawn. So, for example, power would go out at say, 16h00 and only come back at 18h00, however, sundown for my location is 17h45- right in the middle of the blackout- obviously the Sonoff doesn't switch due to no power. So in this instance, the lights were off, but when power comes on, the Sonoff doesn't automatically toggle the lights and I would have to do it manually.

Is there any way around this?

I don't want to set a schedule to toggle the lights on every 5 minutes for the duration of the sundown period (this was mentioned somewhere on the forum) since it defeats the purpose of using the really simple dusk / dawn scene.
I have a second automation in Home Assistant which caters for this -- basically when Home Assistant boots up (or when power comes back on - I have an battery/inverter setup that tells me grid availability and HA runs from it) then see if it is night, if so, turn on the lights again.
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,685
I have a second automation in Home Assistant which caters for this -- basically when Home Assistant boots up (or when power comes back on - I have an battery/inverter setup that tells me grid availability and HA runs from it) then see if it is night, if so, turn on the lights again.
He's trying to do it without HA
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,452
Anyone update to OS6.2 yet? Is it stable?
Nothing in the release notes hints any breaking changes.

1627904487170.png
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
This was posted on the HA forums and probably the best graph card I found for HA so far.

Apexcharts

Screenshot 2021-08-03 at 13.37.13.png

Now I can see I need to fix my settings on the forecast website (solcast).
 

JibbersCrabst

Well-Known Member
Joined
Oct 7, 2008
Messages
320
Having an issue with my sonoff zigbee door sensors. They don't seem to register opens and closes as they should.

They connected to zigbee hub and can see them in ewelink and Alexa, but just not responsive. Any trick?
 

Magnum

Executive Member
Joined
Mar 12, 2013
Messages
6,593
I am going to be the Guy that was absent during the conference call, and that has the signing off powers on all projects...You will all go SIGH now...


I'm looking at some home automation. got 1x PI 4, 2x PI 3+ decent Fiber and an AMD though I would prefer not to leave that on full time during the Day.

Plan is some Power Saving by auto controlling lighting around the house. I'm busy converting everything to LED. Any Ideas guys?

Got a full 16 Channel HIK DVR with alarm interface, That would be incorporated next. I'll get on solar/Solar Geyser much later on.
 
Last edited:

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,685
I am going to be the Guy that was absent during the conference call, and that has the signing off powers on all projects...You will all go SIGH now...


I'm looking at some home automation. got 1x PI 4, 2x PI 3+ decent Fiber and an AMD though I would prefer not to leave that on full time during the Day.
Welcome to the rabbit hole. How can we help?
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,685
Was typing and browser auto uploaded.
Apart from switching to LEDs, you can consider adding some sonoff's (or shelly 1's) and then running HA on the Pi4. That'll allow you to automate the lights turning on/off by time of day, sunset or some other trigger. If you have a home alarm you could even use the alarm sensors to turn certain lights on when entering a room etc.

Although, to be honest, once you've gone LED there's not much to be saved in terms of power from your lighting (unless you have an inordinate amount of lights). The real power saving is on the water heating side, but that'll require evacuated tubes or PV panels
 

Magnum

Executive Member
Joined
Mar 12, 2013
Messages
6,593
Apart from switching to LEDs, you can consider adding some sonoff's (or shelly 1's) and the running HA on the Pi4. That'll allow you to automate the lights turning on/off by time of day, sunset or some other trigger. If you have a home alarm you could even use the alarm sensors to turn certain lights on when entering a room etc.

Although, to be honest, once you've gone LED there's not much to be saved in terms of power from your lighting (unless you have an inordinate amount of lights). The real power saving is on the water heating side, but that'll require evacuated tubes or PV panels
The Changeover was mostly due to Replacement bulb scarcity. Mid 1900's Chandeliers don't take normal Bayonet bulbs.

Now I just want to get Lazy. and have the house do some mundane stuff in stead of me having to do it myself.
 

Speedster

Honorary Master
Joined
May 2, 2006
Messages
21,685
The Changeover was mostly due to Replacement bulb scarcity. Mid 1900's Chandeliers don't take normal Bayonet bulbs.

Now I just want to get Lazy. and have the house do some mundane stuff in stead of me having to do it myself.
I see your initial post is still growing. Load up HA on the Pi and then start playing from there.
 

MidnightZA

Expert Member
Joined
Mar 9, 2013
Messages
2,452
Lets see if anyone can help me with this.

I have a few Sonoff Zigbee motion sensors (3 connected so far) and it works as expected. One of them however, after 6 hours and a few min of no activity, the sensor becomes unavailable (see pic). If I walk pass the sensor, it then says "detected" as it should but doesnt trigger automations, then after a min it will switch to clear. If I walk pass again then it will trigger the automations.

I only noticed it over the past 3 days but Im not sure when this issue started. It is only this sensor that is doing that. I have switched the battery with another sensor to rule out a low battery. I took out the battery for 5 or so min to do a soft reset, and same result

1627994649836.png

EDIT: For ZHA config, 21600 seconds is 6 hours, now I know why its becoming unavailable.
The next question is why the other sensors are not becoming unavailable after 6 hours? :/

1627995878263.png
 
Last edited:

SykomantiS

Expert Member
Joined
May 7, 2012
Messages
3,797
Apart from switching to LEDs, you can consider adding some sonoff's (or shelly 1's) and then running HA on the Pi4. That'll allow you to automate the lights turning on/off by time of day, sunset or some other trigger. If you have a home alarm you could even use the alarm sensors to turn certain lights on when entering a room etc.

Although, to be honest, once you've gone LED there's not much to be saved in terms of power from your lighting (unless you have an inordinate amount of lights). The real power saving is on the water heating side, but that'll require evacuated tubes or PV panels
I have a question, please excuse if it is a dumb one. LEDs still work on 220V to the bulb socket? I'm assuming each led has it's own converter (assuming DC 12V?)

Are there native 12V solutions (like 220V from DB to a 12V DC converter / distribution with wiring then going from there directly to the lights), and if there are, is there any benefits over the above? (such as power efficiency/savings).
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,478
Energy Management in Home Assistant


demo of the above

Hmm how can I see the code of the energy dashboard or is that auto generated? Guess I need to update to see it.
 

w1tw0lf

Expert Member
Joined
Sep 29, 2009
Messages
1,192
Hmm how can I see the code of the energy dashboard or is that auto generated? Guess I need to update to see it.
Mine just finished update. Seems like it is generated.

Screenshot 2021-08-04 133013.png

There is also a new section in general to add currency

Screenshot 2021-08-04 133147.png

Can't setup as I don't track energy usage... need to do that part still.
 
Last edited:

w1tw0lf

Expert Member
Joined
Sep 29, 2009
Messages
1,192
Just found this under configuration

1628077572591.png

Seems like they want to make it easy configuration.
 
Last edited:

w1tw0lf

Expert Member
Joined
Sep 29, 2009
Messages
1,192
This was posted on the HA forums and probably the best graph card I found for HA so far.

Apexcharts

View attachment 1119544

Now I can see I need to fix my settings on the forecast website (solcast).

Have you tried this card ? Tried it and literally grinded my home assistant pc to a halt where the page didn't respond at all. Tried with cahce enabled in the card and without, no diffirence. Even tried setting the update interval to 4 hours.
 
Top