|
| 1 | +const char* _VICTBSC_json = "{\"brand\":\"Victron Energy\",\"model\":\"Blue Smart Charger\",\"model_id\":\"VICTBSC\",\"tag\":\"1400\",\"condition\":[\"manufacturerdata\",\"=\",46,\"index\",0,\"e10211\",\"&\",\"manufacturerdata\",\"index\",12,\"08ffff\"],\"properties\":{\"device_state\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",20,2]},\"_device_state\":{\"decoder\":[\"string_from_hex_data\",\"manufacturerdata\",20,2],\"lookup\":[\"00\",\"off\",\"01\",\"low power\",\"02\",\"fault\",\"03\",\"bulk\",\"04\",\"absorption\",\"05\",\"float\",\"06\",\"storage\",\"07\",\"equalize manual\",\"09\",\"inverting\",\"0b\",\"power supply\",\"f5\",\"starting up\",\"f6\",\"repeated absorption\",\"f7\",\"recondition\",\"f8\",\"battery safe\",\"f9\",\"active\",\"fc\",\"external control\",\"ff\",\"N/A\"]},\"volt_batt_1\":{\"condition\":[\"manufacturerdata\",24,\"!\",\"ffff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",24,4,true,false],\"post_proc\":[\"&\",8191,\"/\",100]},\"current_batt_1\":{\"condition\":[\"manufacturerdata\",26,\"!\",\"ffff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",26,4,true,false],\"post_proc\":[\">\",5,\"&\",2047,\"/\",10]},\"volt_batt_2\":{\"condition\":[\"manufacturerdata\",30,\"!\",\"ffff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",30,4,true,false],\"post_proc\":[\"&\",8191,\"/\",100]},\"current_batt_2\":{\"condition\":[\"manufacturerdata\",32,\"!\",\"ffff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",32,4,true,false],\"post_proc\":[\">\",5,\"&\",2047,\"/\",10]},\"volt_batt_3\":{\"condition\":[\"manufacturerdata\",36,\"!\",\"ffff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",36,4,true,false],\"post_proc\":[\"&\",8191,\"/\",100]},\"current_batt_3\":{\"condition\":[\"manufacturerdata\",38,\"!\",\"ffff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",38,4,true,false],\"post_proc\":[\">\",5,\"&\",2047,\"/\",10]},\"tempc\":{\"condition\":[\"manufacturerdata\",42,\"!\",\"ff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",42,2],\"post_proc\":[\"&\",127,\"-\",40]},\"current_ac\":{\"condition\":[\"manufacturerdata\",44,\"!\",\"ff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",42,4,false,false],\"post_proc\":[\"&\",511,\"/\",10]},\"error_code\":{\"condition\":[\"manufacturerdata\",22,\"!\",\"ff\"],\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",22,2]}}}"; |
| 2 | +/*R""""( |
| 3 | +{ |
| 4 | + "brand":"Victron Energy", |
| 5 | + "model":"Blue Smart Charger", |
| 6 | + "model_id":"VICTBSC", |
| 7 | + "tag":"1400", |
| 8 | + "condition":["manufacturerdata", "=", 46, "index", 0, "e10211", "&", "manufacturerdata", "index", 12, "08ffff"], |
| 9 | + "properties":{ |
| 10 | + "device_state":{ |
| 11 | + "decoder":["value_from_hex_data", "manufacturerdata", 20, 2] |
| 12 | + }, |
| 13 | + "_device_state":{ |
| 14 | + "decoder":["string_from_hex_data", "manufacturerdata", 20, 2], |
| 15 | + "lookup":["00", "off", |
| 16 | + "01", "low power", |
| 17 | + "02", "fault", |
| 18 | + "03", "bulk", |
| 19 | + "04", "absorption", |
| 20 | + "05", "float", |
| 21 | + "06", "storage", |
| 22 | + "07", "equalize manual", |
| 23 | + "09", "inverting", |
| 24 | + "0b", "power supply", |
| 25 | + "f5", "starting up", |
| 26 | + "f6", "repeated absorption", |
| 27 | + "f7", "recondition", |
| 28 | + "f8", "battery safe", |
| 29 | + "f9", "active", |
| 30 | + "fc", "external control", |
| 31 | + "ff", "N/A"] |
| 32 | + }, |
| 33 | + "volt_batt_1":{ |
| 34 | + "condition":["manufacturerdata", 24, "!", "ffff"], |
| 35 | + "decoder":["value_from_hex_data", "manufacturerdata", 24, 4, true, false], |
| 36 | + "post_proc":["&", 8191, "/", 100] |
| 37 | + }, |
| 38 | + "current_batt_1":{ |
| 39 | + "condition":["manufacturerdata", 26, "!", "ffff"], |
| 40 | + "decoder":["value_from_hex_data", "manufacturerdata", 26, 4, true, false], |
| 41 | + "post_proc":[">", 5, "&", 2047, "/", 10] |
| 42 | + }, |
| 43 | + "volt_batt_2":{ |
| 44 | + "condition":["manufacturerdata", 30, "!", "ffff"], |
| 45 | + "decoder":["value_from_hex_data", "manufacturerdata", 30, 4, true, false], |
| 46 | + "post_proc":["&", 8191, "/", 100] |
| 47 | + }, |
| 48 | + "current_batt_2":{ |
| 49 | + "condition":["manufacturerdata", 32, "!", "ffff"], |
| 50 | + "decoder":["value_from_hex_data", "manufacturerdata", 32, 4, true, false], |
| 51 | + "post_proc":[">", 5, "&", 2047, "/", 10] |
| 52 | + }, |
| 53 | + "volt_batt_3":{ |
| 54 | + "condition":["manufacturerdata", 36, "!", "ffff"], |
| 55 | + "decoder":["value_from_hex_data", "manufacturerdata", 36, 4, true, false], |
| 56 | + "post_proc":["&", 8191, "/", 100] |
| 57 | + }, |
| 58 | + "current_batt_3":{ |
| 59 | + "condition":["manufacturerdata", 38, "!", "ffff"], |
| 60 | + "decoder":["value_from_hex_data", "manufacturerdata", 38, 4, true, false], |
| 61 | + "post_proc":[">", 5, "&", 2047, "/", 10] |
| 62 | + }, |
| 63 | + "tempc":{ |
| 64 | + "condition":["manufacturerdata", 42, "!", "ff"], |
| 65 | + "decoder":["value_from_hex_data", "manufacturerdata", 42, 2], |
| 66 | + "post_proc":["&", 127, "-", 40] |
| 67 | + }, |
| 68 | + "current_ac":{ |
| 69 | + "condition":["manufacturerdata", 44, "!", "ff"], |
| 70 | + "decoder":["value_from_hex_data", "manufacturerdata", 42, 4, false, false], |
| 71 | + "post_proc":["&", 511, "/", 10] |
| 72 | + }, |
| 73 | + "error_code":{ |
| 74 | + "condition":["manufacturerdata", 22, "!", "ff"], |
| 75 | + "decoder":["value_from_hex_data", "manufacturerdata", 22, 2] |
| 76 | + } |
| 77 | + } |
| 78 | +})"""";*/ |
| 79 | + |
| 80 | +const char* _VICTBSC_json_props = "{\"properties\":{\"device_state\":{\"unit\":\"string\",\"name\":\"device state\"},\"volt_batt_1\":{\"unit\":\"V\",\"name\":\"voltage\"},\"current_batt_1\":{\"unit\":\"A\",\"name\":\"current\"},\"volt_batt_2\":{\"unit\":\"V\",\"name\":\"voltage\"},\"current_batt_2\":{\"unit\":\"A\",\"name\":\"current\"},\"volt_batt_3\":{\"unit\":\"V\",\"name\":\"voltage\"},\"current_batt_3\":{\"unit\":\"A\",\"name\":\"current\"},\"tempc\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"current_ac\":{\"unit\":\"A\",\"name\":\"current\"},\"error_code\":{\"unit\":\"int\",\"name\":\"error code\"}}}"; |
| 81 | +/*R""""( |
| 82 | +{ |
| 83 | + "properties":{ |
| 84 | + "device_state":{ |
| 85 | + "unit":"string", |
| 86 | + "name":"device state" |
| 87 | + }, |
| 88 | + "volt_batt_1": { |
| 89 | + "unit": "V", |
| 90 | + "name": "voltage" |
| 91 | + }, |
| 92 | + "current_batt_1": { |
| 93 | + "unit": "A", |
| 94 | + "name": "current" |
| 95 | + }, |
| 96 | + "volt_batt_2": { |
| 97 | + "unit": "V", |
| 98 | + "name": "voltage" |
| 99 | + }, |
| 100 | + "current_batt_2": { |
| 101 | + "unit": "A", |
| 102 | + "name": "current" |
| 103 | + }, |
| 104 | + "volt_batt_3": { |
| 105 | + "unit": "V", |
| 106 | + "name": "voltage" |
| 107 | + }, |
| 108 | + "current_batt_3": { |
| 109 | + "unit": "A", |
| 110 | + "name": "current" |
| 111 | + }, |
| 112 | + "tempc": { |
| 113 | + "unit": "°C", |
| 114 | + "name": "temperature" |
| 115 | + }, |
| 116 | + "current_ac": { |
| 117 | + "unit": "A", |
| 118 | + "name": "current" |
| 119 | + }, |
| 120 | + "error_code":{ |
| 121 | + "unit":"int", |
| 122 | + "name":"error code" |
| 123 | + } |
| 124 | + } |
| 125 | +})"""";*/ |
0 commit comments