Skip to content
Kai Kramer edited this page Nov 24, 2017 · 5 revisions

Switched Lamp

Common:

  • type: Switch
  • valueType: boolean
  • encoding on|off

KNX

Example by https://github.com/owagner/knx2mqtt

KNX Group Addressing provides the following topic hierarchy knx//main/middle/sub an a data point type "dpt"

A typische schema for the knx groups is technology/function/device.

In the example we have a DPT 1.001 DPT_Switch. The dpt defines with the left number the data type und with the right sub number the range and unit. In this example 1 means boolean (0/1) and 001 is switch type with "off" and "on" as valid values.

knx/status/Lights/Switch feedback/Living Room Lamp 
{  
  "ts":1511559980689,
  "lc":1511390995027,
  "knx_src_addr":"1.1.19",
  "knx_dpt":"1.001",
  "knx_textual":"off",
  "val":0
}

Proposed Meta Database Schema

{
  "id": "Lights/Switch feedback/Living Room Lamp",
  "type": "Switch", 
  "name": "...",
  "parent": "..." 
  attribute?
  "common": {   
      
  },
  "native": {     
     
  }
}

How to store type (== boolean) and encoding ("on"/"off")

Loxone

Example by https://github.com/krambox/loxone2mqtt

Loxone provides similar information in this case to knx. There is a hierarchy // and a datatype with an numeric an string value.

lox/state/Living Room/Lights/Lamp 
{
  "val":0,
  "ts":1511424040,
  "native":{"active":"off","type":"Switch"}
}

Proposed Meta Database Schema

{
  "id": "Living Room/Lights/Lamp",
  "type": "Switch", 
  "name": "...",
  "parent": "..." 
  attribute?
  "common": {   
      
  },
  "native": {     
     
  }
}

Temperature Sensors

Common:

  • type: Temperature Sensors
  • Unit: "°C"
  • valueType: float
  • writabe: true|false
    • min:
    • max:

KNX

knx/status/Heating/Temperature/Living Room
{
  "ts":1511562715211,
  "lc":1511562715211,
  "knx_src_addr":"1.1.7",
  "knx_dpt":"9.001", // DPT_Value_Temp , Range: -273 °C ... 670 760 °C, Unit "°C" 
  "knx_textual":
  "21.54 °C",
  "val":21.54
}

Loxone

lox/state/Living Room/temperature/temp_lr
{
  "val":20.03,
  "ts":1511563136,
  "native":{"value":"20.03°C","type":"InfoOnlyAnalog"}
}

lox/meta/...
{"native":
  {"type":"InfoOnlyAnalog",
  "details":{"format":"%.2f°C"},
  "uuidAction":"b26402ce-6e29-11e2-8339ecc3404b2f22"}
}

KM200 (Buders)

Read Only

km200/status/system/sensors/temperatures/outdoor_t1 
{"ts":1511563659,"val":9.9,"km200_unitOfMeasure":"C"}

km200/meta/system/sensors/temperatures/outdoor_t1 {"native":{"type":"floatValue","writeable":0,"recordable":1,"unitOfMeasure":"C"}}

Writable

km200/status/heatingCircuits/hc1/temperatureLevels/day 
{"ts":1511563660,"val":21,"km200_unitOfMeasure":"C"}

km200/meta/heatingCircuits/hc1/temperatureLevels/day 
{"native":{"type":"floatValue","writeable":1,"recordable":1,"unitOfMeasure":"C","minValue":6,"maxValue":30}}