zivillian / ism7mqtt

GNU General Public License v3.0
57 stars 11 forks source link

ism7config does not work for TGB-20 yet #70

Closed jatty closed 11 months ago

jatty commented 1 year ago

I finally have some time for Homeassistant again. Unfortunately ism7config does not work on my TGB-20 yet. That's all I get, at the end it times out.

# OPENSSL_CONF=openssl.cnf ./ism7config -i 192.168.1.9 -p redacted
2023-10-03 00:57:10.6655|INFO|LuCon.WebPortal.StandaloneService.NetworkConnector|Try IP-resolve for host:192.168.1.9
2023-10-03 00:57:10.6810|INFO|LuCon.WebPortal.StandaloneService.NetworkConnector|Try connect destination server -> 192.168.1.44:9092, Timeout:60000 ms
2023-10-03 00:57:11.9173|INFO|LuCon.SocketServer.SocketServerBase.GatewayContext|<GW:-1,0> Written XML, bytes:118, msg:<?xml version="1.0" encoding="utf-8"?>
    <direct-logon-request>
    <password>redacted</password>
    </direct-logon-request>
2023-10-03 00:57:12.0839|INFO|LuCon.WebPortal.StandaloneService.NetworkConnector|Got XML msg:<?xml version="1.0" encoding="utf-8"?>
    <direct-logon-response state="ok" sid="">
    <installationname>WolfLink</installationname>
    <serialnumber>682719000001</serialnumber>
    <ism-softwareversion>300.10.1.300.300.1</ism-softwareversion>
    <ism-hardwareversion>3.0</ism-hardwareversion>
    <type>WOLFLink</type>
    </direct-logon-response>
2023-10-03 00:57:12.0898|INFO|LuCon.WebPortal.StandaloneService.NetworkConnector|logonResponse:Errormsg:, State:ok
2023-10-03 00:57:12.1038|INFO|GW-1|<GW:1,0> Written XML, bytes:81, msg:<?xml version="1.0" encoding="utf-8"?>
    <read-systemconfig-request sid="1" />
2023-10-03 00:57:12.1530|TRACE|GW-1|<GW:1,0> ReadTelegramAsync !!
2023-10-03 00:57:12.1553|TRACE|GW-1|<GW:1,0> Got 6 bytes from stream, elapsedMs=1
2023-10-03 00:57:12.1553|TRACE|GW-1|<GW:1,0> lenToRead: 439
2023-10-03 00:57:12.1553|TRACE|GW-1|<GW:1,0> telegrType SystemconfigResponse
2023-10-03 00:57:12.1553|TRACE|GW-1|<GW:1,0> Try to complete msg, bytesMissing:439 [6/439]
2023-10-03 00:57:12.2291|TRACE|GW-1|<GW:1,0> Got 203 bytes from stream, elapsedMs=75
2023-10-03 00:57:12.2292|TRACE|GW-1|<GW:1,0> Try to complete msg, bytesMissing:236 [209/439]
2023-10-03 00:57:12.2696|TRACE|GW-1|<GW:1,0> Got 64 bytes from stream, elapsedMs=116
2023-10-03 00:57:12.2696|TRACE|GW-1|<GW:1,0> Try to complete msg, bytesMissing:172 [273/439]
2023-10-03 00:57:12.3092|TRACE|GW-1|<GW:1,0> Got 64 bytes from stream, elapsedMs=155
2023-10-03 00:57:12.3092|TRACE|GW-1|<GW:1,0> Try to complete msg, bytesMissing:108 [337/439]
2023-10-03 00:57:12.3494|TRACE|GW-1|<GW:1,0> Got 51 bytes from stream, elapsedMs=195
2023-10-03 00:57:12.3494|TRACE|GW-1|<GW:1,0> Try to complete msg, bytesMissing:57 [388/439]
2023-10-03 00:57:12.3893|TRACE|GW-1|<GW:1,0> Got 57 bytes from stream, elapsedMs=235
2023-10-03 00:57:12.3893|INFO|GW-1|<GW:1,0> Got XML msg:???<?xml version="1.0" encoding="utf-8"?>
    <read-systemconfig-response sid="1">
    <gateway type="WOLFLink" softwareNumber="1" softwareVersion="300" wlan="false" g3="false"/>
    <busconfig type="ebus">
    <busDevices>
    <busDevice ba="0x8" sv="0x30" sr="0x2" cfg="0x405A" did="0x35"/>
    <busDevice ba="0x35" sv="0x2" sr="0x4" cfg="0xC000" did="0x20"/>
    </busDevices>
    </busconfig>
    <modbusconfig>
    <busDevices>
    </busDevices>
    </modbusconfig>
    </read-systemconfig-response>
2023-10-03 00:57:12.4217|INFO|GW-1|<GW:1,-1> - ProcessSystemconfigResponse:SystemconfigResponse, SID:1
2023-10-03 00:57:12.4403|INFO|GW-1|<GW:1,-1> >>>>>>>>>>>> state:1, count:3{
{Device(-1), visible:True, ba:0x00, dt:GW, di:0 hdt:-1, sv:, sr:, wrsId:, HWSInd:-1, SYSHWSInd:-1, IsCombinedDevice:False, DeviceTemplateId:190000, ConfigIndex:0, ConfigMask:0}
{Device(-2), visible:False, ba:0x8, dt:HG, di:1 hdt:-1, sv:0x30, sr:0x2, wrsId:0x35, HWSInd:-1, SYSHWSInd:-1, IsCombinedDevice:False, DeviceTemplateId:440000, ConfigIndex:0, ConfigMask:16474}
{Device(-3), visible:False, ba:0x35, dt:BM, di:0 hdt:-1, sv:0x2, sr:0x4, wrsId:0x20, HWSInd:-1, SYSHWSInd:-1, IsCombinedDevice:False, DeviceTemplateId:220000, ConfigIndex:0, ConfigMask:49152}}
<<<<<<<<<<<<
2023-10-03 00:57:12.4895|INFO|GW-1|<GW:1,0> Written XML, bytes:630, msg:<?xml version="1.0" encoding="utf-8"?>
    <tbreq bn="1" gw="1" ae="true" ty="pull">
    <ird se="A;11" ba="0x35" in="10812" is="60" />
    <ird se="A;8" ba="0x35" in="10185" is="60" />
    <ird se="A;5" ba="0x8" in="10805" is="60" />
    <ird se="A;3" ba="0x8" in="2751" is="60" />
    <ird se="A;10" ba="0x35" in="10920" is="60" />
    <ird se="A;7" ba="0x35" in="10162" is="60" />
    <ird se="A;4" ba="0x8" in="10804" is="60" />
    <ird se="A;6" ba="0x35" in="10163" is="60" />
    <ird se="A;1" ba="0x8" in="10033" is="60" />
    <ird se="A;2" ba="0x8" in="10075" is="60" />
    <ird se="A;12" ba="0x35" in="10130" is="60" />
    <ird se="A;9" ba="0x35" in="10165" is="60" />
    </tbreq>

2023-10-03 00:58:12.4772|INFO|GW-1|<GW:1,0> Close
2023-10-03 00:58:12.4836|TRACE|GW-1|<GW:1,0> ReadTelegramAsync !!
2023-10-03 00:58:12.4836|DEBUG|LuCon.SocketServer.GatewayInterface.Util|CloseTcpClient
2023-10-03 00:58:12.4844|ERROR|GW-1|<GW:1,0>
jatty commented 1 year ago

It logically looks like the <tbreq> tag is not parsed properly.

zivillian commented 11 months ago

<tbreq> is a request, so parsing is not the problem. By looking at the timestamp I would say that your setup is too slow and takes more than one minute to answer the request. Before increasing the timeout it would be great if you can test your setup again with the wolf app and check if the initial connection takes more than a minute. You may have to reset your app if it was connected before (and has cached the setup).

jatty commented 11 months ago

<tbreq> is a request, so parsing is not the problem. By looking at the timestamp I would say that your setup is too slow and takes more than one minute to answer the request.

Yes, you're absolutely right. The Wolf App has the same problem - as a fun fact: it also times out after 60 seconds within their App. After switching the complete heating system on and off i was able to get ism7config running and fetch a complete parameter.json, which works great now, but it does not work every time, sometimes it still runs into a timeout.

zivillian commented 11 months ago

I'd say there is nothing I can do to fix this - luckily you got it working for your setup. Please reopen if you have an idea how this can be improved.