Fronius Wattpilot

@mk-maddin Hi Martin, thanks heaps, this is a great integration! Works great with my CUPRA Born.

@mk-maddin Thanks for your integration.
I have a issue with the Value of Entity ā€œWattpilot Next Trip Chargingā€. Itā€™s limited to 50000 Wh. Our car can load up more than 70000 Wh (70 kWh). Wattpilot supports greater Values.
Can you open up the Value or give me tip to do it by myself?

Jerem

Just for clarity, the entity ā€œnext_trip_chargingā€ has the description: Defined amount of energy will be provided unitl the next scheduled ride. However, the actual variable (in the wattpilot app & presented by the API) is described as : Minimum amount of charging.
So, as I understand it, 50kWh is the highest minimum charging you can specify. It will charge more than that if time & power is available.

So, as I understand it, 50kWh is the highest minimum charging you can specify. It will charge more than that if time & power is available.

After 50kWh Wattpilot continues in Eco Mode. If theres no PV Energy available it will stop. But if I need to charge my car f.e. until 7:00PM with 70kWh itā€™s too less.
In the original Fronius App you can choose bigger values. So I think itā€™s only the limitation of the variable.

Not sure why I selected 50 000 Wh - I think my main purpose was to overwrite the default number maximum which is 100 as of HA dev docs.

I extended now with additional 0 - so 500 000 Wh (500 kWh) which should be fine for the most cars in next some years :stuck_out_tongue:

Can you test this and give a short feedback if it works for you correctly?
(I do not have a car where I can exceed that number :wink: )

2 Likes

@mk-maddin : yeah, works great. Thank you for your quick support. Great integration you made.

I seem to have hit a problem - not sure if itā€™s the integration or the Wattpilot.

After rearranging router & wifi access points, the wattpilot refused to connect to the LAN so eventually (after rebooting everything) I reset it. I can connect to it now through the app (it is even reporting 100% wifi strength but it drops connection occasionally) and reconfigured password & name, as previously.
But now the integration fails to setup. Iā€™ve deleted it & recopied the integration, restarted HA & still it refuses to setup.
I get this in the log

2024-04-06 21:27:07.630 DEBUG (MainThread) [custom_components.wattpilot] Setting up config entry: 2bbd4cf7d1c986fb95a7adff00f83cb6
2024-04-06 21:27:07.630 DEBUG (MainThread) [custom_components.wattpilot] 2bbd4cf7d1c986fb95a7adff00f83cb6 - async_setup_entry: Connecting charger ip: 192.168.1.25
2024-04-06 21:27:07.639 DEBUG (MainThread) [custom_components.wattpilot] 2bbd4cf7d1c986fb95a7adff00f83cb6 - async_setup_entry: Ensure charger is connected and initialized: 192.168.1.25
2024-04-06 21:27:22.738 ERROR (MainThread) [custom_components.wattpilot] 2bbd4cf7d1c986fb95a7adff00f83cb6 - async_setup_entry: Timeout - charger not connected: False (15 sec)

Is this saying the wattpilot is not connected? I also ran a ping while trying to setup the integration and the wattpilot was definitely connected.
Could it be password related? (although I know it is set correctly in the app/wattpilot & in the integration config).

Iā€™m starting to think there is a hardware issue but any suggestions would be appreciated.

Fixed.
It was a weird password issue. Having reset the wattpilot, I reconfigured the Access Point password & device name but didnā€™t set up the other password (Settings, Security). I was still able to log in through the cloud with the app (& directly via the AP with the app) so I thought the password had remained set

This morning (with me doing nothing at all) the cloud access threw up a password error. So, through the AP, I entered the old (xyzpw) & new password (xyzpw) and it was accepted. Note, old password (which was being refused by the wattpilot via cloud but accepted via AP) was set to be the same as it was & the same as the new password. Now the app via cloud & the HA integration work.
A very frustrating 36 hours - but all good now.

1 Like

Hello Martin @mk-maddin ,
First of all, thank you very much for your great and helpful integration - great job!
Iā€™ve recently been getting HA error messages from Wattpilot when I restart HA. Unfortunately, I canā€™t remember when this started, as I rarely look at the protocol. However, as far as I can see, the integration works without any problems.

I could send the diagnostic data via PM if necessary.

Forgive me for the grammar, Google helped with the translation

Protocol:

Logger: homeassistant.util.loop
Quelle: util/loop.py:84
Erstmals aufgetreten: 01:17:31 (5 Vorkommnisse)
Zuletzt protokolliert: 01:17:31

Detected blocking call to open inside the event loop by custom integration 'wattpilot' at custom_components/wattpilot/sensor.py, line 44: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream: (offender: /config/custom_components/wattpilot/sensor.py, line 44: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:), please report it to the author of the 'wattpilot' custom integration Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2055, in async_forward_entry_setup return await self._async_forward_entry_setup(entry, domain, True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 134, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/wattpilot/sensor.py", line 44, in async_setup_entry with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:
Detected blocking call to open inside the event loop by custom integration 'wattpilot' at custom_components/wattpilot/switch.py, line 46: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream: (offender: /config/custom_components/wattpilot/switch.py, line 46: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:), please report it to the author of the 'wattpilot' custom integration Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2055, in async_forward_entry_setup return await self._async_forward_entry_setup(entry, domain, True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 94, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/wattpilot/switch.py", line 46, in async_setup_entry with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:
Detected blocking call to open inside the event loop by custom integration 'wattpilot' at custom_components/wattpilot/select.py, line 45: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream: (offender: /config/custom_components/wattpilot/select.py, line 45: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:), please report it to the author of the 'wattpilot' custom integration Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2055, in async_forward_entry_setup return await self._async_forward_entry_setup(entry, domain, True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 106, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/wattpilot/select.py", line 45, in async_setup_entry with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:
Detected blocking call to open inside the event loop by custom integration 'wattpilot' at custom_components/wattpilot/number.py, line 45: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream: (offender: /config/custom_components/wattpilot/number.py, line 45: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:), please report it to the author of the 'wattpilot' custom integration Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2055, in async_forward_entry_setup return await self._async_forward_entry_setup(entry, domain, True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 129, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/wattpilot/number.py", line 45, in async_setup_entry with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:
Detected blocking call to open inside the event loop by custom integration 'wattpilot' at custom_components/wattpilot/button.py, line 45: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream: (offender: /config/custom_components/wattpilot/button.py, line 45: with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:), please report it to the author of the 'wattpilot' custom integration Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2055, in async_forward_entry_setup return await self._async_forward_entry_setup(entry, domain, True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 69, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/wattpilot/button.py", line 45, in async_setup_entry with open(os.path.dirname(os.path.realpath(__file__))+'/'+platform+'.yaml', 'r') as stream:

FYI, this bug was logged on github yesterday. link to github

Hi Martin,

after yesterdays Sirmware update your great intergration stopped with my HA.
I get the following error Mesages:

Logger: homeassistant.components.sensor
Quelle: helpers/entity_platform.py:600
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 19:47:51 (3 Vorkommnisse)
Zuletzt protokolliert: 19:47:51

Error adding entity None for domain sensor with platform wattpilot
Traceback (most recent call last):
File ā€œ/usr/src/homeassistant/homeassistant/helpers/entity_platform.pyā€, line 600, in _async_add_entities
await coro
File ā€œ/usr/src/homeassistant/homeassistant/helpers/entity_platform.pyā€, line 738, in _async_add_entity
entity_name = entity.name
^^^^^^^^^^^
File ā€œ/config/custom_components/wattpilot/entities.pyā€, line 88, in name
return self._name
^^^^^^^^^^
AttributeError: ā€˜ChargerSensorā€™ object has no attribute ā€˜_nameā€™. Did you mean: ā€˜nameā€™?

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.wattpilot.entities
Quelle: custom_components/wattpilot/entities.py:49
Integration: Fronius Wattpilot (Dokumentation)
Erstmals aufgetreten: 19:47:51 (3 Vorkommnisse)
Zuletzt protokolliert: 19:47:51

Wattpilot - qsw: init: Charger does not have a property: qsw (maybe an attribute?)
Wattpilot - wcch: init: Charger does not have a property: wcch (maybe an attribute?)
Wattpilot - wccw: init: Charger does not have a property: wccw (maybe an attribute?)

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.wattpilot.utils
Quelle: custom_components/wattpilot/utils.py:123
Integration: Fronius Wattpilot (Dokumentation)
Erstmals aufgetreten: 19:47:51 (3 Vorkommnisse)
Zuletzt protokolliert: 19:47:51

wattpilot - GetChargerProp: Charger does not have property: qsw
wattpilot - GetChargerProp: Charger does not have property: wcch
wattpilot - GetChargerProp: Charger does not have property: wccw

Looks to be the same issue logged in github Get ChargerProp: Charger does not have property: qsw Ā· Issue #47 Ā· mk-maddin/wattpilot-HA Ā· GitHub
What is your wattpilot fw version? 41.7?

just released v0.2.3
This version is compatible with beta Firmware 41.7

1 Like

Thanks it works again for your great work

Thanks for your ongoing efforts, Martin - itā€™s appreciated.

Quite some time ago, I installed the custom component manually. How would I go about changing to a HACS install without losing all the existing entities & automations? (HA core in a docker container with HACS).

I have no experience with HA core in docker container, but as of my knowledge HA does not care from where the integration comes, as long as it is installed.
So a way that should work is:

  1. create a backup
  2. remove the wattpilot folder you manually placed within custom_components
  3. install wattpilot via HACS
  4. restart home assistant

Thanks for the advice. Fyi, v0.2.3 loaded - all good.

Curious, isnā€™t the Wattpilot OCPP compatible? Couldnā€™t you get everything you need via that instead of making a custom app/API integration?

OCPP 1.6J compatibility was implemented in firmware version V37.14 within Wattpilot.
The integration was created when V35.9 was the currentā€¦ :wink:

IMG_7324

2 Likes

Hi Martin, this is more a ā€˜heads-upā€™ for a (probable?) wattpilot fw update - but Iā€™ll log it as an issue if you want. Iā€™m currently running v42.0 (as a beta, seeking to solve ongoing authentication issues between device & Fronius proxy servers, apparently). When restarting HA, it throws the following error. (edited to add : the integration is working, all entities are good)

Source: helpers/frame.py:151
First occurred: 4:32:15 PM (5 occurrences)
Last logged: 4:32:15 PM

Detected code that calls async_forward_entry_setup for integration wattpilot with title: q-Watt and entry_id: d44e6143feb5320924098d9109d24866, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.```