mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
65 lines
2.7 KiB
C
65 lines
2.7 KiB
C
|
|
const char* _TPMS_json = "{\"brand\":\"GENERIC\",\"model\":\"TPMS\",\"model_id\":\"TPMS\",\"tag\":\"0a01\",\"condition\":[\"manufacturerdata\",\"=\",36,\"index\",0,\"000\",\"&\",\"manufacturerdata\",\"mac@index\",4],\"conditionnomac\":[\"manufacturerdata\",\"=\",36,\"&\",\"name\",\"index\",0,\"TPMS\"],\"properties\":{\"count\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",5,1,false],\"post_proc\":[\"+\",1]},\"pres\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",16,8,true],\"post_proc\":[\"/\",100000]},\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",24,8,true],\"post_proc\":[\"/\",100]},\"batt\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",32,2,true]},\"alarm\":{\"decoder\":[\"bit_static_value\",\"manufacturerdata\",35,0,false,true]},\"mac\":{\"decoder\":[\"mac_from_hex_data\",\"manufacturerdata\",4]}}}";
|
||
|
|
/*R""""(
|
||
|
|
{
|
||
|
|
"brand":"GENERIC",
|
||
|
|
"model":"TPMS",
|
||
|
|
"model_id":"TPMS",
|
||
|
|
"tag":"0a01",
|
||
|
|
"condition":["manufacturerdata", "=", 36, "index", 0, "000", "&", "manufacturerdata", "mac@index", 4],
|
||
|
|
"conditionnomac":["manufacturerdata", "=", 36, "&", "name", "index", 0, "TPMS"],
|
||
|
|
"properties":{
|
||
|
|
"count":{
|
||
|
|
"decoder":["value_from_hex_data", "manufacturerdata", 5, 1, false],
|
||
|
|
"post_proc":["+", 1]
|
||
|
|
},
|
||
|
|
"pres":{
|
||
|
|
"decoder":["value_from_hex_data", "manufacturerdata", 16, 8, true],
|
||
|
|
"post_proc":["/", 100000]
|
||
|
|
},
|
||
|
|
"tempc":{
|
||
|
|
"decoder":["value_from_hex_data", "manufacturerdata", 24, 8, true],
|
||
|
|
"post_proc":["/", 100]
|
||
|
|
},
|
||
|
|
"batt":{
|
||
|
|
"decoder":["value_from_hex_data", "manufacturerdata", 32, 2, true]
|
||
|
|
},
|
||
|
|
"alarm":{
|
||
|
|
"decoder":["bit_static_value", "manufacturerdata", 35, 0, false, true]
|
||
|
|
},
|
||
|
|
"mac":{
|
||
|
|
"decoder":["mac_from_hex_data", "manufacturerdata", 4]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})"""";*/
|
||
|
|
|
||
|
|
const char* _TPMS_json_props = "{\"properties\":{\"batt\":{\"unit\":\"%\",\"name\":\"battery\"},\"tempc\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"pres\":{\"unit\":\"bar\",\"name\":\"pressure\"},\"count\":{\"unit\":\"int\",\"name\":\"count\"},\"alarm\":{\"unit\":\"status\",\"name\":\"alarm\"},\"mac\":{\"unit\":\"string\",\"name\":\"MAC address\"}}}";
|
||
|
|
/*R""""(
|
||
|
|
{
|
||
|
|
"properties":{
|
||
|
|
"batt":{
|
||
|
|
"unit":"%",
|
||
|
|
"name":"battery"
|
||
|
|
},
|
||
|
|
"tempc":{
|
||
|
|
"unit":"°C",
|
||
|
|
"name":"temperature"
|
||
|
|
},
|
||
|
|
"pres":{
|
||
|
|
"unit":"bar",
|
||
|
|
"name":"pressure"
|
||
|
|
},
|
||
|
|
"count":{
|
||
|
|
"unit":"int",
|
||
|
|
"name":"count"
|
||
|
|
},
|
||
|
|
"alarm":{
|
||
|
|
"unit":"status",
|
||
|
|
"name":"alarm"
|
||
|
|
},
|
||
|
|
"mac":{
|
||
|
|
"unit":"string",
|
||
|
|
"name":"MAC address"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})"""";*/
|