From fa49fa381ac1d61fc2e7611fedba2f98a5dcdb41 Mon Sep 17 00:00:00 2001 From: Ben Aylott Date: Wed, 12 Jul 2017 17:42:30 +0100 Subject: [PATCH 1/4] Rename vedirect.emonhub.conf to bmv700.vedirect.emonhub.conf --- .../{vedirect.emonhub.conf => bmv700.vedirect.emonhub.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename conf/interfacer_examples/vedirect/{vedirect.emonhub.conf => bmv700.vedirect.emonhub.conf} (100%) diff --git a/conf/interfacer_examples/vedirect/vedirect.emonhub.conf b/conf/interfacer_examples/vedirect/bmv700.vedirect.emonhub.conf similarity index 100% rename from conf/interfacer_examples/vedirect/vedirect.emonhub.conf rename to conf/interfacer_examples/vedirect/bmv700.vedirect.emonhub.conf From 67e6ea98690cc12377d1fbabd6d05c1d5f8d9358 Mon Sep 17 00:00:00 2001 From: Ben Aylott Date: Wed, 12 Jul 2017 17:59:48 +0100 Subject: [PATCH 2/4] Update readme.md --- conf/interfacer_examples/vedirect/readme.md | 31 ++++++++------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/conf/interfacer_examples/vedirect/readme.md b/conf/interfacer_examples/vedirect/readme.md index 5ba63e27..de96c6f0 100644 --- a/conf/interfacer_examples/vedirect/readme.md +++ b/conf/interfacer_examples/vedirect/readme.md @@ -1,20 +1,18 @@ -#VE Direct interface Victron products# +# Interfacer for Victron VE.Direct Protocol -The VE Direct protocol is as binary/ASCII [protocol](https://www.victronenergy.com/upload/documents/VE.Direct-Protocol.pdf) used by [Victron Energy] to communicate between it's products. For those who don't know, Victron is the leading producer of solar inverters and charge controllers designed for the off grid market. +The VE.Direct protocol is as binary/ASCII [protocol](https://www.victronenergy.com/live/vedirect_protocol:faq) created and used by [Victron Energy](https://www.victronenergy.com/) for communication between and with their products. - With this interfacer now it's possible to interface data from any VE Direct compatible Victron product with Emon. In this example we use the [BMV 700](https://www.google.rw/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwi14t-MkqfLAhVBExoKHRGeCioQFggbMAA&url=https%3A%2F%2Fwww.victronenergy.com%2Fbattery-monitors%2Fbmv-700&usg=AFQjCNGENUubkSY_HkWGN61NdkP8onXHag&sig2=XjH6HIbtSzwY_kDDKOfsJw), which is a battery monitor. For emon users that have a battery bank, this will allow them to get stats on their batteries very easily. +This interfacer provides support for reading data from any Victron product that can use the VE.Direct protocol for inter-device communication. Currently this includes the BMV600, BMV700, Blue Solar MPPT, and Phoenix ranges. -##Usage and configuration## -There is a sample vedirect.emonhub.conf file located in this directory. -This is already preconfigured to talk to a BMV700 that is connect to the emonpi via isolated [USB cable](https://www.victronenergy.com/accessories/ve-direct-to-usb-interface) +Example configurations are provided for the BMV700 battery monitor and Blue Solar MPPT charge controller. -Each VE Direct product has it's own source of variables that it delivers. The full list of variables can be found on Victron's github page as [datalist.py](https://github.com/victronenergy/velib_python/blob/master/dbusmonitor.py). +A VE.Direct to USB converter is available from Victron which would allow direct connection to a emonPi/Raspberry Pi or laptop. -This file isn't necessary, but it's just useful as a reference to see which data codes correspond to which values. +## Usage and configuration +Each supported product has it's own set of data that can be read over VE.Direct called 'fields' . The full list of available fields can be found in the VE.Direct Protocol white paper found [here](https://www.victronenergy.com/support-and-downloads/whitepapers). This information can be used to adapt the provided configurations for your device. - -###Sample interfacer config within emonhub.conf ### +### Sample interfacer config within emonhub.conf # Sample configuration for Victron Product with VEDirect connection over USB # Configuration is for BMV 700 [[VEDirect]] @@ -22,7 +20,7 @@ This file isn't necessary, but it's just useful as a reference to see which data [[[init_settings]]] com_port = /dev/ttyUSB0 # Where to find our device com_baud = 19200 # Baud rate needed to decode - toextract = SOC,CE,TTG,V,I,Relay,Alarm # These are the fields we wish to extract, explanation can be seen in datalist.py + toextract = SOC,CE,TTG,V,I,Relay,Alarm poll_interval = 10 # How often to get data in seconds [[[runtimesettings]]] nodeoffset = 9 #make sure this matches with nodename below @@ -31,13 +29,11 @@ This file isn't necessary, but it's just useful as a reference to see which data basetopic = emonhub/ -### Followed by a corresponding Node declaration in emonhub.conf### +### Followed by a corresponding Node declaration in emonhub.conf In this example our battery monitor will be designated node id 9 [[9]] nodename = emonDC - firmware =V1_6_emonTxV3_4_DiscreteSampling #not used - hardware = emonTx_(NodeID_DIP_Switch1:ON) #not used [[[rx]]] names = SOC,CE,TTG,V,I,Relay,Alarm # Make sure this matches 'toextract' in interfacer datacode = 0 #no need to decode values @@ -45,11 +41,8 @@ In this example our battery monitor will be designated node id 9 units =%,Ah,s,V,A,S,S -With this config in place now you simply need to restart emonhub on our emonpi by ssh'ing into it and typing +With this config in place you just need to restart emonhub on your emonPi by rebooting it or ssh'ing into it and typing $>sudo service emonhub restart -If there are any problems you can debug by looking inside /var/emonhub/emonhub.log - -Hope that helps - +If there are any problems you can debug by looking inside /var/emonhub/emonhub.log. From 0e53298c0daf00fbe7e960b9170bf5d9a50c40e4 Mon Sep 17 00:00:00 2001 From: Ben Aylott Date: Thu, 13 Jul 2017 14:15:15 +0100 Subject: [PATCH 3/4] Update readme.md --- conf/interfacer_examples/vedirect/readme.md | 39 ++++++++++----------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/conf/interfacer_examples/vedirect/readme.md b/conf/interfacer_examples/vedirect/readme.md index de96c6f0..391dd476 100644 --- a/conf/interfacer_examples/vedirect/readme.md +++ b/conf/interfacer_examples/vedirect/readme.md @@ -12,33 +12,32 @@ A VE.Direct to USB converter is available from Victron which would allow direct Each supported product has it's own set of data that can be read over VE.Direct called 'fields' . The full list of available fields can be found in the VE.Direct Protocol white paper found [here](https://www.victronenergy.com/support-and-downloads/whitepapers). This information can be used to adapt the provided configurations for your device. -### Sample interfacer config within emonhub.conf +### Sample interfacer config for a BMV700 # Sample configuration for Victron Product with VEDirect connection over USB # Configuration is for BMV 700 [[VEDirect]] Type = EmonHubVEDirectInterfacer - [[[init_settings]]] - com_port = /dev/ttyUSB0 # Where to find our device - com_baud = 19200 # Baud rate needed to decode - toextract = SOC,CE,TTG,V,I,Relay,Alarm - poll_interval = 10 # How often to get data in seconds - [[[runtimesettings]]] - nodeoffset = 9 #make sure this matches with nodename below - pubchannels = ToEmonCMS, - subchannels = ToBMV, - basetopic = emonhub/ - - -### Followed by a corresponding Node declaration in emonhub.conf -In this example our battery monitor will be designated node id 9 - - [[9]] - nodename = emonDC + [[[init_settings]]] + com_port = /dev/ttyUSB0 # Where to find our device + com_baud = 19200 # Baud rate needed to decode + toextract = SOC,CE,TTG,V,I,Relay,Alarm + poll_interval = 10 # How often to get data in seconds + [[[runtimesettings]]] + nodeoffset = 9 #make sure this matches with nodename below + pubchannels = ToEmonCMS, + subchannels = ToBMV, + basetopic = emonhub/ + + + # Followed by a corresponding Node declaration + + [[9]] # This node name should be consistent with the nodeoffset parameter above + nodename = VictronBMV700 [[[rx]]] - names = SOC,CE,TTG,V,I,Relay,Alarm # Make sure this matches 'toextract' in interfacer + names = SOC,CE,TTG,V,I,Relay,Alarm # Make sure this matches 'toextract' in interfacer definition above datacode = 0 #no need to decode values scales = 0.1,1,1,0.001,1,1,1 # Some scaling necassary - units =%,Ah,s,V,A,S,S + units = %,Ah,s,V,A,S,S With this config in place you just need to restart emonhub on your emonPi by rebooting it or ssh'ing into it and typing From da696d33ff948aba4ad16baec8176124ef95e1bc Mon Sep 17 00:00:00 2001 From: Ben Aylott Date: Thu, 13 Jul 2017 14:18:11 +0100 Subject: [PATCH 4/4] Create mppt.vedirect.emonhub.conf --- .../vedirect/mppt.vedirect.emonhub.conf | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 conf/interfacer_examples/vedirect/mppt.vedirect.emonhub.conf diff --git a/conf/interfacer_examples/vedirect/mppt.vedirect.emonhub.conf b/conf/interfacer_examples/vedirect/mppt.vedirect.emonhub.conf new file mode 100644 index 00000000..4bf2ab17 --- /dev/null +++ b/conf/interfacer_examples/vedirect/mppt.vedirect.emonhub.conf @@ -0,0 +1,22 @@ +[[VEDirect]] + Type = EmonHubVEDirectInterfacer + [[[init_settings]]] + com_port = /dev/ttyUSB0 + com_baud = 19200 + toextract = V,VPV,PPV,I,IL,LOAD,Relay,H19,H20,H21,H22,H23,ERR,CS,FW,PID,HSDS + poll_interval = 10 + [[[runtimesettings]]] + nodeoffset = 9 #make sure this matches with nodename below + pubchannels = ToEmonCMS, + subchannels = ToBlueSolarMPTT, + basetopic = emonhub/ + +[nodes] + +[[9]] + nodename = BlueSolarMPTT + [[[rx]]] + names = V,VPV,PPV,I,IL,LOAD,Relay,H19,H20,H21,H22,H23,ERR,CS,FW,PID,HSDS + datacode = 0 + scales = 0.001,0.001,0.001,0.001,1,1,1,1,0.001,1,0.001,1,1,1,1,1,1,1 + units = V,V,W,A,A,1,1,kWh,kWh,W,kWh,W,1,1,1,1,1,1