Created At
Oct 20, 2017
Created By Marcin S. Milewski
Reads the information on the level of ionized radiation from the sensors distributed all over Europe, some ...
Created At
Oct 20, 2017
Last Update
Dec 14, 2018
Platforms
HC 2
Views
6015
Download
151
--------------------------------------------------------------------
Virtual Device to pull information on ionized radiation level
-- version 1.69 --
-- Date: 2nd Mar 2017 --
--------------------------------------------------------------------
by Marcin S. Milewski (gucio1234)
FUNCTIONS
This Virtual Device reads the information on the level of ionized radiation from the http://radioactiveathome.org/map/.There are sensors distributed all over Europe, some in US, Japan and other countries.
INSTALLATION
For the VD to be functional the following has to be adjusted:
ThingSpeak API Key if one wants to push data to ThingSpeak. IDs of the Icons (green, yellow, orange, red, yellow with timer)
Coordiantes of the locaton of the sensor
How to know where are the sensors located and how to get their coordinates :
The map of the sensors is at: http://radioactiveathome.org/map/
Click on the dot of the sensor you want to know the location ID
You will see the popup with the information of the sensor.
Note 'Details Sensor' number
You need to see the source of the http://radioactiveathome.org/map/
Enter 'view-source:http://radioactiveathome.org/map/'
into the browser (eg. Chrome)
Press Ctrl-F to find the sensor number you noted earlier
Next to the number found you will see the coordinates
Enter coordinates into the code below.
CHANGLOG
What is new in version 0.67:
Multilangual support.
What is new in version 1.67:
The VD is not anymore auto-refreshed with the time interval set by slider, but it is refreshed by pressing a button. This is to have it triggered by Main Timer Scene.
What is new in version 1.68:
German translation added (by gobbli of forum.fibaro.com)
What is new in version 1.69:
Dutch and Slovak translation added (by Bodyart of forum.fibaro.com)
Italian and Croatian translation added (by Sankotronic of forum.fibaro.com)
CREDITS TO
I found a problem in your code: function getWebPageData() local HCnet=Net.FHttp("radioactiveathome.org") local webString,sepString,stationID,web_data=HCnet:GET("/map/"),'GLatLng',"0",{} When you do GET you are not checking if the exit code and status is correct so when there are some problems with radioactiveathome.org site the virtual device hangs and stops to collect any data anymore. You can simple correct this by: unction getWebPageData() local HCnet=Net.FHttp("radioactiveathome.org") local sepString,stationID,web_data='GLatLng',"0",{} local webString, status, errorCode = HCnet:GET("/map/") if ((tonumber(errorCode) == 0) and (tonumber(status) == 200)) then local _d_unit,_active,skip=unit(),true,false (...) else fibaro:debug("Error processing request, status: " .. status .. " | errorCode: " .. errorCode) end end
Can it be launched on HC Lite?
Newest version of this VD was published on marketplace : https://marketplace.fibaro.com/items/advanced-radiation-monitor-vd-v2-1 It is much more advanced, and ism hands free. No user input is needed. I do recommend to upgrade to this version 2.1 published by Sankotronic.
Terje, I did not know uradmonitor.com project earlier. They offered API interface for their data. The Radiation monitor I published is not easy to link to their project, but I will consider to focus on another, dedicated VD.
@Maciej Gawrysiak Thank you very much for your interest in Radiation Monitor. The version published here was significantly improved and enhanced by @Sankotronic. This new version is available at the following link : https://forum.fibaro.com/files/file/209-advanced-radiation-monitor-arm-vd-standalone/ Since we do have improved version available, one which was published here is not updated anymore.