dingo35 / SmartEVSE-3.5

Smart Electric Vehicle Charging Station (EVSE)
MIT License
38 stars 13 forks source link

Feature request: Please put back PV modbus client #16

Closed hp197 closed 1 month ago

hp197 commented 4 months ago

Is your feature request related to a problem? Please describe. My electrical panel is as follows:

                                        | -> [EV modbus meter] -> [EV ....]
[main breaker] -> [main modbus meter] - | 
                                        | -> [PV modbus meter] -> [PV ....]
                                        |
                                        | -> Other consumers, unrelated....

SmartEVSE is the master on the modbus network and as far as im aware, only one master is allowed on modbus networks. With the serkri firmware, this worked without a problem except for the occasional value glitch due to the multithreading issues.

But, your fork has the extra PV modbus client removed. This causes me to not being able to go forward or backward. A lot of my automation is tied to the PV meter reading in HA.

Im currently using the modbus tcp bridge, this is gone in your fork (and i understand why). I can rebuild my side to mqtt though.

Describe the solution you'd like I would love to have the reading of the PV meter back in SmartEVSE.

Describe alternatives you've considered An alternative would be me having to replace (tussen)meters, what would be a waste.

hp197 commented 4 months ago

*** im happy to build it back myself, will you accept the functionality?

dingo35 commented 4 months ago

The modbus code is not threadsafe; I want to rewrite it so it makes better use of the emodbus library, and hopefully it is then threadsafe.

If that is the case, I can re-enable the tcp-modbus-bridge, and you can directly read all the data that is on your modbus, no PV meter necessary ....

dingo35 commented 1 month ago

I recommend putting devices that are NOT used by the SmartEVSE on a separate modbus; with a cheap USB <-> RS485 interface you can hook all devices you have to HomeAssistant or any other software, without having to worry about disturbing the communication between SmartEVSEs (if you have more than one) and MainsMeter and EVMeters.