Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: file does not exist .storage/wyze_sensors.txt #74

Closed
erlanger opened this issue Dec 20, 2019 · 5 comments
Closed

Fixed: file does not exist .storage/wyze_sensors.txt #74

erlanger opened this issue Dec 20, 2019 · 5 comments

Comments

@erlanger
Copy link
Contributor

The sensor was read only once, and not read anymore. The logs mention this error:

ERROR (Thread-3) [custom_components.wyzesense.wyzesense_custom] [Errno 2] No such file or directory: '.storage/wyze_sensors.txt'

After creating the file everything works okay, but this should be done directly in the code.

Thanks for the great work!

@erlanger
Copy link
Contributor Author

by the way, I got the error again (missing .storage/wyze_sensors.txt), I think it is because the file is opened using a relative file name. Should probably include the directory, because it will cause problems if home assistant changes the running directory (pwd) for some reason.

@erlanger
Copy link
Contributor Author

erlanger commented Dec 20, 2019

Update: I changed the code to use an absolute path and it works fine now. The proper fix would be to probably use $HOME to get the absolute path.

@KingofTown
Copy link

Same issue for me.

Note, this is a hassbian install, so ".storage/" is actually located at:
/home/homeassistant/.homeassistant/.storage

Tried adding the full path first, but all that did was get rid of the warning. The sensors were being discovered, but no wyze_storage.txt file was anywhere to be found. Nothing was working until I manually created the file.

@rodpayne
Copy link

rodpayne commented Dec 30, 2019

I am new to Wyze Sensors and had this same problem when initially setting it up. (The device appeared when it was first set up, but did not update after that.)
I reverted from master branch to release 0.0.5 and it started working wonderfully.
Subsequent testing shows that it also works on release 0.0.6.

On the master branch, the log had: 2019-12-29 21:54:09 ERROR (Thread-2) [custom_components.wyzesense.wyzesense_custom] [Errno 2] No such file or directory: '.storage/wyze_sensors.txt'

Adding the file to /home/homeassistant/.homeassistant/.storage did not help for my installation on Raspbian.

@kevinvincent
Copy link
Owner

kevinvincent commented Jan 14, 2020

Hi all. Please update to 0.0.7 through HACS or the latest master. It will fix this issue specifically.

Please make sure to follow the update instructions where you must retrigger each sensor once updating the component for the sensor to show up in Home Assistant (it's only a one-time thing).

Feel free to re-open this issue if that update still doesn't fix it.

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

No branches or pull requests

4 participants