Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for a SmartEVSE to MQTT bridge to enable integration into home automation #11

Open
PA1RB opened this issue Apr 27, 2021 · 12 comments

Comments

@PA1RB
Copy link
Contributor

PA1RB commented Apr 27, 2021

I am about to start working on a solution to integrate SmartEVSE into home automation, in my case that would be Home Assistant.

The idea is to create an additional physical slave (pardon: server) device (let's call it a bridge), hooked to the Modbus RTU bus of the SmartEVSE system, that holds a copy of certain registers of the SmartEVSE controllers, which can be updated and read by the primary SmartEVSE controller. The value of these registers is in-turn exchanged by the bridge with Home Assistant based on the MQTT protocol over ethernet.

In a first iteration, the primary EVSE controller will only write information to the bridge. This will allow the home automation system to monitor the SmartEVSE controller's states and certain values.

In a future iteration, the primary EVSE controller will also read information from the bridge that was pushed there from the home automation system, thereby influencing the charge process based on various rules within Home Assistant. These rules can include planning charge time and charge speed based on planned travel schedules, cost of electricity and/or knowledge from the car itself like battery state, etc.

I plan to take an approach where I leave the operation of SmartEVSE as-is, and ensure it will continue to operate as usual and autonomously in case of absence of a connection to the bridge. Also, none of the EVSE safety-related parameters shall be write-accessible through MQTT.

Potentially the device may include the functionality of a Sensorbox to reduce the number of required devices, but I do not pursue that myself.

Any interest in or thoughts on this approach?
Anyone who already started on a similar solution?

@bobosch
Copy link
Collaborator

bobosch commented Apr 28, 2021

We like to implement the smart features also in the sensorbox, which has a wifi interface as well. When sensorbox is present, it could take control over the modbus communication (act as master device), and it would be able to do additional tasks like provide information over Modbus TCP, act as RTU <-> TCP gateway or also implement other protocols.

@PA1RB
Copy link
Contributor Author

PA1RB commented Apr 28, 2021

OK, excellent news, and the approach to let the Sensorbox take the master (sorry, client 😇) role in that set-up makes perfect sense to me.
In case Sensorbox-2 already has the required hardware capabilities, and the team is willing to publish code and schematics, I would be happy to contribute to the concept and/or the code.
If the feature is already in development and you want to hold-off publication until a minimal viable product is ready, can you then share a guesstimated target date please?

@pc1e
Copy link

pc1e commented May 10, 2021

Excellent news, i'm struggling to get te communication between the evse and sensorbox via an RS485 - wifi gateway as the distance between is not convenient to overcome by cable, too match digging. No luck so far.
If this is build in functionality that would be a great help.
Any progress on this part is very much appreciated.
Any procedure to activate the wifi part in the Sensorbox 2 will be helpful as wel

@TonKro
Copy link

TonKro commented Jun 5, 2021

You can use Node-Red (with Raspberry PI) make MQTT possible with a RS485 USB adapter.

Via this way you also can make the MODBUS transfer via WiFi or Lan.

@IgorYbema
Copy link

Any news in enabling the wifi in the sensorbox? I would also like to intergrate into my home automation and before I put too much effort in trying to add my own modbus master on a bus which already has a master I would like to know if the sensorbox code is almost ready for wifi. Also when will that code (if ever) be available for public?

@fluppie
Copy link

fluppie commented Aug 20, 2021

You can maybe check this code and see if you can use it? https://github.com/ict-one-nl/mqtt-to-smartevse

@IgorYbema
Copy link

You can maybe check this code and see if you can use it? https://github.com/ict-one-nl/mqtt-to-smartevse

This is exactly what I meant with a double modbus master which I would like to prevent.

@mintgroen
Copy link

Any news in enabling the wifi in the sensorbox? I would also like to intergrate into my home automation and before I put too much effort in trying to add my own modbus master on a bus which already has a master I would like to know if the sensorbox code is almost ready for wifi. Also when will that code (if ever) be available for public?

I've heard from Stegen that the Sensorbox V2 PCB and source code will be published this week.

@Egyras
Copy link

Egyras commented Nov 23, 2021

Some users have existig own smart meters and for example in detached garage from house sometimes is hard to route any additional wires from modbus smart meter to EVSE box. So MQTT integration sounds good when you have some home automation runing, would be nice that Sensorbox could "subscribe" via mqtt and lookup for power usage values in smart House systems like Home Assistant, Openhab and etc.

@rmeekers
Copy link

Any updates on this?

@IgorYbema
Copy link

IgorYbema commented Apr 19, 2022

This guy is making modification to the smartevse v3 code which adds integrations: https://github.com/serkri/SmartEVSE-3
You need a v3 smartevse for this though.

@rmeekers
Copy link

thanks @IgorYbema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants