britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
71 stars 32 forks source link

Battery voltage for AIO #130

Open TimClement opened 8 months ago

TimClement commented 8 months ago

The AIO does not appear to have a battery details topic, but does provide the battery voltage in the raw JSON (and it also shows in the GE app as a battery statistic). Would it be possible to feed this to HA as a sensor if raw input is enabled? It might be of interest to people seeing the "sudden drop in SOC on discharge" issue.

britkat1980 commented 8 months ago

Battery details for AIO are a WIP. Its a completely different data structure, so I need to modify the underlying (un-maintained) library. I'm planning on getting this working before 2.5.0

DJBenson commented 7 months ago

Came here to ask about this, after discussing with Paul on the groups that the registers are there it's great to hear that you're looking into this @britkat1980.

pbyrne-ms commented 7 months ago

You can add manually to HA, via MQTT, in the meantime

mqtt:
  sensor:
    - name: AIO#1 Battery Voltage
        unique_id: 6b27bc8d-0b08-4131-85d1-d2304c79226d
        force_update: true
        icon: mdi:flash-triangle-outline
        device_class: voltage
        state_class: measurement
        qos: 0
        unit_of_measurement: "V"
        state_topic: "aio1/CH<serial>/raw/invertor/v_battery"
    - name: AIO#1 Battery Current
        unique_id: 10c410c5-1bd4-4e88-8577-666b4e575818
        force_update: true
        icon: mdi:current-dc
        device_class: current
        state_class: measurement
        qos: 0
        unit_of_measurement: "A"
        state_topic: "aio1/CH<serial>/raw/invertor/i_battery"

I've done this and it's working fine for about a month now...Just check the topic string suits your specific setup...

TimClement commented 7 months ago

@pbyrne-ms Thanks - I now have this up and running (with a little help from MQTT Explorer to get the first part of the topic name right).