Post Skriptum: Mit der Firmware v2.0 kommen massive Änderungen mit der API. War früher die dimmer_config
einfach aufgebaut, so ist sie mit FW 2.0 unglaublich umfangreicher - und nicht mehr kompatibel mit Code der FW 1.x zugeschnitten ist. Und das ist nur ein Endpunkt von vielen die möglicherweise geändert haben.
Das ist alles gut und recht, bedeutet aber für uns Third-Party Entwickler umfangreiche Anpassungen am Code wenn wir hier mitziehen wollen. Der Code sollte zudem noch rückwärts kompatibel sein: Längst nicht alle Benutzer wollen ihre Dingz upgraden (oder, umgekehrt, auf die Features der neuen FW verzichten).
Zumindest etwas Vorab-Info zu den "Breaking Changes" für Entwickler von Drittlösungen wäre bei einem Release einer neuen Firmware hilfreich, v.a. in den Fällen wo die Drittlösung auf Initiative von dingz entstanden ist ...
Dimmer Config (Old)
{
"dimmers": [
{
"output": "halogen",
"name": "",
"feedback": null,
"feedback_intensity": 100
},
{
"output": "halogen",
"name": "",
"feedback": null,
"feedback_intensity": 100
},
{
"output": "halogen",
"name": "",
"feedback": null,
"feedback_intensity": 100
},
{
"output": "halogen",
"name": "",
"feedback": null,
"feedback_intensity": 100
}
]
}
Dimmer Config (New)
{
"dimmers": [
{
"active": true,
"name": "Leftie",
"type": "light",
"groups": "z",
"feedback": {
"color": "none",
"brightness": 100
},
"light": {
"dimmable": false,
"dimmer": {
"type": "linear",
"use_last_value": false,
"range": {
"min": 1,
"max": 100
},
"dynamic": {
"day": 100,
"twilight": 100,
"night": 100
}
},
"onoff": {
"group_on": {
"day": true,
"twilight": true,
"night": true
}
}
},
"heater": {
"type": "nc",
"function": "heating"
},
"pulse": {
"type": "positive",
"length": {
"min": 0.2,
"max": 0
}
},
"fan": {
"delay": {
"pre": 3,
"post": 5
},
"ventilation": {
"from": {
"hour": 7,
"minute": 0
},
"to": {
"hour": 21,
"minute": 0
},
"force_in_24": 0
},
"react": {
"pir_during_slot": false,
"btn_no_delay": false
},
"active": true
},
"garage_door": {
"opening_travel_time": 12,
"close_timeout": 60,
"pulse_time": 1
},
"valve": {
"duration": 60
}
},
{
"active": true,
"name": "Unstoppable",
"type": "light",
"groups": "z",
"feedback": {
"color": "none",
"brightness": 100
},
"light": {
"dimmable": true,
"dimmer": {
"type": "led_bulb",
"use_last_value": false,
"range": {
"min": 1,
"max": 100
},
"dynamic": {
"day": 100,
"twilight": 100,
"night": 100
}
},
"onoff": {
"group_on": {
"day": true,
"twilight": true,
"night": true
}
}
},
"heater": {
"type": "nc",
"function": "heating"
},
"pulse": {
"type": "positive",
"length": {
"min": 0.2,
"max": 0
}
},
"fan": {
"delay": {
"pre": 3,
"post": 5
},
"ventilation": {
"from": {
"hour": 7,
"minute": 0
},
"to": {
"hour": 21,
"minute": 0
},
"force_in_24": 0
},
"react": {
"pir_during_slot": false,
"btn_no_delay": false
},
"active": true
},
"garage_door": {
"opening_travel_time": 12,
"close_timeout": 60,
"pulse_time": 1
},
"valve": {
"duration": 60
}
},
{
"active": false,
"name": "Badum, tssss",
"type": "light",
"groups": "z",
"feedback": {
"color": "none",
"brightness": 100
},
"light": {
"dimmable": true,
"dimmer": {
"type": "linear",
"use_last_value": false,
"range": {
"min": 1,
"max": 100
},
"dynamic": {
"day": 100,
"twilight": 100,
"night": 100
}
},
"onoff": {
"group_on": {
"day": true,
"twilight": true,
"night": true
}
}
},
"heater": {
"type": "nc",
"function": "heating"
},
"pulse": {
"type": "positive",
"length": {
"min": 0.2,
"max": 0
}
},
"fan": {
"delay": {
"pre": 3,
"post": 5
},
"ventilation": {
"from": {
"hour": 7,
"minute": 0
},
"to": {
"hour": 21,
"minute": 0
},
"force_in_24": 0
},
"react": {
"pir_during_slot": false,
"btn_no_delay": false
},
"active": true
},
"garage_door": {
"opening_travel_time": 12,
"close_timeout": 60,
"pulse_time": 1
},
"valve": {
"duration": 60
}
},
{
"active": false,
"name": "Mo' mojo",
"type": "light",
"groups": "z",
"feedback": {
"color": "none",
"brightness": 100
},
"light": {
"dimmable": true,
"dimmer": {
"type": "linear",
"use_last_value": false,
"range": {
"min": 1,
"max": 100
},
"dynamic": {
"day": 100,
"twilight": 100,
"night": 100
}
},
"onoff": {
"group_on": {
"day": true,
"twilight": true,
"night": true
}
}
},
"heater": {
"type": "nc",
"function": "heating"
},
"pulse": {
"type": "positive",
"length": {
"min": 0.2,
"max": 0
}
},
"fan": {
"delay": {
"pre": 3,
"post": 5
},
"ventilation": {
"from": {
"hour": 7,
"minute": 0
},
"to": {
"hour": 21,
"minute": 0
},
"force_in_24": 0
},
"react": {
"pir_during_slot": false,
"btn_no_delay": false
},
"active": true
},
"garage_door": {
"opening_travel_time": 12,
"close_timeout": 60,
"pulse_time": 1
},
"valve": {
"duration": 60
}
}
]
}