Python Plugin: Most recent Dutch earthquake

Python and python framework

Moderator: leecollings

elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by elmortero »

blauwebuis wrote: Saturday 20 January 2018 14:28 Cool! Could there be a way for people in other countries to fill in their datasource?
Hi!
Not Python - I am not very good in that -, but with dzVents, I came up with this

The source I used has world-wide info and allows to use location limits.
Xorfor

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor »

@elmortero,

Great job!

I also looked for other sources like the one you are using. But it looks like the other sources are only reporting 'real' (tectonic) earthquakes. Until now, for the Netherlands, the KNMI is the most accurate source.
Perhaps in the future I make a more global plugin.
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 »

Lately I get numbers and double entries in the log.
Screen Shot 2018-05-28 at 09.28.49.png
Screen Shot 2018-05-28 at 09.28.49.png (127.36 KiB) Viewed 890 times
See attachment
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
quilae
Posts: 10
Joined: Tuesday 07 November 2017 21:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Most recent Dutch earthquake

Post by quilae »

Since I'm not into using Google Maps as source for maps I took the liberty to create a slightly modified version of the script.
It is really simple just change this line:

Code: Select all

txt = date + ": <a target='_blank' style='color: black;' href='https://www.google.com/maps/search/?api=1&query=" + lat + "+" + lon + "'>" + plaats + "</a><br/>" + \
into this:

Code: Select all

txt = date + ": <a target='_blank' style='color: black;' href='https://www.openstreetmap.org/?zoom=15&mlat=" + lat + "&mlon=" + lon + "'>" + plaats + "</a><br/>" + \
and you'll be able to show the location on the maps of www.openstreetmap.org.
Xorfor

Re: Python Plugin: Most recent Dutch earthquake

Post by Xorfor »

@quilae
Thnx for your idea! I updated the plugin. It has now a parameter where you can select Google Maps or OpenStreetMap!
Post Reply

Who is online

Users browsing this forum: winner61 and 1 guest