Git Product home page Git Product logo

hass-victron's People

Contributors

christophcaina avatar christophpech avatar nijel avatar sfstar avatar solaral avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hass-victron's Issues

victron: Error on device update!

On a restart

Logger: homeassistant.components.binary_sensor
Source: custom_components/victron/select.py:127
Integration: Binary sensor (documentation, issues)
First occurred: 9:38:37 PM (1 occurrences)
Last logged: 9:38:37 PM

victron: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 503, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 729, in async_device_update
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 392, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 175, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 82, in async_call
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 201, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 316, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 121, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 381, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 97, in state
if self.current_option is None or self.current_option not in self.options:
File "/config/custom_components/victron/select.py", line 127, in current_option
return self.description.options(self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)).name
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: 0 is not a valid ess_mode

Unable to add integration

When trying to add the intergration i get the following error:
Config flow could not be loaded: {"message":"Invalid handler specified"}

More readings from BMS, e.g. Cell voltages/deviation

Great integration, thank you!!!
Can I raise an improvement request?
Would be great, if the integration would read out BMS values like cell voltages or cell voltage deviations because the whole DIY community tracks their cell voltages carefully. Currently I need to read them via mqtt but doing this with your integration would be a lot easier...

Missing 1-wire sensor

I am using RpiGpioSetup and have a DS18B20 OneWire temperature sensor connected. It shows up in VRM as "VRM instance 101" but it does come through to Home Assisstant. I only see my Ruuvi temperature sensor, VRM instance 20.

Error doing job: Task exception was never retrieved

ON a restart

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/victron/select.py:127
Integration: victron (documentation, issues)
First occurred: 9:38:48 PM (1 occurrences)
Last logged: 9:38:48 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 316, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 121, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 381, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 97, in state
if self.current_option is None or self.current_option not in self.options:
File "/config/custom_components/victron/select.py", line 127, in current_option
return self.description.options(self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)).name
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: 0 is not a valid ess_mode

Battery min SOC - input

Hi.
amazing work! Thanks for this integration.

I tried to use sensor.victron_settings_ess_batterylife_minimumsoc for dashboard slider, in order to change minimum SOC, based on individual need, but this entity does not allowed me to write any data. Is there any possibility to change SOC via your integration?

Example:
Snímek obrazovky 2022-12-27 v 17 03 10

Retrying setup: division by zero

Hello, I tried to use your integration over HACS with my newly installed Victron system but failed at the first step.

I used the IP address which is statet on the router page:
image

The port number is untouched:
image

It tells me Success! but your integration shows an error:
image

The log tells me nothing I understand:
home-assistant_victron_2022-12-15T21-38-48.144Z.log

The Modbus TCP services page on my Cerbo GX tells me following ids:
image
image

The last Modbus/TCP error occurred at the time of configuration of the integration:
image

The Firmware of the Cerbo GX is v2.92
The Firmware of the MultiPlus-II 48/5000/70-50 is 497
The Firmware of the SmartSolar MPPT VE.Can 250/100 rev2 is v3.10

I don't know if I missed something important, but I reread the github page two times and found nothing.

HA version 2022.2.0 with hass-victron v0.0.7

Just updated my HA core instance to the one released today. I didn't receive a HACS update option for this Victron integration, and on redownload I'm seeing this.

Screenshot 2023-02-01 at 3 30 31 PM

Attempting to continue anyway just hangs on the updating spinner.

Error adding entities for domain select with platform victron

On a restart....

tks for your work

Logger: homeassistant.components.select
Source: custom_components/victron/select.py:127
Integration: Select (documentation, issues)
First occurred: 9:38:37 PM (2 occurrences)
Last logged: 9:38:37 PM

Error adding entities for domain select with platform victron
Error while setting up victron platform for select
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 709, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 804, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 556, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 562, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 97, in state
if self.current_option is None or self.current_option not in self.options:
File "/config/custom_components/victron/select.py", line 127, in current_option
return self.description.options(self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)).name
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: 0 is not a valid ess_mode

Device that becomes unavailable does not update correctly afterwards

This was originally another issue, but now that I have some experience with the integration, I thought I'd open a clean item.

In my case, I have a ET112 grid meter. When the mains is cut off (South Africa and loadshedding - this happens multiple times a day for 2-4 hours at a time), the device does not get reported by modbus. When the device returns, subsequent queries does display it again. I tested this with my own modbus configuration.

However, the integration does not update the entities afterwards. It does show a fixed value, not changing, and the statistics says "updated x hours ago". Other devices continue to update as normal. If I reload the integration, it starts to update correctly.

Currently I am working around this by having an automation that does a reload as soon as mains power is restored. I will monitor for a while to see if this works correctly, but so far it does.

I have replaced my CCGX with a Cerbo GX since the last report, but still get the same behaviour, so it's not hardware in the controller, as I thought before.

vebus mode control & status problem?

Thank you sfstar. Great work. Took a few minutes to install and works great the last 3 days. Only problem I found is that: the vebus mode, when set to OFF, it does not work and the vebus mode (charger - inverter - on - off) does not refresh (it does not show the correct mode, when changed from HA).
Latest HA version. Only one Multiplus (f/w 497), a Daly integrated bat (f/w 0.14.3) and an RPI4 with the v.2.92 venusOS, configured as UPS and load diverter here.

Entity sensor.victron_inverter_alarm_ripple_239

ON a restart

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:980
Integration: Sensor (documentation, issues)
First occurred: 9:38:36 PM (105 occurrences)
Last logged: 9:38:37 PM

Entity sensor.victron_inverter_alarm_ripple_239 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_inverter_info_firmwareversion_239 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_inverter_info_productid_239 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_inverter_info_state_239 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_inverter_alarm_lowsoc_239 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

device class voltage, state class None and unit thus indicating it has a numeric value; however, it has the non-numeric value: OK (<class 'str'>)

Tks again for all the work
i removed the integration, reload the new HACS and reinstall the integration.

=============================================
Logger: homeassistant.components.sensor
Source: components/sensor/init.py:605
Integration: Sensor (documentation, issues)
First occurred: 08:25:20 (77 occurrences)
Last logged: 08:25:21

Sensor sensor.victron_inverter_alarm_lowacoutvoltage_239 has device class voltage, state class None and unit thus indicating it has a numeric value; however, it has the non-numeric value: OK (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Sensor sensor.victron_inverter_alarm_overload_239 has device class voltage, state class None and unit thus indicating it has a numeric value; however, it has the non-numeric value: OK (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Sensor sensor.victron_inverter_alarm_ripple_239 has device class voltage, state class None and unit thus indicating it has a numeric value; however, it has the non-numeric value: OK (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Sensor sensor.victron_inverter_info_state_239 has device class voltage, state class None and unit thus indicating it has a numeric value; however, it has the non-numeric value: INVERTING (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Sensor sensor.victron_inverter_alarm_lowsoc_239 has device class voltage, state class None and unit thus indicating it has a numeric value; however, it has the non-numeric value: OK (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Phases from grid are mixed

Hello,

I have been testing this further and found out, that phases from grid are mixed for some reason.

obrazek

It seems that it is like:
Victron - Homeassistant
L1 - L2
L2 - L3
L3 - L1

It can be easy changed in Homeassistant with Template sensors, but is there way to change it natively? Or it cannot be somehow controlled and it base on the discovering of devices?

Thank you a lot for help and wish you nice day

Charge control according to market prices

Perfect work.
I have a question about controlling the charging according to the price of electricity on the market.
I have an integration into our market operator where I can see the current price and the price for the day.
I would like according to some key to enable charging in the low price window.
Would it be possible to work this into the integration somehow?

Thank you and have a great New year.

Translated with www.DeepL.com/Translator (free version)

state class 'measurement' which is impossible considering device class ('volume')

Tks again for all the work
i removed the integration, reload the new HACS and reinstall the integration.

========================================

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:503
Integration: Sensor (documentation, issues)
First occurred: 08:25:20 (4 occurrences)
Last logged: 08:25:21

Entity sensor.victron_tank_capacity_20 (<class 'custom_components.victron.sensor.VictronSensor'>) is using state class 'measurement' which is impossible considering device class ('volume') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_tank_remaining_20 (<class 'custom_components.victron.sensor.VictronSensor'>) is using state class 'measurement' which is impossible considering device class ('volume') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_tank_capacity_21 (<class 'custom_components.victron.sensor.VictronSensor'>) is using state class 'measurement' which is impossible considering device class ('volume') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_tank_remaining_21 (<class 'custom_components.victron.sensor.VictronSensor'>) is using state class 'measurement' which is impossible considering device class ('volume') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

not functioning in venus 3.x

my modbus.yaml will not validate with an error
image

in config:
modbus: !include modbus.yaml
`modbus:

  • name: victron
    type: tcp
    host: 192.168.0.15 # use the IP address of your CCGX
    port: 502
    sensors:
    • name: 'Victron AC L1' #I am single phase, if your 3 phase, you will need to add this 3 times and update the addresses using the link above for the full address list
      unit_of_measurement: "W"
      slave: 100 #HUB1
      address: 817 #AC Consumption L1
      data_type: uint16
      scan_interval: 5
      device_class: power

    • name: 'Victron Grid Load'
      unit of_measurement: "W"
      slave: 100 #HUB
      address: 820 #GridL1 Net
      data_type: int16
      scan_interval: 5
      device_class: power

    • name: 'Victron Solar power'
      unit_of_measurement: "W"
      slave: 100 #HUB
      address: 850
      data_type: uint16
      device_class: power

#Battery
- name: 'Victron Battery current'
unit_of_measurement: "A"
slave: 100 #HUB
address: 841
data_type: int16
scale: 0.1
precision: 0
device_class: current

- name: 'Victron Battery Power System'
  unit_of_measurement: "W"
  slave: 100  #HUB
  address: 842
  data_type: int16
  scale: 1.0
  precision: 0
  device_class: power
  
- name: 'Victron Charge Power System'
  unit_of_measurement: "W"
  slave: 100 #HUB
  address: 860
  data_type: int16
  scale: 10.0
  precision: 0
  device_class: power
  
- name: 'Victron Battery State of Charge System'
  unit_of_measurement: "%"
  slave: 100 #HUB
  address: 843
  data_type: uint16
  scale: 1
  precision: 0
  
- name: 'Victron Inverter AC IN L1 V'
  unit_of_measurement: "V"
  slave: 236
  address: 3
  data_type: uint16
  scale: 0.1
  precision: 1
  device_class: voltage

- name: 'Victron Inverter AC IN L1 A'
  unit_of_measurement: "A"
  slave: 236
  address: 6
  data_type: uint16
  scale: 0.1
  precision: 1
  device_class: current

- name: 'Victron Inverter Max Over V Feed In L1'
  unit_of_measurement: "V"
  slave: 236
  address: 66
  data_type: uint16
  scale: 0.1
  precision: 1
  device_class: voltage

- name: 'Victron Battery Voltage'
  unit_of_measurement: "V"
  slave: 237
  address: 259
  data_type: uint16
  scale: 0.01
  precision: 1
  device_class: voltage

- name: 'Victron Battery Amperage'
  unit_of_measurement: "A"
  slave: 237
  address: 261
  data_type: uint16
  scale: 0.1
  precision: 1
  device_class: current

- name: 'Victron Battery Consumed Amphours'
  unit_of_measurement: "A"
  slave: 237
  address: 265
  data_type: uint16
  scale: 0.1
  precision: 1
  device_class: current

- name: 'Victron Battery State Of Charge'
  unit_of_measurement: "%"
  slave: 237
  address: 266
  data_type: uint16
  scale: 0.1
  precision: 1
  device_class: power

- name: 'Victron Battery Capacity'
  unit_of_measurement: "A"
  slave: 237
  address: 309
  data_type: uint16
  scale: 0.1
  precision: 1
  device_class: current`
  
  It is a new version and I guess it isnt supported yet in the plug.

Outbound Connection, Why?

Hi,
as you recommend in the haos forum I tried your addon without hacs.
Why there are any outbound connections required for this addon?
I can see new connections after enable this integration.

Thanks for Feedback!

No entities?

Hi,
I installed and configured the integration.
Then I enabled Modbus on the CerboGX.
The integration could be added in Home Assistant, but I don't see any entities... What can be the reason?
My CerboGX is connected to the Raspberry Pi 3B via a VEDirect to USB cable.

Battery Sensor to use for Energy Dashboard

Good Day,

Thank you for this awesome integration. Loving it.

I am having a issue where I think not all my battery sensors are available for the energy dashboard.
These are the only ones showing, but they are reporting zero.

image

Is there something that I am missing?

Also, can you maybe give the sensors that you use for your dashboard? All these sensors are quire confusing to me and I am not 100% sure which ones represent what.

Any help would be much appreciated

EDIT:

I have 282 entities available:
image

And this is the firmware I am running (Updated to the latest possible)

image

6 devices and no entities upon installation

After installing the integration for the first time, the 6 devices appeared, but they had no entities. I let it run for some time (about an hour), but nothing changed. There were no errors in the log.

Then I've restarted Home Assistant and the entities appeared.

This is not fully reproducible, but I never get the same number of entities upon installing, but the full list is filled in after restarting Home Assistant or reloading the integration.

Typically, I get something around 300 upon installing, while the full set seems to be 358. The missing entities seem to be random.

Device Address 0/100

Recognizing the devices on 0/100 still is unstable. First scan found the solarcharger on 0, after a restart of HA the entities weren’t available anymore. A new scan found them now under 100. this issue had been mentioned before but now it seems to be sure that it has to do with handling of devices under this address. Would a manual fixation of this address maybe help?

ValueError: 0 is not a valid alternator_errorcode

Tks again for all the work
i removed the integration, reload the new HACS and reinstall the integration.

=============================================

Logger: homeassistant.components.sensor
Source: custom_components/victron/sensor.py:155
Integration: Sensor (documentation, issues)
First occurred: 08:25:21 (1 occurrences)
Last logged: 08:25:21

victron: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update
await task
File "/config/custom_components/victron/sensor.py", line 155, in async_update
self._attr_native_value = self.entity_type.decodeEnum(data).name.split("_DUPLICATE")[0]
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: 0 is not a valid alternator_errorcode

Bluetooth Sensor like Propane Mopeka

first .. tks for that Integration :-).. i was using Yaml and Modbus for this ouf... lot of job

Do you plan to integrate Bluetooth Sensor like Propane Mopeka

in the print screen list has LPG Sensor

image

[Feedback] 3 phase ESS

Hi!

First of all, thank you. I've been waiting for this integration.

Since the README stated that it has not been tested with a 3 phase system, I'm just guessing that this is related to a 3 Phase system.

So, setting up the integration worked flawlessly. By now I only did this. No further configuration. Also, there are no errors or any issues.

I recognized two minor things that I find confusing and want you to know. On the devices overview the battery SOC values are taken from the wrong sensor.
victron-devices
For the battery device it seems to be the value from victron_battery_midvoltagedeviation instead of victron_battery_soc:
battery-device
And for settings its victron_settings_ess_batterylife_soclimit but should be victron_system_battery_soc:
system-device

My current setup:
Home Assistant 2022.12.8
Supervisor 2022.11.2
Operating System 9.4
HACS 1.29.0

Victron CerboGX with v2.29 Firmware
3x Pylontec US3000C Batteries

pvinverter pvtotal

hi, ive a problem with the measurement of pvinverter pvtotal it shows 130KW but it should show 0,13KW

sensor.victron_pvinverter_power_total_20

the sensors
sensor.victron_pvinverter_l1_power_20
sensor.victron_pvinverter_l2_power_20
sensor.victron_pvinverter_l3_power_20

shows correct in W

can you fix this please?

thank you for your work :-)

ValueError: 0 is not a valid ess_mode

Tks again for all the work
i removed the integration, reload the new HACS and reinstall the integration.

=============================================
Logger: homeassistant.components.select
Source: custom_components/victron/select.py:127
Integration: Select (documentation, issues)
First occurred: 08:25:21 (2 occurrences)
Last logged: 08:25:21

Error adding entities for domain select with platform victron
Error while setting up victron platform for select
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 442, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 717, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 814, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 566, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 607, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/select/init.py", line 97, in state
if self.current_option is None or self.current_option not in self.options:
File "/config/custom_components/victron/select.py", line 127, in current_option
return self.description.options(self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)).name
File "/usr/local/lib/python3.10/enum.py", line 385, in call
return cls.new(cls, value)
File "/usr/local/lib/python3.10/enum.py", line 710, in new
raise ve_exc
ValueError: 0 is not a valid ess_mode

Victron reboot requires integration restart

Hi sfstar,
first, many thanks for your work and effort here. Highly appreciated.

I observe the situation that I need to restart your integration everytime I reboot my victron (raspi) device. Otherwise I don't get any values anymore.

Cheers
Christian

entities disappear

After having installed the integration successfully, the integration found 509 entities, both solarchargers included. After a while (reboot?) some of the entities disappeared.
image
image
image
image

What happened here?

System Charger Device ID 226 - 5 x Wrong Device Class entities

Device class set as Voltage - however these are actual general text states I believe, going by the data showing in Developer Tools States, current values for me showing as;
Charger Alarm 226 = OK
High Voltage Alarm 226 = OK
Low Voltage Alarm = OK
Error Code 226 = NONE
MPP Operation Mode = OFF

Extract from the Log;


Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:980
Integration: Sensor (documentation, issues)
First occurred: 13:29:30 (86 occurrences)
Last logged: 13:29:30

Entity sensor.victron_solar_system_charger_alarm_226 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Entity sensor.victron_solar_system_charger_alarm_lowvoltage_226 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Entity sensor.victron_solar_system_charger_alarm_highvoltage_226 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Entity sensor.victron_solar_system_charger_errorcode_226 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Entity sensor.victron_solar_system_charger_mppoperationmode_226 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Duplicate entities without value updates

I happened to notice that on one of the devices ('solarcharger'), some entities (trackers) are no longer updating in the device settings. On the other hand, the entities with the same name in the 'settings' device are updated. If you look at the entities under 'Settings' -> 'Devices and Services' -> 'Entities' you see that there are duplicate entries!

Grid Meter and battery stops getting data

I have started using this integration today only, so I don't have a lot of experience with it yet.

My ET112 grid meter (unit ID 30) have stopped providing data after some time. Is there a way to debug the cause of this? Other sensors seems to work correctly so the CCGX responding correctly. I did a full rescan as well, just in case that's the issue. My CCGX and the VRM portal both show the grid meter as present. My previous modbus configuration did also work correctly.

The same is happening to the battery (ID 247).

I have also tried a HA restart and a reload of the integration.

ve bus out
grid out

At the time the data stopped, I got these messages (once off) in my HA logs. I've trimmed off some at the end to keep the comment short enough to post, but there are several more battery entity key errors errors similar to these.

2022-12-11 20:04:57.247 WARNING (MainThread) [custom_components.victron.coordinator] no valid data returned for entities of slave: 30 if device was physically removed please force a rescan to resolve this issue
2022-12-11 20:04:57.399 WARNING (MainThread) [custom_components.victron.coordinator] no valid data returned for entities of slave: 247 if device was physically removed please force a rescan to resolve this issue
2022-12-11 20:04:57.405 WARNING (MainThread) [custom_components.victron.coordinator] no valid data returned for entities of slave: 247 if device was physically removed please force a rescan to resolve this issue
2022-12-11 20:04:57.527 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.victron_battery_alarm_hightemperature_247 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 527, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 722, in async_device_update
    raise exc
  File "/config/custom_components/victron/sensor.py", line 153, in async_update
    data = self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)
  File "/config/custom_components/victron/base.py", line 10, in <lambda>
    value_fn: Callable[[dict], StateType] = lambda data, slave, key: data["data"][str(slave) + "." + str(key)]
KeyError: '247.battery_alarm_hightemperature'
2022-12-11 20:04:57.532 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.victron_battery_alarm_midvoltage_247 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 527, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 722, in async_device_update
    raise exc
  File "/config/custom_components/victron/sensor.py", line 153, in async_update
    data = self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)
  File "/config/custom_components/victron/base.py", line 10, in <lambda>
    value_fn: Callable[[dict], StateType] = lambda data, slave, key: data["data"][str(slave) + "." + str(key)]
KeyError: '247.battery_alarm_midvoltage'
2022-12-11 20:04:57.535 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.victron_battery_alarm_lowfusedvoltage_247 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 527, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 722, in async_device_update
    raise exc
  File "/config/custom_components/victron/sensor.py", line 153, in async_update
    data = self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)
  File "/config/custom_components/victron/base.py", line 10, in <lambda>
    value_fn: Callable[[dict], StateType] = lambda data, slave, key: data["data"][str(slave) + "." + str(key)]
KeyError: '247.battery_alarm_lowfusedvoltage'
2022-12-11 20:04:57.537 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.victron_battery_alarm_highfusedvoltage_247 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 527, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 722, in async_device_update
    raise exc
  File "/config/custom_components/victron/sensor.py", line 153, in async_update
    data = self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)
  File "/config/custom_components/victron/base.py", line 10, in <lambda>
    value_fn: Callable[[dict], StateType] = lambda data, slave, key: data["data"][str(slave) + "." + str(key)]

Device class seems wrong for some sensors

Some entities are having device class voltage and they have no unit. The device class seems wrong in this case, as there is definitely no unit for things like active input or overload alarm.

Sample log entries (there are way more of them):

Entity sensor.victron_vebus_activein_activeinput_227 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Entity sensor.victron_vebus_alarm_l3_overload_227 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Entity sensor.victron_battery_state (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Multiple PV Inverter in HomeAssistant

Hi,
I run 3 PV inverters on my Victron Multiplus. These are also recognized in Venus and have different VRM instances (34,35,36).
However, when I run a scan in HomeAssistant, only the first inverter (34) is detected. I can recognize this from the displayed values.
Any solution for this?
BR
Ben

Battery sensors shows mostly zero values

Hello,

first let me announce that I am newbie in HA as such. During last week I have been able to integrate Stiebel Eltron heat pump and jumped to PV. My configuration is 3-phase, Fronius Symo 8.2.3 (currently without datalogger card, Fronius currently distributes only Light version of their inverters, thus I am not able to read data for PV production via modbus till end of Q1/2023 ), 3x Victron Multiplus II/3000 + 2x BMZ ESS 9.0 + Cerbo GX.

After victron integration installation, I entered IP of Cerbo, and system get scanned correctly. Now I see 4 devices, all sensors seems to be reading correctly except "battery device".

image

Alarm sensors on battery device reporting OK, few status sensors also (temperature, soc, settings etc,) but on the rest of sensors, I see zero values.
Do you have some advise what I am doing wrong?

image
image
image
image
image

Thanks a lot.
Zdenek

Missing VE-Can MPPT 250/85

Wonderful integration - many thanks.

I am missing my VE.Can MPPT when the integration discovers the modbus devices.
Unit ID: 280
Firmware Versions: Latest
Cerbo GX: v3.00~8

Latest upgrade done as well.

Regards
Mark

image

First Feedback and idea for improvement

3 Phase is working well. My first proposal for improvement wuld be to add a unique ID (could be the same as entity, this would help to add them into dashboards. Additionally, the ability to add all (or more than one a a time) entity to a dashboard would help
image

Add to dashboard:
image

using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']

Tks again for all the work
i removed the integration, reload the new HACS and reinstall the integration.

=============================================
Logger: homeassistant.components.sensor
Source: components/sensor/init.py:674
Integration: Sensor (documentation, issues)
First occurred: 08:25:20 (29 occurrences)
Last logged: 08:25:21

Entity sensor.victron_battery_system_numberofmodulesonline_235 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_battery_system_numberofmodulesblockingcharge_235 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_battery_system_numberofmodulesblockingdischarge_235 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_inverter_info_firmwareversion_239 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
Entity sensor.victron_inverter_info_productid_239 (<class 'custom_components.victron.sensor.VictronSensor'>) is using native unit of measurement '' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

installation issue

I am trying to install it on a backup system. the original Modbus integration had been disabled. I was able to install, but unable to configure the integration. I am using a 3 phase MPII 5000/48, cerbo GC, Pylontech LiFePO4 battery, 2x Fronius inverter (Symo 3 Phase), 1x MPPT 450/100, 1x MPPT 250/60. The Yaml integration had been disabled. Any idea?
image

Power "W" values of by 10x!

Hi

I just installed your integration and I noticed on the values that a lot of the power "W" values are 10time less than they should be.
Look at my screenshot below showing my portal I built via using node-red and modbus and then your implementation on HomeAssistant
image

As you see from an Ampere point of view the Wattage values are off 10x. L1 loaded with 2,6A at 240V cannot be 37W. It was actually 355W. Same applies to L2 Power, L3 Power etc.

Where can I correct this?

Phases from system consumption / genset not correct

Hello,
I have installed your integration today. Unfortunately, something seems to be mixed up for me as well. At the "system consumtion" the value for L1 seems to be at L2, L2 at L3 and L3 is at "system genset L1". There is no generator for me!

I have also checked the whole thing again via the MQTT interface using MQTT Explorer.

Nevertheless: This is a very nice integration. Now only the small errors have to be removed.

PS: I have checked the register definition. This seems to be correct.

Many greetings
Holger
system_mappings
mqtt_explorer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.