serkri / SmartEVSE-3

Smart Electric Vehicle Charging Station (EVSE)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue setting CurrentMaxSumMains over MQTT

devdems opened this issue · comments

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.

This is the part of the code that is preventing to do an update

} else if (RequestedCurrent >= (10 * 10) && RequestedCurrent <= (600 * 10)) {

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

Closing as i have opened a pull request for this issue. dingo35#39