All nodes Inactive

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

 

atomozero's picture

Re: All nodes Inactive


Welcome to minicom 2.6.1 
OPTIONS: I18n 
Compiled on Apr 28 2012, 19:24:31. 
Port /dev/ttyAMA0 
Press CTRL-A Z for help on special keys 
19 207 0 211 0 244 1 26 0 
19 10 0 0 0 0 0 0 0 
19 9 0 0 0 0 0 0 0 
19 8 0 0 0 0 0 0 0 
19 7 0 0 0 0 0 0 0 
19 6 0 0 0 0 0 0 0 
19 5 0 0 0 0 0 0 0 
19 4 0 0 0 0 0 0 0 
19 3 0 0 0 0 0 0 0 
19 2 0 0 0 0 0 0 0 
19 1 0 0 0 0 0 0 0 
19 0 0 0 0 0 0 0 0 
19 207 0 211 0 7 2 26 0
Robert Wall's picture

Re: All nodes Inactive

Why do you have 11 'names' & 11 'datacodes' but only 10 'scales & 10 'units'?

atomozero's picture

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 :(

emonhub.log:

2015-11-13 10:21:16,629 INFO MainThread EmonHub Pre-Release Development Version (rc2.0?) 
2015-11-13 10:21:16,632 INFO MainThread Opening hub... 
2015-11-13 10:21:16,635 INFO MainThread Logging level set to DEBUG 
2015-11-13 10:21:16,638 INFO MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
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 
2015-11-13 10:21:18,656 INFO MainThread Setting RFM2Pi frequency: 868 (8b) 
2015-11-13 10:21:19,661 INFO MainThread Setting RFM2Pi group: 210 (210g) 
2015-11-13 10:21:20,665 INFO MainThread Setting RFM2Pi quiet: 0 (0q) 
2015-11-13 10:21:21,669 INFO MainThread Setting RFM2Pi baseid: 5 (5i) 
2015-11-13 10:21:22,673 INFO MainThread Setting RFM2Pi calibration: 230V (1p) 
2015-11-13 10:21:23,677 DEBUG MainThread Setting RFM2Pi subchannels: ['ToRFM12'] 
2015-11-13 10:21:23,684 DEBUG MainThread Interfacer: Subscribed to channel' : ToRFM12 
2015-11-13 10:21:23,687 DEBUG MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS'] 
2015-11-13 10:21:23,690 DEBUG MainThread Interfacer: Subscribed to channel' : ToRFM12 
2015-11-13 10:21:23,700 INFO MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2015-11-13 10:21:23,707 INFO MainThread MQTT Init mqtt_host=127.0.0.1 mqtt_port=1883 
2015-11-13 10:21:23,732 DEBUG MainThread MQTT Subscribed to channel' : ToEmonCMS 
2015-11-13 10:21:23,739 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2015-11-13 10:21:23,759 DEBUG MainThread emoncmsorg Subscribed to channel' : ToEmonCMS 
2015-11-13 10:21:23,860 INFO MQTT Connecting to MQTT Server 
2015-11-13 10:21:23,959 INFO MQTT connection status: Connection successful 
2015-11-13 10:21:23,974 DEBUG MQTT CONACK => Return code: 0 
2015-11-13 10:21:24,123 INFO MQTT on_subscribe
....
....
2015-11-13 10:32:47,787 DEBUG MainThread MQTT Subscribed to channel' : ToEmonCMS
2015-11-13 10:32:47,791 DEBUG MainThread emoncmsorg Subscribed to channel' : ToEmonCMS
2015-11-13 10:32:55,311 INFO emoncmsorg sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1447410775
2015-11-13 10:32:55,521 DEBUG emoncmsorg acknowledged receipt with 'ok' from http://emoncms.org 
2015-11-13 10:33:06,772 DEBUG MainThread SIGINT received. 
2015-11-13 10:33:06,775 INFO MainThread Exiting hub... 
2015-11-13 10:33:06,895 INFO MainThread Exit completed

 

pb66's picture

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

 

atomozero's picture

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

pb66's picture

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

atomozero's picture

Re: All nodes Inactive

Upgrade the firmware and work!!!!

Thx All!!

http://www.andreabernardi.it/emoncms/

:)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.