aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/dynamic-layers/meta-python/recipes-connectivity/thingsboard-gateway/thingsboard-gateway/can.json
blob: b5cec0045a9760e5881afe538b8620766057f819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
    "interface": "socketcan",
    "channel": "vcan0",
    "backend": {
      "fd": true
    },
    "reconnectPeriod": 5,
    "devices": [
      {
        "name": "Car",
        "sendDataOnlyOnChange": false,
        "enableUnknownRpc": true,
        "strictEval": false,
        "attributes": [
          {
            "key": "isDriverDoorOpened",
            "nodeId": 41,
            "command": "2:2:big:8717",
            "value": "4:1:int",
            "expression": "bool(value & 0b00000100)",
            "polling": {
              "type": "once",
              "dataInHex": "AB CD AB CD"
            }
          }
        ],
        "timeseries": [
          {
            "key": "rpm",
            "nodeId": 1918,
            "isExtendedId": true,
            "command": "2:2:big:48059",
            "value": "4:2:big:int",
            "expression": "value / 4",
            "polling": {
              "type": "always",
              "period": 5,
              "dataInHex": "aaaa bbbb aaaa bbbb"
            }
          },
          {
            "key": "milliage",
            "nodeId": 1918,
            "isExtendedId": true,
            "value": "4:2:little:int",
            "expression": "value * 10",
            "polling": {
              "type": "always",
              "period": 30,
              "dataInHex": "aa bb cc dd ee ff aa bb"
            }
          }
        ],
        "attributeUpdates": [
          {
            "attributeOnThingsBoard": "softwareVersion",
            "nodeId": 64,
            "isExtendedId": true,
            "dataLength": 4,
            "dataExpression": "value + 5",
            "dataByteorder": "little"
          }
        ],
        "serverSideRpc": [
          {
            "method": "sendSameData",
            "nodeId": 4,
            "isExtendedId": true,
            "isFd": true,
            "bitrateSwitch": true,
            "dataInHex": "aa bb cc dd ee ff    aa bb aa bb cc d ee ff"
          },
          {
            "method": "setLightLevel",
            "nodeId": 5,
            "dataLength": 2,
            "dataByteorder": "little",
            "dataBefore": "00AA"
          },
          {
            "method": "setSpeed",
            "nodeId": 16,
            "dataAfter": "0102",
            "dataExpression": "userSpeed if maxAllowedSpeed > userSpeed else maxAllowedSpeed"
          }
        ]
      }
    ]
  }