Announcement

Collapse
No announcement yet.

Lightning Detection for Homeseer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Thank you Greg.

    I am over complicating this.

    It is just that I do not have any 555 chips around but do have a bunch of these DG style debounce boards around and one Elk hot spare debounce board. Very cheap chinese boards so I bought a few of them for my alarm stuff. This are almost identical to the Altronix boards. I do also have the Ocelot AD devices around.

    So now looking for the schematic to these boards as I make a mountain of a mole hill here.

    Concurrently have a few of the old Hobby Boards dual counter boards around to play with.

    [ATTACH]61630[/ATTACH]
    Last edited by Pete; June 9, 2017, 10:14 AM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #47
      Depends on how small you want to make the package, and how you want to power it I suppose. The 555 is an 8 pin chip. I didn't happen to have any left on hand either so I ordered a supply for future projects. They'll be delivered by Fed-Ex today. The relay is the equivalent size of a 14 pin package.
      I'll fit this entire thing inside a plastic junction box, solar powered, entirely wireless and mounted on my weather station mast.
      As Yoda would say, "No right or wrong there is".
      Real courage is not securing your Wi-Fi network.

      Comment


        #48
        Thank you Greg.

        Googling a bit here relating to using an RPi (original one).

        I have a few around these days.

        I can just velco the sensor inside of the RPi box. Use either 3 or 5 VDC from it to power the lightning sensor and connect to one GPIO and measure pulses using a python script.

        So will give this a try...using one original RPi which was the original Zee and I no longer utilize it. (it ended up in the automation widget box).

        GPIO 2 (Board Pin 3) to Digital pin on lightning sensor, power and ground.

        Code:
        import RPi.GPIO as g
        from time import sleep
        g.setmode(g.BCM)
        g.setup(2, g.IN)
        global revcount
        revcount = 0
        def increaserev(channel):
            global revcount
            revcount += 1
        g.add_event_detect(2, g.RISING, callback=increaserev)
        while True:
            sleep(60)
            print "{0} Lightning strikes per minute".format(revcount)
            revcount = 0
        This would be only to test. Long term plan is to put the sensor in the attic.

        The POE RPi2 in the attic has a ZWave GPIO card and a PiFace RTC shim in it. I know though I can still tap into a free GPIO. That said too using Bernard's Module A USB board I can do the same except plug it in to the RPi2 and read the serial port counter.

        Here is a picture of my testing. Connected it all up and it is fine. Next now is to write an OS to an SD card.

        Two tests now.

        1 - using original Zee RPi - bit banging / GPIO port for pulse / python script
        2 - GliNet microrouter made to tinker with (multiple gpio pins exposed). Same bit banging / GPIO port for pulse / python script.
        Difference is that the microrouter has built in wireless so I can give it a go with that too.

        The microrouter pictured has OpenWRT on it and it is for tinkering as there are GPIO ports there I can access along with 3/5VDC. Plus an RTC with battery and one 1-wire temperature sensor. It is much smaller and the OS memory is soldered on to the board (firmware). Not nearly as much space as the RPi but enough to run Python and a web server...

        [ATTACH]61635[/ATTACH]

        So for RPi (original see).

        1 - downloaded raspbian_wheezy_hardfp_20140726.img from this mirror.
        2 - wrote it to a 2Gb SD card via Linux.
        3 - it booted up via DHCP - default root password is raspberry
        4 - created a sudo user pete
        5 - updated and upgraded
        6 - more stuff updated.
        do apt-get update
        sudo apt-get install python-dev python-pip
        sudo pip install --upgrade distribute
        sudo pip install ipython
        6 - ran raspi-config
        7 - edited script above a bit.
        8 - used a piezo BBQ lighter to test. I had to put it very close to the antenna to get LED to flash. No chirping though.

        ~# python revcount.py
        0 Lightning strikes per minute
        0 Lightning strikes per minute
        22 Lightning strikes per minute
        0 Lightning strikes per minute
        0 Lightning strikes per minute

        Found another script that just writes a single line counter with time stamp. This one just provides a one liner tally of counts.

        cat gpio*.log
        27
        2017-06-09 19:19:39.116528
        Last edited by Pete; June 9, 2017, 07:56 PM.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
        HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

        HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

        Comment


          #49
          No storms yet. I currently am testing some other stuff on the same power strip as the RPi2 that I am using. I have triggered the sensor today just plugging in a small 5VDC power adapter.

          Thinking the direction here will be just to write a one liner with time stamp lightning count, put it a database and use RRD to graph the numbers. (maybe reset it every night).

          Probably leaving it inside of the house maybe in the attic. Should work well enough there. (maybe will attach an external antenna to it).
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

          Comment


            #50
            Final how-to?

            Greg, Pete, Bernard, Dick, et al, when you get a simple-to-use, simple-to-build project out of all this (fascinating) back-and-forth will someone put together a how-to that shows us eager and capable followers what we need to do to get lightning information into our own HomeSeer system? I, too, bought one of these (thanks, Bernard!) and I only have it powered on (no rain yet). I am a knowledgeable tinkerer but I don't have any experience with Arduino, so I'm not sure how I go about getting this information into HomeSeer and my personal in-house weather page.

            Any directions that you people can provide would be GREATLY appreciated!

            Thanks,
            Steve
            Steve

            (System configuration is in my profile)

            Comment


              #51
              @Steve,

              So far two approaches to this endeavor.

              1 - connect a debounce circuit to trigger a relay to trigger a switch for HS3.

              Greg detailed this with a diagram. This is also documented in the first link by switchdoctor.



              2 - Here just connected mine to an original RPi which I had sitting around. It is 3 wires only. 3.3VDC, Ground, GPIO2 to Digital output. This is seen as a pulse on the RPi. I can do the same today with a little TP-Link like microrouter and OpenWRT. Only difference is that the microuter has two network ports and wireless. I ordered a new on to tinker with. The new one will have an RTC with a 1-wire interface (tiny) and the lightning sensor inside. It is much smaller than the RPi and cheaper in price at around $20 versus $35 for an RPi.

              The pulse can be read with a python script.

              3 - tentatively posted way is to utilize an arduino. It would be similiar to #2 where the ardunio would read the pulse and that would be read by the current arduino HS3 plugin. You can also do this wirelessly with the arduino. Here have a few of these on my home office desk but went to other endeavors here.

              Personally interested in #2 and #3. I want to trigger something on the alarm panel and use it with the NOAA hard wired triggered and measure or count the lightning strikes and graph them sort of like the 1-wire hobby boards lightning sensor way.

              4 - Will be using module A which is a USB interface with some intelligence. There is also a combo USB device. I am waiting to get this one. This one will be the easiest to interface with Homeseer 3. No fuss / no building of anything else...just plug it in and read the serial interface to get lightning strikes. The Homeseer 3 plugin would just be one to read the data serially from the usb port.

              Note that the device doesn't attract lighting. IE: putting it outside with current on board antenna will not attract lighting. It works inside fine. Anything outside with metal and a ground can attract lightning.


              That said my original HB lightning sensor was using a piece of copper 6" long and that was mounted on the roof. I used coaxial cable (X2) for the 1-wire connection which went to a lightning arrestor to a ground stake. It always worked (~ 10 years plus) and never did get struck by lightning. What I am saying here is that you can also put this sensor outside say on a deck and it'll probably work better than inside.
              Last edited by Pete; June 12, 2017, 06:33 AM.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
              HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

              HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

              Comment


                #52
                The schematic of what I've done. This has only been tested with a short and relatively weak pulse I was able to produce (picking up a relay next to the EMP sensor) on my bench. I've yet to see results during an actual storm.

                As stated on the drawing, the purpose here is not so much to produce hundreds of counts during an event, so much as to provide a relative indication of lightning activity. The adjusted pulse should be set to the minimum time required to have a Door Sensor send a status change to Homeseer. With the selected components (RV1, C1), the pulse is adjustable up to 5.5 seconds (The formula is 1.1 x C x R, where C is in farads and R is in ohms). Using the Everspring door sensor, I've found 2 seconds to be sufficient.

                I've built the circuit on a 2x2 inch perf-board. It's my intention to power this using a solar cell and rechargeable Li-Ion battery making the device completely wireless.

                EDIT: New schematic. Switched to Digital EMP output + added inversion to 555 input.
                Attached Files
                Last edited by Wadenut; June 13, 2017, 08:20 AM.
                Real courage is not securing your Wi-Fi network.

                Comment


                  #53
                  Thank you for providing the drawing / schematic. Might give it a similar try here with a DS10A. The RPI pulse thing is working.

                  It is just writing a one liner with a time stamp every time there is a trigger.

                  cat gpio*
                  145
                  2017-06-12 06:36:13.680836


                  Have you seen any activity due to thunderstorms / lightning?

                  Here nothing yet.

                  The piezo lighter works when it is next to the sensor. I have seen only bursts of 20-30 strikes when clicking the lighter once. This is the same thing I saw with the HB lightning sensor.
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                  Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                  HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                  HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                  HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                  Comment


                    #54
                    Originally posted by Pete View Post
                    I have seen only bursts of 20-30 strikes when clicking the lighter once. This is the same thing I saw with the HB lightning sensor.
                    Multiple counts is what I'd expect per strike and did see ridiculous numbers using the HB detector. I'd imagine a discharge is hardly a single clean pulse, but multiple peaks with any number of 'transients', which is why I'm comfortable with the 1-2 second hardware delay (Call it a filter). Any greater frequency than that, it's likely time to join Auntie Em in the root cellar.

                    I heard two claps of thunder before midnight last night. Hardly a storm, at least not close, but I do see this morning that both were recorded.

                    Found this:
                    Attached Files
                    Last edited by Wadenut; June 13, 2017, 02:07 AM.
                    Real courage is not securing your Wi-Fi network.

                    Comment


                      #55
                      Ahh...

                      Yes with the HB lightning sensor the counts would go from zero to hundreds to tens of thousands within about 20 minutes on an approaching storm. This was with the device on the roof. In the basement testing right now the numbers are similiar to that of the new lightning sensor device. I was amazed that the 1-wire counter even worked with those numbers.
                      Last edited by Pete; June 13, 2017, 04:11 AM.
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                      Comment


                        #56
                        Thunder and lightning here most of the afternoon and in to the evening today June 14.
                        NOAA thunderstorm radio alerts all day today.

                        I have the emp sensor in the kitchen near the outside door.

                        Never flashed nor did I hear a peep from it. Last RPi recorded GPIO pulse trigger was yesterday.

                        So now wondering if I need to install it outside?

                        I did have to use the piezo lighter very close to it to trigger when I was testing.

                        Looking at the HB's lightning sensor in the basement see this: (yesterday numbers were around 15 k).

                        digitemp -a -q -c /etc/digitemp.conf
                        Jun 14 20:14:20 Sensor 0 C: 18.88 F: 65.97
                        Jun 14 20:14:20 Sensor 1 #0 23532694
                        Jun 14 20:14:20 Sensor 1 #1 23571377
                        - Pete

                        Auto mator
                        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                        HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                        HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                        Comment


                          #57
                          Help please DrFlash

                          Here is a picture of my model The familiar one (A).

                          and a picture of the piezo lighter I am using to test with.

                          Here is a picture of my 3 wire connection to the RPi. IE: 3.3VDC, ground and GPIO pin #1 to VDC, Ground and Digital output on lightning sensor.


                          It doesn't appear to be sensitive to lightning inside of the house. I was going to move it to the attic. Not sure if it is worth the effort at this time.

                          We have had thunderstorms (much lightning and thunder, rain and wind) in the last couple of days and I have it connected to the RPi in the kitchen of house near a window. I have not seen the white LED flash nor have heard any sounds with the passing thunderstorms.

                          Is there anything I could do to make it more sensitive?

                          When testing with a piezo lighter it only triggered when I held the piezo lighter mm away from the sensor. I am guessing it should have triggered a bit further away from the sensor. IE: I can hold the piezo lighter about 12 inches away from the HBs sensor and it triggers just fine.
                          - Pete

                          Auto mator
                          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                          Comment


                            #58
                            Originally posted by Pete View Post
                            It doesn't appear to be sensitive to lightning inside of the house.
                            I don't usually get much lightning inside the house; how much do you get? (Sorry, couldn't resist).
                            Real courage is not securing your Wi-Fi network.

                            Comment


                              #59
                              Only see it when my parrot fights with my wife. Sparks fly.

                              I leave the room as it becomes dangerous. Don't want to get shocked as I get thunderstruck by their dialog.

                              When she feeds the parrot; the parrot attacks her (for the last 20 years).

                              She coos me and tells me she loves me when I feed her. (really and truly).



                              The goal here is to mount the device in the attic. That is similar to what I was going to do with the HB's lightning sensor which is working fine in the basement today.

                              I was going to purchase an outdoor wireless lightning sensor (part of a commercially sold weather station) device and connect that to my Meteostick. (can do Davis and other with it).
                              Last edited by Pete; June 16, 2017, 09:07 AM.
                              - Pete

                              Auto mator
                              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                              HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                              HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                              Comment


                                #60
                                I received mine yesterday and will start bench testing next week!

                                It came with a little bank of LEDs - are you guys using these?
                                HS4Pro on a Raspberry Pi4
                                54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
                                Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

                                HSTouch Clients: 1 Android

                                Comment

                                Working...
                                X