Closed lbbrhzn closed 3 years ago
These could be good starting points https://github.com/hesselonline/wallbox or https://github.com/fondberg/easee_hass
Wallbox is based on reading data from the cloud. It is now integrated into home assistant core: https://github.com/home-assistant/core/tree/dev/homeassistant/components/wallbox It does not create separate sensor entities, only a single sensor with a lot of attributes.
Homematic uses local push, like us, and can create new objects on the fly. https://github.com/home-assistant/core/tree/master/homeassistant/components/homematic
hi guys, quick review here based on a request by @drc38. I'm the author of the wallbox component (which does actually seperate the sensor entities ;-)).
I'm just going to trow some first thoughts here, feel free to ignore them. Also, feel free to ask if you need more info. My point of reference is what you would need to do to get this added to HA core.
Thanks for your comments! I have installed the wallbox integration in my ha setup, and it works great!
As a future idea I would also like to make an integration for obd2, to connect with an elm327 based Bluetooth dongle in de car. This allows you to monitor things like State of Charge and battery temperature while charging, so you can adjust the charging profile accordingly. All without cloud!
@lbbrhzn, rather than going down the elm327 route I would recommend getting one of these units if your vehicle is supported https://www.openvehicles.com/ there is a mqtt client that can be used to integrate with HA, and it has its own app to pre-heat/AC or lock the car. I use it with my Leaf.
@drc38 thanks for the tip. Does not seem to support VW ID.4 yet, though
@hesselonline I'm considering using this template: https://cookiecutter-homeassistant-custom-component.readthedocs.io/en/2021.1.1/guide.html Can you recommend it?
I would start with the link I posted above, setting up your dev environment there and then create a scaffold component. If you get that running properly it will save you ages of time. Do you use a windows machine? If so, get docker running with the WSL2 integration, that will speed up the devcontainer considerably.
I'm using visual studio code on MacOs, got the docker container up and running.
@drc38 thanks for the tip. Does not seem to support VW ID.4 yet, though
If the ID.4 is using TP 2.0 it wouldn't take much to add it. https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/blob/vwtp20/vehicle/OVMS.V3/components/vehicle/docs/VW-TP-2.0.txt
There's some code in EVNotify to support VW ID.x: https://github.com/EVNotify/EVNotify/blob/master/app/www/components/cars/ID_3.vue
The current ChargePoint is an extension from ocpp.v16.ChargePoint. To enable entity services, and allow multiple chargepoint instances, a chargepoint should be modeled as an homeassistant Entity. There are two options:
I prefer option 2, this makes it much clearer which methods belong to which interface, and avoids naming clashes.