lmatula / ha_chint_pm

homeassistant Chint power meter integration
Creative Commons Zero v1.0 Universal
15 stars 8 forks source link

Receive no values #12

Open ruschmitz opened 1 year ago

ruschmitz commented 1 year ago

Hello Imatula, I have installed the DTSU666 integration in Home Assistant, I see 1 device and 37 entities, but I do not receive any values. I get "unknown" as sensor value. The log file shows this error:

File "/config/custom_components/chint_pm/sensor.py", line 872, in _handle_coordinator_update value = self.coordinator.device.data[self.entity_description.key]


KeyError: 'rev'

Line 872 in sensor.py is:

 value = self.coordinator.device.data[self.entity_description.key]

Unfortunately, I am not a programmer and dont know where I have to look for the error. Can you please help me? 
The following is a part of my configuration.yaml:

      # Chint DTSU666 an Modbus
modbus:
  - name: "DxSU-666"
    type: serial
#    port: /dev/ttyUSB1    # USB-RS485 Adapter Adresse 
    port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0@11       # USB-RS485 Adapter Adresse 
    baudrate: 9600    # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
    bytesize: 8
    method: rtu
    parity: N
    stopbits: 1 
#    delay: 10
#    timeout: 10
ruschmitz commented 1 year ago

Sorry, this is the configuration.yaml:

modbus:

Logfile: home-assistant_chint_pm_2023-10-19T16-52-38.058Z.log

lmatula commented 1 year ago

i'm found in your log "No such file or directory: '/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0@11'" This mean device is busy, or don't connected.

I'm think did you configure individual modbus integration also, this isn't required.

ruschmitz commented 1 year ago

Thank you for your answer. I have removed the Modbus entry from configuration.yaml, and also removed the DTSU666 integration from Home Assistant and wanted to reinstall it. To do this, I use the ADD INTEGRATION-Function from Home Assistant,, followed by the dialogue with the UI.

UI01 My power meter is from Chint, but I tried both.

UI02 Serial is correct

UI03 The top entry is right for my configuration.

Term01

I have a Modbus-USB adapter on ttyUSB1 to which the DTSU666 is connected. I have access to the DTSU666 via EVCC, which I have running as an Add-on on Home Assistant. The Modbus address 11 is correct, but I don't know what the designation "s/n: n/a - 6790:29987" means. The Modbus-Adapter ttyUSB0 is connected to a Solax Solar-Inverter.

UI04 After entering, the message "unknown" appears and I can't get any further.

UI05

Trying to use Enter Manually not work either.

UI06 I tried many different entries without success

UI07 Do you have any ideas?

acaradic commented 1 year ago

Hi all, I'm experiencing exactly same issue. Just stopped working about month ago. Tried same as above but no luck. It won't let me pass unknown error as above.

lmatula commented 11 months ago

Hi all, I'm experiencing exactly same issue. Just stopped working about month ago. Tried same as above but no luck. It won't let me pass unknown error as above.

changed the pymodbus api, updated in 0.0.4, please retry

dzlabing commented 7 months ago

The above error might be related to missing permissions on the /dev/ttyUSB0 device. Fix: Add the homeassistant user to the dialout group.