question

marcoherbst avatar image
marcoherbst asked

API or similar to put data IN to VRM from BlueSolar MPTT 100/50

Hi, we have a BlueSolar MPTT 100/50 which is sending data via USB to our 4G router (connected to a CCTV camera). My current plan is to write some software to periodically poll the router for the data and create my own version of VRM. But, could there be a way I could use VRM without replicating it? e.g. I could have a script on the router to send or display data in a way that VRM can use it?

VRM
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

5 Answers
markus avatar image
markus answered ·

I have to be honest, I had to scratch my head while reading this and I am not 100% sure if I got what you want, but I have a suggestion to offer:

I was curios, how you manage to read out the values from your MPPT with your router, maybe you could further describe this. But as a cheap alternative solution:

Get a Raspberry Pi. If you are lucky, it will be powered by the USB Port of your router.

Download a Venus Image from Victron and flash a SD card with it.

Connect LAN from router to the RPi.

Connect your MPPT to the USB Port of the RPi and enjoy full functionality of VRM.

There is plenty of documentation available online, where it is described in more detail how to get this done


Regards,

Markus

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

marcoherbst avatar image
marcoherbst answered ·

Thank you, @Markus, that sounds like it will work.


Without testing what you have proposed, I understand it is based on the idea that Venus (on PI) will communicate the MPTT data from MPTT to VRM. Great.


In the meantime, I have made some progress with my original alternative idea, i.e. rather than MPTT to RaspberryPi, I have connected MPTT to Router (with USB) and I am running a script on the router to simply take that feed and save it to a file on the router in the /www directory.


I am then polling this file from my own application, saving it to DB and displaying it in a table & graph.


It is definitely not as nice as if I knew the details of the VRM API and could directly communicate with it (And therefore avoid the RaspberryPI) however I have heard from my Victron distributor that this is not possible. (It would be nice, for me, if it was.


FYI the router I am using is a Teltonika RUT955 which is good for this type of thing. It also supports various USB features, MQTT and more, so there would probably be many other ways of tackling this.

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

markus avatar image markus ♦♦ commented ·

Interesting. Thank you, I never heard of this router. I will google it.

0 Likes 0 ·
markus avatar image markus ♦♦ markus ♦♦ commented ·

Very cool stuff!!! You can not imagine how you actually helped me, in suggesting this device. I need this elsewhere.

1 Like 1 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

Cool device indeed! Should have Venus OS running on it directly :-)

0 Likes 0 ·
marcoherbst avatar image
marcoherbst answered ·

I'm delighted to hear it.


It did seem to me when we got this working that it would be a solution that could be suitable for a variety of people.


We are also building an open source dashboard to help in basic operations of reading from MPTT and SMS control of router https://github.com/edgecommander .


Happy to try to answer Q's here or at marco@Evercam.io



2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mariowagner avatar image
mariowagner answered ·

oh ... :-) now i get what u are up to! bigs up. great project. i had a look at the edgecommander.

- so public ip address is needed at any times? no reverse mechanism?

- what does the sms function do?

- for the routers: did u write openwrt plugins? or do u straight poll built in functions of NVRs and routers?


i'm actually using Hikvision NVRs and Routers like Teltonika and i built a similar tool for our purposes

@Markus: Have a look at Netmodule routers. e.g. NB800 or NB1601. More rugged and industry proven. Also openWRT based, comes with a very powerfull scripting engine based on a 'C' like language.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

markus avatar image markus ♦♦ commented ·

Thanks Mario, this was also very helpful! Very cool IT guys here...

0 Likes 0 ·
marcoherbst avatar image
marcoherbst answered ·

The purpose of SMS is that we will sometimes lose LTE signal and SMS (on 2G or 3G) is still able to receive a reboot command or to send a last minute "I've lost power" message.


Re: Public IPs, we use a PPTP VPN which is supported pretty commonly on the routers. No custom programming.


Netmodule looks lovely. I had never seen LXC before, I am not familiar with this, but I imagine in principle that venus could be run in a container ... which would solve my original Q as to how to connect to VRM.







4 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

On a container.. well the full thing on a container might be hard. Its compiled into an image that runs straight onto the hardware.

You should be able to run it in QEMU. But I’ve no experience with that.


But all you need is just a few processes:

- vedirect to dbus driver

- script to start that either auto or manually on the right usb port

- localsettings daemon

- vrmlogger process

Last two are python. First one is C or Cpp.

0 Likes 0 ·
markus avatar image markus ♦♦ mvader (Victron Energy) ♦♦ commented ·

@mvader (Victron Energy Staff) running Venus on QEMU actually works. I have a running VM of Venus on my MacBook.

It's a good thing to play around and test mods ;o)


Your browser does not support HTML5 video.

0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ markus ♦♦ commented ·

Really? Nice; i want it! I need to charge my phone before being able to see that video.

0 Likes 0 ·
markus avatar image markus ♦♦ mvader (Victron Energy) ♦♦ commented ·

I got it running, using an Raspberry Pi Emulator based on QEMU and using an official RPi Venus SD Image.

https://www.macupdate.com/app/mac/57724/raspberry-pi-emu

0 Likes 0 ·