| state#outputCurrent | Number:ElectricCurrent | no | | |
| state#isOnline | Switch | no | | |
| state#dynamicChargerCurrent | Number:ElectricCurrent | yes | | 0, 6-32 |
-| state#reasonForNoCurrent | Number | no | | |
+| state#reasonForNoCurrent | Number | no | 2=NoCurrent, 27=Charging, 52=Paused, 55=NotAuthorized, 79=BatteryFull | |
| state#lifetimeEnergy | Number:Energy | no | | |
| state#errorCode | Number | no | | |
| state#fatalErrorCode | Number | no | | |
public static final String COMMAND_CHANGE_CONFIGURATION = "ChangeConfiguration";
public static final String COMMAND_SEND_COMMAND = "SendCommand";
public static final String COMMAND_SEND_COMMAND_START_STOP = "SendCommandStartStop";
+ public static final String COMMAND_SEND_COMMAND_PAUSE_RESUME = "SendCommandPauseResume";
public static final String COMMAND_SET_CIRCUIT_SETTINGS = "SetCircuitSettings";
public static final String COMMAND_SET_DYNAMIC_CIRCUIT_CURRENTS = "SetDynamicCircuitCurrents";
public static final String COMMAND_SET_MAX_CIRCUIT_CURRENTS = "SetMaxCircuitCurrents";
public static final int CHARGER_OP_STATE_WAITING = 2;
public static final int CHARGER_OP_STATE_CHARGING = 3;
public static final double CHARGER_DYNAMIC_CURRENT_PAUSE = 0;
+ public static final int CHARGER_REASON_FOR_NO_CURRENT_DYNAMIC_0KW = 2;
public static final int CHARGER_REASON_FOR_NO_CURRENT_PAUSED = 52;
public static final String THING_CONFIG_ID = "id";
import org.openhab.binding.easee.internal.command.charger.GetConfiguration;
import org.openhab.binding.easee.internal.command.charger.LatestChargingSession;
import org.openhab.binding.easee.internal.command.charger.SendCommand;
+import org.openhab.binding.easee.internal.command.charger.SendCommandPauseResume;
import org.openhab.binding.easee.internal.command.charger.SendCommandStartStop;
import org.openhab.binding.easee.internal.config.EaseeConfiguration;
import org.openhab.binding.easee.internal.connector.CommunicationStatus;
return new SendCommand(this, chargerId, channel, command);
case COMMAND_SEND_COMMAND_START_STOP:
return new SendCommandStartStop(this, chargerId, channel, command);
+ case COMMAND_SEND_COMMAND_PAUSE_RESUME:
+ return new SendCommandPauseResume(this, chargerId, channel, command);
default:
// this should not happen
logger.error("write command '{}' not found for channel '{}'", command.toString(),
String rfnc = Utils.getAsString(rawData, CHANNEL_CHARGER_REASON_FOR_NO_CURRENT);
int reasonForNoCurrent = Integer.valueOf(rfnc == null ? "-1" : rfnc);
- boolean paused = (val == CHARGER_OP_STATE_WAITING
- && reasonForNoCurrent == CHARGER_REASON_FOR_NO_CURRENT_PAUSED);
-
+ boolean paused = false;
+ if (val == CHARGER_OP_STATE_WAITING) {
+ switch (reasonForNoCurrent) {
+ case CHARGER_REASON_FOR_NO_CURRENT_PAUSED:
+ case CHARGER_REASON_FOR_NO_CURRENT_DYNAMIC_0KW:
+ paused = true;
+ break;
+ default:
+ paused = false;
+ break;
+ }
+ }
result.put(channel, OnOffType.from(charging || paused));
}
}