CurrentCost meters
From MiOS
(Difference between revisions)
m (→OptiSmart) |
|||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Hardware]] | ||
==Devices== | ==Devices== | ||
Line 12: | Line 13: | ||
http://www.phidgets.com/docs/1102_User_Guide | http://www.phidgets.com/docs/1102_User_Guide | ||
+ | |||
+ | Putting the OptiSmart to creative use | ||
+ | |||
+ | [[File:SI39G_OptiSmart.jpg|400px]] | ||
+ | |||
+ | HW: | ||
+ | |||
+ | Geiger-Mueller counter (http://www.pollin.de/shop/dt/Njc3OTgxOTk-/Bausaetze_Module/Bausaetze/Bausatz_Geiger_Mueller_Zaehler_.html) | ||
+ | |||
+ | SW: | ||
+ | |||
+ | CurrentCost plugin (http://code.mios.com/trac/mios_currentcost-envir) and | ||
+ | |||
+ | <source lang="text"> | ||
+ | luup.variable_watch( 'update_gamma_dose_rate', 'urn:micasaverde-com:serviceId:EnergyMetering1', 'Pulse', 259 ) | ||
+ | |||
+ | |||
+ | function update_gamma_dose_rate( lul_device, lul_service, lul_variable, lul_value_old, lul_value_new ) | ||
+ | |||
+ | if gdr_startup_time == nil | ||
+ | then | ||
+ | |||
+ | gdr_startup_time = os.time() | ||
+ | gdr_startup_count = tonumber( lul_value_new ) | ||
+ | |||
+ | gdr_task_handle = luup.task( 'Initializing ...', 2, 'Dose rate', -1 ) | ||
+ | |||
+ | else | ||
+ | |||
+ | local total_counts = tonumber( lul_value_new ) | ||
+ | |||
+ | total_counts = total_counts - gdr_startup_count | ||
+ | |||
+ | local total_time = os.time() - gdr_startup_time | ||
+ | |||
+ | -- conversion for Geiger-Mueller counter SI39G @ 410 V | ||
+ | |||
+ | local gamma_dose_rate = total_counts / total_time * 3600 / 3.86 | ||
+ | |||
+ | gamma_dose_rate = math.floor( gamma_dose_rate + 0.5 ) | ||
+ | |||
+ | local gdr_message = tostring( gamma_dose_rate ) .. ' nSv/h ' .. | ||
+ | '(' .. tostring( total_time ) .. ' s; ' .. tostring( total_counts ) .. ' imp)' | ||
+ | |||
+ | luup.task( gdr_message, 2, 'Dose rate', gdr_task_handle ) | ||
+ | |||
+ | end | ||
+ | |||
+ | end | ||
+ | </source> | ||
+ | |||
+ | [[File:SI39G_OptiSmart2.jpg]] | ||
===GaSmart=== | ===GaSmart=== |
Latest revision as of 03:06, 15 June 2013
Contents |
[edit] Devices
[edit] EnviR
[edit] Energy transmitter
[edit] IAM
[edit] OptiSmart
http://tickett.wordpress.com/2011/10/26/current-cost-optismart/
http://www.phidgets.com/docs/1102_User_Guide
Putting the OptiSmart to creative use
HW:
Geiger-Mueller counter (http://www.pollin.de/shop/dt/Njc3OTgxOTk-/Bausaetze_Module/Bausaetze/Bausatz_Geiger_Mueller_Zaehler_.html)
SW:
CurrentCost plugin (http://code.mios.com/trac/mios_currentcost-envir) and
luup.variable_watch( 'update_gamma_dose_rate', 'urn:micasaverde-com:serviceId:EnergyMetering1', 'Pulse', 259 ) function update_gamma_dose_rate( lul_device, lul_service, lul_variable, lul_value_old, lul_value_new ) if gdr_startup_time == nil then gdr_startup_time = os.time() gdr_startup_count = tonumber( lul_value_new ) gdr_task_handle = luup.task( 'Initializing ...', 2, 'Dose rate', -1 ) else local total_counts = tonumber( lul_value_new ) total_counts = total_counts - gdr_startup_count local total_time = os.time() - gdr_startup_time -- conversion for Geiger-Mueller counter SI39G @ 410 V local gamma_dose_rate = total_counts / total_time * 3600 / 3.86 gamma_dose_rate = math.floor( gamma_dose_rate + 0.5 ) local gdr_message = tostring( gamma_dose_rate ) .. ' nSv/h ' .. '(' .. tostring( total_time ) .. ' s; ' .. tostring( total_counts ) .. ' imp)' luup.task( gdr_message, 2, 'Dose rate', gdr_task_handle ) end end
[edit] GaSmart
http://forum.micasaverde.com/index.php/topic,6752.msg113255.html#msg113255
[edit] Documentation
Interface specification: http://www.currentcost.com/download/Envi%20XML%20v19%20-%202011-01-11.pdf
[edit] Software
[edit] MiOS plugin
http://code.mios.com/trac/mios_currentcost-envir