Get readable data from my Resol KM2

895 views
Skip to first unread message

Mello Lorier

unread,
Dec 5, 2017, 10:25:43 AM12/5/17
to Resol Vbus

Hi to all

We have a Solar boiler installed and controlled by a HR Solar ADVANCED controller and a Resol KM2 for communications.

I found out that <IP_OF_YOUR_DEVICE>/current/current_packets.vbus return with a binary file current_packets.vbus.  Is there a way to convert this binary file to humn readable data

Kind regards
McMelloW

Daniel Wippermann

unread,
Dec 21, 2017, 11:58:03 AM12/21/17
to Mello Lorier, resol...@googlegroups.com
Hi McHelloW,

there are several ways to decode the file. It conforms to the "VBus Recording File Format" described here:


If you do not want to implement a file parser and formatter yourself there are several existing solutions. One of them is the formatter example of the resol-vbus.rs library:


It currently lacks documentation, but the usage is simple enough:

- Make sure you have a recent Rust toolchain installed
- "cargo build --release"
- "target/release/formatter csv <<path to current_packet.vbus file>>"
- "cat Output.csv"

Best regards,
Daniel
--
You received this message because you are subscribed to the Google Groups "Resol Vbus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resol-vbus+...@googlegroups.com.
To post to this group, send email to resol...@googlegroups.com.
Visit this group at https://groups.google.com/group/resol-vbus.
For more options, visit https://groups.google.com/d/optout.

Mello Lorier

unread,
Dec 25, 2017, 9:41:03 AM12/25/17
to Resol Vbus
Hi Daniel,

Thanks for your repely. I am studying on this documentation. It looks quite complicated to implement on a Raspberry Pi.
Is there not a simple command like <IP_OF_YOUR_DEVICE>/dlx/live  or for JSON  <IP_OF_YOUR_DEVICE>/current/current_packets.json

Kinds regards
McMelloW
 

Op donderdag 21 december 2017 17:58:03 UTC+1 schreef Daniel:

Daniel Wippermann

unread,
Dec 25, 2017, 3:57:27 PM12/25/17
to Mello Lorier, resol...@googlegroups.com
Hi McHelloW,

no, those web service endpoints are only supported in the dataloggers DL2 and DL3, but not in the KM2.

Best regards,
Daniel

Mello Lorier

unread,
Dec 26, 2017, 6:39:06 AM12/26/17
to Resol Vbus
Hi Daniel

All I want is getting 4-5 values from my Solar-Boiler into my Raspberry Pi Domoticz system. Google for vbus and resol leads any way or another to your name, So that's why I chase you for some extra information.

That is a pitty there is no JSON support on the KM2.  The data is stored to a SD-card in the Advanced Controller of my Solar Boiler in human readable data.But this not avaiable inside the KM2. I have searched the KM2 via SSH, but could not find anything. This is a bit frustrating, I payed a lot of money for monitoring my Solar Boiler. However the only way to do this is via a third party at vbus.net

The Vbusnet download API document example below does help me much either. (See attached file.)

METHOD 1: Basic Authentication


Add Basic Authorization header (example see below)

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

&filter=%7B%22onlyVisible%22:true,%22fields%22:%5B%7B%22id%22:%2201_0010_7E11_0100_000_2_0%22,%22name%22:
%22Collector%22%7D,%7B%22id%22:%2201_0010_7E11_0100_002_2_0%22,%22name%22:%22Storage%22%7D%5D%7D

When using my OwnerShip-Id results in lines with only a timestamp at the beginning and nothing else. No query parameter information at all is included in the API document.

I hope you point me at some more information how I can get it done.

Kind regards
McMelloW



Op maandag 25 december 2017 21:57:27 UTC+1 schreef Daniel:
vbusnet-download-api.pdf

Daniel Wippermann

unread,
Dec 26, 2017, 2:10:23 PM12/26/17
to Mello Lorier, resol...@googlegroups.com
Hi McHelloW,

regarding the "However the only way to do this is via a third party at vbus.net": yes, that is a design decision. The KM2 was originally designed to not be used stand-alone but always in conjunction with VBus.net. Sorry to hear that you had different expectations.

I cannot comment on the VBus.net API since I do not have any experience using it. If you have questions regarding that API it is best to contact RESOL's tech support staff directly.

As I already mentioned: my go-to solution currently would be a small Rust app for the RPi that downloads the file from the KM2 and outputs JSON into a file. The main problem for me currently is that I have no RPis in reach and hence have no possibility to test such a solution. Perhaps I find one at work tomorrow that I can snatch for a couple of days.

If that works I'll send the resulting executable your way.

Best regards,
Daniel
Message has been deleted
Message has been deleted

Mello Lorier

unread,
Jan 4, 2018, 6:57:49 AM1/4/18
to Resol Vbus
Hi Daniel,

All the best wishes for 2018

Thanks very much, your formatter for the KM2 works !!


Op donderdag 21 december 2017 17:58:03 UTC+1 schreef Daniel:
If you do not want to implement a file parser and formatter yourself there are several existing solutions. One of them is the formatter example of the resol-vbus.rs library:


It currently lacks documentation, but the usage is simple enough:

- Make sure you have a recent Rust toolchain installed
- "cargo build --release"
- "target/release/formatter csv <<path to current_packet.vbus file>>"
- "cat Output.csv"

Best regards,
Daniel

Installing Rust appears to be much easier on a Raspberry Pi after all. Just followed the steps on https://github.com/rust-lang/rust and https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html for a Linux installation. 

After that I followed the steps above which you wrote to me. It all went without any errors and I have an executable formatter on my Pi. After running the formatter, on a fresh downloaded current_packets.vbus, I have a file Output.csv, with the fields tab seperated.

I have a few questions about the formatter
  1. Is the formatter independent executable, or do you need other files apart from the input file. Can I put it on any location on my Pi?
  2. Can you add a path for the location of the output file?
  3. Finally, can you use json as an output file-type?
Thanks again and greetings
McMelloW


Mello Lorier

unread,
Jan 11, 2018, 12:23:11 PM1/11/18
to Resol Vbus

Compiled the formatter again with some alteration

pi:~/resol-vbus.rs/examples/formatter $ cargo build --release
   Compiling formatter v0.1.0 (file:///home/pi/resol-vbus.rs/examples/formatter)
    Finished release [optimized] target(s) in 79.23 secs

pi:~/resol-vbus.rs/examples/formatter/target/release $ formatter csv /tmp/current_packets.vbus
-bash: formatter: command not found

Thisis the current version of rustc and cargo
pi@mcmellow-pi:~ $ rustc -V
rustc 1.23.0 (766bd11c8 2018-01-01)
pi@mcmellow-pi:~ $ cargo -V
cargo 0.24.0 (45043115c 2017-12-05)

Somebody knows a trick to solve this   command not found error

Kind regards


Daniel Wippermann

unread,
Jan 13, 2018, 1:19:52 AM1/13/18
to Mello Lorier, resol...@googlegroups.com
Hi McMelloW,

try "./formatter csv /tmp/current_packets.vbus".

If you do not put the dot-slash combination in front of the formatter command Linux will normally not search in the local directory.

Best regards,
Daniel

Mello Lorier

unread,
Jan 13, 2018, 6:55:10 AM1/13/18
to Resol Vbus

try "./formatter csv /tmp/current_packets.vbus". This works very well on a commandline. without the ./ it returns with: -bash: formatter: command not found

However, in a script  os.execute(' </PATH-of-executable/formatter -- simple-json /tmp/current_packets.vbus') does not work.

I think it something in Debian what I have to change.

McMelloW
Reply all
Reply to author
Forward
0 new messages