Amperfied: Disable standby for rtu based energy control wallbox
parent
58fa2ca870
commit
5764f8b83c
|
|
@ -53,6 +53,19 @@
|
|||
"value": 11
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Standby",
|
||||
"values": [
|
||||
{
|
||||
"key": "StandbyEnabled",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"key": "StandbyDisabled",
|
||||
"value": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"blocks": [
|
||||
|
|
@ -245,6 +258,17 @@
|
|||
"unit": "1/10 A",
|
||||
"defaultValue": "0",
|
||||
"access": "RW"
|
||||
},
|
||||
{
|
||||
"id": "standby",
|
||||
"address": 258,
|
||||
"size": 1,
|
||||
"type": "uint16",
|
||||
"readSchedule": "init",
|
||||
"registerType": "holdingRegister",
|
||||
"description": "Standby function control",
|
||||
"defaultValue": 0,
|
||||
"access": "RW"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -281,9 +281,12 @@ void IntegrationPluginAmperfied::setupRtuConnection(ThingSetupInfo *info)
|
|||
thing->setStateValue(energyControlConnectedStateTypeId, false);
|
||||
}
|
||||
});
|
||||
connect(connection, &AmperfiedModbusRtuConnection::initializationFinished, thing, [thing](bool success){
|
||||
connect(connection, &AmperfiedModbusRtuConnection::initializationFinished, thing, [connection, thing](bool success){
|
||||
if (success) {
|
||||
thing->setStateValue(energyControlConnectedStateTypeId, true);
|
||||
|
||||
// Disabling the auto-standby as it will shut down modbus
|
||||
connection->setStandby(AmperfiedModbusRtuConnection::StandbyStandbyDisabled);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue