suaveolent / ha-hoymiles-wifi

Home Assistant custom component for Hoymiles DTUs and the HMS-XXXXW-2T microinverters
MIT License
142 stars 9 forks source link

Fail to connect #73

Open AlbertvanEngen opened 3 weeks ago

AlbertvanEngen commented 3 weeks ago

Describe the bug I'm using a Hoymiles DTU-Pro-S that is connected via a network cable to my router.

As soon as I try to setup the Hoymiles DTU connection, I enter the IP address (found on the router and able to ping) as Host and leave the default 35 as update interval. Then press the send button. Then I do get a message "Failed to connect" and the host field is cleared.

Please advise how to solve this issue

To Reproduce Steps to reproduce the behavior: see above

Expected behavior The Hoymiles installation will be connected to my Home Assistant server

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Home Assistant 2024.10.3 on Raspberry PI 3

iroc-fabi commented 1 week ago

Bei mir gleicher Fehler. DTU PRO S wird nicht gefunden. DTU Version V00.02.23

suaveolent commented 1 week ago

Is there anything in the logs?

Can you ping your DTU from your home assistant instance?

iroc-fabi commented 1 week ago

Verbunden.

image

iroc-fabi commented 1 week ago

image

suaveolent commented 1 week ago

Can you look into the log if there is anything explaining the issue?

AlbertvanEngen commented 1 week ago

Is there anything in the logs?

Can you ping your DTU from your home assistant instance?

Yes I can ping the DTU pro

iroc-fabi commented 1 week ago

No entry in the log.

iroc-fabi commented 1 week ago

I have now switched off DHCP on the DTU and reset the firmware to V00.02.19. Doesn't help either.

suaveolent commented 1 week ago

Can you check if the get-real-data-new command from the hoymiles-wifi (https://github.com/suaveolent/hoymiles-wifi) lib works?

Please only keep the first four digits of the serial numbers and post the ouput if successfull.

AlbertvanEngen commented 1 week ago

When I execute hoymiles-WiFi --host 192.168.2.2 get-real-data-new I do get a message: no response or unable to retrieve response for get-real-data-new

Ping however is sending a reply

suaveolent commented 1 week ago

Well that explains why the Home Assistant integration cannot connect.

Are you sure 192.168.2.2 is the correct IP-address? Can you access the web interface of the DTU via this ip-address?

AlbertvanEngen commented 1 week ago

This is the ip address the dtu is having on my router, connected via Itp cable. I'm not able to connect via a web browser

suaveolent commented 1 week ago

I See. When you directly connect to the DTU do you get a response for the command ?

AlbertvanEngen commented 1 week ago

When I connect my phone to the dtu WiFi I can connect via the app, it is not working via a browser

suaveolent commented 1 week ago

Can you connect your pc to the DTU wifi and issue the get-real-data-new command ? (Note that the DTU will have a different ip address)

AlbertvanEngen commented 1 week ago

When I connect my pc directly to the WiFi router of the dtu, I do get a response from the dtu with block sgs_data and pv_data

AlbertvanEngen commented 1 week ago

I've made a WiFi connection from the HA instance directly to the dtu, now I'm able to get data from the dtu in HA. It seems that the wired Ethernet connection is not able to read data via the local wired network

suaveolent commented 1 week ago

That is interesting. Maybe there is something else going wrong in your setup? I have heard from multiple sides that the connection should work via a router too.