Переглянути джерело

[FEAT] add default device file

Adrien Carteron 2 роки тому
батько
коміт
58f79ef371
3 змінених файлів з 3477 додано та 2 видалено
  1. 14 1
      cmd/homectrl/main.go
  2. 3460 0
      example/devices.json
  3. 3 1
      internal/connectors/mqtt/mqtt.go

+ 14 - 1
cmd/homectrl/main.go

@@ -2,6 +2,8 @@ package main
 
 import (
 	"fmt"
+	"io/ioutil"
+	"os"
 
 	"homectrl/internal/connectors/mqtt"
 	interaction "homectrl/internal/devices"
@@ -14,8 +16,19 @@ func main() {
 	var broker = "192.168.8.50"
 	var port = 1883
 
+	defer func() {
+		if r := recover(); r != nil {
+			fmt.Printf("Panic: %+v\n", r)
+			jsonFile, err := os.Open("example/devices.json")
+			if err != nil {
+				fmt.Println(err)
+			}
+			byteValue, _ := ioutil.ReadAll(jsonFile)
+			defer jsonFile.Close()
+			interaction.Builder(byteValue)
+		}
+	}()
 	c := mqtt.New(broker, port)
 	c.SubTopic("zigbee2mqtt/bridge/devices")
-	interaction.Builder2(`[{"friendly_name":"lolilol"}]`)
 
 }

+ 3460 - 0
example/devices.json

@@ -0,0 +1,3460 @@
+[
+    {
+        "definition": null,
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "10": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "11": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "ssIasAce"
+                    ],
+                    "output": [
+                        "ssIasZone",
+                        "ssIasWd"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "110": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "12": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "13": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genOta"
+                    ],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "2": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "3": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "4": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "47": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "5": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "6": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "8": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "Coordinator",
+        "ieee_address": "0x00124b00229884d8",
+        "interview_completed": true,
+        "interviewing": false,
+        "network_address": 0,
+        "supported": false,
+        "type": "Coordinator"
+    },
+    {
+        "date_code": "201803280847170",
+        "definition": {
+            "description": "Smart+ switch mini",
+            "exposes": [
+                {
+                    "access": 1,
+                    "description": "Remaining battery in %",
+                    "name": "battery",
+                    "property": "battery",
+                    "type": "numeric",
+                    "unit": "%",
+                    "value_max": 100,
+                    "value_min": 0
+                },
+                {
+                    "access": 1,
+                    "description": "Triggered action (e.g. a button click)",
+                    "name": "action",
+                    "property": "action",
+                    "type": "enum",
+                    "values": [
+                        "on",
+                        "brightness_move_up",
+                        "brightness_move_down",
+                        "brightness_stop",
+                        "color_temperature_move",
+                        "hue_move",
+                        "hue_stop",
+                        "move_to_saturation",
+                        "off",
+                        "brightness_move_to_level"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "AC0251100NJ/AC0251600NJ/AC0251700NJ",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Set to false to disable the legacy integration (highly recommended), will change structure of the published payload (default true).",
+                    "name": "legacy",
+                    "property": "legacy",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "OSRAM"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "genPowerCfg",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x804b50fffe13256f",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x804b50fffe13256f",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genPowerCfg",
+                        "genPollCtrl",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "genOta",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "batteryVoltage",
+                        "cluster": "genPowerCfg",
+                        "maximum_report_interval": 62000,
+                        "minimum_report_interval": 3600,
+                        "reportable_change": 0
+                    }
+                ],
+                "scenes": []
+            },
+            "2": {
+                "bindings": [
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x804b50fffe13256f",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x804b50fffe13256f",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "3": {
+                "bindings": [
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x804b50fffe13256f",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x804b50fffe13256f",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "kitchen_light_control_0",
+        "ieee_address": "0x000d6f000e0fab46",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "OSRAM",
+        "model_id": "Lightify Switch Mini",
+        "network_address": 7666,
+        "power_source": "Battery",
+        "software_build_id": "e.1.11.0M",
+        "supported": true,
+        "type": "EndDevice"
+    },
+    {
+        "definition": {
+            "description": "Classic E27 Tunable White",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature of this light",
+                            "name": "color_temp",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 150
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warm temperature (454 mireds / 2200 Kelvin)",
+                                    "name": "warm",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 500
+                                }
+                            ],
+                            "property": "color_temp",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 500,
+                            "value_min": 150
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "AC25702",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
+                    "name": "color_sync",
+                    "property": "color_sync",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "LEDVANCE"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "lightingColorCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "haDiagnostic"
+                    ],
+                    "output": [
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "currentLevel",
+                        "cluster": "genLevelCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "colorTemperature",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentY",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentX",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": "5",
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "onOff",
+                        "cluster": "genOnOff",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 0,
+                        "reportable_change": 0
+                    }
+                ],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": [
+                        "greenPower"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "livingroom_light_0",
+        "ieee_address": "0xf0d1b80000173610",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LEDVANCE",
+        "model_id": "A60 TW Value II",
+        "network_address": 14893,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "00203045",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "20190308",
+        "definition": {
+            "description": "TRADFRI LED bulb E27 1000 lumen, dimmable, white spectrum, opal white",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature of this light",
+                            "name": "color_temp",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warm temperature (454 mireds / 2200 Kelvin)",
+                                    "name": "warm",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 454
+                                }
+                            ],
+                            "property": "color_temp",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 454,
+                            "value_min": 250
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature after cold power on of this light",
+                            "name": "color_temp_startup",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warm temperature (454 mireds / 2200 Kelvin)",
+                                    "name": "warm",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Restore previous color_temp on cold power on",
+                                    "name": "previous",
+                                    "value": 65535
+                                }
+                            ],
+                            "property": "color_temp_startup",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 454,
+                            "value_min": 250
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "LED1732G11",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
+                    "name": "color_sync",
+                    "property": "color_sync",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "IKEA"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "lightingColorCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "touchlink",
+                        "64636"
+                    ],
+                    "output": [
+                        "genScenes",
+                        "genOta",
+                        "genPollCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "onOff",
+                        "cluster": "genOnOff",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 0,
+                        "reportable_change": 0
+                    },
+                    {
+                        "attribute": "colorTemperature",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentX",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentY",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentLevel",
+                        "cluster": "genLevelCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    }
+                ],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "greenPower"
+                    ],
+                    "output": [
+                        "greenPower"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "bedroom_0_light_0",
+        "ieee_address": "0xd0cf5efffef90a1b",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "IKEA of Sweden",
+        "model_id": "TRADFRI bulb E27 WS opal 1000lm",
+        "network_address": 45598,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "2.0.022",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "20190705-350",
+        "definition": {
+            "description": "E27 filament bulb dimmable",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "RF 263",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                }
+            ],
+            "supports_ota": false,
+            "vendor": "Innr"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "haDiagnostic",
+                        "touchlink",
+                        "heimanSpecificInfraRedRemote"
+                    ],
+                    "output": [
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": [
+                        "greenPower"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "up_light_0",
+        "ieee_address": "0x14b457fffecaffb0",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "innr",
+        "model_id": "RF 263",
+        "network_address": 58643,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "2.1",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "07-17-2020",
+        "definition": {
+            "description": "Aqara curtain motor",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "name": "state",
+                            "property": "state",
+                            "type": "enum",
+                            "values": [
+                                "OPEN",
+                                "CLOSE",
+                                "STOP"
+                            ]
+                        },
+                        {
+                            "access": 7,
+                            "description": "Position of this cover",
+                            "name": "position",
+                            "property": "position",
+                            "type": "numeric",
+                            "value_max": 100,
+                            "value_min": 0
+                        }
+                    ],
+                    "type": "cover"
+                },
+                {
+                    "access": 1,
+                    "description": "Whether the motor is moving or not",
+                    "name": "running",
+                    "property": "running",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                },
+                {
+                    "access": 1,
+                    "description": "Motor state",
+                    "name": "motor_state",
+                    "property": "motor_state",
+                    "type": "enum",
+                    "values": [
+                        "stopped",
+                        "opening",
+                        "closing"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "ZNCLDJ11LM",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Inverts the cover position, false: open=100,close=0, true: open=0,close=100 (default false).",
+                    "name": "invert_cover",
+                    "property": "invert_cover",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "Xiaomi"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genGroups",
+                        "genIdentify",
+                        "genScenes",
+                        "genTime",
+                        "closuresWindowCovering",
+                        "genAnalogOutput",
+                        "genMultistateOutput",
+                        "genOnOff",
+                        "genPowerCfg",
+                        "msOccupancySensing"
+                    ],
+                    "output": [
+                        "genOta",
+                        "genTime",
+                        "genAnalogOutput",
+                        "closuresWindowCovering",
+                        "genMultistateOutput",
+                        "genOnOff",
+                        "genPowerCfg",
+                        "msOccupancySensing"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "onOff",
+                        "cluster": "genOnOff",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 0,
+                        "reportable_change": 0
+                    }
+                ],
+                "scenes": []
+            }
+        },
+        "friendly_name": "livingroom_curtain_motor",
+        "ieee_address": "0x00158d00054881a8",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LUMI",
+        "model_id": "lumi.curtain",
+        "network_address": 61646,
+        "power_source": "Mains (single phase)",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "201804210955470",
+        "definition": {
+            "description": "Smart+ switch mini",
+            "exposes": [
+                {
+                    "access": 1,
+                    "description": "Remaining battery in %",
+                    "name": "battery",
+                    "property": "battery",
+                    "type": "numeric",
+                    "unit": "%",
+                    "value_max": 100,
+                    "value_min": 0
+                },
+                {
+                    "access": 1,
+                    "description": "Triggered action (e.g. a button click)",
+                    "name": "action",
+                    "property": "action",
+                    "type": "enum",
+                    "values": [
+                        "on",
+                        "brightness_move_up",
+                        "brightness_move_down",
+                        "brightness_stop",
+                        "color_temperature_move",
+                        "hue_move",
+                        "hue_stop",
+                        "move_to_saturation",
+                        "off",
+                        "brightness_move_to_level"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "AC0251100NJ/AC0251600NJ/AC0251700NJ",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Set to false to disable the legacy integration (highly recommended), will change structure of the published payload (default true).",
+                    "name": "legacy",
+                    "property": "legacy",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "OSRAM"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genPowerCfg",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00158d00054881a8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genPowerCfg",
+                        "genPollCtrl",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "genOta",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "batteryVoltage",
+                        "cluster": "genPowerCfg",
+                        "maximum_report_interval": 62000,
+                        "minimum_report_interval": 3600,
+                        "reportable_change": 0
+                    }
+                ],
+                "scenes": []
+            },
+            "2": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00158d00054881a8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "3": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00158d00054881a8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "livingroom_curtain_motor_control_0",
+        "ieee_address": "0x000d6f000e1b8f47",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "OSRAM",
+        "model_id": "Lightify Switch Mini",
+        "network_address": 4329,
+        "power_source": "Battery",
+        "software_build_id": "e.1.11.0M",
+        "supported": true,
+        "type": "EndDevice"
+    },
+    {
+        "definition": {
+            "description": "MiJia wireless switch",
+            "exposes": [
+                {
+                    "access": 1,
+                    "description": "Remaining battery in %",
+                    "name": "battery",
+                    "property": "battery",
+                    "type": "numeric",
+                    "unit": "%",
+                    "value_max": 100,
+                    "value_min": 0
+                },
+                {
+                    "access": 1,
+                    "description": "Triggered action (e.g. a button click)",
+                    "name": "action",
+                    "property": "action",
+                    "type": "enum",
+                    "values": [
+                        "single",
+                        "double",
+                        "triple",
+                        "quadruple",
+                        "hold",
+                        "release",
+                        "many"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Voltage of the battery in millivolts",
+                    "name": "voltage",
+                    "property": "voltage",
+                    "type": "numeric",
+                    "unit": "mV"
+                },
+                {
+                    "access": 1,
+                    "description": "Number of power outages",
+                    "name": "power_outage_count",
+                    "property": "power_outage_count",
+                    "type": "numeric"
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "WXKG01LM",
+            "options": [
+                {
+                    "description": "The WXKG01LM only reports a button press and release.By default, a hold action is published when there is at least 1000 ms between both events. It could be that due to delays in the network the release message is received late. This causes a single click to be identified as a hold action. If you are experiencing this you can try experimenting with this option (e.g. set it to 2000) (value is in ms).",
+                    "name": "hold_timeout",
+                    "property": "hold_timeout",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "description": "Sometimes it happens that the button does not send a release. To avoid problems a release is automatically send after a timeout. The default timeout is 4000 ms, you can increase it with this option (value is in ms).",
+                    "name": "hold_timeout_expire",
+                    "property": "hold_timeout_expire",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Set to false to disable the legacy integration (highly recommended), will change structure of the published payload (default true).",
+                    "name": "legacy",
+                    "property": "legacy",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": false,
+            "vendor": "Xiaomi"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "0x00158d0003a4c5c0",
+        "ieee_address": "0x00158d0003a4c5c0",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LUMI",
+        "model_id": "lumi.sensor_switch",
+        "network_address": 29143,
+        "power_source": "Battery",
+        "supported": true,
+        "type": "EndDevice"
+    },
+    {
+        "date_code": "201803280951540",
+        "definition": {
+            "description": "Smart+ switch mini",
+            "exposes": [
+                {
+                    "access": 1,
+                    "description": "Remaining battery in %",
+                    "name": "battery",
+                    "property": "battery",
+                    "type": "numeric",
+                    "unit": "%",
+                    "value_max": 100,
+                    "value_min": 0
+                },
+                {
+                    "access": 1,
+                    "description": "Triggered action (e.g. a button click)",
+                    "name": "action",
+                    "property": "action",
+                    "type": "enum",
+                    "values": [
+                        "on",
+                        "brightness_move_up",
+                        "brightness_move_down",
+                        "brightness_stop",
+                        "color_temperature_move",
+                        "hue_move",
+                        "hue_stop",
+                        "move_to_saturation",
+                        "off",
+                        "brightness_move_to_level"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "AC0251100NJ/AC0251600NJ/AC0251700NJ",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Set to false to disable the legacy integration (highly recommended), will change structure of the published payload (default true).",
+                    "name": "legacy",
+                    "property": "legacy",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "OSRAM"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genPowerCfg",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    },
+                    {
+                        "cluster": "lightingColorCtrl",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genPowerCfg",
+                        "genPollCtrl",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "genOta",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "batteryVoltage",
+                        "cluster": "genPowerCfg",
+                        "maximum_report_interval": 62000,
+                        "minimum_report_interval": 3600,
+                        "reportable_change": 0
+                    }
+                ],
+                "scenes": []
+            },
+            "2": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    },
+                    {
+                        "cluster": "lightingColorCtrl",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "3": {
+                "bindings": [
+                    {
+                        "cluster": "lightingColorCtrl",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "id": 2,
+                            "type": "group"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "touchlink",
+                        "64768"
+                    ],
+                    "output": [
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "livingroom_light_control_0",
+        "ieee_address": "0x000d6f000e110b7d",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "OSRAM",
+        "model_id": "Lightify Switch Mini",
+        "network_address": 11672,
+        "power_source": "Battery",
+        "software_build_id": "e.1.11.0M",
+        "supported": true,
+        "type": "EndDevice"
+    },
+    {
+        "date_code": "20140331CNEF****",
+        "definition": {
+            "description": "SMART+ CLASSIC A 60 TW",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature of this light",
+                            "name": "color_temp",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 153
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 370
+                                }
+                            ],
+                            "property": "color_temp",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 370,
+                            "value_min": 153
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "AC03642",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
+                    "name": "color_sync",
+                    "property": "color_sync",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "OSRAM"
+        },
+        "disabled": false,
+        "endpoints": {
+            "3": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "touchlink",
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "manuSpecificOsram"
+                    ],
+                    "output": [
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "bedroom_1_light_0",
+        "ieee_address": "0x7cb03eaa00af70de",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "OSRAM",
+        "model_id": "CLA60 TW OSRAM",
+        "network_address": 45561,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "V1.05.10",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "definition": {
+            "description": "Classic E27 Tunable White",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature of this light",
+                            "name": "color_temp",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 150
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warm temperature (454 mireds / 2200 Kelvin)",
+                                    "name": "warm",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 500
+                                }
+                            ],
+                            "property": "color_temp",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 500,
+                            "value_min": 150
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "AC25702",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
+                    "name": "color_sync",
+                    "property": "color_sync",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "LEDVANCE"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "lightingColorCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "haDiagnostic"
+                    ],
+                    "output": [
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "colorTemperature",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentX",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentY",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "onOff",
+                        "cluster": "genOnOff",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 0,
+                        "reportable_change": 0
+                    },
+                    {
+                        "attribute": "currentLevel",
+                        "cluster": "genLevelCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    }
+                ],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": [
+                        "greenPower"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "livingroom_light_1",
+        "ieee_address": "0xf0d1b80000173667",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LEDVANCE",
+        "model_id": "A60 TW Value II",
+        "network_address": 38644,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "00203045",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "definition": {
+            "description": "Classic E27 Tunable White",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature of this light",
+                            "name": "color_temp",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 150
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warm temperature (454 mireds / 2200 Kelvin)",
+                                    "name": "warm",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 500
+                                }
+                            ],
+                            "property": "color_temp",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 500,
+                            "value_min": 150
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "AC25702",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
+                    "name": "color_sync",
+                    "property": "color_sync",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "LEDVANCE"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "lightingColorCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "lightingColorCtrl",
+                        "haDiagnostic"
+                    ],
+                    "output": [
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "colorTemperature",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentX",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "currentY",
+                        "cluster": "lightingColorCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "onOff",
+                        "cluster": "genOnOff",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 0,
+                        "reportable_change": 0
+                    },
+                    {
+                        "attribute": "currentLevel",
+                        "cluster": "genLevelCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    }
+                ],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": [
+                        "greenPower"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "livingroom_light_2",
+        "ieee_address": "0xf0d1b80000173581",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LEDVANCE",
+        "model_id": "A60 TW Value II",
+        "network_address": 22961,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "00203045",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "20201102",
+        "definition": {
+            "description": "TRADFRI driver for wireless control (30 watt)",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "ICPSHC24-30EU-IL-1",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "IKEA"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "genLevelCtrl",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    },
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "haDiagnostic",
+                        "touchlink"
+                    ],
+                    "output": [
+                        "genScenes",
+                        "genOta",
+                        "genPollCtrl",
+                        "touchlink"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "currentLevel",
+                        "cluster": "genLevelCtrl",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 5,
+                        "reportable_change": 1
+                    },
+                    {
+                        "attribute": "onOff",
+                        "cluster": "genOnOff",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 0,
+                        "reportable_change": 0
+                    }
+                ],
+                "scenes": []
+            }
+        },
+        "friendly_name": "kitchen_light_0",
+        "ieee_address": "0x804b50fffe13256f",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "IKEA of Sweden",
+        "model_id": "TRADFRI Driver 30W",
+        "network_address": 19998,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "2.3.068",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "20160516",
+        "definition": {
+            "description": "MiJia temperature & humidity sensor",
+            "exposes": [
+                {
+                    "access": 1,
+                    "description": "Remaining battery in %",
+                    "name": "battery",
+                    "property": "battery",
+                    "type": "numeric",
+                    "unit": "%",
+                    "value_max": 100,
+                    "value_min": 0
+                },
+                {
+                    "access": 1,
+                    "description": "Measured temperature value",
+                    "name": "temperature",
+                    "property": "temperature",
+                    "type": "numeric",
+                    "unit": "°C"
+                },
+                {
+                    "access": 1,
+                    "description": "Measured relative humidity",
+                    "name": "humidity",
+                    "property": "humidity",
+                    "type": "numeric",
+                    "unit": "%"
+                },
+                {
+                    "access": 1,
+                    "description": "Voltage of the battery in millivolts",
+                    "name": "voltage",
+                    "property": "voltage",
+                    "type": "numeric",
+                    "unit": "mV"
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "WSDCGQ01LM",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Calibrates the temperature value (absolute offset), takes into effect on next report of device.",
+                    "name": "temperature_calibration",
+                    "property": "temperature_calibration",
+                    "type": "numeric"
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for temperature, takes into effect on next report of device.",
+                    "name": "temperature_precision",
+                    "property": "temperature_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for humidity, takes into effect on next report of device.",
+                    "name": "humidity_precision",
+                    "property": "humidity_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Calibrates the humidity value (absolute offset), takes into effect on next report of device.",
+                    "name": "humidity_calibration",
+                    "property": "humidity_calibration",
+                    "type": "numeric"
+                }
+            ],
+            "supports_ota": false,
+            "vendor": "Xiaomi"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genOta",
+                        "65535",
+                        "genMultistateInput"
+                    ],
+                    "output": [
+                        "genBasic",
+                        "genGroups",
+                        "genIdentify",
+                        "genScenes",
+                        "genOta",
+                        "65535",
+                        "genMultistateInput"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "2": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genIdentify",
+                        "genMultistateInput"
+                    ],
+                    "output": [
+                        "genGroups",
+                        "genIdentify",
+                        "genScenes",
+                        "genMultistateInput"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "3": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genIdentify",
+                        "genAnalogInput"
+                    ],
+                    "output": [
+                        "genGroups",
+                        "genIdentify",
+                        "genScenes",
+                        "genAnalogInput"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "bedroom_1_temperature_0",
+        "ieee_address": "0x00158d0003637c8f",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LUMI",
+        "model_id": "lumi.sensor_ht",
+        "network_address": 61695,
+        "power_source": "Battery",
+        "software_build_id": "3000-0001",
+        "supported": true,
+        "type": "EndDevice"
+    },
+    {
+        "date_code": "09-06-2019",
+        "definition": {
+            "description": "Mi power plug ZigBee EU",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of the switch",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        }
+                    ],
+                    "type": "switch"
+                },
+                {
+                    "access": 5,
+                    "description": "Instantaneous measured power",
+                    "name": "power",
+                    "property": "power",
+                    "type": "numeric",
+                    "unit": "W"
+                },
+                {
+                    "access": 1,
+                    "description": "Sum of consumed energy",
+                    "name": "energy",
+                    "property": "energy",
+                    "type": "numeric",
+                    "unit": "kWh"
+                },
+                {
+                    "access": 1,
+                    "description": "Temperature of the device",
+                    "name": "device_temperature",
+                    "property": "device_temperature",
+                    "type": "numeric",
+                    "unit": "°C"
+                },
+                {
+                    "access": 1,
+                    "description": "Measured electrical potential value",
+                    "name": "voltage",
+                    "property": "voltage",
+                    "type": "numeric",
+                    "unit": "V"
+                },
+                {
+                    "access": 1,
+                    "description": "Instantaneous measured electrical current",
+                    "name": "current",
+                    "property": "current",
+                    "type": "numeric",
+                    "unit": "A"
+                },
+                {
+                    "access": 1,
+                    "description": "Indicates whether a plug is physically attached. Device does not have to pull power or even be connected electrically (state of this binary switch can be ON even if main power switch is OFF)",
+                    "name": "consumer_connected",
+                    "property": "consumer_connected",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                },
+                {
+                    "access": 7,
+                    "description": "Enable/disable the LED at night",
+                    "name": "led_disabled_night",
+                    "property": "led_disabled_night",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                },
+                {
+                    "access": 7,
+                    "description": "Enable/disable the power outage memory, this recovers the on/off mode after power failure",
+                    "name": "power_outage_memory",
+                    "property": "power_outage_memory",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                },
+                {
+                    "access": 3,
+                    "description": "Turn the device automatically off when attached device consumes less than 2W for 20 minutes",
+                    "name": "auto_off",
+                    "property": "auto_off",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                },
+                {
+                    "access": 7,
+                    "description": "Maximum allowed load, turns off if exceeded",
+                    "name": "overload_protection",
+                    "property": "overload_protection",
+                    "type": "numeric",
+                    "unit": "W",
+                    "value_max": 2300,
+                    "value_min": 100
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "ZNCZ04LM",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Calibrates the power value (percentual offset), takes into effect on next report of device.",
+                    "name": "power_calibration",
+                    "property": "power_calibration",
+                    "type": "numeric"
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for power, takes into effect on next report of device.",
+                    "name": "power_precision",
+                    "property": "power_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Calibrates the energy value (percentual offset), takes into effect on next report of device.",
+                    "name": "energy_calibration",
+                    "property": "energy_calibration",
+                    "type": "numeric"
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for energy, takes into effect on next report of device.",
+                    "name": "energy_precision",
+                    "property": "energy_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.",
+                    "name": "device_temperature_calibration",
+                    "property": "device_temperature_calibration",
+                    "type": "numeric"
+                },
+                {
+                    "access": 2,
+                    "description": "Calibrates the voltage value (percentual offset), takes into effect on next report of device.",
+                    "name": "voltage_calibration",
+                    "property": "voltage_calibration",
+                    "type": "numeric"
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for voltage, takes into effect on next report of device.",
+                    "name": "voltage_precision",
+                    "property": "voltage_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Calibrates the current value (percentual offset), takes into effect on next report of device.",
+                    "name": "current_calibration",
+                    "property": "current_calibration",
+                    "type": "numeric"
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for current, takes into effect on next report of device.",
+                    "name": "current_precision",
+                    "property": "current_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "Xiaomi"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [
+                    {
+                        "cluster": "genOnOff",
+                        "target": {
+                            "endpoint": 1,
+                            "ieee_address": "0x00124b00229884d8",
+                            "type": "endpoint"
+                        }
+                    }
+                ],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genDeviceTempCfg",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genAlarms",
+                        "seMetering",
+                        "haElectricalMeasurement"
+                    ],
+                    "output": [
+                        "genTime",
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [
+                    {
+                        "attribute": "onOff",
+                        "cluster": "genOnOff",
+                        "maximum_report_interval": 3600,
+                        "minimum_report_interval": 0,
+                        "reportable_change": 0
+                    }
+                ],
+                "scenes": []
+            },
+            "21": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": []
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": [
+                        "greenPower"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "bedroom_0_smart_switch_0",
+        "ieee_address": "0x04cf8cdf3c7b1abf",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LUMI",
+        "model_id": "lumi.plug.mmeu01",
+        "network_address": 2694,
+        "power_source": "Mains (single phase)",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "20160516",
+        "definition": {
+            "description": "MiJia temperature & humidity sensor",
+            "exposes": [
+                {
+                    "access": 1,
+                    "description": "Remaining battery in %",
+                    "name": "battery",
+                    "property": "battery",
+                    "type": "numeric",
+                    "unit": "%",
+                    "value_max": 100,
+                    "value_min": 0
+                },
+                {
+                    "access": 1,
+                    "description": "Measured temperature value",
+                    "name": "temperature",
+                    "property": "temperature",
+                    "type": "numeric",
+                    "unit": "°C"
+                },
+                {
+                    "access": 1,
+                    "description": "Measured relative humidity",
+                    "name": "humidity",
+                    "property": "humidity",
+                    "type": "numeric",
+                    "unit": "%"
+                },
+                {
+                    "access": 1,
+                    "description": "Voltage of the battery in millivolts",
+                    "name": "voltage",
+                    "property": "voltage",
+                    "type": "numeric",
+                    "unit": "mV"
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "WSDCGQ01LM",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Calibrates the temperature value (absolute offset), takes into effect on next report of device.",
+                    "name": "temperature_calibration",
+                    "property": "temperature_calibration",
+                    "type": "numeric"
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for temperature, takes into effect on next report of device.",
+                    "name": "temperature_precision",
+                    "property": "temperature_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Number of digits after decimal point for humidity, takes into effect on next report of device.",
+                    "name": "humidity_precision",
+                    "property": "humidity_precision",
+                    "type": "numeric",
+                    "value_max": 3,
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "Calibrates the humidity value (absolute offset), takes into effect on next report of device.",
+                    "name": "humidity_calibration",
+                    "property": "humidity_calibration",
+                    "type": "numeric"
+                }
+            ],
+            "supports_ota": false,
+            "vendor": "Xiaomi"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genOta",
+                        "65535",
+                        "genMultistateInput"
+                    ],
+                    "output": [
+                        "genBasic",
+                        "genGroups",
+                        "genIdentify",
+                        "genScenes",
+                        "genOta",
+                        "65535",
+                        "genMultistateInput"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "2": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genIdentify",
+                        "genMultistateInput"
+                    ],
+                    "output": [
+                        "genGroups",
+                        "genIdentify",
+                        "genScenes",
+                        "genMultistateInput"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "3": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genIdentify",
+                        "genAnalogInput"
+                    ],
+                    "output": [
+                        "genGroups",
+                        "genIdentify",
+                        "genScenes",
+                        "genAnalogInput"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "0x00158d000350446d",
+        "ieee_address": "0x00158d000350446d",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "LUMI",
+        "model_id": "lumi.sensor_ht",
+        "network_address": 54587,
+        "power_source": "Battery",
+        "software_build_id": "3000-0001",
+        "supported": true,
+        "type": "EndDevice"
+    },
+    {
+        "date_code": "",
+        "definition": {
+            "description": "Curtain/blind switch",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 3,
+                            "name": "state",
+                            "property": "state",
+                            "type": "enum",
+                            "values": [
+                                "OPEN",
+                                "CLOSE",
+                                "STOP"
+                            ]
+                        },
+                        {
+                            "access": 7,
+                            "description": "Position of this cover",
+                            "name": "position",
+                            "property": "position",
+                            "type": "numeric",
+                            "value_max": 100,
+                            "value_min": 0
+                        }
+                    ],
+                    "type": "cover"
+                },
+                {
+                    "access": 1,
+                    "name": "moving",
+                    "property": "moving",
+                    "type": "enum",
+                    "values": [
+                        "UP",
+                        "STOP",
+                        "DOWN"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "name": "calibration",
+                    "property": "calibration",
+                    "type": "binary",
+                    "value_off": "OFF",
+                    "value_on": "ON"
+                },
+                {
+                    "access": 7,
+                    "name": "motor_reversal",
+                    "property": "motor_reversal",
+                    "type": "binary",
+                    "value_off": "OFF",
+                    "value_on": "ON"
+                },
+                {
+                    "access": 7,
+                    "name": "backlight_mode",
+                    "property": "backlight_mode",
+                    "type": "enum",
+                    "values": [
+                        "LOW",
+                        "MEDIUM",
+                        "HIGH"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Calibration time",
+                    "name": "calibration_time",
+                    "property": "calibration_time",
+                    "type": "numeric",
+                    "unit": "S"
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "TS130F",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Inverts the cover position, false: open=100,close=0, true: open=0,close=100 (default false).",
+                    "name": "invert_cover",
+                    "property": "invert_cover",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": false,
+            "vendor": "TuYa"
+        },
+        "disabled": false,
+        "endpoints": {
+            "1": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genTime",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "closuresWindowCovering"
+                    ],
+                    "output": [
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "livingroom_shutter_0",
+        "ieee_address": "0xb4e3f9fffe53686f",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "_TZ3000_8kzqqzu4",
+        "model_id": "TS130F",
+        "network_address": 26102,
+        "power_source": "Mains (single phase)",
+        "supported": true,
+        "type": "Router"
+    },
+    {
+        "date_code": "20210305",
+        "definition": {
+            "description": "Hue Go with Bluetooth",
+            "exposes": [
+                {
+                    "features": [
+                        {
+                            "access": 7,
+                            "description": "On/off state of this light",
+                            "name": "state",
+                            "property": "state",
+                            "type": "binary",
+                            "value_off": "OFF",
+                            "value_on": "ON",
+                            "value_toggle": "TOGGLE"
+                        },
+                        {
+                            "access": 7,
+                            "description": "Brightness of this light",
+                            "name": "brightness",
+                            "property": "brightness",
+                            "type": "numeric",
+                            "value_max": 254,
+                            "value_min": 0
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature of this light",
+                            "name": "color_temp",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 150
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warm temperature (454 mireds / 2200 Kelvin)",
+                                    "name": "warm",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 500
+                                }
+                            ],
+                            "property": "color_temp",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 500,
+                            "value_min": 150
+                        },
+                        {
+                            "access": 7,
+                            "description": "Color temperature after cold power on of this light",
+                            "name": "color_temp_startup",
+                            "presets": [
+                                {
+                                    "description": "Coolest temperature supported",
+                                    "name": "coolest",
+                                    "value": 150
+                                },
+                                {
+                                    "description": "Cool temperature (250 mireds / 4000 Kelvin)",
+                                    "name": "cool",
+                                    "value": 250
+                                },
+                                {
+                                    "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
+                                    "name": "neutral",
+                                    "value": 370
+                                },
+                                {
+                                    "description": "Warm temperature (454 mireds / 2200 Kelvin)",
+                                    "name": "warm",
+                                    "value": 454
+                                },
+                                {
+                                    "description": "Warmest temperature supported",
+                                    "name": "warmest",
+                                    "value": 500
+                                },
+                                {
+                                    "description": "Restore previous color_temp on cold power on",
+                                    "name": "previous",
+                                    "value": 65535
+                                }
+                            ],
+                            "property": "color_temp_startup",
+                            "type": "numeric",
+                            "unit": "mired",
+                            "value_max": 500,
+                            "value_min": 150
+                        },
+                        {
+                            "description": "Color of this light in the CIE 1931 color space (x/y)",
+                            "features": [
+                                {
+                                    "access": 7,
+                                    "name": "x",
+                                    "property": "x",
+                                    "type": "numeric"
+                                },
+                                {
+                                    "access": 7,
+                                    "name": "y",
+                                    "property": "y",
+                                    "type": "numeric"
+                                }
+                            ],
+                            "name": "color_xy",
+                            "property": "color",
+                            "type": "composite"
+                        },
+                        {
+                            "description": "Color of this light expressed as hue/saturation",
+                            "features": [
+                                {
+                                    "access": 7,
+                                    "name": "hue",
+                                    "property": "hue",
+                                    "type": "numeric"
+                                },
+                                {
+                                    "access": 7,
+                                    "name": "saturation",
+                                    "property": "saturation",
+                                    "type": "numeric"
+                                }
+                            ],
+                            "name": "color_hs",
+                            "property": "color",
+                            "type": "composite"
+                        }
+                    ],
+                    "type": "light"
+                },
+                {
+                    "access": 2,
+                    "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
+                    "name": "effect",
+                    "property": "effect",
+                    "type": "enum",
+                    "values": [
+                        "blink",
+                        "breathe",
+                        "okay",
+                        "channel_change",
+                        "finish_effect",
+                        "stop_effect"
+                    ]
+                },
+                {
+                    "access": 7,
+                    "description": "Controls the behavior when the device is powered on after power loss",
+                    "name": "power_on_behavior",
+                    "property": "power_on_behavior",
+                    "type": "enum",
+                    "values": [
+                        "off",
+                        "on",
+                        "toggle",
+                        "previous"
+                    ]
+                },
+                {
+                    "access": 1,
+                    "description": "Link quality (signal strength)",
+                    "name": "linkquality",
+                    "property": "linkquality",
+                    "type": "numeric",
+                    "unit": "lqi",
+                    "value_max": 255,
+                    "value_min": 0
+                }
+            ],
+            "model": "7602031P7",
+            "options": [
+                {
+                    "access": 2,
+                    "description": "Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).",
+                    "name": "transition",
+                    "property": "transition",
+                    "type": "numeric",
+                    "value_min": 0
+                },
+                {
+                    "access": 2,
+                    "description": "When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
+                    "name": "color_sync",
+                    "property": "color_sync",
+                    "type": "binary",
+                    "value_off": false,
+                    "value_on": true
+                }
+            ],
+            "supports_ota": true,
+            "vendor": "Philips"
+        },
+        "disabled": false,
+        "endpoints": {
+            "11": {
+                "bindings": [],
+                "clusters": {
+                    "input": [
+                        "genBasic",
+                        "genIdentify",
+                        "genGroups",
+                        "genScenes",
+                        "genOnOff",
+                        "genLevelCtrl",
+                        "touchlink",
+                        "lightingColorCtrl",
+                        "manuSpecificUbisysDimmerSetup"
+                    ],
+                    "output": [
+                        "genOta"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            },
+            "242": {
+                "bindings": [],
+                "clusters": {
+                    "input": [],
+                    "output": [
+                        "greenPower"
+                    ]
+                },
+                "configured_reportings": [],
+                "scenes": []
+            }
+        },
+        "friendly_name": "0x001788010b442b42",
+        "ieee_address": "0x001788010b442b42",
+        "interview_completed": true,
+        "interviewing": false,
+        "manufacturer": "Philips",
+        "model_id": "7602031P7",
+        "network_address": 30388,
+        "power_source": "Mains (single phase)",
+        "software_build_id": "1.82.10",
+        "supported": true,
+        "type": "Router"
+    }
+]

+ 3 - 1
internal/connectors/mqtt/mqtt.go

@@ -16,7 +16,7 @@ type mqtt struct {
 }
 
 var messagePubHandler mqtt_cli.MessageHandler = func(client mqtt_cli.Client, msg mqtt_cli.Message) {
-	//fmt.Printf("Received message: %s from topic: %s\n", msg.Payload(), msg.Topic())
+	fmt.Printf("Received message: %s from topic: %s\n", msg.Payload(), msg.Topic())
 	devices.Builder(msg.Payload())
 }
 
@@ -54,6 +54,7 @@ func connect(broker string, port int) mqtt_cli.Client {
 	opts.OnConnectionLost = connectLostHandler
 	client := mqtt_cli.NewClient(opts)
 	if token := client.Connect(); token.Wait() && token.Error() != nil {
+		fmt.Println("Error")
 		panic(token.Error())
 	}
 	return client
@@ -65,6 +66,7 @@ func New(broker string, port int) mqtt {
 }
 
 func (m mqtt) SubTopic(topic string) {
+	fmt.Println("subtopic")
 	m.topics.PushBack(topic)
 	sub(m.client, topic)
 }