ArekKubacki / Hoymiles-Plant-DTU-Pro

Hoymiles-Plant-DTU-Pro via Modbus TCP
MIT License
37 stars 7 forks source link

DTU Pro S - Firmware 02.22 #24

Closed CrazymanXYZ closed 6 months ago

CrazymanXYZ commented 7 months ago

Doesnt work anymore with DTU-Pro-S Firmware 02.22.

Also Home Assistant triggers following info

`Logger: homeassistant.const Source: helpers/deprecation.py:205 First occurred: 21:10:58 (12 occurrences) Last logged: 21:10:58

DEVICE_CLASS_VOLTAGE was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.VOLTAGE instead, please report it to the author of the 'hoymiles_dtu' custom integration DEVICE_CLASS_CURRENT was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.CURRENT instead, please report it to the author of the 'hoymiles_dtu' custom integration TEMP_CELSIUS was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'hoymiles_dtu' custom integration DEVICE_CLASS_TEMPERATURE was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.TEMPERATURE instead, please report it to the author of the 'hoymiles_dtu' custom integration FREQUENCY_HERTZ was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfFrequency.HERTZ instead, please report it to the author of the 'hoymiles_dtu' custom integration`

CrazymanXYZ commented 7 months ago

`Logger: homeassistant.components.sensor Source: helpers/deprecation.py:205 Integration: Sensor (documentation, issues) First occurred: 21:10:58 (6 occurrences) Last logged: 21:10:58

STATE_CLASS_MEASUREMENT was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.MEASUREMENT instead, please report it to the author of the 'hoymiles_dtu' custom integration STATE_CLASS_TOTAL was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL instead, please report it to the author of the 'hoymiles_dtu' custom integration STATE_CLASS_TOTAL_INCREASING was used from hoymiles_dtu, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorStateClass.TOTAL_INCREASING instead, please report it to the author of the 'hoymiles_dtu' custom integration`

vriezenaar commented 7 months ago

Getting the same.

ArekKubacki commented 7 months ago

What you show will come into force in 2025. There is no error here. what exactly doesn't work. If Hoymiles blocked Modbus, unfortunately you will have to downgrade or build OpenDTU for little money. I use it myself and I don't remember the last time I had any problems.

CrazymanXYZ commented 7 months ago

Got feedback from Hoymiles Does this info would help you to publish an softwareupdate or a workaround for the affected people? :-) Really miss the readings from your software.

`GERMAN: Die wichtigsten Modbus-Änderungen in der DTU-Firmware Version 22 sind:

  1. Hinzufügen des Lesebefehls von Befehl 4 und der Datenpunkttabelle beginnend mit 0x3000 in der Modbus-Punktetabelle.
  2. Hinzufügen der Tabelle mit den Informationen über Mikro-Wechselrichter-Alarme in der Modbus-Punktetabelle.

ENGLISH: The main Modbus changes in DTU firmware version 22 are:

  1. Add the read command of command 4 and the data point table starting from 0x3000 in the Modbus point table.
  2. Adding the microinverter alarm information table in the Modbus points table. `
CrazymanXYZ commented 7 months ago

At the moment no readings can be read IMG_7795 IMG_7796

ArekKubacki commented 7 months ago

Can you edit files on your HA? I would give you the line number where you could check its operation.

CrazymanXYZ commented 7 months ago

I am a rookie, but can do my best and give it a try :-)

ArekKubacki commented 7 months ago

homeassistant/custom_components/hoymiles_dtu/hoymiles/client.py Change in line 114 and 116 0x1000 to 0x3000

and restart HA

CrazymanXYZ commented 7 months ago

Didn't work. I contacted Hoymiles, and asked for the changelog and adressfile. Hopefully they are willing to share it

biasowicka commented 7 months ago

podpinam temat

alarta commented 7 months ago

Hi ArekKubacki you have any more ideas how to fix?

ArekKubacki commented 6 months ago

Please send the logs. Mostly errors, not warnings.

alarta commented 6 months ago

with client.py:114/116 *start_address = i 20 + 0x1000**

Logger: pymodbus.logging Source: custom_components/hoymiles_dtu/hoymiles/client.py:98 Integration: hoymiles_dtu (documentation) First occurred: 13:32:19 (2 occurrences) Last logged: 13:32:24 Connection to (192.168.X.XXX, 502) failed: timed out

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:360 Integration: Sensor (documentation, issues) First occurred: 13:32:24 (1 occurrences) Last logged: 13:32:24

Error while setting up hoymiles_dtu platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hoymiles_dtu/sensor.py", line 69, in setup_platform raise Exception('Invalid configuration for Hoymiles DTU platform') Exception: Invalid configuration for Hoymiles DTU platform

with client.py:114/116 *start_address = i 20 + 0x3000**

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:408 Integration: Sensor (documentation, issues) First occurred: 13:38:00 (1 occurrences) Last logged: 13:38:00

Setup of platform hoymiles_dtu is taking longer than 60 seconds. Startup will proceed without waiting any longer.

Logger: homeassistant Source: custom_components/hoymiles_dtu/sensor.py:69 Integration: hoymiles_dtu (documentation) First occurred: 13:38:05 (1 occurrences) Last logged: 13:38:05

Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hoymiles_dtu/sensor.py", line 69, in setup_platform raise Exception('Invalid configuration for Hoymiles DTU platform') Exception: Invalid configuration for Hoymiles DTU platform

ArekKubacki commented 6 months ago

I am currently waiting for a response from Hoymiles technicians. Unfortunately, it is currently Chinese New Year.

biasowicka commented 6 months ago

I asked Hoymiles support to downgrade DTU PRO-S to version 2.19, and it started working

ArekKubacki commented 6 months ago

Can you attach files for downgrade? Personally, I have an old version in my files.

pon., 12 lut 2024, 11:14 użytkownik biasowicka @.***> napisał:

I asked Hoymiles support to downgrade DTU PRO-S to version 2.19, and it started working

— Reply to this email directly, view it on GitHub https://github.com/ArekKubacki/Hoymiles-Plant-DTU-Pro/issues/24#issuecomment-1938382781, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKPOB3JYULIPM47R7FBVXTYTHTOTAVCNFSM6AAAAABCNTSS3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGM4DENZYGE . You are receiving this because you commented.Message ID: @.***>

biasowicka commented 6 months ago

They did the downgrade remotely because I asked them for it, I also asked for a share of the software, as soon as they send me the file, I will post it here.

Can you attach files for downgrade? Personally, I have an old version in my files. pon., 12 lut 2024, 11:14 użytkownik biasowicka @.> napisał: I asked Hoymiles support to downgrade DTU PRO-S to version 2.19, and it started working — Reply to this email directly, view it on GitHub <#24 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKPOB3JYULIPM47R7FBVXTYTHTOTAVCNFSM6AAAAABCNTSS3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGM4DENZYGE . You are receiving this because you commented.Message ID: @.>

biasowicka commented 6 months ago

Firmware V0.2.19 DTU Pro or Pro S.zip DTU PRO-S to version 2.19

CrazymanXYZ commented 6 months ago

According to this Forum: ModBus does not function anymore on 2.22: https://www.photovoltaikforum.com/thread/221261-neues-firmware-update-2-22-f%C3%BCr-dtu-pro-erh%C3%A4ltlich/

alarta commented 6 months ago

from photovoltaikforum: But I now know what the problem is: In the old version, the registers can be read with "Read Input Register" (CMD 4) and with "Read Holding Register" (CMD 3). In V2.22 only “Read Holding Register (CMD 3) works”.

alarta commented 6 months ago

got it working ... bug from Hoymiles For 22 Version, if you choose "Export control", it prohibits MODBUS TCP. But "Remote control" still supports it. So you have to go to "Toolkit" in APP and then choose "Remote Control" from RS-485 Port Config under DTU Information.

ArekKubacki commented 6 months ago

Thank you for finding a workaround. This solution actually works. I took the liberty of using your solution in the Readme file in the repository.

bynight66 commented 4 months ago

got it working ... bug from Hoymiles For 22 Version, if you choose "Export control", it prohibits MODBUS TCP. But "Remote control" still supports it. So you have to go to "Toolkit" in APP and then choose "Remote Control" from RS-485 Port Config under DTU Information.

What is the correct Portaddress? I downgradet from .22 to .19, but also there I have to chooce between Export and Remote. Is there really a different?

vriezenaar commented 4 months ago

502 is the port that is used (coded in the software). I have also .19 IMG_6516 Mine works with "export control". Connected via Ethernet. Are you sure you have the right IP? Check the mac adres in your router to check.

bynight66 commented 4 months ago

I have the .22 now and it works with remote Control. But there I have to choose a Portaddress... from 101 ~ 254... Export Control I did not try... Hoymiles_Port

alarta commented 4 months ago

i used 101

bynight66 commented 4 months ago

I also... ;-)