Hi, i use the standard iso with raspberry 1 and RFM12Pi V2 but all nodes are inactive :(
emohub.log:
2015-11-12 18:27:35,915 INFO emoncmsorg sending: http://localhost/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y 2015-11-12 18:27:36,000 WARNING emoncmsorg emoncmsorg couldn't send to server, HTTPError: 404 2015-11-12 18:28:05,764 INFO emoncmsorg sending: http://localhost/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1447352885 2015-11-12 18:28:05,813 WARNING emoncmsorg emoncmsorg couldn't send to server, HTTPError: 404 2015-11-12 18:28:05,833 WARNING emoncmsorg send failure: wanted 'ok' but got ''
emocms.log:
2015-11-12 18:34:04 FEEDWRITER INFO PHPTimeSeries bytes written: 0 2015-11-12 18:34:04 FEEDWRITER INFO PHPFina bytes written: 0 2015-11-12 18:34:05 MQTT INFO Reloading config 2015-11-12 18:34:11 MQTT INFO Reloading config 2015-11-12 18:34:17 MQTT INFO Reloading config 2015-11-12 18:34:23 MQTT INFO Reloading config 2015-11-12 18:34:29 MQTT INFO Reloading config 2015-11-12 18:34:35 MQTT INFO Reloading config
[[RFM2Pi]]
Type = EmonHubJeeInterfacer
[[[init_settings]]]
com_port = /dev/ttyAMA0
com_baud = 38400
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
subchannels = ToRFM12,
group = 210 #(default:210)
frequency = 868 #(default:433)
baseid = 1 #(emonPi default:5)
quiet = false #(default:true)
calibration = 230V #(UK/EU: 230V, US: 110V)
[[emoncmsorg]]
Type = EmonHubEmoncmsHTTPInterfacer
[[[init_settings]]]
[[[runtimesettings]]]
pubchannels = ToRFM12,
subchannels = ToEmonCMS,
url = http://localhost
apikey = [i use the Write API Key]
senddata = 1
sendstatus = 1
[[1]]
nodename = emonPi
firmware = emonPi_RFM69CW_RF12Demo_DiscreteSampling.ino
hardware = emonpi
[[[rx]]]
names = power1,power2,power1_plus_power2,Vrms,T1,T2,T3,T4,T5,T6,pulseCount
datacodes = h, h, h, h, h, h, h, h, h, h, L
scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1
units = W,W,p,V,C,C,C,C,C,C
[[19]]
nodename = emonTH_1
firmware = emonTH_DHT22_DS18B20.ino
hardware = emonTH_(Node_ID_Switch_DIP1:OFF_DIP2:OFF)
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
Re: All nodes Inactive
Re: All nodes Inactive
Why do you have 11 'names' & 11 'datacodes' but only 10 'scales & 10 'units'?
Re: All nodes Inactive
I have corrected the script using this
https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
[[5]]
nodename = emonPi
firmware = emonPi_RFM69CW_RF12Demo_DiscreteSampling.ino
hardware = emonpi
[[[rx]]]
names = power1,power2,power1_plus_power2,Vrms,T1,T2,T3,T4,T5,T6,pulseCount
datacodes = h, h, h, h, h, h, h, h, h, h, L
scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
units = W,W,W,V,C,C,C,C,C,C,p
but the node are all inactive :(
Re: All nodes Inactive
"2015-11-13 10:21:16,644 DEBUG MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2015-11-13 10:21:18,653 WARNING MainThread Device communication error - check settings"
Are you sure your RFM12Pi v2 is 38400 baud? originally they were 9600, then briefly 57600 before settling at 38400 so if you are not 100% sure try the other bauds in emonhub.conf.
Also I believe the "emon-pi" variant insists on a "OK" prefix so if using an early rfm2pi firmware the packets may get discarded, si if the baud isn't 38400 it maybe worth updating the firmware rather than just changing the baud in emonhub.conf.
"2015-11-13 10:21:22,673 INFO MainThread Setting RFM2Pi calibration: 230V (1p)"
This setting isn't required for non-emonpi emonbases and should be removed from emonhub.conf or when the rfm2pi can communicate it will respond to that unknown command with a full print of the instructions.
I think the http 404 errors in your original post were due to "emoncmsorg" interfacers url pointing at localhost, which isn't required as the local posting to emoncms is done via mqtt and the input api is incomplete on the v8.5 low-write emoncms.
"2015-11-13 10:21:16,629 INFO MainThread EmonHub Pre-Release Development Version (rc2.0?)"
You should also use the update routine as you are using the very first un-updated "emon-pi" variant of emonhub, this version info is from the original emonhub experimental branch this variant is derived from.
Although Robert was correct in spotting the inaccuracies in the nodes section, in this instance it probably won't help you as node 5 is the emonPi add-on board which you are not using. you will however, need to explicitly define each of the nodes you do have in your system for them to be processed, but you will see any processing errors in the emonhub.log once you have comms between the rfm2pi and emonhub so it will be easier then.
Paul
Re: All nodes Inactive
very thx :)
I'm trying to upgrade the rfm2pi with this command
avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 9600 -U flash:w:RF12_Demo_atmega328.cpp.hex
it is normal that puts us almost two hours?
Andrea
Re: All nodes Inactive
No, it should not take very long at all. the avrdude command line should remain "-b 38400" not "-b 9600". to test the commandline and your install drop the "-U flash,,,,etc" to just communicate without attempting an upload eg
avrdude -v -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 38400
Sorry if this confuses things further, but the baud we have been discussing is the baud defined in the firmware sketch as the speed for on-going serial communication during normal runtime, which could have been set to any of the 3 values mentioned depending on the era/revision of the device or more specifically the installed firmware. The baud in the avrdude command line is actually the baud defined by the devices bootloader for serial uploads of the afore mentioned sketches(firmware). This 'overriding" baud should be 38400 regardless of era or version etc, it overrides the default of 115200 which is usual for 16MHz devices whereas the RFM2Pi's are 8MHz as they have no external crystal.
Paul
Re: All nodes Inactive
Upgrade the firmware and work!!!!
Thx All!!
http://www.andreabernardi.it/emoncms/
:)