RS485 Meter Interface with EmonPi

Hi I am new to EmonPi and this is my first post, Not much familiar with Linux

My final setup will be Xbee S2 Mesh network with 10-50 3-ph Meters to monitor industrial consumption

 3-Ph Multifuction Meter--->Xbee S2--->Arduino-->>EmonPi

I have successfully got data from 3 Nodes on Xbee S2 Mesh with MODBUS Protocol. My software is in VB6

Basic data logging, Display and Log to excel, Want to upgrade with EmonPi

My Hardware Setup:

1. RaspberryPi with vlow-write-v8.5 image SD card.

2. (for testing) FT232 USB to serial converter connected to Raspberry Pi, Rx and GND Line.

3. I played with EmonHub Config Editor and Now Confused Need Help

Question is: How I can get data to nodes using SerialDirect ?

1. What Must be there in EmonHub Config to get data on nodes

Example : three voltages at node 10

V1 V2 V3

2. How I can test It, with serial Terminal on Windows Computer.

I tried to send below data, no luck need help to get data on emonPi

10 230 120 120

[node id] [v1] [v2] [v3]

I've gone through http://openenergymonitor.org/emon/node/3884

Booted successfully

Found some issues

1. Blank screen after "startx" to solve this problem used "rpi-rw" command

 

Capacitor70's picture

Re: RS485 Meter Interface with EmonPi

Thanks, Waiting for help

Capacitor70's picture

Re: RS485 Meter Interface with EmonPi

This is my EmonHub.config

I am sending serially this data for node 6

6 12 12 12 [+Cr]

Noting special in log view no error or any sign of data reception

#######################################################################
#######################      emonhub.conf     #########################
#######################################################################
###
### SPECIMEN emonHub configuration file
### Note that when installed from apt, a new config file is written
### by the debian/postinst script, so changing this file will do
### nothing in and of itself.
###
### Each Interfacer and each Reporter has
### - a [[name]]: a unique string
### - a type: the name of the class it instantiates
### - a set of init_settings (depends on the type)
### - a set of runtimesettings (depends on the type)
### Both init_settings and runtimesettings sections must be defined,
### even if empty. Init settings are used at initialization,
### and runtime settings are refreshed on a regular basis.
### Many settings below are "commented out" as they are not mandatory and
### have been included as a template or to provide alternative options
### removing the leading # will enable the setting and override the default
### Default settings are shown as comments on the same line as the setting
### eg #(default:xyz) "xyz" is set if the setting is "commented out".
###
### All lines beginning with '###' are comments and can be safely removed.
###
#######################################################################
#######################    emonHub  settings    #######################
#######################################################################

[hub]

### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
### see here : http://docs.python.org/2/library/logging.html
loglevel = DEBUG #(default:WARNING)

#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]

[[SerialDirect]]
    Type = EmonHubSerialInterfacer
    [[[init_settings]]]
        com_port = /dev/ttyAMA0
        com_baud = 38400
    [[[runtimesettings]]]

### This interfacer manages the RFM2Pi module
[[RFM2Pi]]
    #Type = EmonHubJeeInterfacer
    [[[init_settings]]]
        com_port = /dev/ttyAMA0
        com_baud = 38400
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        subchannels = ToRFM12,
        
        # datacode = B #(default:h)
        # scale = 100 #(default:1)
        group = 210 #(default:210)
        frequency = 433 #(default:433)
        baseid = 5 #(emonPi default:5)
        quiet = false #(default:true)
        calibration = 230V #(UK/EU: 230V, US: 110V)
        # interval = 300 #(default:0)
        # nodeoffset = 32 #(default:0)

### This interfacer manages the RFM2Pi module
[[MQTT]]

    Type = EmonHubMqttInterfacer
    [[[init_settings]]]
        mqtt_host = 127.0.0.1
        mqtt_port = 1883
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        basetopic = emonhub/
        
[[emoncmsorg]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = http://localhost/emoncms
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        senddata = 1
        sendstatus = 1
        
#######################################################################
#######################          Nodes          #######################
#######################################################################

[nodes]

### List of nodes by node ID
### 'datacode' is default for node and 'datacodes' are per value data codes.
### if both are present 'datacode' is ignored in favour of 'datacodes'
### eg node 99 would expect 1 long and 4 ints, unless the "datacodes" line
### was removed, then "datacode" would make it expect any number of longs,
### likewise per value "scales" will override default node "scale", the number
### of "scales" must match the number of values or frame will be discarded.

[[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

[[6]]
    nodename = Manoj
    firmware = emonTxShield
    hardware = emonTxShield
    [[[rx]]]
        names = power1,power2,power3
        datacodes = h, h, h
        scales = 1,1,1
        units = W,W,W

[[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

[[20]]
    nodename = emonTH_2
    firmware = emonTH_DHT22_DS18B20.ino
    hardware = emonTH_(Node_ID_Switch_DIP1:ON_DIP2:OFF)
    [[[rx]]]
       names = temperature, external temperature, humidity, battery
       datacode = h
       scales = 0.1,0.1,0.1,0.1
       units = C,C,%,V

[[21]]
    nodename = emonTH_3
    firmware = emonTH_DHT22_DS18B20.ino
    hardware = emonTH_(Node_ID_Switch_DIP1:OFF_DIP2:ON)
    [[[rx]]]
       names = temperature, external temperature, humidity, battery
       datacode = h
       scales = 0.1,0.1,0.1,0.1
       units = C,C,%,V

[[22]]
    nodename = emonTH_4
    firmware = V1_5_emonTH_DHT22_DS18B20.ino
    hardware = emonTH_(Node_ID_Switch_DIP1:ON_DIP2:ON)
    [[[rx]]]
       names = temperature, external temperature, humidity, battery
       datacode = h
       scales = 0.1,0.1,0.1,0.1
       units = C,C,%,V

[[10]]
    nodename = emonTx_1
    firmware =V1_6_emonTxV3_4_DiscreteSampling
    hardware = emonTx_(NodeID_DIP_Switch1:OFF)
    [[[rx]]]
       names = power1, power2, power3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse #Firmware V1.6
       #names = power1, power2, power3, power4, Vrms, temp                                           #Firmware =<V1.4 (un-comment)
       datacode = h
       scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1 #Firmware V1.6
       units =W,W,W,W,V,C,C,C,C,C,C,p                   #FirmwareV1.6
       #scales = 1,1,1,1,0.01,0.1                       #Firmware =<V1.4 (un-comment) 
       #units =W,W,W,W,V,C                              #Firmware =<V1.4 (un-comment)
       

[[9]]
    nodename = emonTx_2
    firmware =V1_6_emonTxV3_4_DiscreteSampling
    hardware = emonTx_(NodeID_DIP_Switch1:ON)
    [[[rx]]]
       names = power1, power2, power3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse #Firmware V1.6
       #names = power1, power2, power3, power4, Vrms, temp                                           #Firmware =<V1.4 (un-comment)
       datacode = h
       scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1 #Firmware V1.6
       units =W,W,W,W,V,C,C,C,C,C,C,p                   #FirmwareV1.6
       #scales = 1,1,1,1,0.01,0.1                       #Firmware =<V1.4 (un-comment) 
       #units =W,W,W,W,V,C                              #Firmware =<V1.4 (un-comment)

Capacitor70's picture

Re: RS485 Meter Interface with EmonPi

SD Image file is latest emonSD-17Jun2015

Comment viewing options

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