Closed matthyne closed 4 years ago
Please configure only one button1
Indeed. Only One Button1 was supposed to work. It may be more enforced now in the latest version.
To solve your issue you need to use Switch1 for GPIO4.
Update - It appears that 8.3.1 does not like having two GPIOs configured as Button1.
If I remove the Button1 from GPIO0 and only have GPIO4 configured then the external switch connection works.
Seems to be a change from 8.2 and does result in the internal button being useless. Switch1 is not an option because both these buttons are momentary.
Read the docs and learn how to configure a switch as momentary button.
I also suggest documenting that only one ButtonX is permitted per GPIO (assume this applies to switches and other peripherals as well).
I will need to change all my other Sonoff mini configs before I update to 8.3.
Sidebar: There does seem to be issues with downgrading 8.3 to 8.2 as well. I will investigate them and post in another ticket.
i thought it was obvious that you can have only one button1 and only one button2, same as a relay or a pwm
@arendst Suggestion: enforce a validation on assigning twice the same component. It's easy to make this mistake when configuring the device with json.
Was in the code some time ago. Keeping it up-to-date was a nightmare. Removed it and until you came along no-one had issues with it.
No offence but won't be re-implemented.
No worries at all @arendst I landed here because I could not understand from the documentation what is the number after the component. In other words I was thinking that Button1 and Button2 were referred to the I/Os and not to a unique identifier of the component. In the components page of the docs, there is no mention at all about their unique assignment to the I/O. I understand that it is straightforward once you understand the logic of the project, but most of the people lands here just because they want to see the light turning on :)
I was thinking that a simple validation could both clarify their meaning and avoid stupid errors like mine.
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
After upgrade to 8.3.1 the external switch/button (GPIO4) is no longer detected on a Sonoff Mini.
(I also add that downgrade to 8.2.0 is failing in 8.3.1)
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Rules output here:
No rules
STATUS 0 output here: 06:26:41 MQT: garage_lights/stat/STATUS = {"Status":{"Module":0,"DeviceName":"Garage Lights","FriendlyName":["Garage Lights"],"Topic":"garage_lights","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}} 06:26:41 MQT: garage_lights/stat/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://thehackbox.org/tasmota/release/tasmota.bin","RestartReason":"Software/System restart","Uptime":"0T00:03:09","StartupUTC":"2020-05-19T05:23:32","Sleep":50,"CfgHolder":4617,"BootCount":34,"BCResetTime":"2020-04-05T13:51:48","SaveCount":1754,"SaveAddress":"FA000"}} 06:26:41 MQT: garage_lights/stat/STATUS2 = {"StatusFWR":{"Version":"8.3.1(tasmota)","BuildDateTime":"2020-05-18T15:39:35","Boot":31,"Core":"2_7_1","SDK":"2.2.2-dev(38a443e)","Hardware":"ESP8285","CR":"398/699"}} 06:26:41 MQT: garage_lights/stat/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["cleve.net",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["000A8009","2805C8000100060000005A00000000000000","00000200","00000000"]}} 06:26:41 MQT: garage_lights/stat/STATUS4 = {"StatusMEM":{"ProgramSize":587,"Free":416,"Heap":24,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"144051","FlashMode":3,"Features":["00000809","8FDAE797","043683A0","000000CD","010013C0","C000F981","00000024"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37","Sensors":"1,2,3,4,5,6"}} 06:26:41 MQT: garage_lights/stat/STATUS5 = {"StatusNET":{"Hostname":"garage_lights-7708","IPAddress":"10.1.100.230","Gateway":"10.1.100.1","Subnetmask":"255.255.255.0","DNSServer":"8.8.4.4","Mac":"D8:F1:5B:C8:3E:1C","Webserver":2,"WifiConfig":4,"WifiPower":17.0}} 06:26:41 MQT: garage_lights/stat/STATUS6 = {"StatusMQT":{"MqttHost":"10.1.100.222","MqttPort":1883,"MqttClientMask":"GARAGE_LIGHT","MqttClient":"GARAGE_LIGHT","MqttUser":"mqtt","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30}} 06:26:41 MQT: garage_lights/stat/STATUS7 = {"StatusTIM":{"UTC":"2020-05-19T05:26:41","Local":"2020-05-19T06:26:41","StartDST":"2020-03-29T02:00:00","EndDST":"2020-10-25T03:00:00","Timezone":"+01:00","Sunrise":"05:02","Sunset":"20:30"}} 06:26:41 MQT: garage_lights/stat/STATUS10 = {"StatusSNS":{"Time":"2020-05-19T06:26:41"}} 06:26:42 MQT: garage_lights/stat/STATUS11 = {"StatusSTS":{"Time":"2020-05-19T06:26:41","Uptime":"0T00:03:09","UptimeSec":189,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"POWER":"OFF","Wifi":{"AP":1,"SSId":"cleve.net","BSSI
Console output here: 11:23:53 CMD: weblog 4 11:23:53 MQT: garage_lights/stat/RESULT = {"WebLog":4} 11:23:54 CFG: Saved to flash at F5, Count 1759, Bytes 4096 11:23:58 WIF: Checking connection... 11:24:18 WIF: Checking connection... 11:24:38 WIF: Checking connection... 11:24:58 WIF: Checking connection...