Schrack: Add firmware version state
parent
9096691950
commit
776736b8e4
|
|
@ -171,6 +171,16 @@
|
|||
"readSchedule": "init",
|
||||
"description": "DIP switch states",
|
||||
"access": "R"
|
||||
},
|
||||
{
|
||||
"id": "firmwareVersion",
|
||||
"address": 832,
|
||||
"size": 16,
|
||||
"type": "string",
|
||||
"registerType": "holdingRegister",
|
||||
"readSchedule": "init",
|
||||
"description": "Firmware version",
|
||||
"access": "R"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ void IntegrationPluginSchrack::setupThing(ThingSetupInfo *info)
|
|||
qCDebug(dcSchrack) << "DIP switche states:" << cionConnection->dipSwitches();
|
||||
m_cionConnections.insert(thing, cionConnection);
|
||||
info->finish(Thing::ThingErrorNoError);
|
||||
info->thing()->setStateValue(cionCurrentVersionStateTypeId, cionConnection->firmwareVersion());
|
||||
} else {
|
||||
delete cionConnection;
|
||||
info->finish(Thing::ThingErrorHardwareNotAvailable);
|
||||
|
|
|
|||
|
|
@ -89,6 +89,13 @@
|
|||
"displayNameEvent": "Charging started or stopped",
|
||||
"type": "bool",
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "33780b19-4855-4b5c-bd84-cec8400309be",
|
||||
"name": "currentVersion",
|
||||
"displayName": "Firmware version",
|
||||
"type": "QString",
|
||||
"defaultValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue