Check value set
This commit is contained in:
@@ -750,6 +750,12 @@ void NukiOpenerWrapper::onConfigUpdateReceived(const char *value)
|
|||||||
{
|
{
|
||||||
const char *jsonchar = json[basicKeys[i]].as<const char*>();
|
const char *jsonchar = json[basicKeys[i]].as<const char*>();
|
||||||
|
|
||||||
|
if(strlen(jsonchar) == 0)
|
||||||
|
{
|
||||||
|
jsonResult[basicKeys[i]] = "noValueSet";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if((int)basicOpenerConfigAclPrefs[i] == 1)
|
if((int)basicOpenerConfigAclPrefs[i] == 1)
|
||||||
{
|
{
|
||||||
cmdResult = Nuki::CmdResult::Error;
|
cmdResult = Nuki::CmdResult::Error;
|
||||||
@@ -925,6 +931,12 @@ void NukiOpenerWrapper::onConfigUpdateReceived(const char *value)
|
|||||||
{
|
{
|
||||||
const char *jsonchar = json[advancedKeys[i]].as<const char*>();
|
const char *jsonchar = json[advancedKeys[i]].as<const char*>();
|
||||||
|
|
||||||
|
if(strlen(jsonchar) == 0)
|
||||||
|
{
|
||||||
|
jsonResult[advancedKeys[i]] = "noValueSet";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if((int)advancedOpenerConfigAclPrefs[i] == 1)
|
if((int)advancedOpenerConfigAclPrefs[i] == 1)
|
||||||
{
|
{
|
||||||
cmdResult = Nuki::CmdResult::Error;
|
cmdResult = Nuki::CmdResult::Error;
|
||||||
|
|||||||
@@ -687,6 +687,12 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
|
|||||||
{
|
{
|
||||||
const char *jsonchar = json[basicKeys[i]].as<const char*>();
|
const char *jsonchar = json[basicKeys[i]].as<const char*>();
|
||||||
|
|
||||||
|
if(strlen(jsonchar) == 0)
|
||||||
|
{
|
||||||
|
jsonResult[basicKeys[i]] = "noValueSet";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if((int)basicLockConfigAclPrefs[i] == 1)
|
if((int)basicLockConfigAclPrefs[i] == 1)
|
||||||
{
|
{
|
||||||
cmdResult = Nuki::CmdResult::Error;
|
cmdResult = Nuki::CmdResult::Error;
|
||||||
@@ -884,6 +890,12 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
|
|||||||
{
|
{
|
||||||
const char *jsonchar = json[advancedKeys[i]].as<const char*>();
|
const char *jsonchar = json[advancedKeys[i]].as<const char*>();
|
||||||
|
|
||||||
|
if(strlen(jsonchar) == 0)
|
||||||
|
{
|
||||||
|
jsonResult[advancedKeys[i]] = "noValueSet";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if((int)advancedLockConfigAclPrefs[i] == 1)
|
if((int)advancedLockConfigAclPrefs[i] == 1)
|
||||||
{
|
{
|
||||||
cmdResult = Nuki::CmdResult::Error;
|
cmdResult = Nuki::CmdResult::Error;
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ The result of the last configuration change action will be published to the `con
|
|||||||
<br>
|
<br>
|
||||||
The JSON data will include a node called "general" and a node for every setting that Nuki Hub detected in the action.<br>
|
The JSON data will include a node called "general" and a node for every setting that Nuki Hub detected in the action.<br>
|
||||||
Possible values for the "general" node are "noPinSet", "invalidJson", "invalidConfig", "success" and "noChange".<br>
|
Possible values for the "general" node are "noPinSet", "invalidJson", "invalidConfig", "success" and "noChange".<br>
|
||||||
Possible values for the node per setting are "unchanged", "invalidValue", "valueTooLong", "accessDenied", "success", "failed", "timeOut", "working", "notPaired", "error" and "undefined"<br>
|
Possible values for the node per setting are "unchanged", "noValueSet", "invalidValue", "valueTooLong", "accessDenied", "success", "failed", "timeOut", "working", "notPaired", "error" and "undefined"<br>
|
||||||
<br>
|
<br>
|
||||||
Example:
|
Example:
|
||||||
- `{"advertisingMode":"success","general":"success"}`
|
- `{"advertisingMode":"success","general":"success"}`
|
||||||
|
|||||||
Reference in New Issue
Block a user