Hi, I do not know if this has been discussed here.
But I wanted to make a request, if possible, of course.
In the tasmota, we get to put some extra functions in the buttons as two touch make Y a touch do X, pressing make Z.Hi, I do not know if this has been discussed here.
But I wanted to make a request, if possible, of course.
In the tasmota, we get to put some extra functions in the buttons as two touch make Y a touch do X, pressing make Z.
Is it possible without changing the firmware? Can you implement something?
Hi,
Still have problems with connection:
File “/Users/robertp/.homeassistant/custom_components/switch/sonoff.py”, line 58, in turn_off
self._state = self._hass.data[SONOFF_DOMAIN].switch(False, self._deviceid, self._outlet)
File “/Users/robertp/.homeassistant/custom_components/sonoff.py”, line 289, in switch
self._ws = self._get_ws()
File “/Users/robertp/.homeassistant/custom_components/sonoff.py”, line 254, in _get_ws
self._ws = create_connection((‘wss://{}:8080/api/ws’.format(self._wshost)), timeout=10)
File “/Users/robertp/.homeassistant/deps/lib/python/site-packages/websocket/_core.py”, line 511, in create_connection
websock.connect(url, **options)
File “/Users/robertp/.homeassistant/deps/lib/python/site-packages/websocket/_core.py”, line 220, in connect
options.pop(‘socket’, None))
File “/Users/robertp/.homeassistant/deps/lib/python/site-packages/websocket/_http.py”, line 126, in connect
sock = _ssl_socket(sock, options.sslopt, hostname)
File “/Users/robertp/.homeassistant/deps/lib/python/site-packages/websocket/_http.py”, line 253, in _ssl_socket
sock = _wrap_sni_socket(sock, sslopt, hostname, check_hostname)
File “/Users/robertp/.homeassistant/deps/lib/python/site-packages/websocket/_http.py”, line 232, in _wrap_sni_socket
server_hostname=hostname,
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py”, line 401, in wrap_socket
_context=self, _session=session)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py”, line 808, in init
self.do_handshake()
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py”, line 1061, in do_handshake
self._sslobj.do_handshake()
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py”, line 683, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
@robertpe try the fixes mentioned above in this thread or fix your env certificates (check this similar issue too)
@letherwin someone else mentioned this previously here or on github (i don’t remember exactly) but no i will not add support for it. mostly because i can hardly do the tests on my own i can easily introduce bugs that’ll propagate quite fast and break automations, leaving it to manuall update gives everyone a small sense of debug is something goes wrong.
Awesome work. Got a couple Sonoff Basics just to test out so didn’t want to bother flashing/setting up MQTT etc… took literally minutes to get up in HA. Great work, much appreciated.
After update to 0.88 I get this : Integrations need to be in their own folder. Change switch/sonoff.py to sonoff/switch.py. This will stop working soon.
And this:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 147, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 962, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.sonoff.switch'; 'custom_components.sonoff' is not a package
So you either renamed the sensor folder to sonoff or created a new sonoff folder and renamed the sonoff.py to sensor.py in that folder did you? Because that will work… it did for 6 custom components I was using…
1i download from github “custom component.zip” i will extract it
2 i go in home assistant folder and i have a folder custom_components.
3 under custom_components i create a folder called sonoff
4 in sonoff folder i create two other folders switch and sensor
5 in switch folder i copy sonoff.py that i found in switch folder i have downloaded from gituhub
6 in sensor folder i copy sonoff.py that i found in sensor folder i have downloaded from github
is it corrrect??
Hi again. Just a shout out for us in the websocket club as well please
I am not in a hurry to upgrade to 0.88 as I have about 6 custom components running!
Thanks
so it will be :
1 create a sonoff folder in custom components
2 copy sonoff. py present in switch folder to custom_components/sonoff
3 rename sonoff.py in switch.py to have custom_components/sonoff/switch.py
and the same procedure for sensor?
is it right now?