Using Home Assistant to fix my JuiceBox Pro 40 connection issues.


Today finally got around to resolving an issue that has been plaguing me for the past month or so.   If you are a regular reader of the blog, you know that we’ve gone solar and with the purchase of the Chevy Bolt, we had a JuiceBox 40 EVSE installed to charge the car.  One of the driving (pun intended) reasons I chose the JuiceBox was due to it’s enhanced Wi-Fi capabilities.  I can manage the unit, get reporting and usage details as well as set schedules for charging all via an app.  Additionally, thanks to the awesome developers at Home Assistant, there is a great JuiceBox component that allows the Smart Home to get all sorts of charging data that I typically tweet out using the BearStoneHA account.  All of this was working great until a few weeks ago. 

For some reason, the box kept dropping off the network.  The app would show as offline and the Home Assistant status would also show as disconnected.  The physical unit was also flashing it light slowly blue indicating it was trying to establish a connection.  I wasn’t sure how to resolve it.  There was a Unifi AP right above the box so signal strength wasn’t the issue.  I was able to fix the connection by unplugging the unit and then going through the Wi-Fi set up process again but every couple of days, it was becoming tedious.  I ended up calling eMotorWerks technical support and they were able to help me troubleshoot the situation a little further.   After troubleshooting with Tech Support, it became clear that the real issue was the connection between the unit and eMotorWerks SERVERS.  I checked the DHCP entries and found the JuiceBox was totally fine on the local Wi-Fi and was accessible via a browser.  Awesome! I could issue a restart command to the JuiceBox unit and it would do a quick 3 second restart and reestablish the connection!  Perfect!  Using Home Assistant, I am now able to watch the box and if it goes offline for 5 minutes or more, restart the unit automagically!

Here is how I set it all up in Home assistant :

From the JuiceBox package I created:

I created a command line switch to restart the unit.

along with this self healing automation:

In this automation, we watch for the unit to go into ‘disconnect’ mode for at least 5 minutes and then check to make sure we haven’t restarted the unit in the past 11 hours or so and if those conditions are true, we issue the command to restart the JuiceBox. 

Now, you might be thinking that this is really a Band-Aid and not a solution.  You’d be right.  Tech Support did offer a new firmware that could have resolved the issue but would have closed down the open API I was using to do all this cool stuff.  Since this solution seemed to be perfect and work without issue, I stuck on the older firmware.  Even without internet access, the unit still worked fine at it’s primary function of charging.

So there you have it: Home Assistant FTW.