Closed smartboart closed 1 year ago
I suggest you fill in the mandatory fields requested when you openend this issue.
Currently it's a big guess what switches you have.
Sorry, i thought this is clear....I have about 20 devices.. Wemo D1 Mini, ESP32 Olimex and NodeMCU. In all devices i have standard external switches configurated as switch and motion sensors also conifgurated as switch. All these gpios which are configurated as switch are not working. All gpios configurated as buttons are still working. Even I²C Sensors and rules are still working... Some switches are standart linked to relais some not linked to a relay / detached ..But this makes no difference.
Please post one exact setup which is not working. Use the template, you have deleted, and provide ALL info asked there. Without providing this data we can't help.
DO NOT DELETE ANY TEXT from this template! Otherwise the issue will be auto-closed. -->
_A clear and concise description of what the problem is. After the upgrade from Percy to Peter, all devices will not read gpios with connected switch. All action on the hardware switch is not recognized. It makes no difference if the switch is detached fromrelay or linked to a relay like it is in standard configuration. Even if it is a wemo D1 mini, a Node MCU or a ESP32 Olimex POE Modul. All my devices have the same issue after upgrade to Peter. Here is a example of a Wemo Config which is linked to Relay...
After downgrade to Percy everything is fine again.
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:
Configuration output here:
11:06:09.007 CMD: Backlog Template; Module; GPIO 255
11:06:09.094 MQT: stat/sonoff/RESULT = {"NAME":"Generic","GPIO":[1,1,1,1,1,1,1,1,1,1,1,1,1,1],"FLAG":0,"BASE":18}
11:06:09.294 MQT: stat/sonoff/RESULT = {"Module":{"18":"Generic"}}
11:06:09.500 MQT: stat/sonoff/RESULT = {"GPIO0":{"640":"I2C SDA"},"GPIO1":{"0":"None"},"GPIO2":{"608":"I2C SCL"},"GPIO3":{"0":"None"},"GPIO4":{"257":"Relay_i2"},"GPIO5":{"256":"Relay_i1"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"97":"Button_i2"},"GPIO13":{"0":"None"},"GPIO14":{"162":"Switch3"},"GPIO15":{"0":"None"},"GPIO16":{"226":"Relay3"},"GPIO17":{"0":"None"}}
- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
Rules output here:
11:08:22.370 CMD: rule1
11:08:22.378 MQT: stat/sonoff/RESULT = {"Rule1":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":142,"Free":369,"Rules":"on switch8#state=1 do publish stat/sonoff/RESULT {\"POWER8\":\"ON\"} endon on switch8#state=0 do publish stat/sonoff/RESULT {\"POWER8\":\"OFF\"} endon"}}
11:08:52.282 CMD: rule2
11:08:52.290 MQT: stat/sonoff/RESULT = {"Rule2":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":149,"Free":362,"Rules":"ON button2#state=10 DO power1 2 ENDON ON button2#state=11 DO power2 2 ENDON ON button2#state=3 DO power2 2 ENDON ON button2#state=3 DO power1 2 ENDON"}}
11:09:16.651 CMD: rule3
11:09:16.660 MQT: stat/sonoff/RESULT = {"Rule3":{"State":"OFF","Once":"OFF","StopOnError":"OFF","Length":75,"Free":436,"Rules":"ON button2#state=10 DO power2 2 ENDON ON button2#state=11 DO power1 2 ENDON"}}
Status 0
:
STATUS 0 output here:
11:29:30.363 CMD: status0
11:29:30.365 SRC: WebConsole from 192.168.1.75
11:29:30.368 CMD: Grp 0, Cmd 'STATUS', Idx 0, Len 0, Pld -99, Data ''
11:29:30.412 MQT: stat/sonoff/STATUS0 = {"Status":{"Module":18,"DeviceName":"Wemo-Ankleidezimmer","FriendlyName":["Rolladen_hoch","Rolladen_runter","Licht_Ankleidezimmer"],"Topic":"sonoff","ButtonTopic":"","Power":0,"PowerOnState":0,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"","SwitchMode":[1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":1,"InfoRetain":0,"StateRetain":0,"StatusRetain":0},"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"sonoffs","OtaUrl":"http://192.168.1.42:8000/Tasmota/tasmota-sensors.bin.gz","RestartReason":"Software/System restart","Uptime":"0T00:07:10","StartupUTC":"2023-02-18T10:22:20","Sleep":0,"CfgHolder":4617,"BootCount":83,"BCResetTime":"2020-03-24T14:36:31","SaveCount":5891,"SaveAddress":"F9000"},"StatusFWR":{"Version":"12.4.0(sensors)","BuildDateTime":"2023-02-16T12:12:06","Boot":31,"Core":"2_7_4_9","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"485/699"},"StatusLOG":{"SerialLog":0,"WebLog":4,"MqttLog":0,"SysLog":0,"LogHost":"192.168.1.39","LogPort":514,"SSId":["michaswlan",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["0000802B","0A05C80000000600003C5AFF002800000000","00808080","00006000","00004000","00000000"]},"StatusMEM":{"ProgramSize":698,"Free":304,"Heap":18,"ProgramFlashSize":1024,"FlashSize":4096,"FlashChipId":"16405E","FlashFrequency":40,"FlashMode":"DOUT","Features":["00000809","8F9A8787","0415A005","B7F7BFCF","05DA9BC4","64367CC7","00084052","20000000","54000020","0000C081"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,14,16,17,20,21,24,29,34,62,65,66","Sensors":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,26,31,34,37,39,40,42,43,45,51,52,55,56,58,59,62,64,66,67,74,98,103"},"StatusNET":{"Hostname":"Wemo-Ankleidezimmer","IPAddress":"192.168.1.71","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.1.1","DNSServer2":"0.0.0.0","Mac":"84:F3:EB:E3:EA:D7","Webserver":2,"HTTP_API":1,"WifiConfig":5,"WifiPower":17.0},"StatusMQT":{"MqttHost":"192.168.1.42","MqttPort":1884,"MqttClientMask":"Wemo_Ankleidezimmer","MqttClient":"Wemo_Ankleidezimmer","MqttUser":"admin","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4},"StatusTIM":{"UTC":"2023-02-18T10:29:30","Local":"2023-02-18T11:29:30","StartDST":"2023-03-26T02:00:00","EndDST":"2023-10-29T03:00:00","Timezone":"+01:00","Sunrise":"07:53","Sunset":"18:14"},"StatusSNS":{"Time":"2023-02-18T11:29:30","Switch3":"OFF","BME280":{"Temperature":21.1,"Humidity":48.9,"DewPoint":9.9,"Pressure":1006.5},"PressureUnit":"hPa","TempUnit":"C"},"StatusSTS":{"Time":"2023-02-18T11:29:30","Uptime":"0T00:07:10","UptimeSec":430,"Heap":17,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":631,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","Wifi":{"AP":1,"SSId":"xxxxxwlan","BSSId":"xxxxxxxxxxxx","Channel":1,"Mode":"11n","RSSI":48,"Signal":-76,"LinkCount":1,"Downtime":"0T00:00:03"}}}
11:29:41.010 CMD: status0
weblog
to 4 and then, when you experience your issue, provide the output of the Console log:
Console output here:
00:00:00.001 HDW: ESP8266EX
00:00:00.050 CFG: Loaded from flash at FB, Count 5888
00:00:00.128 CFG: Saved to flash at FB, Count 5889, Bytes 4096
00:00:00.143 ROT: Mode 1
00:00:00.146 SRC: Restart
00:00:00.192 Project tasmota - Wemo-Ankleidezimmer Version 12.4.0(sensors)-2_7_4_9(2023-02-16T12:12:06)
00:00:00.205 SHT: Sensor did not ACK command
00:00:00.228 I2C: BME280 found at 0x76
00:00:00.500 WIF: Checking connection...
00:00:00.500 WIF: Attempting connection...
00:00:00.837 WIF: Connecting to AP1 michaswlan Channel 1 BSSId 74:42:7F:AE:BA:58 in mode 11n as Wemo-Ankleidezimmer...
00:00:01.753 WIF: Connected
00:00:02.006 HTP: Web server active on Wemo-Ankleidezimmer with IP address 192.168.1.71
11:22:24.003 MQT: Attempting connection...
11:22:24.027 MQT: Connected
11:22:24.030 MQT: tele/sonoff/LWT = Online (retained)
11:22:24.032 MQT: cmnd/sonoff/POWER =
11:22:24.037 MQT: tele/sonoff/INFO1 = {"Info1":{"Module":"Generic","Version":"12.4.0(sensors)","FallbackTopic":"cmnd/Wemo_Ankleidezimmer_fb/","GroupTopic":"cmnd/sonoffs/"}}
11:22:24.051 MQT: tele/sonoff/INFO2 = {"Info2":{"WebServerMode":"Admin","Hostname":"Wemo-Ankleidezimmer","IPAddress":"192.168.1.71"}}
11:22:24.064 MQT: tele/sonoff/INFO3 = {"Info3":{"RestartReason":"Software/System restart","BootCount":83}}
11:22:24.077 MQT: stat/sonoff/RESULT = {"POWER1":"OFF"}
11:22:24.080 MQT: stat/sonoff/POWER1 = OFF (retained)
11:22:24.083 MQT: stat/sonoff/RESULT = {"POWER2":"OFF"}
11:22:24.085 MQT: stat/sonoff/POWER2 = OFF (retained)
11:22:24.086 MQT: stat/sonoff/RESULT = {"POWER3":"OFF"}
11:22:24.088 MQT: stat/sonoff/POWER3 = OFF (retained)
11:22:28.420 MQT: tele/sonoff/STATE = {"Time":"2023-02-18T11:22:28","Uptime":"0T00:00:08","UptimeSec":8,"Heap":22,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":54,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","Wifi":{"AP":1,"SSId":"michaswlan","BSSId":"74:42:7F:AE:BA:58","Channel":1,"Mode":"11n","RSSI":52,"Signal":-74,"LinkCount":1,"Downtime":"0T00:00:03"}}
11:22:28.432 MQT: tele/sonoff/SENSOR = {"Time":"2023-02-18T11:22:28","Switch3":"OFF","BME280":{"Temperature":21.1,"Humidity":48.9,"DewPoint":9.9,"Pressure":1006.5},"PressureUnit":"hPa","TempUnit":"C"}
11:23:39.761 MQT: stat/sonoff/RESULT = {"SerialLog":{"0":{"Active":"0"}}}
11:23:39.781 MQT: stat/sonoff/RESULT = {"WebLog":4}
11:23:39.797 SRC: Backlog
11:23:39.799 CMD: Grp 0, Cmd 'MQTTLOG', Idx 1, Len 1, Pld 0, Data '0'
11:23:39.802 MQT: stat/sonoff/RESULT = {"MqttLog":0}
11:23:39.822 SRC: Backlog
11:23:39.824 CMD: Grp 0, Cmd 'SYSLOG', Idx 1, Len 1, Pld 0, Data '0'
11:23:39.828 MQT: stat/sonoff/RESULT = {"SysLog":{"0":{"Active":"0"}}}
11:23:39.844 SRC: Backlog
11:23:39.847 CMD: Grp 0, Cmd 'LOGHOST', Idx 1, Len 12, Pld 192, Data '192.168.1.39'
11:23:39.849 CFG: CR 485/699, Busy 0
11:23:39.854 MQT: stat/sonoff/RESULT = {"LogHost":"192.168.1.39"}
11:23:39.870 SRC: Backlog
11:23:39.872 CMD: Grp 0, Cmd 'LOGPORT', Idx 1, Len 3, Pld 514, Data '514'
11:23:39.876 MQT: stat/sonoff/RESULT = {"LogPort":514}
11:23:39.895 SRC: Backlog
11:23:39.897 CMD: Grp 0, Cmd 'TELEPERIOD', Idx 1, Len 3, Pld 300, Data '300'
11:23:39.902 MQT: stat/sonoff/RESULT = {"TelePeriod":300}
11:23:40.421 MQT: tele/sonoff/STATE = {"Time":"2023-02-18T11:23:40","Uptime":"0T00:01:20","UptimeSec":80,"Heap":20,"SleepMode":"Dynamic","Sleep":0,"LoadAvg":287,"MqttCount":1,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","Wifi":{"AP":1,"SSId":"michaswlan","BSSId":"74:42:7F:AE:BA:58","Channel":1,"Mode":"11n","RSSI":52,"Signal":-74,"LinkCount":1,"Downtime":"0T00:00:03"}}
11:23:40.435 MQT: tele/sonoff/SENSOR = {"Time":"2023-02-18T11:23:40","Switch3":"OFF","BME280":{"Temperature":21.1,"Humidity":48.9,"DewPoint":9.9,"Pressure":1006.5},"PressureUnit":"hPa","TempUnit":"C"}
11:23:40.579 CFG: Saved to flash at F9, Count 5891, Bytes 4096
11:23:42.753 WIF: Checking connection...
11:23:46.927 HTP: Main Menu
11:23:49.951 HTP: Console
11:24:02.753 WIF: Checking connection...
11:24:20.415 WIF: Sending Gratuitous ARP
11:24:22.754 WIF: Checking connection...
11:24:42.753 WIF: Checking connection...
11:25:02.753 WIF: Checking connection...
11:25:20.414 WIF: Sending Gratuitous ARP
11:25:22.753 WIF: Checking connection...
11:25:42.754 WIF: Checking connection...
### TO REPRODUCE
_Steps to reproduce the behavior:_
use external switch ...always no reaction
### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._
When i use my external Switch which is connected to gpio 14 D5 conigured as switch 3 it should switch on relay 3 in this example..
### SCREENSHOTS
_If applicable, add screenshots to help explain your problem._
### ADDITIONAL CONTEXT
_Add any other context about the problem here._
**(Please, remember to close the issue when the problem has been addressed)**
Thx for the better description!
Originally the switch (and button) numbering was supposed to be sequential. So starting at 1 and up. Until v12.4 this was apparently not enforced. It is now to cater for virtual switches (and buttons).
I'll need to revisit my code changes leading to this as you seem to have a valid solution up until v12.4
Investigating.
Supporting scattered values would be a problem when adding port extenders for example that are expecting 8 or more switches to be available continuously like what was recently done on tm1638
The motto on support has always been : start at 1 and increment by 1. This was a loophole
This would indeed be the preffered and supported way of button and switch configuration:
In this case GPIO13 can still be unconnected while allowing the switch to control relay2.
Even is the switch on gpio14 was set to switch 1, it could still be redirected to relay 3 with a rule
Does this mean that out-of-sequence Switch inputs works differently now? Someone is having trouble with this device, where the template has Switch1 and Switch3. While the user for some reason now has a gpio config with Switch2 and Switch3, both setups would be hit by issues here. https://templates.blakadder.com/milfra_MFA06.html
What's the use for Switch3
without havong a relay3?
I also have configurations with switch numbers without corespondent Relais.. for example switch 3 is a motion sensor...for these Things i use rules to set a non configurated Relais for example 10 to get a Real time mqtt Information about the switch state..so in the mqtt Broker i trigger with motion information of Relais 10... For example on switch3#state=1 do publish stat/sonoff/RESULT {\"POWER10\":\"ON\"} endon on switch3#state=0 do publish stat/sonoff/RESULT {\"POWER10\":\"OFF\"} endon"}}
Or do we get now switch state change in Realtime to mqtt with switchmode XYZ
I suggest you try latest dev release and report back if it solves your issues.
If so, I'll release v12.4.1 ....
Hello ..latest dev fixed it...i have tried with the example one from here in this issue.. Thanks...
OK. I'll add the change to v12.4.0 and keep it v12.4.0
Hi just a question from my side. I updated ~60 Devices to 2.4.0 which was released on 16.02.2023. Should I recompile and update again?
Are you affected by this issue? If yes, better update..... If using precompiled builds, better first make sure that the files have been pushed to the servers.
Hi just a question from my side. I updated ~60 Devices to 2.4.0 which was released on 16.02.2023. Should I recompile and update again?
If you have the switch and Relais counting done as recommended (starting from one and continous) there is no need for.
Closing since OP gave feedback it is fixed
Hello, after updating all my devices from Percy to Peter, All my configurated Switches didnt work anymore. After downgrade from Peter to Percy it worked again..