Python Plugin: Most recent Dutch earthquake Topic is solved

Python and python framework

Moderator: leecollings

Xorfor

Python Plugin: Most recent Dutch earthquake

Post by Xorfor »

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: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by blauwebuis »

Cool! Could there be a way for people in other countries to fill in their datasource?
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK »

Funny to see. The created map is that the exact location?
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Xorfor

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor »

@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: 290
Joined: Monday 29 December 2014 15:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Siewert308SW »

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 3082 times
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
febalci
Posts: 331
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 »

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: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK »

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 (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
Siewert308SW
Posts: 290
Joined: Monday 29 December 2014 15:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Siewert308SW »

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

@ febalci
thx...
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK »

Siewert308SW wrote: Saturday 20 January 2018 17: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 (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK »

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 (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Xorfor

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor »

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: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK »

And again the same error
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
Siewert308SW
Posts: 290
Joined: Monday 29 December 2014 15:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Siewert308SW »

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:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK »

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 (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Xorfor

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor »

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: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by EdwinK »

Okay. Can happen to everyone.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
assenzuid
Posts: 135
Joined: Friday 13 November 2015 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands, Emmen Area
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by assenzuid »

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

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor »

@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: 135
Joined: Friday 13 November 2015 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands, Emmen Area
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by assenzuid »

Xorfor wrote: Tuesday 23 January 2018 19: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
Derik
Posts: 1602
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by Derik »

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: eddieb and 1 guest