sakrut / hoymiles-dtu-homeassistant-addon

2 stars 0 forks source link

Support for HMS-800W-2T #4

Open XilefTech opened 3 months ago

XilefTech commented 3 months ago

So I got an HMS-800W Balcony Microinverter that is wifi-enabled. I would really like to add it to my homeassistant through this integration (there are not really any other options right now anyways, as far as I have seen).

The only problem right now is, that the firmware version of the DTU that is integrated into this inverter doesn't seem to be supported.

My DTU is Hardware V. H00.01.00 and Software V. V00.01.04.

Addon logs (with a few connection retries cut out):

INFO  | 2024-08-01 12:13:45 | [pool-2-thread-1] infrastructure.App (App.java:79) - Application Hoymiles DTU starting...
INFO  | 2024-08-01 12:13:45 | [pool-2-thread-1] infrastructure.App (App.java:109) - Connecting to DTU: 192.168.178.31:10081 (watchdog_timeout=300)
INFO  | 2024-08-01 12:13:45 | [pool-2-thread-1] dtu.DtuClient (DtuClient.java:78) - Trying connect to 192.168.178.31:10081
WARN  | 2024-08-01 12:13:48 | [pool-2-thread-1] infrastructure.App (App.java:118) - DTU connection error: No route to host: /192.168.178.31:10081
<6 retries>
INFO  | 2024-08-01 12:15:01 | [RxComputationThreadPool-1] dtu.DtuClient (DtuClient.java:78) - Trying connect to 192.168.178.31:10081
INFO  | 2024-08-01 12:15:01 | [RxComputationThreadPool-1] dtu.DtuClient (DtuClient.java:87) - Connect success to 192.168.178.31:10081
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] infrastructure.App (App.java:123) - DTU connection success
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] infrastructure.App (App.java:127) - Connecting to MQTT: tcp://core-mosquitto:1883
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] infrastructure.App (App.java:142) - MQTT connection success
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] application.AppController (AppController.java:57) - Successful connected to tcp://core-mosquitto:1883
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] application.AppController (AppController.java:59) - Sending online state...
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] application.AppController (AppController.java:96) - Getting AppInfo from DTU...
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] dtu.DtuClient (DtuClient.java:130) - Sending command: message=com.hoymiles.infrastructure.protos.APPInformationData$APPInfoDataResDTO, responseClazz=com.hoymiles.infrastructure.protos.APPInformationData$APPInfoDataReqDTO
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] dtu.DtuClient (DtuClient.java:120) - --> sending: msgId=41729
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] dtu.DtuClient (DtuClient.java:121) - ymdHms: "2024-08-01 12:15:01", offset: 3600, packageNow: 0, errCode: 0, time: 1722507301, 
INFO  | 2024-08-01 12:15:01 | [pool-2-thread-1] dtu.DtuClient (DtuClient.java:115) - --> end
INFO  | 2024-08-01 12:15:02 | [nioEventLoopGroup-2-1] dtu.DtuMessageDecoder (DtuMessageDecoder.java:24) - <-- decode: incoming message, length=102
INFO  | 2024-08-01 12:15:02 | [nioEventLoopGroup-2-1] dtu.DtuMessageDecoder (DtuMessageDecoder.java:58) - 484da20100018a2b0066|0a0c34313433393233323633333910abc0adb506180120022801380142221084021880022001380140c5bcadb50648265a0e322e312e306230327030337430315a1a10b9c6c991a9820520984e288184858101308002388006408140
INFO  | 2024-08-01 12:15:02 | [nioEventLoopGroup-2-1] dtu.DtuMessageDecoder (DtuMessageDecoder.java:67) - header=HM, msgId=41473, counter=1, dataCrc=35371, msgLen=102
INFO  | 2024-08-01 12:15:02 | [nioEventLoopGroup-2-1] dtu.DtuMessageDecoder (DtuMessageDecoder.java:97) - dtuSn: "414392326339", time: 1722507307, deviceNub: 1, pvNub: 2, packageNub: 1, channel: 1, mAPPDtuInfo {,   dtuSw: 260,   dtuHw: 256,   dtuStepTime: 1,   accessModel: 1,   communicationTime: 1722506821,   signalStrength: 38,   wifiVsn: "2.1.0b02p03t01", }, mAPPpvInfo {,   pvSn: 22069994742585,   pvSw: 10008,   pvHwPn: 270615041,   pvHw: 256,   pvGpfCode: 768,   pvGpf: 8193, }, 
INFO  | 2024-08-01 12:15:02 | [nioEventLoopGroup-2-1] dtu.DtuMessageDecoder (DtuMessageDecoder.java:101) - <-- end
INFO  | 2024-08-01 12:15:02 | [pool-2-thread-1] application.AppController (AppController.java:100) - DTU: hw=256, sw=260, time=2024-08-01T12:15:07
INFO  | 2024-08-01 12:15:02 | [pool-2-thread-1] application.AppController (AppController.java:102) - Sending autodiscovery...
ERROR | 2024-08-01 12:15:02 | [pool-2-thread-1] hoymiles.Entrypoint (Entrypoint.java:33) - Uncaught exception: Device with sw_version < 512 is currently not supported
org.apache.commons.lang3.NotImplementedException: Device with sw_version < 512 is currently not supported
    at com.hoymiles.infrastructure.repository.DtuRepository.sendRealDataReq(DtuRepository.java:67) ~[app.jar:?]
    at com.hoymiles.domain.MetricsService.sendRealDataReq(MetricsService.java:28) ~[app.jar:?]
    at com.hoymiles.application.AppController.start(AppController.java:113) ~[app.jar:?]
    at com.hoymiles.application.AppController$Proxy$_$$_WeldClientProxy.start(Unknown Source) ~[app.jar:?]
    at com.hoymiles.infrastructure.App.run(App.java:84) ~[app.jar:?]
    at com.hoymiles.Entrypoint.lambda$main$1(Entrypoint.java:31) ~[app.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
    at java.lang.Thread.run(Thread.java:829) ~[?:?]
INFO  | 2024-08-01 12:15:02 | [pool-2-thread-1] infrastructure.App (App.java:91) - Stopping...
INFO  | 2024-08-01 12:15:02 | [pool-2-thread-1] application.AppController (AppController.java:163) - Stopping...
INFO  | 2024-08-01 12:15:02 | [main] hoymiles.Entrypoint (Entrypoint.java:44) - Shutdown complete

I would be really happy, if you would be interested in extending this addon for my inverter.

If there is anything I can help with or any other data I can provide for you, please let me know.

XilefTech commented 2 months ago

anyone interested in this?

sakrut commented 2 months ago

HI. Unfortunately, it's not looking like an easy change. I'm not sure do we have any already implemented format of messages for this DTU.

Could you please check that you are able to connect to your DTU through the "S-Miles Installer" application ? https://play.google.com/store/apps/details?id=com.hm.hemaiInstall1 You should be able to connect directly to DTU in configure mode.

Code behind this plugin is based on the installer app. https://github.com/sakrut/hoymiles-dtu

XilefTech commented 2 months ago

I can connect to the DTU through the S-Miles Installer app. That was also the app, I needed to use to log the DTU into my wifi network. The App is also the place where I got the Software- and hardware versions from. As far as I can tell, there is no update offered for my DTU.

If it helps anything: In the beginning I think on day one when I was still using the original repo from @banny310 I think I had data from the addon for about a day or so, I don't know how that worked... then it stopped working and I didn't have time to look into it for a few months, and since that repo seems kinda abandoned, I switched to your fork, to get the updates you made and hope it would fix the reason it broke, but it seems like it should've never worked in the first place...