Page 1 of 2
Python Plugin: Most recent Dutch earthquake
Posted: Friday 19 January 2018 22:20
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
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 14:28
by blauwebuis
Cool! Could there be a way for people in other countries to fill in their datasource?
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 15:39
by EdwinK
Funny to see. The created map is that the exact location?
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 15:58
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.
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 16:06
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 (9.09 KiB) Viewed 3088 times
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 16:32
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.
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 17:26
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

Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 17:30
by Siewert308SW
@ EdwinK
Jumping, slamming doors and throwing my wife around.
Didn't help i think
@ febalci
thx...
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 17:34
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

Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 19:27
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.
Re: Python Plugin: Most recent Dutch earthquake
Posted: Saturday 20 January 2018 21:21
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.
Re: Python Plugin: Most recent Dutch earthquake
Posted: Sunday 21 January 2018 13:11
by EdwinK
And again the same error
Re: Python Plugin: Most recent Dutch earthquake
Posted: Monday 22 January 2018 10:43
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...
Re: Python Plugin: Most recent Dutch earthquake
Posted: Monday 22 January 2018 12:33
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
Re: Python Plugin: Most recent Dutch earthquake
Posted: Monday 22 January 2018 19:46
by Xorfor
Ok, finally a real test!!!
@EdwinK: I forgot a check in the code where I create devices. It is fixed now.
Re: Python Plugin: Most recent Dutch earthquake
Posted: Monday 22 January 2018 21:18
by EdwinK
Okay. Can happen to everyone.
Re: Python Plugin: Most recent Dutch earthquake
Posted: Tuesday 23 January 2018 13:04
by assenzuid
Great plugin, thanks.
Is it possible to get a notification (email or pushover) when there is a new earthquake logged?
Re: Python Plugin: Most recent Dutch earthquake
Posted: Tuesday 23 January 2018 19:39
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?
Re: Python Plugin: Most recent Dutch earthquake
Posted: Tuesday 23 January 2018 21:16
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
Re: Python Plugin: Most recent Dutch earthquake
Posted: Thursday 25 January 2018 8:55
by Derik
Thanks
Nice job
works great..
Edit...
Perhaps an option to send a mail when there is a %^(%^( problem in Groningen..