mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
new Ble ver, 2 parts
This commit is contained in:
64
lib/decoder/src/devices/TPMS_json.h
Normal file
64
lib/decoder/src/devices/TPMS_json.h
Normal file
@@ -0,0 +1,64 @@
|
||||
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"
|
||||
}
|
||||
}
|
||||
})"""";*/
|
||||
Reference in New Issue
Block a user