thejeffreystone / home-assistant-configuration

My Old Home Assistant Config. For more Information visit ->
https://slacker-labs.com
415 stars 69 forks source link

Switched to a hardware Lightning Detector for local control. #86

Closed thejeffreystone closed 4 years ago

thejeffreystone commented 4 years ago

I already leverage some 433mhz weather sensors outside. So I bought https://amzn.to/3aJo8Ry and will see if I can get it integrated.

I tried Blitzortung.org but i was getting some weird reports of strikes in the middle of a cloudless day when other times it was super accurate. If this hardware version works that is one less cloud dependency.

thejeffreystone commented 4 years ago

Testing this out -> https://github.com/thejeffreystone/home-assistant-configuration/commit/b9dde9ad51d6bfb9488bc1740acd2cff8eae47bd

thejeffreystone commented 4 years ago

Had to clean this up a bit, but this is good now. Wrote a better system for integrating these sensor with MQTT. Running that on a Raspberry Pi I had laying around after a recent migration.

Since it is not critical I would rather it not suck resources from Home Assistant. Although I am going to see if I can turn that into an "official" "add-on" because I am really digging the local weather sensor for lightning for just $20 and to integrate cheap Acurite sensors.

Because the lightning sensor doesn't have a reliable binary indicator, I am using the strike count which is reliable. I just store the current count to a MQTT topic every 30 mins and then compare the current count to the "history" for my trigger. I think I may need to change this to a != condition instead of a > because the strike counter resets at 129 or so but we will see.

You can find the automation at https://github.com/thejeffreystone/home-assistant-configuration/blob/master/config/packages/weather.yaml#L346

And the sensors at https://github.com/thejeffreystone/home-assistant-configuration/blob/master/config/packages/weather.yaml#L54