Comments (30)
These are the possible states right now:
- Standby
- VehicleDetected
- Charging
- Error
Starting should only work when VehicleDetected
and stopping should only be possible when Charging
In any of the other states the request you should not assume the charger to do anything when sending requests.
from home-assistant-zonneplan-one.
Released #86
from home-assistant-zonneplan-one.
Just installed it. Will do some testing and report back.
from home-assistant-zonneplan-one.
That would be great (came here to find out if it's possible while creating the same type of automation). I'm afraid the current implementation is a read-only one.
from home-assistant-zonneplan-one.
Ok, ik heb de call naar de API gevonden. Ga deze hier echter niet delen zonder overleg met @fsaris
from home-assistant-zonneplan-one.
Goed bezig. Zou mooi zijn als die api call ingebouwd zou kunnen worden. Dan kunnen we 's avonds inpluggen en automatisch laden in de goedkoopste uurtjes. Ideaal.
from home-assistant-zonneplan-one.
I tried running your latest commit (Initiate buttons}
The Zonneplan app is configured to only start charging using the app or a schedule (so not when connecting the cable)
The start and stop buttons appear after reloading HA. After manually enabling them i can press the start button:
The Zonneplan app shows the charging is starting.
2023-11-08 22:07:15.014 INFO (MainThread) [custom_components.zonneplan_one.api] POST: /charge-points/0e5eda79-3006-4f74-bf80-582ec82e2bc6/actions/start_boost 2023-11-08 22:07:15.286 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response header: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Wed, 08 Nov 2023 21:07:15 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, private', 'x-ratelimit-limit': '120', 'x-ratelimit-remaining': '105', 'Strict-Transport-Security': 'max-age=63072000')> 2023-11-08 22:07:15.286 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response status: 200 2023-11-08 22:07:15.286 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response body: {}
The charging works (confirmed by checking my energy usage and car app)
But after about 10 seconds it stops charging again.
@fsaris if you need further testing the start/stop charging button I will be happy to help.
from home-assistant-zonneplan-one.
This looks promising. So the update sets a "start charge" value?
Did it also add a stop charge value? If not that could be the problem?
from home-assistant-zonneplan-one.
Can not replicate the issue @holobeer mentions. My car (Tesla) keeps charging after being started from HA.
Would be very interesting to find out who stops the charging. Can be stopped on the car side and on the charger side.
No stop charging calls in the log I assume? And when you hit the start charging button in the Zonneplan app the charging continues after 10 seconds?
from home-assistant-zonneplan-one.
I just installed the version too. I will check if it works in the evening.
I do get an error pressing the start charge button but it could be caused by the simple fact that there's no car plugged in. Maybe there needs to be some error handling in place for this situation.
[...] 400, message='Bad Request', url=URL('https://app-api.zonneplan.nl/connections/.../actions/start_boost')
edit: Just checked with the car plugged in. I'm not getting an error, but my car isn't charging either.
edit2: The log:
2023-11-09 16:17:17.159 INFO (MainThread) [custom_components.zonneplan_one.api] POST: /charge-points/.../actions/start_boost 2023-11-09 16:17:17.432 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response header: <CIMultiDictProxy('Server': 'nginx', 'Date': 'Thu, 09 Nov 2023 15:17:17 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Cache-Control': 'no-cache, private', 'x-ratelimit-limit': '120', 'x-ratelimit-remaining': '119', 'Strict-Transport-Security': 'max-age=63072000')> 2023-11-09 16:17:17.432 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response status: 200 2023-11-09 16:17:17.432 DEBUG (MainThread) [custom_components.zonneplan_one.api] ZonneplanAPI response body: {}
Looks kinda simular to @holobeer 's log. But my car doesn't start charging at all.
edit3: And after a reboot of the charger it suddenly does respond to the start charge triggers. It seems to be working. :)
from home-assistant-zonneplan-one.
I have tested the button again today and now it keeps charging. Not sure what changed,
Will keep testing.
from home-assistant-zonneplan-one.
Okay, about current status.
After some investigation done by @rutgersmit we know now what calls to make to start/stop charging.
With that info I added the 2 buttons for now. And seems that works so next step is to make it a little more error prone. You should only be able to start charging when connected and stop charging when it's currently in charging state.
Current idea is to change the 2 buttons into 1 switch
from home-assistant-zonneplan-one.
Okay, about current status.
After some investigation done by @rutgersmit we know now what calls to make to start/stop charging.
With that info I added the 2 buttons for now. And seems that works so next step is to make it a little more error prone. You should only be able to start charging when connected and stop charging when it's currently in charging state.
Current idea is to change the 2 buttons into 1 switch
Sounds good! It's working great in a automation I made.
Only weird thing that I had was when I pressed the start charge button a couple of times, while the car was unplugged. After that I actually had to reboot the charger because it was acting weird.
So the extra check of a plugged car before sending the start trigger is probably a good idea.
Thanks for your work!
from home-assistant-zonneplan-one.
I use the charge buttons in combination with the ev smart charging addon over the past week and it has been working great. No problems at this moment.
from home-assistant-zonneplan-one.
@Arnoudd @holobeer could you check current version and check if the status check to enable/disable the buttons work?
from home-assistant-zonneplan-one.
@Arnoudd @holobeer could you check current version and check if the status check to enable/disable the buttons work?
I'm getting this error:
Logger: homeassistant.setup
Source: setup.py:359
First occurred: 18:24:55 (1 occurrences)
Last logged: 18:24:55
Unable to prepare setup for platform zonneplan_one.button: Platform not found (cannot import name 'BUTTON_TYPES' from 'custom_components.zonneplan_one.const' (/config/custom_components/zonneplan_one/const.py)).
If I take an older version of the const.py the error is gone. Will check nore later this evening.
from home-assistant-zonneplan-one.
@Arnoudd are you sure you used the latest version of branch charge-start-stop
?
from home-assistant-zonneplan-one.
@Arnoudd are you sure you used the latest version of branch
charge-start-stop
?
No. I'm not sure. I made an error with selecting some versions. I just checked all my versions again and it looks better. Will check some more later this evening.
from home-assistant-zonneplan-one.
I created a beta release that can be install using HACS, use version 0.0.21b1
See https://github.com/fsaris/home-assistant-zonneplan-one/tree/0.0.21b1#installing-mainbeta-version-using-hacs for info about installing a beta
from home-assistant-zonneplan-one.
I created a beta release that can be install using HACS, use version 0.0.21b1
See https://github.com/fsaris/home-assistant-zonneplan-one/tree/0.0.21b1#installing-mainbeta-version-using-hacs for info about installing a beta
Thanks, that makes it a lot easier. 😬
Just verified that both buttons are disabled when there's no car plugged in. When I plug in the car the start charge becomes available.
I can't test the stop button since it's already fully charged.
from home-assistant-zonneplan-one.
Just checked the stop button and it's working too. It's disabled when it's not charging and it works when the car is charging. 👍
from home-assistant-zonneplan-one.
Please test 0.0.21b2
See https://github.com/fsaris/home-assistant-zonneplan-one/tree/0.0.21b1#installing-mainbeta-version-using-hacs for info about installing a beta
from home-assistant-zonneplan-one.
Shouldn't the start charging button be disabled if no car is detected?
from home-assistant-zonneplan-one.
@rutgersmit that is currently the case isn't?
Else could you share a dumb of the logging so we can check what values to check?
from home-assistant-zonneplan-one.
Same here. It was disabled this morning when it was charging. But when I unplugged the car it enabled itself again.
What variables are you using to check if a car is plugged in?
from home-assistant-zonneplan-one.
AFAIK checking if a car is detected to enable the button was not implemented yet. The API returns a boolean whether a car is detected or not. So not something new since the last update.
from home-assistant-zonneplan-one.
AFAIK checking if a car is detected to enable the button was not implemented yet. The API returns a boolean whether a car is detected or not. So not something new since the last update.
I have seen it disabled earlier when there was no car plugged in. But it looks like it's not always working like that.
from home-assistant-zonneplan-one.
@rutgersmit @Arnoudd can you provide the api response? Or are you talking about 1 of the existing sensors?
from home-assistant-zonneplan-one.
@rutgersmit @Arnoudd can you provide the api response? Or are you talking about 1 of the existing sensors?
I'm guessing @rutgersmit is talking about the "sensor.charge_point_state" sensor?
"Standby" means there's no car plugged in where "VehicleDetected" and "Charging" means there is a car plugged in.
I do believe I've also seen an error state. In short the only time the Start_charge button should be enabled is when the state of the "sensor.charge_point_state" sensor is "VehicleDetected".
from home-assistant-zonneplan-one.
@fsaris the response from https://app-api.zonneplan.nl/connections/GUID/charge-points/GUID has the property 'state'. My car is not connected and shows the state Standby. When a car is connected the state is VehicleDetected. When the car is charging the state is Charging
Don't know if there are any other states.
{
"data": {
"contracts": [
{
"uuid": "GUID",
"label": "Charge laadpaal",
"type": "charge_point_installation",
"start_date": "2023-10-08T22:00:00.000000Z",
"end_date": null,
"meta": {
"serial_number": "TACW11123456",
"identifier": "TACW11411223456",
"show_in_contract_screen": true
},
"state": {
"connectivity_state": true,
"state": "Standby",
"power_actual": 0,
"energy_delivered_session": 0,
"can_charge": true,
"can_schedule": true,
"charging_manually": false,
"charging_automatically": false,
"plug_and_charge": false,
"overload_protection_active": false,
"dynamic_load_balancing_health": "HEALTHY"
},
"charge_schedules": []
}
]
}
}
from home-assistant-zonneplan-one.
Related Issues (20)
- Multiple zero values retrieved throughout the day for delivery/production of Zonneplan home battery HOT 4
- Powerplay compensation sensor HOT 16
- Current electricity tariff one hour off since Summertime HOT 2
- Thuisbatteriij sensors stopped updating HOT 6
- Entity "Schedule start and end" is not working anymore HOT 8
- Gas price not updating anymore HOT 3
- Powerplay HOT 3
- Connect call failed HOT 10
- HomeAssistantType
- deprecated alias HOT 1
- Try to get update for Charge point data after button press HOT 1
- Only call the summary endpoint once HOT 3
- Eerste inlog lukt niet: "Login link opvragen" HOT 2
- API not working? HOT 46
- Add integration version to API call headers HOT 5
- New costs sensors have wrong state_class HOT 5
- Data is rounded HOT 10
- Zonneplan last measured value update only once per hour HOT 4
- Deprecated constants used in Zonneplan integration HOT 2
- Only one of two PV installation shown (both present on one address) HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home-assistant-zonneplan-one.