SPM Main | Failure in setting the overload protection in DIY mode (local LAN)

Hi,
My name is Frederick.
I am currently testing and “programming” on the DIY mode of the SPM-4Relay (Stackable Power meter) with the help of Postman (nice programm by the way) ^-^ .
I have a SPM-Main and two sub-devices (SPM4Relay) called 3c6… and 3f6…
Right now most of the programming is done with the 3c6.
On that relay, I have connected the second output to a electric consumer.

I used a couple of command and it is working as intended.
E.g. I can get:

  • the device id,
  • subdeviceID,
  • set the channels (on/off)
  • receive data via the monitoring function via a set port and IP/URL

My next goal is to set the overload function/values.
For that I am using the example code on your website:

Here is the current configuration:
When I prompt the getState for the subdevice
Prompt:

{    "deviceid": "10014a73a6",    "data": {        "subDevId": "3c63464e3635361735363236"    }}

response:

{    "seq": 501,    "error": 0,    "data": {        "switches": [            
            {                "switch": "on",                "outlet": 0            },
            {                "switch": "on",                "outlet": 1            },
            {                "switch": "off",                "outlet": 2            },
            {                "switch": "on",                "outlet": 3            }
        ],
        "fwVersion": "1.2.0",
        "faultState": {            "subDevCom": 1,            "cse7761Com": [                1,                1,                1,                1            ]        },
        "threshold": {            "actPow": {                "min": 10,                "max": 480000            },
            "voltage": {                "min": 9000,                "max": 26400            },
            "current": {                "min": 10,                "max": 2000            }        },
        "overload_00": {            "minAP": {                "en": 0,                "val": 10            },
            "maxAP": {                "en": 0,                "val": 480000            },
            "minV": {                "en": 0,                "val": 9000            },
            "maxV": {                "en": 0,                "val": 26400            },
            "maxC": {                "en": 0,                "val": 2000            },            "delayTime": 0        },
        "overload_01": {            "minAP": {                "en": 0,                "val": 10            },
            "maxAP": {                "en": 0,                "val": 480000            },
            "minV": {                "en": 0,                "val": 9000            },
            "maxV": {                "en": 0,                "val": 26400            },
            "maxC": {                "en": 0,                "val": 2000            },            "delayTime": 0        },
        "overload_02": {            "minAP": {                "en": 0,                "val": 10            },
            "maxAP": {                "en": 0,                "val": 480000            },
            "minV": {                "en": 0,                "val": 9000            },
            "maxV": {                "en": 0,                "val": 26400            },
            "maxC": {                "en": 0,                "val": 2000            },            "delayTime": 0        },
        "overload_03": {            "minAP": {                "en": 0,                "val": 10            },
            "maxAP": {                "en": 0,                "val": 480000            },
            "minV": {                "en": 0,                "val": 9000            },
            "maxV": {                "en": 0,                "val": 26400            },
            "maxC": {                "en": 0,                "val": 2000            },            "delayTime": 0        },
        "configure": [
            {                "outlet": 0,                "startup": "off"            },
            {                "outlet": 1,                "startup": "off"            },
            {                "outlet": 2,                "startup": "off"            },
            {                "outlet": 3,                "startup": "off"            }        ]    }}

So we can see that we are working between:
actPow 10 to 480000 (0,01 W to 4800 W.
(althought the value range, according to the overload prompt (api/#5) is between 10, to 440000. )

I am using this url:
http://192.168.178.143:8081/zeroconf/overload
(POST command)

I prompt this:

{    "deviceid": "10014a73a6",    "data": {        "subDevId": "3c63464e3635361735363236",        "overload_00":         {            "minAP": {                "en": 0,                "val": 110000            },
            "maxAP": {                "en": 1,                "val": 10000            },
            "minV": {                "en": 1,                "val": 1000            },
            "maxV": {                "en": 0,                "val": 22000            },
            "maxC": {                "en": 1,                "val": 2000            },            "delayTime": 10        },
        "overload_01":{},
        "overload_02":{},
        "overload_03":{}    },}

this gives me the following response:

{ “seq”: 0, “error”: 422}

Error 422, according to:

is:

– 422: The operation failed and the request parameters are invalid. For example, the device does not support setting specific device information.

In the overload prompt code from your website, the “minAP” (minimum Aparrent power) is higher than the “maxAP”, thus I changed this.
from

 "overload_00": 
        {            "minAP": {                "en": 0,                
"val": 110000            },
            "maxAP": {                
"en": 1,                
"val": 10000            
},


to:

{    "deviceid": "10014a73a6",    "data": {        "subDevId": "3c63464e3635361735363236",        "overload_00":         {            "minAP": {                "en": 0,                "val": 10000            },


           "maxAP": {                "en": 1,                "val": 220000            },


           "minV": {                "en": 1,                "val": 1000            },


           "maxV": {                "en": 0,                "val": 22000            },


           "maxC": {                "en": 1,                "val": 2000            },            "delayTime": 10        },


       "overload_01":{},


       "overload_02":{},


       "overload_03":{}    },}

Still I get the same failure response:

{ “seq”: 0, “error”: 422}

Can you share where I made a mistake?
I can’t figure out what is wrong.

Do I need to attach an load to be able to configure output0 (doesn’t make sense from my point of view).