Ignore:
Timestamp:
Nov 24, 2014, 9:30:20 PM (9 years ago)
Author:
njw <njw@…>
Branches:
master
Children:
5ce93a3
Parents:
af9afaf
Message:

Daemonized monitoring scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • de.wigbels.ruby/hothotread/hothotpiper.rb

    raf9afaf rdaaef3e  
    1818$SAFE=0
    1919
    20 
    2120#------------------------------------------
    2221require 'net/http'
     
    2524include PiPiper
    2625
     26@mypath = File.expand_path(File.dirname(__FILE__))
     27
    2728
    2829watch :pin => 4, :trigger => :falling do
    2930  puts('added 10 liter of gas to sensor-database')
    3031  Net::HTTP.get(URI.parse('http://www.wigbels.net/cgi-bin/hhw.rb?sensorid=1&data=10'))
     32  system("rrdtool update #{@mypath}/energy.rrd N:10:U:U")
    3133end
    3234
Note: See TracChangeset for help on using the changeset viewer.