Skip to content

Commit

Permalink
Update device JSON configurations and properties
Browse files Browse the repository at this point in the history
- Modify `SBBT_004CEU_json.h` to update the model name from "SBBT-004CEU" to "SBBT-EU".
- Modify `SBBT_004CUS_json.h` to update the model name from "SBBT-US76d2" to "SBBT-US".
- Modify `SBBT_004CEU_ENCR_json.h` to update the model name from "SBBT-004CEU" to "SBBT-EU".
- Modify `SBBT_004CUS_ENCR_json.h` to update the model name from "SBBT-US76d2" to "SBBT-US".
- Ensure consistency in JSON property definitions across all device headers.
  • Loading branch information
Lars committed Sep 12, 2024
1 parent fe48891 commit a3c6b1c
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 39 deletions.
4 changes: 2 additions & 2 deletions src/devices/SBBT_004CEU_ENCR_json.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const char* _SBBT_004CEU_ENCR_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU Wall Switch4 encrypted\",\"model_id\":\"SBBT_004CEU_ENCR\",\"tag\":\"110602\",\"condition\":[\"servicedata\",\"index\",0,\"41\",\"|\",\"servicedata\",\"index\",0,\"45\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-004CEU\"],\"properties\":{\"cipher\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",2,12]},\"ctr\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",14,8]},\"mic\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",22,8]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",30],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
const char* _SBBT_004CEU_ENCR_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU Wall Switch4 encrypted\",\"model_id\":\"SBBT_004CEU_ENCR\",\"tag\":\"110602\",\"condition\":[\"servicedata\",\"index\",0,\"41\",\"|\",\"servicedata\",\"index\",0,\"45\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-EU\"],\"properties\":{\"cipher\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",2,12]},\"ctr\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",14,8]},\"mic\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",22,8]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",30],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
/*R""""(
{
"brand":"Shelly",
"model":"ShellyBLU Wall Switch4 encrypted",
"model_id":"SBBT_004CEU_ENCR",
"tag":"110602",
"condition":["servicedata", "index", 0, "41", "|", "servicedata", "index", 0, "45", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-004CEU"],
"condition":["servicedata", "index", 0, "41", "|", "servicedata", "index", 0, "45", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-EU"],
"properties":{
"cipher":{
"decoder":["string_from_hex_data", "servicedata", 2, 12]
Expand Down
4 changes: 2 additions & 2 deletions src/devices/SBBT_004CEU_json.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const char* _SBBT_004CEU_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU Wall Switch4\",\"model_id\":\"SBBT-004CEU\",\"tag\":\"1106\",\"condition\":[\"servicedata\",\"=\",26,\"index\",0,\"40\",\"|\",\"servicedata\",\"=\",26,\"index\",0,\"44\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-004CEU\"],\"properties\":{\"packet\":{\"condition\":[\"servicedata\",2,\"00\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false]},\"batt\":{\"condition\":[\"servicedata\",6,\"01\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",8,2,false,false]},\"button1\":{\"condition\":[\"servicedata\",10,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",12,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button2\":{\"condition\":[\"servicedata\",14,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",16,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button3\":{\"condition\":[\"servicedata\",18,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",20,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button4\":{\"condition\":[\"servicedata\",22,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",24,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",\"d2\"],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
const char* _SBBT_004CEU_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU Wall Switch4\",\"model_id\":\"SBBT-004CEU\",\"tag\":\"1106\",\"condition\":[\"servicedata\",\"=\",26,\"index\",0,\"40\",\"|\",\"servicedata\",\"=\",26,\"index\",0,\"44\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-EU\"],\"properties\":{\"packet\":{\"condition\":[\"servicedata\",2,\"00\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false]},\"batt\":{\"condition\":[\"servicedata\",6,\"01\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",8,2,false,false]},\"button1\":{\"condition\":[\"servicedata\",10,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",12,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button2\":{\"condition\":[\"servicedata\",14,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",16,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button3\":{\"condition\":[\"servicedata\",18,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",20,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button4\":{\"condition\":[\"servicedata\",22,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",24,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",\"d2\"],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
/*R""""(
{
"brand":"Shelly",
"model":"ShellyBLU Wall Switch4",
"model_id":"SBBT-004CEU",
"tag":"1106",
"condition":["servicedata", "=", 26, "index", 0, "40", "|", "servicedata", "=", 26, "index", 0, "44", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-004CEU"],
"condition":["servicedata", "=", 26, "index", 0, "40", "|", "servicedata", "=", 26, "index", 0, "44", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-EU"],
"properties":{
"packet":{
"condition":["servicedata", 2, "00"],
Expand Down
4 changes: 2 additions & 2 deletions src/devices/SBBT_004CUS_ENCR_json.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const char* _SBBT_004CUS_ENCR_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU RC Button4 encrypted\",\"model_id\":\"SBBT_004CUS_ENCR\",\"tag\":\"110602\",\"condition\":[\"servicedata\",\"index\",0,\"41\",\"|\",\"servicedata\",\"index\",0,\"45\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-US76d2\"],\"properties\":{\"cipher\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",2,12]},\"ctr\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",14,8]},\"mic\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",22,8]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",30],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
const char* _SBBT_004CUS_ENCR_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU RC Button4 encrypted\",\"model_id\":\"SBBT_004CUS_ENCR\",\"tag\":\"110602\",\"condition\":[\"servicedata\",\"index\",0,\"41\",\"|\",\"servicedata\",\"index\",0,\"45\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-US\"],\"properties\":{\"cipher\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",2,12]},\"ctr\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",14,8]},\"mic\":{\"decoder\":[\"string_from_hex_data\",\"servicedata\",22,8]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",30],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
/*R""""(
{
"brand":"Shelly",
"model":"ShellyBLU RC Button4 encrypted",
"model_id":"SBBT_004CUS_ENCR",
"tag":"110602",
"condition":["servicedata", "index", 0, "41", "|", "servicedata", "index", 0, "45", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-US76d2"],
"condition":["servicedata", "index", 0, "41", "|", "servicedata", "index", 0, "45", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-US"],
"properties":{
"cipher":{
"decoder":["string_from_hex_data", "servicedata", 2, 12]
Expand Down
4 changes: 2 additions & 2 deletions src/devices/SBBT_004CUS_json.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const char* _SBBT_004CUS_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU RC Button4\",\"model_id\":\"SBBT-004CUS\",\"tag\":\"1106\",\"condition\":[\"servicedata\",\"=\",26,\"index\",0,\"40\",\"|\",\"servicedata\",\"=\",26,\"index\",0,\"44\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-US76d2\"],\"properties\":{\"packet\":{\"condition\":[\"servicedata\",2,\"00\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false]},\"batt\":{\"condition\":[\"servicedata\",6,\"01\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",8,2,false,false]},\"button1\":{\"condition\":[\"servicedata\",10,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",12,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button2\":{\"condition\":[\"servicedata\",14,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",16,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button3\":{\"condition\":[\"servicedata\",18,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",20,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button4\":{\"condition\":[\"servicedata\",22,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",24,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",\"d2\"],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
const char* _SBBT_004CUS_json = "{\"brand\":\"Shelly\",\"model\":\"ShellyBLU RC Button4\",\"model_id\":\"SBBT-004CUS\",\"tag\":\"1106\",\"condition\":[\"servicedata\",\"=\",26,\"index\",0,\"40\",\"|\",\"servicedata\",\"=\",26,\"index\",0,\"44\",\"&\",\"uuid\",\"index\",0,\"fcd2\",\"&\",\"name\",\"index\",0,\"SBBT-US\"],\"properties\":{\"packet\":{\"condition\":[\"servicedata\",2,\"00\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",4,2,false,false]},\"batt\":{\"condition\":[\"servicedata\",6,\"01\"],\"decoder\":[\"value_from_hex_data\",\"servicedata\",8,2,false,false]},\"button1\":{\"condition\":[\"servicedata\",10,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",12,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button2\":{\"condition\":[\"servicedata\",14,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",16,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button3\":{\"condition\":[\"servicedata\",18,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",20,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"button4\":{\"condition\":[\"servicedata\",22,\"3a\"],\"decoder\":[\"string_from_hex_data\",\"servicedata\",24,2],\"lookup\":[\"00\",0,\"01\",1,\"02\",2,\"03\",3,\"04\",9,\"fe\",11]},\"mac\":{\"condition\":[\"manufacturerdata\",\"=\",\"d2\"],\"decoder\":[\"revmac_from_hex_data\",\"manufacturerdata\",18]}}}";
/*R""""(
{
"brand":"Shelly",
"model":"ShellyBLU RC Button4",
"model_id":"SBBT-004CUS",
"tag":"1106",
"condition":["servicedata", "=", 26, "index", 0, "40", "|", "servicedata", "=", 26, "index", 0, "44", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-US76d2"],
"condition":["servicedata", "=", 26, "index", 0, "40", "|", "servicedata", "=", 26, "index", 0, "44", "&", "uuid", "index", 0, "fcd2", "&", "name", "index", 0, "SBBT-US"],
"properties":{
"packet":{
"condition":["servicedata", 2, "00"],
Expand Down
Loading

0 comments on commit a3c6b1c

Please sign in to comment.