Changeset daaef3e for de.wigbels.ruby/hotcoldrain/hotcoldrain.rb
- Timestamp:
- Nov 24, 2014, 9:30:20 PM (9 years ago)
- Branches:
- master
- Children:
- 5ce93a3
- Parents:
- af9afaf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
de.wigbels.ruby/hotcoldrain/hotcoldrain.rb
raf9afaf rdaaef3e 21 21 #------------------------------------------ 22 22 class HotColdRain < Logger::Application 23 attr_accessor :temp1, :humidity1, :serialport 23 attr_accessor :temp1, :humidity1, :serialport, :mypath 24 24 25 25 def initialize(application_name) 26 26 super(application_name) 27 27 @serialport = SerialPort.new("/dev/ttyUSB0", 9600, 8, 1, SerialPort::NONE) 28 @mypath = File.expand_path(File.dirname(__FILE__)) 28 29 end 29 30 … … 62 63 rrddata = 'N:'+datagrams.join(':') 63 64 64 system("rrdtool update weather.rrd #{rrddata}")65 system("rrdtool update #{mypath}/weather.rrd #{rrddata}") 65 66 66 67 MQTT::Client.connect('mqtt://notwist:pixies@wigbels.net') do |c|
Note: See TracChangeset
for help on using the changeset viewer.