GlennNZ wrote:Hi KarlHi Karl,
Hope you have finished unpacking! (I don't think anyone finishes unpacking....)
Have a few feature requests/and/or bug /inconsisteny reports for you.
1. ADS1115 sensors device. Please consider adding a SPS setting.
Had an issue were my ADS1115 sensor values would bounce up and down and up and down. 400--31000 - making the particular sensor usable.
Tried the basic library as below and got different readings to some extent would also bounce .
But found if changed readings per second ADS1115 setting could stablise completely. Obviously seems to be sensor dependant.
Managed to setup mysensors.py and use ADS1115.py - using this simple library
https://github.com/ncdcommunity/Raspber ... on_Library
With that got stable readings: Wasn't sure why at the time - but it worked/job done.
Found and used mysensors.py (thanks for that and all was good)
Revisited it now - when a old sensor died and had to replace. Had the same issue, except even more bouncy.
Looking into it in more detail it comes down the the SPS/speed value; it would seem.
I have to set it to 16 or 32 readings per second - to get stable, accurate values.
It appears the ADSL11x5.py code defaults the sps to 250 readings/second - with no way to change?
Manually dropping this seems to stabilize my readings.
Now stable (yah!) but still not completely sure why different readings from these code bases ADS1115.py and ADS11x5.py but as long as stable/internally consistent not necessarily an issue.
With old library ADS1115.py - the below does seem to follow:
- Code: Select all
Note: Set ADS1115 gain to two to read 0-20mA signals.
When resolution is set to 16bit
at 4mA the raw ADC value will be around 6430
at 20mA the raw ADC value will be around 32154.
mysensors.py using ADS1115.py above code = get a reading of 17983.0 (with quite a bit of accuracy) 2.048V/16SPS
vs
ADS1115 Device C=0,M=16,G=2048 (ADS11x5.py code edited for SPS of 16) get raw reading of 1122.44 for example
2. Add INPUTMax/InputMIN to mysensors devices
I think I just added them to the mysensor device subtype and your plugin code cleverly recognised and populated!
Thanks!
Glenn
Hope you have finished unpacking!
I upgraded a relatively old python2 pibeacon install, with slight trepidation it might be said …. but all good! Installed, running fine, no major issues..
Only minor issue is I had added Input0_Maxtoday/mintoday etc to mysensors device config - as above.
If it suits and have time to review above at some point that would be great.
Thanks!
Sent from my iPad using Tapatalk