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.

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