Hallo Gemeinde
Habe einen Shelly2 Plus Pm mit einem LED Deckenpanel und zwei Hue Spots verbunden. Hue auf Kanal1 LED Kanal2 soweit so gut lassen sich beide per Alexa steuern Kanal2 auch über Schalter und App.Kanal1 weil es ja Hue Spots sind über Skript angesteuert geht dann auch per Schalter und App.Jetzt kommt das Problem das wenn das Skript läuft sich die Hue Spots die als Gruppe zusammen laufen sich alle 60sec. Ein und Ausschalten woran kann es liegen der Shelly ist ganz neu.
Hier noch das Skript was ich da laufen habe. Ein Bild von eventuell verschwundenen Szenen hab ich auch gemacht aber da seht keine drin.
/**
* @copyright shelly-tools contributors
* @license GNU Affero General Public License (https://www.gnu.org/licenses/agpl-3.0.de.html)
* @authors https://github.com/shelly-tools/s…hs/contributors
*
* This script is intended to toggle on/Off a Light connected to a Phillips HuE Bridge.
*
*/
// CONFIG START
let CONFIG = {
ip: '192.168.178.44', //Hue Bridge IP
user: '6TIp9tOnlO0D2C7c9TAYbNui2FbGdYTJP5zNki3Y', //Hue Bridge API user
group: '82', // Hue Group ID
input1: 0, // Shelly switch ID
};
// CONFIG END
Shelly.addStatusHandler(function (e) {
if (e.delta.id === CONFIG.input1) {
Shelly.call(
"http.request", {
method: "GET",
url: 'http://' + CONFIG.ip + '/api/' + CONFIG.user + '/groups/' + CONFIG.group,
},
function (res, error_code, error_message, ud) {
let st = JSON.parse(res.body);
if (st.state.any_on === true) {
Toggle("false");
} else {
Toggle("true");
}
},
null
);
}
});
function Toggle(state) {
let b = '{"on": ' + state + '}';
Shelly.call(
"http.request", {
method: "PUT",
url: 'http://' + CONFIG.ip + '/api/' + CONFIG.user + '/groups/' + CONFIG.group + '/action',
body: b
},
function (r, e, m) {
},
null
);
}