communication vbus solar resol - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: communication vbus solar resol (/showthread.php?tid=346) |
communication vbus solar resol - 69jtdti - 15.07.2016 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. RE: communication vbus solar resol - lpala - 12.11.2016 (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?Hi, you can use Resol LAN adapter (http://www.resol.de/index/produktdetail/id/76/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 RE: communication vbus solar resol - edgars - 15.11.2016 Hi Luca, you are welcome to share your code for a common good and for help to community Maybe somebody would optimize it for better operation. RE: communication vbus solar resol - lpala - 01.12.2016 (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 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. RE: communication vbus solar resol - lpala - 18.01.2017 I've just update the module and made it somewhat more usable. Please have a look at example that you find attached
testvbus.lua (Size: 1.4 KB / Downloads: 29)
.You can define as device profiles as you want, just add it in
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
luavbuspacket.lua (Size: 6.19 KB / Downloads: 24)
luavbus.lua (Size: 27.48 KB / Downloads: 23)
vbusprofiles.lua (Size: 2.66 KB / Downloads: 35)
as user libraries.
RE: communication vbus solar resol - lpala - 22.01.2017 I've just updated the module and example. RE: communication vbus solar resol - admin - 23.01.2017 Good job! I suggest moving code to GitHub so it's more manageable. You could also convert profiles from Json to pure Lua. RE: communication vbus solar resol - 69jtdti - 23.01.2017 (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?Hi, RE: communication vbus solar resol - lpala - 23.01.2017 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 RE: communication vbus solar resol - joost001 - 18.02.2017 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 RE: communication vbus solar resol - 69jtdti - 21.02.2017 Hello, I have found this document to implement Vbus Protocol. It's not very easy to understand for a beginner RE: communication vbus solar resol - lpala - 22.02.2017 (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?Hi, (18.02.2017, 08:17)joost001 Wrote: Dear Luca, 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. 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 RE: communication vbus solar resol - joost001 - 04.03.2017 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 RE: communication vbus solar resol - lpala - 23.04.2017 (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, RE: communication vbus solar resol - lpala - 29.04.2017 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 RE: communication vbus solar resol - joost001 - 10.11.2017 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 RE: communication vbus solar resol - admin - 13.11.2017 There's a copy-paste bug in luavbus.lua at line 42, this is corrected code: Code: name = "bit" RE: communication vbus solar resol - joost001 - 13.11.2017 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 RE: communication vbus solar resol - admin - 13.11.2017 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. RE: communication vbus solar resol - lpala - 23.12.2017 (13.11.2017, 10:13)joost001 Wrote: After this change, I still get the following error log, when I start the script 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 |