Comments (7)
-APDS9960: If you do not provide an INT pin to the plugin it will check device status 10 times per second, and if it changes, the value changes.
Is I2C enabled? https://m.blog.hu/bi/bitekmindenhol/image/rpi_lht0.jpg Sensor appears at I2C scan with address 0x39?
I have two of this sensors, and one of them seems buggy(?) that one can only be made to work, if i patched the official apds9960 library.. (APDS9960_LED_BOOST_300->APDS9960_LED_BOOST_100 at device.py) Can you try the proximity test python file of this library from the official site?
https://github.com/liske/python-apds9960/blob/master/rpi/test_prox.py
Itt will give you different numbers based on object distance from the sensor. (70-200mm) If it is working, than my plugin is buggy which need some fixing, otherwise your device seems buggy. (or need further patching of apds9960 lib)
-MQTT: RPIEasy only uses and installs mqtt client. You need to install mqtt broker (which serves at default port 1883), such as mosquitto onto this or other RPI (i usually install mqtt broker on the same machine as the Domoticz server), and using that IP address on the controller settings.
-The autostart feature depends on the Raspbian Linux /etc/rc.local file, which i have struggled a little, now it seems to work on all four of my test RPI devices. Did you install "screen"? Please post content of /etc/rc.local.
Thank you for your support and feedback!
from rpieasy.
APDS9960 works fine for proximity and light So I2C settings is correct and I checked it with I2C SCAN and it shows up as 0x39 but when I set it as gesture sensor/dimmer on devices tab it is not changing value in log with my hand gestures as it should.I do not know how I change "APDS9960_LED_BOOST_300->APDS9960_LED_BOOST_100 at device.py" .
where are APDS9960 driver filed installed on my rpi ?
MQTT now connection works after installing broker on same rpi. Thanks.
this is my /etc/rc.local file
!/bin/sh -e
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
/usr/bin/screen -d -m /home/pi/rpieasy/run.sh
exit 0
from rpieasy.
Fixing LED_BOOST is a little complicated task, can you test it first with the Gesture sample program if it is also failing?
https://github.com/liske/python-apds9960/blob/master/rpi/test_gesture.py
If not working at all, you have to remove apds9960 first:
sudo pip3 uninstall apds9960
Then go to your home directory and clone git repo:
git clone https://github.com/liske/python-apds9960.git
Then try again test_gesture.py.. if not working, open device.py in the apds9960 directory with a text editor and try to replace:
self.setLEDBoost(APDS9960_LED_BOOST_300)
with
self.setLEDBoost(APDS9960_LED_BOOST_100)
If test_gesture.py works now, then after entering the python-apds9960 you can install the modified library with:
sudo python3 setup.py install
Your /etc/rc.local seems OK. When your system is started, then the "My IP address is ...." line appears at the console? If yes, then rc.local is executed.
You can double check, that /home/pi/rpieasy/run.sh file is existing in this directory and make sure it is runnable, by running:
sudo chmod a+x /home/pi/rpieasy/run.sh
Check is screen is located in /usr/bin
ls /usr/bin/screen
If all the above checks, try to run directly from the console:
/usr/bin/screen -d -m /home/pi/rpieasy/run.sh
If there are any error messages, please let me know. Is it a Raspbian Stretch Linux?
from rpieasy.
Fixing LED_BOOST is a little complicated task, can you test it first with the Gesture sample program if it is also failing?
https://github.com/liske/python-apds9960/blob/master/rpi/test_gesture.py
If not working at all, you have to remove apds9960 first:
sudo pip3 uninstall apds9960
Then go to your home directory and clone git repo:
git clone https://github.com/liske/python-apds9960.git
Then try again test_gesture.py.. if not working, open device.py in the apds9960 directory with a text editor and try to replace:
self.setLEDBoost(APDS9960_LED_BOOST_300)
with
self.setLEDBoost(APDS9960_LED_BOOST_100)
If test_gesture.py works now, then after entering the python-apds9960 you can install the modified library with:
sudo python3 setup.py install
- Tried all above and it did not work so I will have to try different sensor. Funny thing is I get MQTT message every second under topic Rpieasy/9960/Gesture/state with payload value of
0 evenif I have selected Proximity/Light on device page with 5 seconds interval.I also get messages every 5 seconds under Rpieasy/9960/proximity/state and Rpieasy/9960/light/state as it should be.
Your /etc/rc.local seems OK. When your system is started, then the "My IP address is ...." line appears at the console? If yes, then rc.local is executed.
You can double check, that /home/pi/rpieasy/run.sh file is existing in this directory and make sure it is runnable, by running:
sudo chmod a+x /home/pi/rpieasy/run.sh
Check is screen is located in /usr/bin
ls /usr/bin/screen
If all the above checks, try to run directly from the console:
/usr/bin/screen -d -m /home/pi/rpieasy/run.sh
If there are any error messages, please let me know. Is it a Raspbian Stretch Linux?
- Ran all test above and it all test good without any error messages but it still does not start at boot up. Yes it is Raspbian stretch
from rpieasy.
Yep, timer function is enabled even if not the Gesture mode wanted... its a bug, will be fixed soon.
Try the following:
sudo systemctl status rc-local.service
It has to write something like "Active: active (exited)", if not, please copy that here.
If no error showed, than try to start with:
sudo su
/etc/init.d/rc.local start
screen -r
The screen -r connects to the RPIEasy console if it started. Isn't it possible that some other program (apache,domoticz,lighttpd) holds port 80, and RPIEasy starts at 8080 or 8008 instead?
This will find RPIEasy in process list:
ps -aux | grep RPI
from rpieasy.
Yes both port 80 and 8080 were taken by other servers I am running and Rpieasy started automatically at port 8008.
When I used following
sudo su
/etc/init.d/rc.local start
screen -r
It started on port 80 and Rpieasy restarted on reboot. Thanks.
For apds-9960 I tried another sensor and it worked fine. For me the purple breakout board with 5 pins (the smallest of 4 different style I tried) worked out of box.
I consider this issue is solved so you can close it. Thank you for all your help.
from rpieasy.
With pleasure... yes i think this case is solved.
For the ADPS timer bug i opened a new issue, as it needs further investigation.
from rpieasy.
Related Issues (20)
- rules syntax or me failed? HOT 2
- [Feature] Add BME680 Sensor HOT 10
- Systemd integration HOT 4
- LYWSD03MMC Xiaomi temperature sensor stuck in Bluetooth communication HOT 2
- Generic MQTT controller status feedback HOT 1
- Generic MQTT Autodiscovery HOT 2
- Weight - HX711 Load Cell HOT 6
- Ina219 possible to add Gain and ADC settings? HOT 7
- measure a 48V battery up to 60V? HOT 1
- Compatibility with python 3.11 HOT 7
- more 1 wire on second gpio?
- Failed to get unit file state for rpieasy.service HOT 2
- !PN532 init error:'Plugin' object has no attribute 'i2cl' HOT 1
- PZEM016/004 -> fast slow? HOT 2
- Unknown command: PZEMRESET,1 HOT 9
- [Rules] some minor bugs/issues HOT 4
- RPI 4 - Hardware type not shown and unknown GPIO HOT 3
- Thingsboard MQTT and HTTP controllers
- Working with Rpi Pico (no wifi chip) through USB? HOT 1
- RPI5 / Rock Pi 4S support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpieasy.