Resol VBUS success
at last, the kind folks in Resol sent me the protocol specification for vbus
with openwrt and rrdcollect and rrdcgi, I can now graph the pumps and temperature information of my solar water system.
There is a bash script that collects from the serial port, decodes it , and then outputs the values to a file that rrdcollect parses. All good, some holes in the graphs, probably a bad awk in my script, to be investigated.
Once it's working reliably with no holes, I will try to post graphs here, somehow
EDIT: Now there is a google group http://groups.google.com/group/resol-vbus
EDIT: I wrote a utility to parse the data, seems to have gotten lost in the group, it's here https://code.google.com/p/vbusdecode/
with openwrt and rrdcollect and rrdcgi, I can now graph the pumps and temperature information of my solar water system.
There is a bash script that collects from the serial port, decodes it , and then outputs the values to a file that rrdcollect parses. All good, some holes in the graphs, probably a bad awk in my script, to be investigated.
Once it's working reliably with no holes, I will try to post graphs here, somehow
EDIT: Now there is a google group http://groups.google.com/group/resol-vbus
EDIT: I wrote a utility to parse the data, seems to have gotten lost in the group, it's here https://code.google.com/p/vbusdecode/
Comments
Thank you
I'm not sure on distribution rights , but ping me if you can't get it from them ?
They were reluctant at first to give it out as it is only in german.
IF you are using windows, you can download their windows software from their site , the basic or lite version is free.
I downloaded the software RESOL Service Center Light and installed. In the folder .. \ RESOL \ ServiceCenterLight \ eclipse \ plugins \ de.resol.servicecenter.vbus.sonnenkraft_2.0.0 file VBusSpecificationSonnenkraft.xml describes the frame of communication used by SONNENKRAFT say right?
service lite will allow you to make a custom image and overlay your temperatures and upload them to website on defined intervals.
I used rrdtool to generate the graphs of my solar system , you can see them else where on this blog, and copy them to a free image server every few hours.
Thats great u got the doc, Daniel was the guy who sent it to me also :-)
VBus protocol PDF in english :)
More info:
The VBus can be extend until 100 meter with a standard telephone cable (2-wire).
Have a nice weekend.
CM
I used the standard vbus cable and extended the serial via cat5e. I actually got a usb serial, cut the cable and inserted rj45 plugs at the ends.
http://www.seconsolar.com/pages/classic/rscom.html
The Activex component makes it easier to code, but makes it less portable to other OS's like osx or linux. something in more native c or c++ could be nice and portable.
What is synoptic planting ? is that a graph based output ?
look elsewhere on my blog , you will see the graphs I generated from by resol controller
Desra, you mention holes in your data. Did you figure this out? When the pump goes on, I start getting bit errors in the data and it drops out entirely after an hour or so. The data is correct again after the pump stops. I am trying to figure out why this is; some sort of interference anywhere?
I am borrowing an official Resol DL2 to see if that shows the same problem.
I fixed the holes in my graphs, it was a bash problem with cut and kill pids :-)
your problem sounds like bug in your code decoding the data, vbus has error checking in it, so you should be able to eliminate it being corrupt data.
Are you using a unix/bash system ?
I have just relocated all my serial line away from any power cables in the duct it was in before, and am logging it on my laptop next to the controller instead. Now hoping for some sun to get the pump going 100% for a few hours!
From what I remember (it was months since I looked at it) the AA 10 packet start header would turn turn into a CC 90, i.e. the top bits (which I believe are just stripped anyway) would start getting set, and then bytes would appear out of phase.
Massively appreciate your help; I couldn't find anything on the web at the time, so very glad I happened to search again and find your blog.
here is the first one, it does the decode of the serial capture log file, which is generated by this .
Requires bash, bc, awk, grep , hexdump and tr . most or all of these would be in a normal linux install. The reason I used bash and these tools is that i run it on an embedded openwrt box, and installing perl/php wasn't an option, though now is, so I could re-write in Perl
Rerouting the serial cable (not the vbus) away from the power cables seems to have fixed all my corruption problems! I have been logging with a laptop in the utility cupboard with no problems. So now I need to find a way to shield it through the duct, or maybe extend the vbus instead, assuming the twisted pair is more tolerant of noise.
my serial to the hot press is over cat 5. i took a usb serial and cut the db9 off and put rj45's on to run it over my cat 5. in an earlier post, someone commented on the max length of vbus cables.
twisted cabling instead of straight, such as alarm cable vs cat5, should make a difference. mi swapped out my home phone cable to cat 5 and now i get adsl2+ at 15mb, previously it ran by power cables etc. and i could only get 8mb with errors.
You've certainly done some great work, this is just what I am hoping to do for my collector - need to get that gas usage down :)
I've finally managed to get my Resol Plus up and running with the RS-COM and capturing nicely into a serial dump file (via some good ol'd cat5)
Is there any chance you could publish your decodesolar.sh?
cheers,
Frosty
I will update getserialdata.sh to point to logsolar.sh instead of decodesolar.sh
I am going to put the server back in the loft now, and leave the cover off to make sure that was the issue. If so, I will relocate the controller outside of the pump station. I'd be surprised if this just affected me though!
My pump station is in the loft, and the controller is in the upstairs landing.
I wonder was the unit actually making the pump run at the wrong speed too ...
Have you looked at using VBUS to program the controller ? from Resols site
'Parametrisation: DeltaSol® M, E ,ES and the BS-series (and future versions of the product family) can be user-friendly configurated with a PC;'
capturing great with your script, thanks. I need to update to capture the timestamp also, and will post back when I'm done.
Cheers,
Frosty.
I don't use the timestamp from the controller, as I prefer the system time on the computer/collector, which is sync'd with via ntpd to a stratum 1 source from my ISP. I'm not sure if I would have a use for the resol timestamp.... anyway looking at vbus doc, shouldn't be much work to extract :-)
re: I've managed to capture a complete day's data with many hours of 100% pumping (which shows some interesting patterns that probably belongs on some other forum! Anyone recommend one?)
What is 'interesting' about your patterns ?
http://www.greenbuildingforum.co.uk
have some forums that seemed useful, though post rate is low
They want to bill me $200 for the RSCOM adapter. Can you please confirm that VBus is "simply" an RS-485 port? Do you know if a "simple" RS-485 -> RS-232 will do the job? Like this one? http://store.qkits.com/moreinfo.cfm/KC485
Thanks,
JM
i would note that it was 88 euro for vbus - rs232 resol adaper. $200 seems very expensive....
So I finally ordered the kit I was talking about before. I will keep you posted if I'm able to make it works with the Resol BS Pro.
ff fd 03 ff fb 03 ff fd 00 ff fb 00 ff fd 2c ff fb 2c ff fb 27 00 f0
any ideas ?
Looking at the data, I assume it's repeating, I don't think it's a resol stream, maybe a message from the tcp/rs485 device ?
The box is in another place will look up the name when I get there later today.
My device sends the stream from power on, I had to do nothing to get it to transmit. Perhaps this is the default mode, as it is possible to write data to some controllers over vbus, and the 'command mode' part of the doc indicates two way responses.
It would be great to know the device you use as it may be of interest to others.
I hope to make a C version of my code that is 'realtime' instead of 5 min cron etc. Infact I just installed gcc on my embeded box today for this purpose. But it will take me some time...
btw, incase you don't hear this often enough, Thank-you for rrdtool ! I have used it for many years and it has made my working-life much easier.
I will post a perl script that does life decoding some time this weekend ...
glad to hear rrdtool is helpful!
My intent was to use this as an excuse to learn c++ as I only use bash/perl/php/VB at the moment.
I was planning to have my code read from a port, or a pipe, and output to console or a file, and default to a Deltasol BS Plus decode, with the option of passing field/frame/datatype information on the command line so that it can decode any resol vbus information, or just the values you want. i.e.
cat /dev/ttyUSB0 | vbusdecode -f my.file -d 1-2,double -d 3-4,double -d 5-6,int -d 6-7,date
would make my.file always contain only the current values
or
cat capture.file | vbusdecode
would return all the values in capture.file to stdout
I realise that the model number is included in the frame headers, but I have 2 reasons for supporting args for exact field extraction (?)
1) newer models, do we really want to have to write more code to support newer models and maintain ? i.e. this year , resol added more vbus support to more models, by allowing args , people could still use the tool for models not defined. My intent was to do both args and pre-known models, plus I can only test on BS plus model.
2) I use rrdcollect, so having a file with just the values I care about makes it easier, i.e. I don't care about the system type, or relay states etc. This is really not a problem, as rrdcollect can ignore certain values, but is even easier if the arg support is in the utility.
The utility could support reading in the xml files that come with Resol service center, they have all the frame data with names, but this makes it more complex I guess.
Thoughts ?
Once upon a time RESOL offered an open-source command line application capable of connecting to several different data source types (serial port being one option), parsing a XML file containing protocol information and outputing the formatted data to a text file.
Its development was deprecated and distribution was stopped so no current controller is supported. And the XML file structure is completely different from the one that is currently used for the ServiceCenter so you can not simply reuse those files.
The application depended on libxml2 for XML parsing. Is that available on your openwrt device?
If you are nevertheless interested you can just send a mail to vbus@resol.de, they will provide you with the necessary information.
this is part of the reason i like the option of passing the parameters in args, it usable if not maintained. also not requiring xml files or depending on libxml seems to keep with the spirit of simple, self contained, single purpose unix utils.
i should have no problem installing libxml. it a pretty common requirement so probably already packaged.
i have started a util and got passed the worst pain of being a newbie at c/c++ i hope. i have it decoding the header and hope to do the frame decode bit late in the week and then the args stuff after that. it has been 23 yrs since i looked at c at the differences between all the datatypes lik unsigned char, are things i had happily forgotten :)
and as usual, now want to start from scratch again as I could do it much better, maybe using a struct for the header and for the frame, and not using fgets.
http://www.dealextreme.com/search.dx/search.rs-485
I hope some of the posters here will sign up :-)
http://groups.google.com/group/resol-vbus
Do you guys think this would work?
http://www.startech.com/item-download/NETRS2321E-1-Port-RS-232-422-485-Serial-over-IP-Ethernet-Device-Server.aspx
You can get it for < $100 at buy.com, amazon etc... and would be nicer than a straight RS232-RS485 converter for my setup.
I haven't seen the Caleffi controller yet, but I'm hoping there are markings on which is D- and which is D+. On the PDF it just shows connection 9 and 10....
Can you post this on http://groups.google.com/group/resol-vbus ??
I am hoping to move as much vbus related stuff there :-)
And I have an interesting alternative answer waiting for you :-)
This is probably cpu in resol unit and connection pins is 32,33.Can You confirm it?
Can you post this on http://groups.google.com/group/resol-vbus ??
I am hoping to move as much vbus related stuff there :-)
I can open the controller and look at what processor is on it tomorrow.
Are you asking is the vbus interface connected to pins 32 and 33 ?
If they were, I would assume it's not direct, as from the manual in the google group, the voltages for mark/space are not normal rs485, so there maybe some electronics between the vbus output and whatever cpu package is in the controller.
I have sonnenkraft SKSC2, this unit dont have pinouts for vbus. Maybe You tell me what chip is between major CPU and vBus pinouts.
link to photos of my unit
http://groups.google.com/group/resol-vbus?msg=subscribe
http://www.solver.katowice.pl/index.php?menu=10&lang=p%EA
I have sonnenkraft SKSC2, this unit dont have pinouts for vbus.
Maybe You tell me how make conection between SKSC2 and RESOL VBus.
Can You make few photos ou desgin?