Read datas from a Victron Bmv 700 using a RaspberryPi ONLY (newbie)

I bought my Emonpi few weeks ago. I’ve plugged my Victron BMV 700 (battery controller) into the emonpi and with a bit a configuration (in the emonhub.conf file) i managed to see datas on my EmonCMS account. It works Perfectly fine !

But now i want to read Bmv 700 datas using my beloved RaspberryPi3 ONLY (no emonpi cardboard, no RFM69PI…), since i couldn’t find any solutions to read my bmv 700 directly i was wondering if i could use emonhub on my raspberryPi to send datas in my emoncms page (exactly the same way i did with my emonpi).

I’ve installed the emonhub (emonpi-variant version) on my raspberry, edit the emonhub.conf, plugged the BMV700 with the victron connect USB cable but it didnt works at all.
I get some errors in the emonhub.log like this :

2016-10-07 16:47:05,025 DEBUG SIGINT received.
2016-10-07 16:47:05,236 INFO Exiting hub...
2016-10-07 16:47:05,266 INFO Exit completed
2016-10-07 16:47:05,691 INFO EmonHub Pre-Release Development Version (rc1.2)
2016-10-07 16:47:05,691 INFO Opening hub...
2016-10-07 16:47:05,692 INFO Logging level set to DEBUG
2016-10-07 16:47:05,692 INFO Creating EmonHubEmoncmsReporter 'emonCMS' 
2016-10-07 16:47:05,693 INFO Set up reporter 'emonCMS' (buffer: memory | size: 1000)
2016-10-07 16:47:05,694 INFO Setting emonCMS url: https://emoncms.org
2016-10-07 16:47:05,694 INFO Setting emonCMS apikey: set
2016-10-07 16:47:05,694 INFO Creating EmonHubJeeInterfacer 'RFM2Pi' 
2016-10-07 16:47:05,695 DEBUG Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2016-10-07 16:47:07,699 DEBUG Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
**2016-10-07 16:47:09,702 ERROR Unable to create 'RFM2Pi' interfacer: Attempting to use a port that is not open**
2016-10-07 16:47:09,703 INFO Creating EmonHubMqttInterfacer 'MQTT' 
2016-10-07 16:47:09,704 ERROR Unable to create 'MQTT' interfacer: 'module' object has no attribute 'EmonHubMqttInterfacer'
2016-10-07 16:47:09,704 INFO Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2016-10-07 16:47:09,705 ERROR Unable to create 'emoncmsorg' interfacer: 'module' object has no attribute 'EmonHubEmoncmsHTTPInterfacer'
2016-10-07 16:47:09,706 INFO Creating EmonHubVEDirectInterfacer 'VEDirect' 
2016-10-07 16:47:09,706 ERROR Unable to create 'VEDirect' interfacer: 'module' object has no attribute 'EmonHubVEDirectInterfacer'

Ive tried to disable onboard Pi3 Bluetooth and restore UART0/ttyAMA0 following this topic : Raspberry Pi 3 - Blog | OpenEnergyMonitor

And i dont got any RFM2PI so i tried to delete the RFM2PI interfacer lines in the Emonhub.conf file to make this error disappear. But im feeling its not working like this… And now im just wondering if its possible to use emonhub, without an emonpi, using a raspberrypi only, to read and display on emonCMS datas from the BMV700.

Thx to everybody for taking some time reading this.
And thx to OpenEnergyMonitor for these beautiful devices, great work !

How did you connect the device to the EmonPi? USB, serial, other?

Hi kobuki,

I am using a Victron Connect USB cable.

BMV 700 → usb cable → emonPi → EmonCMS OK !

BMV 700 → USB cable -x-> RaspberryPi 3 NOT OK ! I wasn’t able to properly configure emonhub to read the bmv700’s datas. Im just wondering if it’s possible

Thx to you kobuki. Ive placed my last hope in this forum :smile:

not sure if this could help

I used the following nore-red as described in this thread to get the data out of the victon multiplus and it works pretty nice.

maybe yo can try via that to get the data out and pre sorted before sending it into emoncms ?

Yes it should be possible, emonhub is not dependent on the emonPi board, if you had just copied or swapped the SDcard from the emonPi to the other PI, it would have worked. I think you have gotten a bit confused with your emonhub versions when installing to the 2nd Pi.

At first glance the log output looks like output from original emonHub despite you saying it is the “emonPi variant” because the format of the log output is different for the “emonPi variant”, it has an extra column for the thread name. For example this first line of the log

2016-10-07 16:47:05,025 DEBUG SIGINT received.

would actually be “2016-10-07 16:47:05,025 DEBUG Main SIGINT received.” if it was from the “emonPi variant” of emonHub.

2016-10-07 16:47:05,236 INFO Exiting hub…
2016-10-07 16:47:05,266 INFO Exit completed
2016-10-07 16:47:05,691 INFO EmonHub Pre-Release Development Version (rc1.2)

The line above also says it is emonHub rc1.2 not the “emonPi variant”.

2016-10-07 16:47:05,691 INFO Opening hub…
2016-10-07 16:47:05,692 INFO Logging level set to DEBUG
2016-10-07 16:47:05,692 INFO Creating EmonHubEmoncmsReporter ‘emonCMS’

All reporters were removed from the “emonPi variant” so maybe it is the original version!

2016-10-07 16:47:05,693 INFO Set up reporter ‘emonCMS’ (buffer: memory | size: 1000)

The “emonPi variant” has no buffers to set to 1000 entries therefore it must be the original version.

> 2016-10-07 16:47:05,694 INFO Setting emonCMS url: https://emoncms.org
> 2016-10-07 16:47:05,694 INFO Setting emonCMS apikey: set
> 2016-10-07 16:47:05,694 INFO Creating EmonHubJeeInterfacer 'RFM2Pi' 
> 2016-10-07 16:47:05,695 DEBUG Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
> 2016-10-07 16:47:07,699 DEBUG Opening serial port: /dev/ttyAMA0 @ 9600 bits/s

There is no baud detection in the "emonPi variant" for it to cycle though the bauds, this absolutely most definitely the original version.  

> 2016-10-07 16:47:09,702 ERROR Unable to create 'RFM2Pi' interfacer: Attempting to use a port that is not open

To be expected if there is no RFM2Pi attached

>2016-10-07 16:47:09,703 INFO Creating EmonHubMqttInterfacer 'MQTT' 

Hello what's this? there's no MQTT in original emonHub!

>2016-10-07 16:47:09,704 ERROR Unable to create 'MQTT' interfacer: 'module' object has no attribute 'EmonHubMqttInterfacer'

Told ya!

>2016-10-07 16:47:09,704 INFO Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 

There is no need for a "EmoncmsHTTPInterfacer" in the original version of emonhub because it still has Reporters, maybe it is the "emonPi variant"?
 
>2016-10-07 16:47:09,705 ERROR Unable to create 'emoncmsorg' interfacer: 'module' object has no attribute 'EmonHubEmoncmsHTTPInterfacer'

Maybe not then!

>2016-10-07 16:47:09,706 INFO Creating EmonHubVEDirectInterfacer 'VEDirect' 

VEDirectInterfacer was only added to the "emonPi variant" 

>2016-10-07 16:47:09,706 ERROR Unable to create 'VEDirect' interfacer: 'module' object has no attribute 'EmonHubVEDirectInterfacer'

This clearly is not the "emonPi variant" of emonhub, but I don't think it is the original version any longer either, perhaps it's a "Battou variant" ???

I'm not sure how you got in this pickle, what were you trying to do? Have you attempted to fashion something specific from the 2 versions or have you accidentally ended up with various parts?

I strongly suspect you have more than one copy of emonhub.conf, or have you just taken the conf from the "emonPi variant" and added it to the "original version" ? (I now suspect this is most likely the case) 

Unless you specifically want the original emonhub version you should probably just install the "emonPi variant" clean and then all you need to do is remove the [[RFM2Pi]] from the config and add the VEDirect details to the [interfacer] and [nodes] sections of the emonhub.conf and it should work without any alteration to the serial port, as that has nothing to do with the USB's.

Is there any reason you didn't use the emonSD image on the 2nd Pi?
1 Like

Well, you are right on this point i’ll explain why !

First of all i used the original version. But i’ve noticed that the files on the emonPi were coming from the “emonPi variant project” on GitHub (make sense). So I’ve deleted all the /home/pi/emonhub files and i’ve installed the emonPi variant but i ended up with 3 emonhub.conf files :

  • /etc/emonhub/emonhub.conf
  • /home/pi/data/emonhub.conf
  • /home/pi/emonhub/conf/emonhub.conf

Then i copied some parts of the emonhub.conf from the emonPi to one of each emonhub.conf located in my own Pi :weary: (i wasnt sure which one is actually used)… I should’ve missed something at this precise moment.

Today i will clean up everything from the previous configurations.
I will try to delete :

  • all the project files located in /home/pi/emonhub/
  • /home/pi/emonhub/conf/emonhub.conf
  • /etc/emonhub/emonhub.conf
  • /home/pi/data/emonhub.conf
  • & delete the emonhub user

Reinstall it clean with github (GitHub - openenergymonitor/emonhub: Python service linking and decoding input to MQTT & Emoncms) remove the [[RFM2Pi]] from the config and add the VEDirect details. And if im still stuck at the end of the day i will use the emonSD image.

Thx A LOT Paul !!

Hello there i’m trying the modifications i was talking about in my previous post, and it works perfectly fine ! Thx a lot Paul for showing the errors.