{
    "bridge": {
        "name": "Dev-4",
        "username": "CA:7C:A3:34:AA:6E",
        "port": 51828,
        "pin": "784-65-426",
        "bind": "192.168.2.44"
    },
    "platforms": [
        {
            "platform": "config",
            "name": "Config",
            "port": 8080,
            "sudo": false
        }
    ],
    "disabledAccessories": [
        {
            "type": "lightbulb-ColTemp",
            "name": "Light-Temp",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "setOn": "testTempLight/setOn",
                "setBrightness": "testTempLight/setBrightness",
                "setColorTemperature": "testTempLight/setColorTemperature",
                "getColorTemperature": "testTempLight/getColorTemperature",
                "getBrightness": "testTempLight/getBrightness"
            },
            "whiteMix": true,
            "accessory": "mqttthing",
            "minColorTemperature": 130,
            "maxColorTemperature": 450
        },
        {
            "type": "lightbulb-Colour",
            "name": "Light-Colour",
            "url": "homebridge2",
            "logMqtt": true,
            "debounceRecvms": 250,
            "topics": {
                "setOn": "colour/setOn",
                "setHue": "colour/setHue",
                "setSaturation": "colour/setSaturation",
                "setBrightness": "colour/setBrightness",
                "xxsetColorTemperature": "colour/setTemperature"
            },
            "noWhiteMix": false,
            "accessory": "mqttthing"
        },
        {
            "accessory": "mqttthing",
            "type": "valve",
            "valveType": "sprinkler",
            "name": "Sprinkler",
            "url": "homebridge2",
            "topics": {
                "getActive": "test/sprinkler/getActive",
                "setActive": "test/sprinkler/setActive",
                "getInUse": "test/sprinkler/getInUse"
            },
            "integerValue": true,
            "durationTimer": true,
            "minDuration": 1,
            "maxDuration": 30
        },
        {
            "type": "television",
            "name": "Tasmota-TV",
            "url": "homebridge2",
            "logMqtt": true,
            "accessory": "mqttthing",
            "topics": {
                "setActive": "cmnd/Remote/irsend",
                "setActiveInput": "cmnd/Remote/irsend"
            },
            "inputs": [
                {
                    "name": "Input 1",
                    "value": "3249178998"
                },
                {
                    "name": "Input 2",
                    "value": "input-2-rf-code"
                },
                {
                    "name": "Input 3",
                    "value": "input-3-rf-code"
                },
                {
                    "name": "Input 4",
                    "value": "input-4-rf-code"
                }
            ],
            "codec": "json",
            "jsonCodec": {
                "fixed": {
                    "Protocol": "NEC",
                    "Bits": 32
                },
                "properties": {
                    "activeIdentifier": "Data",
                    "active": "Data"
                }
            },
            "onValue": "power-on-rf-code",
            "offValue": "power-off-rf-code"
        },
        {
            "accessory": "mqttthing",
            "type": "switch",
            "name": "Toggle Switch",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getOn": "test/toggle/get",
                "setOn": "test/toggle/set"
            },
            "codec": "toggle.js"
        },
        {
            "accessory": "mqttthing",
            "type": "doorbell",
            "name": "Door Bell",
            "url": "homebridge2",
            "caption": "Front Door Bell",
            "topics": {
                "getSwitch": {
                    "topic": "tele/RF/RESULT",
                    "apply": "return JSON.parse( message ).RfReceived.Data;"
                }
            },
            "switchValues": [
                [
                    "F1FB61"
                ]
            ],
            "restrictSwitchValues": [
                0
            ],
            "logMqtt": true
        },
        {
            "url": "homebridge2",
            "type": "switch",
            "name": "Tasmota05s",
            "logMqtt": true,
            "topics": {
                "getOnline": "tele/tasmota05s/STATE",
                "getOn": {
                    "topic": "stat/tasmota05s/RESULT",
                    "apply": "return JSON.parse( message ).POWER"
                },
                "setOn": "cmnd/tasmota05s/POWER"
            },
            "integerValue": false,
            "onValue": "ON",
            "offValue": "OFF",
            "accessory": "mqttthing"
        },        
        {
            "accessory": "mqttthing",
            "type": "lightbulb",
            "name": "Test RGB Light",
            "url": "homebridge2",
            "topics": {
                "getRGB": "test/rgblight/get",
                "setRGB": "test/rgblight/set",
                "getOn": "test/rgblight/get",
                "setOn": "test/rgblight/set"
            },
            "logMqtt": true,
            "integerValue": false,
            "codec": "json",
            "jsonCodec": {
                "properties": {
                    "on": "state.power",
                    "RGB": "state.rgb"
                },
                "fixed": {
                    "version": 1,
                    "sender": "MQTT-Thing"
                }
            }
        },
        {
            "accessory": "mqttthing",
            "type": "lightbulb-RGB",
            "name": "Winter-Light",
            "url": "homebridge2",
            "topics": {
                "getRGB": {
                    "topic": "light/get",
                    "apply": "return message.r + ',' + message.g + ',' + message.b;"
                },
                "setRGB": {
                    "topic": "light/set",
                    "apply": "let rgb = message.split(',').map( v => parseInt(v) ); return { r: rgb[0], g: rgb[1], b: rgb[2] };"
                },
                "getOn": "light/get",
                "setOn": "light/set"
            },
            "logMqtt": true,
            "codec": "json",
            "jsonCodec": {
                "properties": {
                    "on": "state",
                    "RGB": "color"
                },
                "retain": true
            },
            "onValue": "ON",
            "offValue": "OFF"
        },
        {
            "type": "statelessProgrammableSwitch",
            "name": "Hall Entry",
            "url": "homebridge2",
            "topics": {
                "getSwitch": "zigbee2mqtt/0x0017880104e6c096",
                "getBatteryLevel": "zigbee2mqtt/0x0017880104e6c096",
                "getStatusLowBattery": {
                    "topic": "zigbee2mqtt/0x0017880104e6c096",
                    "apply": "return message < 20;"
                }
            },
            "switchValues": [
                "on-press",
                "up-press",
                "down-press"
            ],
            "codec": "json",
            "jsonCodec": {
                "properties": {
                    "switch": "action",
                    "batteryLevel": "battery",
                    "statusLowBattery": "battery"
                }
            },
            "accessory": "mqttthing",
            "logMqtt": true
        },
        {
            "accessory": "mqttthing",
            "type": "custom",
            "name": "Composite",
            "url": "homebridge2",
            "logMqtt": true,
            "services": [
                {
                    "type": "switch",
                    "name": "Switch 1",
                    "topics": {
                        "getOn": "home/get/switch1/POWER",
                        "setOn": "home/set/switch1/POWER"
                    },
                    "integerValue": true
                },
                {
                    "type": "switch",
                    "name": "Switch 2",
                    "topics": {
                        "getOn": "home/get/switch2/POWER",
                        "setOn": "home/set/switch2/POWER"
                    },
                    "integerValue": true
                },
                {
                    "type": "motionSensor",
                    "name": "My PIR",
                    "topics": {
                        "getMotionDetected": "home/get/pir/STATUS",
                        "getStatusActive": "home/get/pir/ACTIVE",
                        "getStatusFault": "home/get/pir/FAULT",
                        "getStatusLowBattery": "home/get/pir/BATLOW"
                    },
                    "onValue": "MOTION",
                    "otherValueOff": true
                }
            ]
        },
        {
            "accessory": "mqttthing",
            "type": "custom",
            "name": "Flower Care",
            "url": "homebridge2",
            "logMqtt": true,
            "codec": "json",
            "jsonCodec": {
                "properties": {
                    "currentRelativeHumidity": "moisture",
                    "currentTemperature": "temperature",
                    "currentAmbientLightLevel": "light",
                    "statusLowBattery": "battery"
                }
            },
            "services": [
                {
                    "type": "humiditySensor",
                    "topics": {
                        "getCurrentRelativeHumidity": "miflora/Limone",
                        "getStatusLowBattery": {
                            "topic": "miflora/Limone",
                            "apply": "return message < 20;"
                        }
                    }
                },
                {
                    "type": "temperatureSensor",
                    "topics": {
                        "getCurrentTemperature": "miflora/Limone",
                        "getStatusLowBattery": {
                            "topic": "miflora/Limone",
                            "apply": "return message < 20;"
                        }
                    }
                },
                {
                    "type": "lightSensor",
                    "topics": {
                        "getCurrentAmbientLightLevel": "miflora/Limone",
                        "getStatusLowBattery": {
                            "topic": "miflora/Limone",
                            "apply": "return message < 20;"
                        }
                    }
                }
            ]
        },
        {
            "accessory": "mqttthing",
            "type": "statelessProgrammableSwitch",
            "name": "4 Way Switch",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getOnline": "zigbee2mqtt/bridge/state",
                "getSwitch": "zigbee2mqtt/0x04cf8cdf3c791ad9"
            },
            "switchValues": [
                "button_1_single",
                "button_1_double",
                "button_1_hold"
            ],
            "codec": "json",
            "jsonCodec": {
                "properties": {
                    "switch": "action"
                }
            }
        },
        {
            "accessory": "mqttthing",
            "type": "statelessProgrammableSwitch",
            "name": "Multi-switch",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getSwitch": [ {
                    "topic": "test/multiswitch",
                    "apply": "let msg = JSON.parse( message ); if( msg.id === 1 ) { return msg.state; }"
                }, {
                    "topic": "test/multiswitch",
                    "apply": "let msg = JSON.parse( message ); if( msg.id === 2 ) { return msg.state; }"
                },
                "test/multiswitch3$.state" ]
            }
        },
        {
            "type": "lightbulb-RGBWW",
            "name": "Test RGBWW Light",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getRGBWW": "test/rgbwwlight/rgb",
                "setRGBWW": "test/rgbwwlight/rgb/set"
            },
            "noWhiteMix": true,
            "accessory": "mqttthing"
        },
        {
            "type": "fan",
            "name": "Test Fan",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getRotationDirection": "test/fan/getRotationDirection",
                "setRotationDirection": "test/fan/setRotationDirection",
                "setRotationSpeed": "test/fan/setRotationSpeed",
                "getRotationSpeed": "test/fan/getRotationSpeed",
                "setOn": "test/fan/setOn",
                "getOn": "test/fan/getOn"
            },
            "integerValue": true,
            "accessory": "mqttthing",
            "optimizePublishing": true
        },
        {
            "accessory": "mqttthing",
            "type": "battery",
            "name": "Test Battery",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getBatteryLevel": "battery/level",
                "getStatusLowBattery": "battery/low"
            }
        },
        {
            "type": "lightbulb-RGBWW",
            "name": "Test RGBWW",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "setRGBWW": "rgbww/rgbww",
                "setOn": "rgbww/on"
            },
            "switchWhites": true,
            "accessory": "mqttthing"
        },
        {
            "type": "thermostat",
            "name": "Termostat",
            "url": "homebridge2",
            "topics": {
                "getCoolingThresholdTemperature": "/termostat/espSogutmaEsik",
                "setCoolingThresholdTemperature": "/termostat/homekitSogutmaEsik",
                "getCurrentHeatingCoolingState": "/termostat/espIsitiliyorSogutuluyor",
                "getCurrentRelativeHumidity": "/termostat/espnem",
                "getTargetRelativeHumidity": "/termostat/gettarghum",
                "setTargetRelativeHumidity": "/termostat/settarghum",
                "getCurrentTemperature": "/termostat/espSicaklik",
                "getHeatingThresholdTemperature": "/termostat/espIsitmaEsik",
                "setHeatingThresholdTemperature": "/termostat/homekitIsitmaEsik",
                "getTargetHeatingCoolingState": "/termostat/espDurumu",
                "setTargetHeatingCoolingState": "/termostat/homekitDurumu",
                "getTargetTemperature": "/termostat/espHedefSicaklik",
                "setTargetTemperature": "/termostat/homekitHedefSicaklik"
            },
            "confirmationPeriodms": 1500,
            "logMqtt": true,
            "accessory": "mqttthing"
        },
        {
            "type": "lightbulb-RGBWW",
            "name": "Office Lamp 1",
            "url": "homebridge2",
            "topics": {
                "setRGBWW": "15858303/RGBWW",
                "setOn": "15858303/State"
            },
            "integerValue": true,
            "whiteMix": false,
            "accessory": "mqttthing"
        },
        {
            "type": "lightbulb-RGBWW",
            "name": "Office Lamp 2",
            "url": "homebridge2",
            "topics": {
                "setRGBWW": "8387/RGBWW",
                "setOn": "8387/State"
            },
            "integerValue": true,
            "whiteMix": false,
            "accessory": "mqttthing"
        },
        {
            "type": "lightbulb-White",
            "name": "LightDim255",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getWhite": "light255/get",
                "setWhite": "light255/set"
            },
            "whiteMix": true,
            "accessory": "mqttthing"
        },
        {
            "accessory": "mqttthing",
            "type": "airQualitySensor",
            "name": "Air Quality",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getAirQuality": "test/airquality",
                "getCurrentTemperature": "test/aqTemp"
            },
            "airQualityValues": [ "0", "1", "2", "3", "4", "5" ],
            "history": true,
            "room2": true
        },
        {
            "accessory": "mqttthing",
            "type": "occupancySensor",
            "name": "Occupancy Sensor",
            "url": "homebridge2",
            "logMqtt": true,
            "topics": {
                "getOccupancyDetected": "test/occupancy"
            }
        }, {
            "name": "AMAX",
            "accessory": "mqttthing",
            "url": "homebridge2",
            "username": "user",
            "password": "passwd",
            "type": "securitySystem",
            "codec": "shellyAMAX",
            "ShellyGen": 1,
            "AMAX": {
                "setState": {
                    "Armed": {
                        "name": "shellies/shellyuni-98CDAC25XXXX",
                        "id": 0,
                        "ACTIVE": "on"
                    },
                    "Disarmed": {
                        "name": "shellies/shellyuni-98CDAC25XXXX",
                        "id": 0,
                        "ACTIVE": "on"
                    }
                },
                "getState": {
                    "Armed": {
                        "name": "shellies/shellyuni-98CDAC25XXXX",
                        "id": 0,
                        "ACTIVE": 1
                    },
                    "Triggered": {
                        "name": "shellies/shellyuni-98CDAC25XXXX",
                        "id": 1,
                        "ACTIVE": 0
                    },
                    "AltTriggered": {
                        "name": "shellies/shellyuni-98CDAC25XXXX",
                        "id": 1,
                        "ACTIVE": 1
                    }
                }
            },
            "targetStateValues": [
                "SA",
                "AA",
                "NA",
                "D"
            ],
            "currentStateValues": [
                "SA",
                "AA",
                "NA",
                "D",
                "T"
            ],
            "restrictTargetState": [
                1,
                3
            ],
            "logMqtt": true
        }, {
            "accessory": "mqttthing",
            "type": "door",
            "name": "Door",
            "url": "homebridge2",
            "logMqtt": "true",
            "topics": {
                "getCurrentPosition": "test/door/getCurrentPosition",
                "setTargetPosition": "test/door/setTargetPosition",
                "getPositionState": "test/door/getPositionState"
            },
            "minPosition": 10,
            "maxPosition": 60
        }, {
            "type": "weatherStation",
            "name": "WeatherPI",
            "topics": {
                "getAirPressure": "weatherstation/getAirPressure",
                "getRain1h": "weatherstation/getRain1h",
                "getRain24h": "weatherstation/getRain24h",
                "getWindDirection": "weatherstation/getWindDirection",
                "getWindSpeed": "weatherstation/getWindSpeed",
                "getCurrentRelativeHumidity": "weatherstation/getCurrentRelativeHumidity",
                "getCurrentTemperature": "weatherstation/getCurrentTemperature"
            },
            "history": true,
            "accessory": "mqttthing"
        }
    ],
    "accessories": [
        {
            "type": "outlet",
            "name": "Test Outlet",
            "url": "homebridge2",
            "topics": {
                "setOn": "test/outlet/on",
                "getInUse": "test/outlet/inuse",
                "getWatts": "test/outlet/watts",
                "getVolts": "test/outlet/voltage",
                "getAmperes": "test/outlet/amps"
            },
            "accessory": "mqttthing",
            "logMqtt": true,
            "minVolts": 0,
            "maxVolts": 30
        },
        {
            "accessory": "mqttthing",
            "type": "lightbulb",
            "url": "homebridge2",
            "name": "Escalier",
            "topics": {
                "getOn": {
                    "topic": "test/Escalier",
                    "apply": "return JSON.parse(message).state_right"
                },
                "setOn": "test/Escalier/right/set",
                "getOnline": {
                    "topic": "zigbee2mqtt/boutonentree2/availability",
                    "apply": "return message == 'online' ? 'ON' : 'OFF';"
                }
            },
            "logMqtt": true,
            "integerValue": false,
            "onValue": "ON",
            "offValue": "OFF",
            "turnOffAfterms": "120000",
            "onlineValue": "ON",
            "offlineValue": "OFF"
        }, {
            "accessory": "mqttthing",
            "type": "lightbulb",
            "url": "homebridge2",
            "name": "Simple light",
            "topics": {
                "getOn": "fake/light/getOn",
                "setOn": "fake/light/setOn"
            },
            "integerValue": true,
            "logMqtt": true
        }
    ]
}
