Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Temporary fix HA 0.115 UUID issue. Setup failed for sonoff: Requirements for sonoff not found: ['uuid']. #261

Open
tyjtyj opened this issue Sep 24, 2020 · 10 comments

Comments

@tyjtyj
Copy link

tyjtyj commented Sep 24, 2020

UUID is some hex

Generate uuid from a python command
python -c 'import uuid; print(uuid.uuid4())'
or simply type any hex with the following format
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

eg. PLEASE CHANGE THIS
12345678-abcd-1234-abcd-123456789012

Open init.py file

Remove UUID requirement Line 45
REQUIREMENTS = ['websocket-client==0.54.0']

Comment out Line 210
#import uuid

Line 223
self._imei = 'your uuid here'

@mirasu
Copy link

mirasu commented Oct 3, 2020

Funciono para mi, solo decir que hay que dejar las comillas self._imei = 'your uuid here' yo las quite y no funcionaba :-D

gracias!

@brunolinsalves
Copy link

It worked for me.

Thanks!

@gtrancillo
Copy link

@tyjtyj You are right. But your line numbers are wrong, These are the correct ones.

Generate UUID from a python command
python -c 'import uuid; print(uuid.uuid4())'
or simply type any hex with the following format
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Replace line 26:
REQUIREMENTS = ['uuid', 'websocket-client==0.54.0']
for this:
REQUIREMENTS = ['websocket-client==0.54.0']

Line 121:
import uuid
for
#import uuid

Line 134:
self._imei = str(uuid.uuid4())
for
self._imei = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

@Tahutipai
Copy link

Tahutipai commented Oct 30, 2020

For anyone unsure which file to edit:

vi /root/config/custom_components/sonoff/__init__.py

@TrommlerHH
Copy link

Sorry, I am completely stuck as a newbie.

I tried to install the AlexxIT-sonoff-ingetragtion with HACS, but I also ended up with this "requirements not found"-error.

I do not understand what to do with the phyton-command. It should not be added to the init-file, right?

I also checked my init-file but I could not find the mentioned lines. Searching the entire file for "requirements" or "websocket" failed.

This is how the first lines of my init-file look like:
init py

@jamespo
Copy link

jamespo commented Nov 14, 2020

I found you only need to remove uuid from the requirements line, uuid is in the standard library.

@montyha66
Copy link

Hi unfortunately,
nothing above has helped with the latest HomeAssistant Release 2020.12. to fix the issue below. Actually the Error disappears, but I was sill not able to see my Ewelink switches and sensors. So I have to downgrade to 0.114.4 the last version which is working for me.

Any suggestions how to fix?

After install HomeAssistant Release 2020.12. I have got following:
14/12/2020 10:35
Setup failed for sonoff: Requirements for sonoff not found: ['uuid'].
10:32:58 AM – setup.py (ERROR)
Unable to install package uuid: ERROR: Could not find a version that satisfies the requirement uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 56)) (from versions: 1.30) ERROR: No matching distribution found for uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 56)) WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
10:32:58 AM – util/package.py (ERROR)

@tyjtyj
Copy link
Author

tyjtyj commented Dec 14, 2020

Hi unfortunately,
nothing above has helped with the latest HomeAssistant Release 2020.12. to fix the issue below. Actually the Error disappears, but I was sill not able to see my Ewelink switches and sensors. So I have to downgrade to 0.114.4 the last version which is working for me.

Any suggestions how to fix?

After install HomeAssistant Release 2020.12. I have got following:
14/12/2020 10:35
Setup failed for sonoff: Requirements for sonoff not found: ['uuid'].
10:32:58 AM – setup.py (ERROR)
Unable to install package uuid: ERROR: Could not find a version that satisfies the requirement uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 56)) (from versions: 1.30) ERROR: No matching distribution found for uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 56)) WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
10:32:58 AM – util/package.py (ERROR)

if you remove it right. there should be no uuid requirement.

@josrafafonlo
Copy link

@tyjtyj You are right. But your line numbers are wrong, These are the correct ones.

Generate UUID from a python command
python -c 'import uuid; print(uuid.uuid4())'
or simply type any hex with the following format
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Replace line 26:
REQUIREMENTS = ['uuid', 'websocket-client==0.54.0']
for this:
REQUIREMENTS = ['websocket-client==0.54.0']

Line 121:
import uuid
for
#import uuid

Line 134:
self._imei = str(uuid.uuid4())
for
self._imei = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

I found a way to fix this for good: Do pip install uuid once its done go to the file and revert line 26 to require 'uuid' (Or leave it alone if havent touched it yet)
Then add the line import uuid under import websocket... (My file came without it)
Finally revert line 134 to (or leave it as) original
Save and restart hass. Now it should work as intended

@eole210
Copy link

eole210 commented Feb 5, 2021

@tyjtyj You are right. But your line numbers are wrong, These are the correct ones.
Generate UUID from a python command
python -c 'import uuid; print(uuid.uuid4())'
or simply type any hex with the following format
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Replace line 26:
REQUIREMENTS = ['uuid', 'websocket-client==0.54.0']
for this:
REQUIREMENTS = ['websocket-client==0.54.0']
Line 121:
import uuid
for
#import uuid
Line 134:
self._imei = str(uuid.uuid4())
for
self._imei = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

I found a way to fix this for good: Do pip install uuid once its done go to the file and revert line 26 to require 'uuid' (Or leave it alone if havent touched it yet)
Then add the line import uuid under import websocket... (My file came without it)
Finally revert line 134 to (or leave it as) original
Save and restart hass. Now it should work as intended

@josrafafonlo, sorry if that is dummy question but where do you do 'pip install uuid'? It is clearly not in the file itself so where is it please? Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants