Diese Menüvielfalt, ich bin blind
Где находится Devices with BL0942 power meter chip: Enable zero-cross synchronized output operation
VPN/Proxy erkannt
Es scheint, dass Sie einen VPN- oder Proxy-Dienst verwenden. Bitte beachten Sie, dass die Nutzung eines solchen Dienstes die Funktionalität dieser Webseite einschränken kann.
Diese Menüvielfalt, ich bin blind
Где находится Devices with BL0942 power meter chip: Enable zero-cross synchronized output operation
Leider kann ich keine Scripte basteln.
Moin und ich werde mal versuchen, einen vernünftigen Script hierzu zu entwerfen, da ich im Moment auch eine solche Baustelle (3 Lichtreihen mit Pro Dimmer) habe und ungern nur ein Dreifach-Taster einbauen möchte. Dauert aber bestimmt bis nächstes WE
Es ist etwas aufwendig, die Zeit von von button_hold zu ermitteln und in einem Script auszuwerten und die Dimm-Richtung und -Dauer dann zu senden. Es dauert wesentlich länger mit einem solchen Script den Dimmer zu bedienen. Einfacher ist es mit Actionen im Gen3-Gerät zu händeln.
Füge den BLU-Button mit BTHome in deinen Dimmer ein und lege dann Actionen an. Ich nutze z.B.
Taste 1 mit single_push zum An/Ausschalten (Light.Toggle)
Taste 1 mit long_push zum Hochdimmen bis 100% (Light.DimUp)
Taste 2 mit single_push für Light.DimStop
Taste 2 mit long_push für Runterdimmen bis 1% (Light.DimDown)
Dies lässt sich sogar die Hausfrau merken und funktioniert am Pro Dimmer bisher ganz gut bis auf das Problem, dass der Dimmer Angeschalten bleibt, wenn unter das eingestellte Minimum gedimmt wird und bei 1% immer noch Strom zieht, obwohl die Lampe Ausgeschalten aussieht. Hierfür gibt es aber ein Schript, der die Lampe entweder richtig ausschaltet oder nur bis zum Minimum dimmt und den DimStop auslöst. Da ich dies bisher nur am Pro Dimmer testen konnte, würde mich dies auch interessieren, ob das am Dali- sowie 0-10Volt-Dimmer auch ein Prob ist oder der jeweilige Script hilft.
Ein Script ist dafür nicht unbedingt nötig, dies sollte beim Aufruf des DimUp- und DimDown-Aufruf verknüpfbar sein bzw. parallel aufrufbar sein.
Habe es noch nicht getestet aber probier mal mit der Anleitung aus https://shelly-api-docs.shelly.cloud/gen2/Component…/Light#lightset
und sollte der Dimmwert kleiner als min_brigtness sein, wird der Dimmwert auf min_brightness gesetzt.
Ja ok, das macht auch Sinn und dann könnte der Script so aussehen
Shelly.call("Shelly.GetConfig", {}, function(result){
let Gain = result['light:0'].min_brightness_on_toggle;
console.log("Minimum: ", Gain,"%");
Timer.set(1000, true, function() {
Shelly.call("Light.GetStatus", {'id': 0}, function(response){
let Helligkeit = response.brightness;
let Ausgang = response.output;
let Leistung = response.apower;
console.log("Licht Dimmung: ", Helligkeit,"% Verbrauch: ", Leistung, " Watt");
if(Helligkeit < Gain && Ausgang === true) {
Shelly.call("Light.DimStop", {'id': 0});
Shelly.call("Light.Set", {'id': 0, 'on': true, 'brightness': Gain});
console.log("Minimale Dimmstufe erreicht");
}
});
});
});
Alles anzeigen
und die Timerzeit darf dann aber nicht bei 15000 Millisekunden bleiben
Der Script, den ich für den Pro Dimmer geschrieben habe, um den Kanal auszuschalten, wenn unter das Minimum gedimmt wird, sollte im Gen3 Dimmer auch funktionieren.
https://github.com/ThellyHRO/loca…r1PM_min_off.js
Ich habe nicht alle Dimmerversionen vorrätig zum Testen
Der Gen 3 hatt alle Gen2 uns Gen3 Features drinnen.
ich lese aber auch, dass das Add-On nicht unterstützt wird oder doch?
Moin und soweit ist BTHome wohl noch nicht, könnte aber durchaus möglich werden.
SetConfig mal weiter beobachten
https://shelly-api-docs.shelly.cloud/gen2/DynamicCo…tconfig-example
Aber ich habe jetzt etwas gefunden, das macht mich glücklich
Das ist schön, wenn man was findet
Um den kompletten i4 von einer Webseite zu triggern, gibt es seit einer ganzen Weile schon eine Webseite welche auf dem Anzeigegerät gespeichert werden kann oder auch etwas abgespeckt direkt auf dem i4
Ja das geht mit dem Script nach Anpassung der Mac des BLU-Button, bzw wenn der Script nicht auf dem i4 liegt mit Anpassung der IP des i4 statt hier localhost:
/**
* This script lets you use your Gen2 device as a gateway between Shelly BLU Wall Switch 4 and other Shelly devices (no matter Gen1 or Gen2)
* by sending local requests by their local IP APIs.+
* Based on the blu Button-Script
* Script modifed by Joachim Reiter 2024
*
* What you should change before using it:
* > bluButtonAddress -> You should put the mac address of your blu button here.
* This script will help you find the mac address: https://github.com/ALLTERCO/shelly-script-examples/blob/main/ble-shelly-scanner.js
*
* > actions -> You should put the urls here to be executed at the specified event. Urls that shoudl be called on single/short push
* of the button, must be placed in the singlePush object. This applies to the double and triple push as well. Example below.
*
* Limitations:
* > At the moment there is a limit of 5 RPC calls at the same time and because of this, the script will execute every 3 urls with a 1 second delay.
* Limitations can be check here: https://shelly-api-docs.shelly.cloud/gen2/Scripts/ShellyScriptLanguageFeatures#resource-limits
*
* > The order of the execution of the urls can't be guaranteed
*/
/** =============================== CHANGE HERE =============================== */
let CONFIG = {
bluButtonAddress: "38:39:8f:ab:77:e5", //the mac address of shelly blu Wall Switch 4 that will trigger the actions
actions: [{ //urls to be called on a event Button 1
//when adding urls you must separate them with commas and put them in quotation marks
singlePush: [ //urls that will be executed at singlePush event from the blu button
"http://localhost/rpc/input.trigger?id=0&event_type=single_push"
],
doublePush: [ //urls that will be executed at doublePush event from the blu button
"http://localhost/rpc/input.trigger?id=0&event_type=double_push"
],
triplePush: [ //urls that will be executed at triplePush event from the blu button
"http://localhost/rpc/input.trigger?id=0&event_type=triple_push"
],
longPush: [ //urls that will be executed at longPush event from the blu button
"http://localhost/rpc/input.trigger?id=0&event_type=long_push"
]
},
{ //urls to be called on a event on Button 2
//when adding urls you must separate them with commas and put them in quotation marks
singlePush: [ //urls that will be executed at singlePush event from the blu button
"http://localhost/rpc/input.trigger?id=1&event_type=single_push"
],
doublePush: [ //urls that will be executed at doublePush event from the blu button
"http://localhost/rpc/input.trigger?id=1&event_type=double_push"
],
triplePush: [ //urls that will be executed at triplePush event from the blu button
"http://localhost/rpc/input.trigger?id=1&event_type=triple_push"
],
longPush: [ //urls that will be executed at longPush event from the blu button
"http://localhost/rpc/input.trigger?id=1&event_type=long_push"
]
},
{ //urls to be called on a event on Button 3
//when adding urls you must separate them with commas and put them in quotation marks
singlePush: [ //urls that will be executed at singlePush event from the blu button
"http://localhost/rpc/input.trigger?id=2&event_type=single_push"
],
doublePush: [ //urls that will be executed at doublePush event from the blu button
"http://localhost/rpc/input.trigger?id=2&event_type=double_push"
],
triplePush: [ //urls that will be executed at triplePush event from the blu button
"http://localhost/rpc/input.trigger?id=2&event_type=triple_push"
],
longPush: [ //urls that will be executed at longPush event from the blu button
"http://localhost/rpc/input.trigger?id=2&event_type=long_push"
]
},
{ //urls to be called on a event on Button 4
//when adding urls you must separate them with commas and put them in quotation marks
singlePush: [ //urls that will be executed at singlePush event from the blu button
"http://localhost/rpc/input.trigger?id=3&event_type=single_push"
],
doublePush: [ //urls that will be executed at doublePush event from the blu button
"http://localhost/rpc/input.trigger?id=3&event_type=double_push"
],
triplePush: [ //urls that will be executed at triplePush event from the blu button
"http://localhost/rpc/input.trigger?id=3&event_type=triple_push"
],
longPush: [ //urls that will be executed at longPush event from the blu button
"http://localhost/rpc/input.trigger?id=3&event_type=long_push"
]
}]
};
/** =============================== STOP CHANGING HERE =============================== */
let urlsPerCall = 3;
let urlsQueue = [];
let callsCounter = 0;
let ALLTERCO_MFD_ID_STR = "0ba9";
let BTHOME_SVC_ID_STR = "fcd2";
let uint8 = 0;
let int8 = 1;
let uint16 = 2;
let int16 = 3;
let uint24 = 4;
let int24 = 5;
let BTH = {};
BTH[0x00] = { n: "pid", t: uint8 };
BTH[0x01] = { n: "Battery", t: uint8, u: "%" };
BTH[0x05] = { n: "Illuminance", t: uint24, f: 0.01 };
BTH[0x1a] = { n: "Door", t: uint8 };
BTH[0x20] = { n: "Moisture", t: uint8 };
BTH[0x2d] = { n: "Window", t: uint8 };
BTH[0x3a] = { n: "Button", t: uint8, b: 1 };
function getByteSize(type) {
if (type === uint8 || type === int8) return 1;
if (type === uint16 || type === int16) return 2;
if (type === uint24 || type === int24) return 3;
//impossible as advertisements are much smaller;
return 255;
}
let BTHomeDecoder = {
utoi: function (num, bitsz) {
let mask = 1 << (bitsz - 1);
return num & mask ? num - (1 << bitsz) : num;
},
getUInt8: function (buffer) {
return buffer.at(0);
},
getInt8: function (buffer) {
return this.utoi(this.getUInt8(buffer), 8);
},
getUInt16LE: function (buffer) {
return 0xffff & ((buffer.at(1) << 8) | buffer.at(0));
},
getInt16LE: function (buffer) {
return this.utoi(this.getUInt16LE(buffer), 16);
},
getUInt24LE: function (buffer) {
return (
0x00ffffff & ((buffer.at(2) << 16) | (buffer.at(1) << 8) | buffer.at(0))
);
},
getInt24LE: function (buffer) {
return this.utoi(this.getUInt24LE(buffer), 24);
},
getBufValue: function (type, buffer) {
if (buffer.length < getByteSize(type)) return null;
let res = null;
if (type === uint8) res = this.getUInt8(buffer);
if (type === int8) res = this.getInt8(buffer);
if (type === uint16) res = this.getUInt16LE(buffer);
if (type === int16) res = this.getInt16LE(buffer);
if (type === uint24) res = this.getUInt24LE(buffer);
if (type === int24) res = this.getInt24LE(buffer);
return res;
},
unpack: function (buffer) {
//beacons might not provide BTH service data
if (typeof buffer !== "string" || buffer.length === 0) return null;
let result = {};
let _dib = buffer.at(0);
result["encryption"] = _dib & 0x1 ? true : false;
result["BTHome_version"] = _dib >> 5;
if (result["BTHome_version"] !== 2) return null;
//can not handle encrypted data
if (result["encryption"]) return result;
buffer = buffer.slice(1);
let _bth;
let _value;
let _name;
let _btnNum = 0;
while (buffer.length > 0) {
_bth = BTH[buffer.at(0)];
if (typeof _bth === "undefined") {
console.log("BTH: unknown type");
break;
}
buffer = buffer.slice(1);
_value = this.getBufValue(_bth.t, buffer);
if (_value === null) break;
if (typeof _bth.f !== "undefined") _value = _value * _bth.f;
_name = _bth.n;
if (typeof _bth.b !== "undefined"){
_name = _name + _btnNum.toString();
_btnNum++;
}
result[_name] = _value;
buffer = buffer.slice(getByteSize(_bth.t));
}
return result;
},
};
function callQueue() {
if(callsCounter < 6 - urlsPerCall) {
for(let i = 0; i < urlsPerCall && i < urlsQueue.length; i++) {
let url = urlsQueue.splice(0, 1)[0];
callsCounter++;
Shelly.call("HTTP.GET", {
url: url,
timeout: 5
},
function(_, error_code, _, data) {
if(error_code !== 0) {
console.log("Calling", data.url, "failed");
}
else {
console.log("Calling", data.url, "successed");
}
callsCounter--;
},
{ url: url }
);
}
}
//if there are more urls in the queue
if(urlsQueue.length > 0) {
Timer.set(
1000, //the delay
false,
function() {
callQueue();
}
);
}
}
let lastPacketId = 0x100;
function bleScanCallback(event, result) {
//exit if the call is not for a received result
if (event !== BLE.Scanner.SCAN_RESULT) {
return;
}
//exit if the data is not coming from a Shelly Blu button1 and if the mac address doesn't match
if ( typeof result.local_name === "undefined" ||
typeof result.addr === "undefined" ||
result.local_name.indexOf("SBBT") !== 0 ||
result.addr !== CONFIG.bluButtonAddress
) {
return;
}
let servData = result.service_data;
//exit if service data is null/device is encrypted
if(servData === null || typeof servData === "undefined" || typeof servData[BTHOME_SVC_ID_STR] === "undefined") {
console.log("Can't handle encrypted devices");
return;
}
let receivedData = BTHomeDecoder.unpack(servData[BTHOME_SVC_ID_STR]);
//exit if unpacked data is null or the device is encrypted
if(receivedData === null || typeof receivedData === "undefined" || receivedData["encryption"]) {
console.log("Can't handle encrypted devices");
return;
}
//exit if the event is duplicated
if (lastPacketId === receivedData.pid) {
return;
}
//console.log("rd:",receivedData);
lastPacketId = receivedData["pid"];
for (button = 0; button < 4; button++) {
let _bpush = receivedData["Button"+button.toString(0)];
if (_bpush === 254) _bpush = 0; // ggf 5 für hold
//getting and execuing the action
let actionType = ["", "singlePush", "doublePush", "triplePush", "longPush", "hold"][_bpush];
let actionUrls = CONFIG.actions[button][actionType];
//exit if the event doesn't exist in the config
if(typeof actionType === "undefined") {
console.log("Unknown event type in the config");
return;
}
//save all urls into the queue for the current event
for(let i in actionUrls) {
urlsQueue.push(actionUrls[i]);
}
callQueue();
}
}
function bleScan() {
//check whether the bluethooth is enabled
let bleConfig = Shelly.getComponentConfig("ble");
//exit if the bluetooth is not enabled
if(bleConfig.enable === false) {
console.log("BLE is not enabled");
return;
}
//start the scanner
let bleScanner = BLE.Scanner.Start({
duration_ms: BLE.Scanner.INFINITE_SCAN,
active: true
});
//exist if the scanner can not be started
if(bleScanner === false) {
console.log("Error when starting the BLE scanner");
return;
}
BLE.Scanner.Subscribe(bleScanCallback);
console.log("BLE is successfully started");
}
function init() {
//exit if there isn't a config
if(typeof CONFIG === "undefined") {
console.log("Can't read the config");
return;
}
//exit if there isn't a blu button address
if(typeof CONFIG.bluButtonAddress !== "string") {
console.log("Error with the Shelly BLU button1's address");
return;
}
//exit if there isn't action object
if(typeof CONFIG.actions === "undefined") {
console.log("Can't find the actions object in the config");
return;
}
//start the ble scan
bleScan();
}
//init the script
init();
Alles anzeigen
Shelly bietet (ich weis garnicht ob das noch aktuell ist) für jedes Walldisplay ein Promocode für einen Blu H&T in der App an.
Habe mit dem Promocode den H&T erhalten und bekomme in der App noch immer den Text mit Code angezeigt. Geht vermutlich erst weg, wenn ich den H&T nutze
Am Mini Gen3 auch über das + hinter BTHome
Hallo und für die BLU-Taster gibt es noch kein Script, der Script von SevenofNine müsste total verändert/angepasst werden, was etwas dauern dürfte.
BLU-Taster gehen derzeit nur und relativ sicher über die Aktionen am Gen3 oder Pro Gerät, wie AlexAn schon aufgezeigt hat. Welche Befehle du in die Aktionen eintragen musst, schreib ich gleich mal für Dimmer2 und Pro Dimmer..
http://Dimmer2-IP/light/0?turn=toggle single_push auf Taste 1
http://localhost/rpc/Light.Toggle?id=0 Befehl auf Pro Dimmer
http://Dimmer2-IP/light/0?dim=stop single_push auf Taste 2
http://localhost/rpc/Light.DimStop?id=0 Befehl auf Pro Dimmer
http://Dimmer2-IP/light/0?dim=down&step=100 long_push auf Taste 2
http://localhost/rpc/Light.DimDown?id=0&fade_rate=(ggf. Geschwindigkeit 1-5)
http://Dimmer2-IP/light/0?dim=up&step=100 long_push auf Taste 1
http://localhost/rpc/Light.DimUp?id=0&fade_rate=(Geschwindigkeit 1=langsam ... 5=schnell)
http://Dimmer2-IP/light/0?turn=on&timer=(Sekunden) ggf. auf freier Taste(r Kombination)
http://localhost/rpc/Light.Set?id=0&on=true&toggle_after=(Sekunden)
http://Dimmer2-IP/light/0?turn=on&brightness=(Helligkeit)
http://localhost/rpc/Light.Set?id=0&on=true&brightness=(Helligkeit)
http://Dimmer2-IP/light/0?brightness=(Helligkeit ohne Anschalten)
http://localhost/rpc/Light.Set?id=0&brightness=(Helligkeit)
Für den Pro Dimmer habe ich noch einen Ausschaltscript, wenn unter das Minimum gedimmt wird. Ob das für andere Dimmer auch nötig ist, muss ich in einer Musezeit mal nachsehn
https://github.com/ThellyHRO/loca…r2PM_min_off.js
Der Script kann in andere Scripte auch als Funktion eingefügt werden.
Kannst du mir mal Screenshot machen wo?
im freien Platz den Blu Wall Switch 4 einstecken? Der braucht doch keinerlei Loch in der Wand
Genau so ist das und würde funktionieren
Wenn dein Rollo mit einem Plus 2PM gesteuert wird wie bei mir, kannst du den Script einsetzen
https://github.com/ThellyHRO/loca…r-BLU-Button.js
Funktioniert auch mit Handschuhen vom Lenker aus
Bin ich tatsächlich der erste, der so eine einfache "Comforttaste" für seine Jalousien wünscht😁🫣 ich hätte Rolladen einbauen sollen, da wäre das Problem keines 😄😄😄
Nö, aber mit einem Script kannst du die Positition jedes Rollos abfragen und dann bei 0% den Event des i4 ausführen..
Fertig habe ich den Script nicht, da ich gerade anderes bastel, fehlt mir auch die Zeit zum Schreiben.
Viel Erfolg trotzdem https://shelly-api-docs.shelly.cloud/gen2/Component…dpoint-rollerid
Für den ersten Test klappt das Wetter.
Und Radio lässt sich auch ausschalten bzw. pausieren, nur wenn man Ruhe haben will