-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
TSL2561 - no data #750
Comments
Thanks for the bug report. I just pushed a potential fix. Can you test the latest tsl2561.py? |
I just tried.... by simply replacing the old tsl261.py file with the new version..... now get into a big mess, and mycodoflask/gunicorn does not seem to start/fails, so I can't access via web:
And: Feb 21 20:25:17 phspi06 gunicorn[445]: input_custom = load_module_from_file(full_path, 'in |
Reverting to the original tsl2516.py still won't start.... |
You can stop the daemon with then overwrite the file with then start the daemon with |
I have this sensor, so I'll test with it later. |
So I should do: |
Tried that and still broken... |
That's what I tried to start with.... |
The frontend (flask) has no impact on the backend (daemon) that actually conducts the measurements, so stopping/starting the frontend will have no effect on anything. Also, doing anything to the settings database (mycodo.db) will also have no [positive] effect, as it merely stores settings. |
Actually, I just checked and I don't have that sensor here (it's out on a farm), so I won't be able to test myself. |
That is what I originally thought... I guess I was clutching at straws... |
I won't be able to figure out what your issue is unless you can provide the excerpt of the daemon log that starts at the input activation, through to the end of the last error for the input. |
So it seems I have perhaps another separate issue: mycodoflask fails to start:
|
So to be clear, I have reverted to the original tsl2561.py, and mycodo.db before I attempted to test the fix. |
Not sure what's wrong. I just released 8.3.0. Try upgrading and see if that fixes the issue. |
OK. Without the web interface, what do I need to run to upgrade? |
Okay got it run: |
|
Had to make executable first, in progress... |
If you preface the script with |
Of course, my bad.
Weird that it was working fine up until I tested the new tsl file (no other changes made at that time) |
What's the output after the following commands: cd ~/Mycodo/mycodo
sudo /var/mycodo-root/env/bin/gunicorn \
--workers 1 \
--worker-class gthread \
--threads 2 \
--timeout 300 \
--pid /var/run/mycodoflask.pid \
--bind unix:/var/run/mycodoflask.sock start_flask_ui:app |
After shutdown overnight and then a reboot mycodoflask is now working.
Deleted and then re-created an empty init.py file |
Fixed in version 8.3.0 |
Version 8.25
Connect TSL2561 to i2c
Add new tsl2561 input
Activate
Result -> no data
Log:
2020-02-21 18:03:47,618 - ERROR - mycodo.inputs.tsl2561_0b63ec45 - Error: unsupported operand type(s) for >>: 'float' and 'int'
Traceback (most recent call last):
File "/home/drgrumpy/Mycodo/mycodo/inputs/tsl2561.py", line 85, in get_measurement
self.value_get(0), self.value_get(1)))
File "/var/mycodo-root/env/lib/python3.7/site-packages/tsl2561/tsl2561.py", line 255, in _calculate_lux
channel0 = (broadband * chScale) >> TSL2561_LUX_CHSCALE
TypeError: unsupported operand type(s) for >>: 'float' and 'int'
So looks like the issue lies with the tsl2561.py library file
A quick looking at the library on github: the latest version is 3.4 with change "make fully typed"
My guess is we need to make sure that we use the latest version ?
How do I install into the appropriate place for mycodo?
Can I just copy into /var/mycodo-root/env/lib/python3.7/site-packages/tsl2561/ ?
The text was updated successfully, but these errors were encountered: