I’ve been working on a project to automate the charging of my electric vehicle using solar power, and I wanted to share my journey and some of the challenges I’ve encountered. This might be helpful for others looking to do something similar!
I have a Tesla Model S and an older wall charger that doesn’t have WiFi. My solar setup includes a Kostal Plenticore Plus 10 inverter, and I’m using openHAB to manage the automation. The goal is to start charging the car when solar power exceeds 4kW and stop when it drops below that threshold. Seems straightforward, but the implementation has been a bit tricky.
First, I set up the necessary channels on my inverter to monitor the DC power output and connected the Tesla charger as a separate thing. I’ve been trying to create a rule that triggers based on the power reading from the inverter. However, I’m hitting a roadblock because the rule engine doesn’t seem to recognize the number value directly from the inverter’s DC power channel. I’ve scoured the documentation and forums, but I haven’t found a clear example of someone doing something similar.
One thing I’ve learned is that the rule syntax in openHAB can be quite particular. I’ve tried using when clauses with different conditions, but nothing seems to work as expected. For example, I tried:
java
when {
Item Inverter_DCPower changed
}
then {
if (Inverter_DCPower > 4000) {
Tesla_Charger_Enable.sendCommand(ON)
} else {
Tesla_Charger_Enable.sendCommand(OFF)
}
}
But this doesn’t trigger consistently. I suspect it might be because the Inverter_DCPower item isn’t being updated frequently enough or there’s some lag in the data. I’ve also considered using a different binding or maybe a more advanced rule engine, but I’m not sure if that’s necessary for such a simple automation.
On a positive note, I’ve discovered some great resources in the community that have helped me troubleshoot. For instance, someone suggested using a transform block to convert the power reading into a more usable format. I’m also exploring the possibility of using a cron job to periodically check the power level and adjust the charger accordingly.
I’d love to hear from anyone who has experience with similar automations or who might have some insights into why my rule isn’t working as intended. Maybe there’s a simpler way to achieve this that I’m overlooking!
In the meantime, I’ll keep experimenting and documenting my progress. It’s been a great learning experience, and I’m hopeful that I’ll have a fully automated solar charging setup soon. Stay tuned for more updates!