arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.96k stars 4.77k forks source link

Warning message Shelly RGBW2 with Tasmota 13.2.0.1 #20124

Closed Kludi2019 closed 9 months ago

Kludi2019 commented 9 months ago

Thank you for your great work!

Read-only state "sonoff.0.Treppenlicht.Channel2" has been written without ack-flag with value "40" Jason Script:

on({ id: [].concat(['sonoff.0.LDR_Sd_Terr.BH1750_Illuminance']), change: 'any', ack: true }, async (obj) => { let value = obj.state.val; let oldValue = obj.oldState.val; // Wert zwischen 10 und 8 if (getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val <= 10 && getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val >= 8 && getState('Lichtschalter.0.Außenbeleuchtung_Treppe').val == false) { if (getState('sonoff.0.Treppenlicht.Channel1').val != 10) { console.warn(getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val); setState('sonoff.0.Treppenlicht.Channel1' / Helligkeit_7 /, 10); setState('sonoff.0.Treppenlicht.Channel2' / Helligkeit_Tr /, 10); } } else if (getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val <= 7 && getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val >= 6 && getState('Lichtschalter.0.Außenbeleuchtung_Treppe').val == false) { if (getState('sonoff.0.Treppenlicht.Channel1').val != 20) { setState('sonoff.0.Treppenlicht.Channel1' / Helligkeit_7 /, 20, true); setState('sonoff.0.Treppenlicht.Channel2' / Helligkeit_Tr /, 20, true); } } else if (getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val <= 5 && getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val >= 4 && getState('Lichtschalter.0.Außenbeleuchtung_Treppe').val == false) { if (getState('sonoff.0.Treppenlicht.Channel1').val != 30) { setState('sonoff.0.Treppenlicht.Channel1' / Helligkeit_7 /, 30); setState('sonoff.0.Treppenlicht.Channel2' / Helligkeit_Tr /, 30); } } else if (getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val <= 3 && getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val >= 2 && getState('Lichtschalter.0.Außenbeleuchtung_Treppe').val == false) { if (getState('sonoff.0.Treppenlicht.Channel1').val != 40) { setState('sonoff.0.Treppenlicht.Channel1' / Helligkeit_7 /, 40); setState('sonoff.0.Treppenlicht.Channel2' / Helligkeit_Tr /, 40); } } else if (getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val <= 1 && getState('Lichtschalter.0.Außenbeleuchtung_Treppe').val == false) { if (getState('sonoff.0.Treppenlicht.Channel1').val != 66) { setState('sonoff.0.Treppenlicht.Channel1' / Helligkeit_7 /, 66); setState('sonoff.0.Treppenlicht.Channel2' / Helligkeit_Tr /, 40); } } else if (getState('sonoff.0.LDR_Sd_Terr.BH1750_Illuminance').val > 11 && getState('Lichtschalter.0.Außenbeleuchtung_Treppe').val == false) { if (getState('sonoff.0.Treppenlicht.Channel1').val > 0) { setState('sonoff.0.Treppenlicht.Channel1' / Helligkeit_7 /, 0); setState('sonoff.0.Treppenlicht.Channel2' / Helligkeit_Tr /, 0); sendTo("telegram", "send", { text: 'Treppenbeleuchtung auf 0% gesetzt und ausgeschaltet', disable_notification: true }); } } });

Here a Shelly RGBW2 is controlled with one output on the staircase light and the other output on the house number, each with adjustment of the dimmer using measured brightness “LDR_Sd_Terr xxx.

In the first „if“ the channel is set to 10% without the ack flag. This control works, but produces the warning message: Read-only state "sonoff.0.Streppenlicht.Channel2" has been written without ack-flag with value "10".

In the second if the channel is set to 20% with ack flag. This control does not work and does not produce a warning message.

Is there an explanation for this?

Thank you Gerhard

sfromis commented 9 months ago

I don't see how that relates to Tasmota.

Kludi2019 commented 9 months ago

Sorry, the Shelly has tasmota firmware 13.2.0.1 and no Shelly firmware.

sfromis commented 9 months ago

What I meant is that that the script you posted is not from Tasmota, and you mention no details about what may or may not be happening in Tasmota.