Python Plugin: Most recent Dutch earthquake

Python and python framework
User avatar
Xorfor
Posts: 88
Joined: Sunday 03 December 2017 23:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Python Plugin: Most recent Dutch earthquake

Post by Xorfor » Friday 19 January 2018 23:20

Because it was so easy to program and a hot topic in the news in the Netherlands, I created a python plugin which displays information about the most recent earthquake in the Netherlands. This device displays:

- Date and time
- City (with link to the exact location in Google maps)
- Magnitude and type (tectonic or induced)
- Depth

Still beta, but plugin is available at https://github.com/Xorfor/Domoticz-Last ... ake-Plugin

blauwebuis
Posts: 336
Joined: Wednesday 21 December 2016 10:11
Target OS: Raspberry Pi
Domoticz version: current
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by blauwebuis » Saturday 20 January 2018 15:28

Cool! Could there be a way for people in other countries to fill in their datasource?

User avatar
EdwinK
Posts: 1209
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK » Saturday 20 January 2018 16:39

Funny to see. The created map is that the exact location?
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
Xorfor
Posts: 88
Joined: Sunday 03 December 2017 23:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor » Saturday 20 January 2018 16:58

@blauwebuis,

I found an other source. My plan is to monitor earthquakes depending on the location set in Domoticz.

@EdwinK,

Yes, the map points to the location of the earthquake, which is calculated by different stations.

User avatar
Siewert308SW
Posts: 607
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Siewert308SW » Saturday 20 January 2018 17:06

Thx...
Will try this one out.
Had hope the seismic sensor for the Fibaro Motion Sensor gets support in Domoticz.
Until then i will use this plugin to see if we got a earthquake due to the gasdrilling...
Naamloos.png
Naamloos.png (9.09 KiB) Viewed 968 times
Setup:
- RPi3 - PIco HV3.0A / Domo Beta 3.9XXX / RFXtrx433E / Aeotec Gen5
- RPi3 - PIco HV3.0A / PiHole / PiVPN / NAS / Print Server
- Youless Elec&Gas
- FI9803P Cams
- KD101 detectors
- Zwave & KaKu

MyDomoticz scripts: @GitHub
PIco UPS Toolkit: @GitHub

febalci
Posts: 311
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by febalci » Saturday 20 January 2018 17:32

If you want an alternative, you can also check https://github.com/febalci/DomoticzEarthquake. It works a according to your location (in settings) and gets the info from seismicportal.com.

User avatar
EdwinK
Posts: 1209
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK » Saturday 20 January 2018 18:26

Atm I get the following error:

Code: Select all

2018-01-20 17:18:02.572 Error: (Dutch Earthquakes): Async Read Exception: 104, Connection reset by peer
2018-01-20 17:18:02.594 Error: (Dutch Earthquakes): Socket Shutdown Error: 107, Transport endpoint is not connected
Could someone please shake Groningen a bit, so I can test if this is working now :)
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
Siewert308SW
Posts: 607
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Siewert308SW » Saturday 20 January 2018 18:30

@ EdwinK
Jumping, slamming doors and throwing my wife around.
Didn't help i think ;-)

@ febalci
thx...
Setup:
- RPi3 - PIco HV3.0A / Domo Beta 3.9XXX / RFXtrx433E / Aeotec Gen5
- RPi3 - PIco HV3.0A / PiHole / PiVPN / NAS / Print Server
- Youless Elec&Gas
- FI9803P Cams
- KD101 detectors
- Zwave & KaKu

MyDomoticz scripts: @GitHub
PIco UPS Toolkit: @GitHub

User avatar
EdwinK
Posts: 1209
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK » Saturday 20 January 2018 18:34

Siewert308SW wrote:
Saturday 20 January 2018 18:30
@ EdwinK
Jumping, slamming doors and throwing my wife around.
Didn't help i think ;-)
Thanks for the help; unfortunately, it didn't help :(

:D
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
EdwinK
Posts: 1209
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK » Saturday 20 January 2018 20:27

And now I get this error:

Code: Select all

2018-01-20 19:27:08.259 Error: (Dutch Earthquakes) Device creation failed, Hardware/Unit combination (52:1) already exists in Domoticz.
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
Xorfor
Posts: 88
Joined: Sunday 03 December 2017 23:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor » Saturday 20 January 2018 22:21

Server seems to disconnect after some time. Changed the sequence of Connecting, get response and disconnect. This will solve the error messages about the connection.

For further testing, reinstall the plugin and reinstall the hardware. And then wait... :) .

I looked to some alternative sources, but the KNMI has the most actual and detailed information.

User avatar
EdwinK
Posts: 1209
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK » Sunday 21 January 2018 14:11

And again the same error
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
Siewert308SW
Posts: 607
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Siewert308SW » Monday 22 January 2018 11:43

Haven't seen any errors since your last commit in github two days ago.
Plugin also updates without issues, this morning we a new earthquake and it's showed in the Domo widget...
Setup:
- RPi3 - PIco HV3.0A / Domo Beta 3.9XXX / RFXtrx433E / Aeotec Gen5
- RPi3 - PIco HV3.0A / PiHole / PiVPN / NAS / Print Server
- Youless Elec&Gas
- FI9803P Cams
- KD101 detectors
- Zwave & KaKu

MyDomoticz scripts: @GitHub
PIco UPS Toolkit: @GitHub

User avatar
EdwinK
Posts: 1209
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK » Monday 22 January 2018 13:33

It all works now, still the error is there.

Code: Select all

(Aardschokjes) Device creation failed, Hardware/Unit combination (57:1) already exists in Domoticz.
but as long as the script works, it's fine
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
Xorfor
Posts: 88
Joined: Sunday 03 December 2017 23:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor » Monday 22 January 2018 20:46

Ok, finally a real test!!!

@EdwinK: I forgot a check in the code where I create devices. It is fixed now.

User avatar
EdwinK
Posts: 1209
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK » Monday 22 January 2018 22:18

Okay. Can happen to everyone.
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

assenzuid
Posts: 164
Joined: Friday 13 November 2015 10:11
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands, Emmen Area
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by assenzuid » Tuesday 23 January 2018 14:04

Great plugin, thanks.
Is it possible to get a notification (email or pushover) when there is a new earthquake logged?

User avatar
Xorfor
Posts: 88
Joined: Sunday 03 December 2017 23:37
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor » Tuesday 23 January 2018 20:39

@assenzuid,

Good point. Will think about this. Perhaps an extra alert device, which is switching on/off, when a new earthquake is logged?

assenzuid
Posts: 164
Joined: Friday 13 November 2015 10:11
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands, Emmen Area
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by assenzuid » Tuesday 23 January 2018 22:16

Xorfor wrote:
Tuesday 23 January 2018 20:39
@assenzuid,

Good point. Will think about this. Perhaps an extra alert device, which is switching on/off, when a new earthquake is logged?
:) will be nice

User avatar
Derik
Posts: 2099
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Derik » Thursday 25 January 2018 9:55

Thanks

Nice job

works great..


Edit...

Perhaps an option to send a mail when there is a %^(%^( problem in Groningen..
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests