I have a Sonoff basic switch that was working fine with a lamp in drawing room but it suddenly stopped working, I did not tweak anything at all.
Here is the error in logs:
Error during setup of component sonoff Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn conn.connect() File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 362, in connect self.sock = ssl_wrap_socket( File "/usr/local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 384, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/lib/python3.8/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.8/ssl.py", line 1040, in _create self.do_handshake() File "/usr/local/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1108)
The configurations are as follows:
switch drawing_room: - platform: mqtt name: "Sonoff-01" command_topic: "cmnd/sonoff1/power" state_topic: "stat/sonoff1/POWER" qos: 1 payload_on: "ON" payload_off: "OFF" payload_available: "Online" payload_not_available: "Offline" retain: true sonoff: username: <redacted> password: !secret sonoff_password scan_interval: 60 #(optional, lower values than 60 won't work anymore!) grace_period: 600 #(optional) api_region: 'us' #(optional) entity_prefix: False #(optional) debug: False #(optional)
Last week Sonoff switch started giving some warning about switch being deprecated and to move to SwitchEntity (sorry…did not pay attention so cannot recall with precision).
Any pointers on how to get this switch to start working again?
PS: I am able to operate the Sonoff switch using the eWeLink mobile app without any trouble.