This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

communication vbus solar resol
#1
Is there a solution to read or write with logic machine reactor or gateway to a RESOL solar automation, vbus dial?

for:

- making a visualisation with read parameters
- modify some of them with my knx installation or use it in script.

vbus it seems to be a special RS 485 or 232 bus. It's perhaps same as Viessmann KM bus.
Reply
#2
(15.07.2016, 16:13)69jtdti Wrote: Is there a solution to read or write with logic machine reactor or gateway to a RESOL solar automation, vbus dial?

for:

- making a visualisation with read parameters
- modify some of them with my knx installation or use it in script.

vbus it seems to be a special RS 485 or 232 bus. It's perhaps same as Viessmann KM bus.
Hi,
you can use Resol LAN adapter (http://www.resol.de/index/produktdetail/...sprache/en).

I've implemented VBus protocol (by TCP connection) in LUA to get it working with LM. I think that the code can be easily adpted for serial connection.
I'm able to monitor the plant status (temps, relays, etc). 
But i've not found docs for controlling the plant (but I really didnt need it).

The code must be cleaned and has no comment in it (sorry).
I'll glad to share if you are interested.

Luca
Reply
#3
Hi Luca, you are welcome to share your code for a common good and for help to community Smile Maybe somebody would optimize it for better operation.
Reply
#4
(15.11.2016, 12:10)edgars Wrote: Hi Luca, you are welcome to share your code for a common good and for help to community Smile Maybe somebody would optimize it for better operation.

Edgars,
just the time to reorganize it as a module and make generic and i'll post it here.
Reply
#5
I've just update the module and made it somewhat more usable.

Please have a look at example that you find attached
.lua   testvbus.lua (Size: 1.4 KB / Downloads: 29)
.
You can define as device profiles as you want, just add it in
.lua   vbusprofiles.lua (Size: 2.66 KB / Downloads: 35)
.
Now I've tested it with LM and it works.
I've update the luavbuspacket module to get profile data directly from it (have a look at example).
Direct commands are not yet implemented (maybe never).
It should not be difficult to implement them, but i've no use case to test it.

Feel free to submit comments, bugs, correction. 

I'll post new versions as I develop it.

Luca

You must add
.lua   luavbuspacket.lua (Size: 6.19 KB / Downloads: 24)
.lua   luavbus.lua (Size: 27.48 KB / Downloads: 23)
.lua   vbusprofiles.lua (Size: 2.66 KB / Downloads: 35)
as user libraries.
Reply
#6
I've just updated the module and example.
Reply
#7
Good job! I suggest moving code to GitHub so it's more manageable. You could also convert profiles from Json to pure Lua.
Reply
#8
(12.11.2016, 15:45)HI,A lot of job since september, my LM reactor project stay... Thanks for this possibility, i have the USB Vbus adapter. I\ll try to understand your script and buy a LAN adapter (if i can't adapt it with usb adapter on LM usb port).thanks Wrote:
(15.07.2016, 16:13)69jtdti Wrote: Is there a solution to read or write with logic machine reactor or gateway to a RESOL solar automation, vbus dial?

for:

- making a visualisation with read parameters
- modify some of them with my knx installation or use it in script.

vbus it seems to be a special RS 485 or 232 bus. It's perhaps same as Viessmann KM bus.
Hi,
you can use Resol LAN adapter (http://www.resol.de/index/produktdetail/...sprache/en).

I've implemented VBus protocol (by TCP connection) in LUA to get it working with LM. I think that the code can be easily adpted for serial connection.
I'm able to monitor the plant status (temps, relays, etc). 
But i've not found docs for controlling the plant (but I really didnt need it).

The code must be cleaned and has no comment in it (sorry).
I'll glad to share if you are interested.

Luca
Reply
#9
Hi 69jtdti,
it shouldn't be too difficult do complete the code adding direct connection to the bus by serial interface.
You should check if USB adapter make a serial device available to LM (i think it can be a RS485 to USB converter).
If it's so, you only need to get comm parameters (speed, etc) and make some small changes to the module.
Could you tell the model of USB adapter?
If you can put online the LM with USB adapter connected to it, I can (try to) check how it works.

Luca
Reply
#10
Dear Luca,

I have created the different user libraries and the resident script. However, I got the following error:
Userlibrary luavbus: Line 116 attempt to index field 'socket' (a nil value)

I also tried to activate debug5 by changing warn in debug5 in the resident script but I don't get any debug messages.

do you have any ideas how to solve?
regards,
Joost
Reply
#11
Hello, I have found this document to implement Vbus Protocol.

It's not very easy to understand for a beginner Wink

Attached Files
.pdf   VBus_Protocol.pdf (Size: 99.01 KB / Downloads: 19)
Reply
#12
(23.01.2017, 12:41)69jtdti Wrote:
(12.11.2016, 15:45)HI,A lot of job since september, my LM reactor project stay... Thanks for this possibility, i have the USB Vbus adapter. I\ll try to understand your script and buy a LAN adapter (if i can Wrote:
(15.07.2016, 16:13)69jtdti Wrote: Is there a solution to read or write with logic machine reactor or gateway to a RESOL solar automation, vbus dial?

for:

- making a visualisation with read parameters
- modify some of them with my knx installation or use it in script.

vbus it seems to be a special RS 485 or 232 bus. It's perhaps same as Viessmann KM bus.
Hi,
you can use Resol LAN adapter (http://www.resol.de/index/produktdetail/...sprache/en).

I've implemented VBus protocol (by TCP connection) in LUA to get it working with LM. I think that the code can be easily adpted for serial connection.
I'm able to monitor the plant status (temps, relays, etc). 
But i've not found docs for controlling the plant (but I really didnt need it).

The code must be cleaned and has no comment in it (sorry).
I'll glad to share if you are interested.

Luca

(18.02.2017, 08:17)joost001 Wrote: Dear Luca,

I have created the different user libraries and the resident script. However, I got the following error:
Userlibrary luavbus: Line 116 attempt to index field 'socket' (a nil value)

I also tried to activate debug5 by changing warn in debug5 in the resident script but I don't get any debug messages.

do you have any ideas how to solve?
regards,
Joost

You're right, i've just uploaded a newer version in previous post.
This solves lua error, but you have probably some problem connecting the lan adapter, as the connect method return a nil.

Luca

(21.02.2017, 16:30)69jtdti Wrote: Hello, I have found this document to implement Vbus Protocol.

It's not very easy to understand for a beginner Wink

The most of the protocol useful for integration with domotics is already in.
It's probably full of bugs.
Feel free to correct it and post them.

Luca
Reply
#13
Hi Luca,

The connection now works but get the following error:

DEBUG1: luavbus:packetExtract(): vbus_packet 12 dump  length 10 0xAA 0x00 0x00 0x12 0x42 0x20 0x00 0x05 0x00 0x00
DEBUG1: luavbus:packetExtract(): vbus_packet 13 dump  length 52 0xAA 0x10 0x00 0x12 0x42 0x10 0x00 0x01 0x07 0x03 0x3E 0x00 0x44 0x00 0x05 0x78 0x38 0x22 0x38 0x22 0x05 0x46 0x00 0x00 0x00 0x02 0x00 0x7D 0x5A 0x11 0x00 0x00 0x01 0x13 0x00 0x00 0x00 0x00 0x00 0x7F 0x00 0x00 0x00 0x00 0x00 0x7F 0x03 0x00 0x00 0x00 0x00 0x7C
DEBUG1: luavbus:packetExtract(): vbus_packet 14 dump  length 10 0xAA 0x00 0x00 0x12 0x42 0x20 0x00 0x05 0x00 0x00
DEBUG1: luavbus:packetExtract(): returning 14 packets
lua: /usr/share/lua/user/luavbus.luas:698: attempt to index global 'bit32' (a nil value)
stack traceback:
        /usr/share/lua/user/luavbus.luas:698: in function 'packetCalculateChecksum'
        /usr/share/lua/user/luavbus.luas:565: in function 'packetParse'
        /usr/share/lua/user/luavbus.luas:240: in function 'waitData'
        /lib/genohm-scada/scripting/22.lua:34: in main chunk
        [C]: at 0x0000ca54

Any idea what could be wrong?
regards,
Joost
Reply
#14
(04.03.2017, 16:13)Joost,I\m sorry for being late. I'm checking the code and get back to you.Luca Wrote: Hi Luca,

The connection now works but get the following error:

DEBUG1: luavbus:packetExtract(): vbus_packet 12 dump  length 10 0xAA 0x00 0x00 0x12 0x42 0x20 0x00 0x05 0x00 0x00
DEBUG1: luavbus:packetExtract(): vbus_packet 13 dump  length 52 0xAA 0x10 0x00 0x12 0x42 0x10 0x00 0x01 0x07 0x03 0x3E 0x00 0x44 0x00 0x05 0x78 0x38 0x22 0x38 0x22 0x05 0x46 0x00 0x00 0x00 0x02 0x00 0x7D 0x5A 0x11 0x00 0x00 0x01 0x13 0x00 0x00 0x00 0x00 0x00 0x7F 0x00 0x00 0x00 0x00 0x00 0x7F 0x03 0x00 0x00 0x00 0x00 0x7C
DEBUG1: luavbus:packetExtract(): vbus_packet 14 dump  length 10 0xAA 0x00 0x00 0x12 0x42 0x20 0x00 0x05 0x00 0x00
DEBUG1: luavbus:packetExtract(): returning 14 packets
lua: /usr/share/lua/user/luavbus.luas:698: attempt to index global 'bit32' (a nil value)
stack traceback:
        /usr/share/lua/user/luavbus.luas:698: in function 'packetCalculateChecksum'
        /usr/share/lua/user/luavbus.luas:565: in function 'packetParse'
        /usr/share/lua/user/luavbus.luas:240: in function 'waitData'
        /lib/genohm-scada/scripting/22.lua:34: in main chunk
        [C]: at 0x0000ca54

Any idea what could be wrong?
regards,
Joost
Reply
#15
Joost,
it seems to be a problem with bit32 module non loaded.
Could you please try the updated version that I've attached the files' post?

If it doesn't solves, please try with a simple script using the bit32 (or bit) module.

Let me know if this solves the problem.

Luca
Reply
#16
Hi Luca,

I don't think my logicmachine has a bit32 module because it can't find the module. the bit module seems to work.
Would there be a workaround?

regards,
Joost
Reply
#17
There's a copy-paste bug in luavbus.lua at line 42, this is corrected code:

Code:
name = "bit"
  local loader = searcher(name)
  if type(loader) == 'function' then
    package.preload[name] = loader
    bit32 = require (name)
    break
  end
Reply
#18
After this change, I still get the following error log, when I start the script

resol_deltasol 13.11.2017 11:08:49
User library "luavbus", Line 731: attempt to index global 'bit32' (a nil value)
resol_deltasol 13.11.2017 11:09:50
User library "luavbus", Line 149: attempt to index field 'socket' (a nil value)

regards,
Joost
Reply
#19
That means that socket.connect failed, check that IP and PORT settings are correct. You can also try pinging Resol device IP from LM System config.
Reply
#20
(13.11.2017, 10:13)joost001 Wrote: After this change, I still get the following error log, when I start the script

resol_deltasol 13.11.2017 11:08:49
User library "luavbus", Line 731: attempt to index global 'bit32' (a nil value)
resol_deltasol 13.11.2017 11:09:50
User library "luavbus", Line 149: attempt to index field 'socket' (a nil value)

regards,
Joost

Hi Joost,
I'm sorry to be late.
It seem to not find the bit/bit32 module, it's strange.
The socket problem could be caused by work host/port. Could you try to connect using telnet/putty/nc etc to the port?
If it doesn't connect, check the ethernet adapter configuration.

Luca
Reply


Forum Jump: