Announcement

Collapse
No announcement yet.

Lightning Detection for Homeseer

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

    #61
    Yes got those too with a little note about the extra LEDs.

    I am not using them and only so so here with SMD soldering (even though have all of the tools required these days). IE: purchased here when doing hardware mods on the original Almond + beta hardware and tinkering with my Jogglers.

    Might repurpose one little LED to my Sure GPS as the blinking blue LED is way too bright. It is a nice to have though relating to getting GPS signals.
    - 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


      #62
      Got mine yesterday too and also got the LED's. Excited to try and see if I can get this thing working this weekend, but here in Denver we have gone from raining every day to fire danger almost immediately, so not sure when I will actually get results from it as there is no storms forecasted for the foreseeable future.

      Comment


        #63
        Quickie recap with pictures. Note I do not have an oscilloscope here. I was able to trigger a pulse using a piezo electric lighter and plugging in another transformer (5VDC) on the same power strip as the RPi power supply (1 foot away). The detector seemed to be more sensitive to the plugging in of another 5VDC adapter than the piezo lighter.

        1 - I got version 2 of the board. Here is a side by side picture from original post.

        [ATTACH]61714[/ATTACH]

        2 - here is a picture showing the connections for the RPi and the RPi pinouts. Connected the device to pins 3.3VDC, Ground and GPIO 2.

        [ATTACH]61719[/ATTACH]
        [ATTACH]61718[/ATTACH]

        3 - Just used a python script to read a pulse on GPIO 2.

        It's a very simple connection.

        I could maybe tape the device to a window or remove the antenna and solder a new antenna on to the board or order another one and return this one.
        Attached Files
        Last edited by Pete; June 16, 2017, 03:49 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


          #64
          -=[ UPDATE ]=-

          Board for the USB-stick arrived 2 days ago. Assembled components, tested the sticks and finally added a thin protective rubber-type layer.
          As you can see, there's an integrated antenna. The stick looks a bit like a "dart". Maybe I should code it likewise. At its tail (near the antenna)
          is at each side (*) a white LEDs located. They blink simultaniously when an EMP is detected.



          (*) The stick in the middle, at the bottom, at the left and right, you see the 2 small LEDs.

          Still awaiting the sensor-boards.

          Comment


            #65
            Great news Bernard!!!

            The stick looks a bit like a "dart".

            I like the game of darts and am a sight shooter if that makes any sense?

            Maybe I should code it likewise.

            Read about Google Dart programming.

            Dart is an application programming language that’s easy to learn, easy to scale, and deployable everywhere. Google depends on Dart to make very large apps.

            Personally based on your documentation I thought the firmware was already written for this device?

            [ATTACH]61730[/ATTACH]


            Will probably use one of these devices with your new device.

            [ATTACH]61729[/ATTACH]

            The more plug n play the device is the easier it will be to utilize with Homeseer.

            I have disconnected my current sensor for the time being.

            Can I do something to make it more sensitive? Or can I send it back to the address shown on the original shipping envelope?

            We have had many rain/thunder/lightning storms here in the Midwest near Chicago and more next week. Weather is common due to the great lakes here. I utilize the Weather station, internet and radio for weather here. Lost indoor irrigation modules due to lightning one year. Here have everything earth grounded. I like weather watching as much as automation...too bad I couldn't automate the weather.

            [ATTACH]61731[/ATTACH]
            Last edited by Pete; June 17, 2017, 06:26 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


              #66
              @Pete: The software was indeed ready. However, I used a different IC, which is consuming less energy, but also used a higher frequency Xtal. The commands to control it, are identical.

              Concerning the sensor you got, you might consider removing the antenna and hook up a home-made antenna or alike. The solder-joint (small hole) for the onboard is very close to where the onboard wired antenna. It probably also means you need to remove the onboard antenna.
              Nevertheless, you may also return the sensor to the address mentioned at the envelope.

              Making it more "plug and play" is a difficult job. I've tried, as much as possible, by making it "command-controlled" by (USB) serial port. And yes, it requires some steps, concerning installing a driver for it and set the speed to 115200 Baud. That's the way it is.

              It might be possible to develop it as being a HID, like a USB-keyboard. In such case it won't need a driver (I assume). This comes with some serious limitations. Lets assume it acts like a keyboard : I've still to figure out how to send commands to it (by keyboard ?).
              Next, I wonder what the max. dataspeed will be to transmit data for a HID like a keyboard. Since jumping from DOS to Windows, I've never seen an option to modify the polling-speed of a keyboard. Back in my younger days -if I remember well- the type-rate (in characters per minute) could be modified in the BIOS. I think the max was something like 360 cpm...
              So far I've never found a way to modify this keyboard-speed under Windows. Either a user has to access the BIOS, or an obscure place in the Windows-registry.
              I think the current way (serial port over USB) is -by now- the best way. If you start coding, a lot of software includes support for interaction with a serial port.

              Some more pictures :




              I've included labels at the sticks now, with codename "dart-1".

              Comment


                #67
                Making it more "plug and play" is a difficult job. I've tried, as much as possible, by making it "command-controlled" by (USB) serial port. And yes, it requires some steps, concerning installing a driver for it and set the speed to 115200 Baud. That's the way it is.

                @Bernard, you are already there at the plug n play level with this device. The device's explanation is perfect and very plug n play.

                I meant to write that this device is more plug n play with the serial communications than the first one.

                With one serial link (USB) it is much easier for Homeseer to communicate with the device. It's easier for the homeseer forum users to plug in a USB serial device than to build something hardware wise - IE: RPi / timing circuit / arduino.

                Here I am running Homeseer 3 in Ubuntu Linux 64 bit. I have not had any issues with USB / serial devices or USB devices to date. Today I prefer to run Homeseer 3 in Windows. Most of the users here on the forum run Homeseer in Windows

                I would prefer to send the other device back as I will most likely destroy it trying to remove the coil antenna on it.

                I think the current way (serial port over USB) is -by now- the best way. If you start coding, a lot of software includes support for interaction with a serial port.

                It is the best way and easiest way to program.
                - 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


                  #68
                  Acid test night. There have been 28 counts in the past 90 minutes, even with my 1.5 second built in filter. TV weather just confirmed there are storms in the general area (maybe 60 miles or so) although the sky is still clear here at the moment. Just need to work out a rate (counts per hour) calculation.
                  Real courage is not securing your Wi-Fi network.

                  Comment


                    #69
                    Good news Wadenut!

                    Have you heard the sounder / seen the white LED flash?

                    Is the device inside or outside of your home?
                    - 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


                      #70
                      Originally posted by Pete View Post
                      Good news Wadenut!

                      Have you heard the sounder / seen the white LED flash?

                      Is the device inside or outside of your home?
                      It's in the garage on a shelf, antenna oriented SouthWest which is the direction from which storms approach here, and yes there are audio/visual indications.
                      Real courage is not securing your Wi-Fi network.

                      Comment


                        #71
                        Thank you Greg.

                        Yes here it is on the kitchen table.

                        I got 6 more counts from last posting. We had a major storm pass by yesterday around 5 PM local time. No flashes nor beeps.

                        Going to put the RPi back in the case and stick the sensor on the RPI case to make it a bit more portable.

                        Looked at the Hobby Boards counter in the basement and have these numbers:

                        digitemp -a -q -c /etc/digitemp.conf
                        Jun 20 04:46:45 Sensor 0 C: 20.00 F: 68.00
                        Jun 20 04:46:45 Sensor 1 #0 50103615
                        Jun 20 04:46:45 Sensor 1 #1 50146457

                        Going to connect it to a Midon Temp-08 and keep a terminal window open for a bit.
                        Last edited by Pete; June 20, 2017, 04:48 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


                          #72
                          New project look here....

                          May switch over to the Pine64 for this....combo box...

                          1 - Lightning sensor
                          2 - NOAA weather satellite picture downloader with SD radio (will colorize pictures)
                          3 - GPS NTP server (already using one on PFSense)
                          4 - 1-wire temperature hub for 2nd floor temperatures.

                          The Pine64 2Gb computer is levels above the RPi3 and faster. It will be mounted on the dipole antenna in the attic.

                          The SD radio stuff is just a couple of scripts with the SD radio serially connected to the Pine64b.

                          This concatenation would be part of my weather station stuff as I move over to WeeWx. It would be considered a weather station running on an RPi3 or Pine64. Homeseer could get weather data from it to Homeseer variables via a network connection. The data can be put to a sql DB easy enough and Homeseer would read the sql db values for weather stuff.

                          The NOAA satellite antenna is a small footprint dipole and the GPS antenna works fine in the attic or basement these days.
                          The SDR radio is less than $15. Pine64 2Gb computer is $29 USD.

                          [ATTACH]61761[/ATTACH]
                          Last edited by Pete; June 20, 2017, 07:42 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


                            #73
                            OK so based on your EMP device working put my RPI case back together and sticking the concoction near a window on the main floor.

                            We are getting some passing storms today.

                            If this doesn't work then most likely give up and go to Bernard's USB device and or an alternative lightning sensor.

                            I am looking for a tiny plastic pill bottle to put the EMP sensor in. Well took one of my wife's clear plastic hair stuff caps. Works perfect for this.

                            I used a dremel tool to make a little hole next to the audio port and heat shrink tubing to bundle the wires.

                            Tacked it to a nearby window. This is low on the WAF but wife accepts that the whole house is an automation sandbox any how and this is only temporary.

                            [ATTACH]61764[/ATTACH]
                            [ATTACH]61765[/ATTACH]
                            Last edited by Pete; June 20, 2017, 09:56 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


                              #74
                              Originally posted by Pete View Post
                              OK so based on your EMP device working put my RPI case back together and sticking the concoction near a window on the main floor.

                              We are getting some passing storms today.

                              If this doesn't work then most likely give up and go to Bernard's USB device and or an alternative lightning sensor.

                              I am looking for a tiny plastic pill bottle to put the EMP sensor in. Well took one of my wife's clear plastic hair stuff caps. Works perfect for this.

                              I used a dremel tool to make a little hole next to the audio port and heat shrink tubing to bundle the wires.

                              Tacked it to a nearby window. This is low on the WAF but wife accepts that the whole house is an automation sandbox any how and this is only temporary.

                              [ATTACH]61764[/ATTACH]
                              [ATTACH]61765[/ATTACH]
                              Pete, can you explain your setup a little more? I bought a Pi yesterday just to dev on, and I have my sensor already. My initial plans was to just connect the sensor to my arduino network already connected to HS, but I got to thinking and think I want to dive deeper into weather monitoring, which I think this Pi will get relegated to.

                              What software/setup are you using on the Pi?

                              Comment


                                #75
                                Very simple set up with the original RPi. Just doing a pulse count. It is very basic.

                                See post #62 for the pins to connect on an RPi.

                                It will be similar with an RPi2 as the pinouts are almost the same as the RPi 1.

                                1 - build your RPi using a stock image - here used Wheezy for the RPi
                                2 - Python is already there. You might want to upgrade it.
                                3 - wiring up and testing the EMP device takes about 5 minutes.
                                Connect RPI pins to EMP3
                                1 - 3.3VDC - EMP to RPi Pin #1 (3VDC)
                                2 - ground - EMP to RPi Pin #6 (ground)
                                3 - GPIO2 - EMP digital to RPi GPIO2 Pin #3 on original RPi-1 - the voltage from the digital output triggers the pulse on GPIO2.

                                Currently just running a python script which updates a log file with a count.

                                Where I was going with this was a sort of speedometer with total pulses on the bottom.

                                Here is the python script.

                                Running this at boot up using cron.

                                You can watch it live in a terminal window and test the EMP sensor with a piezo lighter. In another terminal window you can do a tail -f on the log file to watch it update.

                                Here I am testing using a piezo lighter. IE: I see more lightning pulses doing this than what I saw yesterday during some major storms that passed through.

                                Update: 15:22 c time. Major 20 minute storm passed through. Lots of wind, lightning, thunder and rain. Counter is showing same value from when I tested with piezo lighter at 13:26 c time.

                                root@ICS-Lightning:/var/log# tail -f gpio*.log
                                186
                                2017-06-20 06:04:52.658299
                                tail: gpio2-counter.log: file truncated
                                188
                                2017-06-20 13:26:19.774358
                                tail: gpio2-counter.log: file truncated
                                189
                                2017-06-20 13:26:20.900694
                                tail: gpio2-counter.log: file truncated
                                190
                                2017-06-20 13:26:47.077778
                                tail: gpio2-counter.log: file truncated
                                191
                                2017-06-20 13:26:47.754851
                                tail: gpio2-counter.log: file truncated
                                192
                                2017-06-20 13:26:48.345668


                                /root/gpio-counter.py 2 /var/log/gpio2-counter.log &

                                Apologies as I am currently dueling here with a MS and Linux laptop. Easier for me to do stuff these days on Linux.

                                Code:
                                #!/usr/bin/env python
                                
                                import RPi.GPIO as GPIO
                                import datetime
                                import sys
                                import signal
                                
                                #verbose = True		# global variable
                                
                                ############################################################################################################
                                ############################################################################################################
                                
                                def printusage(progname):
                                        print progname + ' <gpio-pin-number> <filename> [debug]'
                                        print 'Example usage: ' 
                                	print progname + ' 2 /path/to/mylogfile'
                                        print progname + ' 2 /path/to/mylogfile debug'
                                	sys.exit(-1)
                                
                                def signal_handler(signal, frame):
                                        if verbose:
                                		print('You pressed Ctrl+C, so exiting')
                                	GPIO.cleanup()
                                        sys.exit(0)
                                
                                
                                def readvalue(myworkfile):
                                	try:
                                		f = open(myworkfile, 'ab+')		# open for reading. If it does not exist, create it
                                		value = int(f.readline().rstrip())	# read the first line; it should be an integer value
                                	except:
                                		value = 0				# if something went wrong, reset to 0
                                	#print "old value is", value
                                	f.close()	# close for reading
                                	return value
                                
                                
                                def writevalue(myworkfile,value):
                                	f = open(myworkfile, 'w')
                                	f.write((str(value)+ '\n'))			# the value
                                	f.write((str(datetime.datetime.now())+ '\n'))	# timestamp
                                	f.close()	
                                
                                ############################################################################################################
                                ############################################################################################################
                                
                                ######### Initialization
                                
                                
                                #### get input parameters:
                                
                                try:
                                	mygpiopin = int(sys.argv[1])
                                	logfile = sys.argv[2]
                                except:
                                	printusage(sys.argv[0])
                                
                                verbose = False
                                try:
                                	if sys.argv[3] == 'debug':
                                		verbose = True
                                		print "Verbose is On"
                                	else:
                                		printusage(sys.argv[0])
                                except:
                                	pass
                                
                                #### if verbose, print some info to stdout
                                
                                if verbose:
                                	print "GPIO is " + str(mygpiopin)
                                	print "Logfile is " + logfile
                                	print "Current value is " + str(readvalue(logfile))
                                
                                
                                #### setup
                                
                                GPIO.setmode(GPIO.BCM)
                                GPIO.setup(mygpiopin, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
                                
                                signal.signal(signal.SIGINT, signal_handler)	# SIGINT = interrupt by CTRL-C
                                
                                
                                ########## Main Loop 
                                
                                while True:
                                	# wait for pin going up
                                	GPIO.wait_for_edge(mygpiopin, GPIO.RISING)
                                
                                	# read value from file
                                	counter=readvalue(logfile) + 1
                                	if verbose:
                                		print "New value is", counter
                                
                                	# write value to file
                                	writevalue(logfile,counter)
                                
                                	# and wait for pin going down
                                	GPIO.wait_for_edge(mygpiopin, GPIO.FALLING)
                                
                                ############################################################################################################
                                ############################################################################################################
                                Attached is the python script zipped.
                                Attached Files
                                Last edited by Pete; June 20, 2017, 03:24 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

                                Working...
                                X