serkri / SmartEVSE-3

Smart Electric Vehicle Charging Station (EVSE)
MIT License
67 stars 28 forks source link

Issue setting CurrentMaxSumMains over MQTT #254

Closed devdems closed 3 months ago

devdems commented 3 months ago

I cannot set CurrentMaxSumMains to values below 100 with MQTT.

I can set it to 100 or more without a problem. If I send for example 60 to SmartEVSE-45332/Set/CurrentMaxSumMains the value does not change.

I'm looking at the raw data feature to show me if the setting was applied or not. If I set it to 100 with MQTT and check on the device I can see that it is set to 100A.

But if I go to the device and manually set it to 60 it works without any issues.

devdems commented 3 months ago

This is the part of the code that is preventing to do an update https://github.com/serkri/SmartEVSE-3/blob/8a1638e74b1f04d11419ef2dace849921680d49f/SmartEVSE-3/src/evse.cpp#L2307

From what I see here when you do an update to 100 from MQTT it should be the value of 10A.

The problem is that when you set it to 10A manually from the device it sets to 10 and if you set it to 100 from MQTT it sets to 100. So one thing is wrong here. Either the setting from MQTT or manual setup.

image

devdems commented 3 months ago

Closing as i have opened a pull request for this issue. https://github.com/dingo35/SmartEVSE-3.5/pull/39