Plugin 64, APDS 9960, which "Collection"?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Plugin 64, APDS 9960, which "Collection"?

#1 Post by oisisi » 24 Mar 2024, 16:53

There are Collections A through G and the respective compiled binaries. The plugin I am interested in, P 64, Gesture APDS9960, only shows as status "Collection" without any letter. Does this mean it isn't included in any binary and I need to compile it myself?

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Plugin 64, APDS 9960, which "Collection"?

#2 Post by Ath » 24 Mar 2024, 17:16

The 'Collection' label implies it is included in ALL Collection builds, A..G. ;)
The same is that all 'Normal' labeled plugins are included in all Collection builds.
/Ton (PayPal.me)

oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Re: Plugin 64, APDS 9960, which "Collection"?

#3 Post by oisisi » 24 Mar 2024, 18:06

That's nice and helpful. Thank you!

whatsupskip
Normal user
Posts: 125
Joined: 28 Feb 2018, 07:40
Location: Melbourne, Australia

Re: Plugin 64, APDS 9960, which "Collection"?

#4 Post by whatsupskip » 26 Mar 2024, 03:18

Let me know if it will work for you as I briefly tried it the other day, but it would not enable the for me using the "G" collection and the two most recent firmware versions for the ESP8266.
Friends with kangaroos and some time koala rescuer.

oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Re: Plugin 64, APDS 9960, which "Collection"?

#5 Post by oisisi » 26 Mar 2024, 07:07

I can confirm it works for me. Initially, it didn't but what do you expect when you forget to hook up GND, duh. The lesson I learned is that I2C modules can be discovered even without the GND pin being connected.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Plugin 64, APDS 9960, which "Collection"?

#6 Post by TD-er » 26 Mar 2024, 09:09

It can, but if it is powered from a different power supply, it can also damage your ESP or your I2C sensor.

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Plugin 64, APDS 9960, which "Collection"?

#7 Post by Ath » 26 Mar 2024, 09:10

oisisi wrote: 26 Mar 2024, 07:07 The lesson I learned is that I2C modules can be discovered even without the GND pin being connected.
I've even seen a sensor being recognized with SCL and SDA swapped... :shock: (but most don't)
/Ton (PayPal.me)

oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Re: Plugin 64, APDS 9960, which "Collection"?

#8 Post by oisisi » 27 Mar 2024, 06:32

@whatsupskip, here's an observation I made. I had to uncheck "Single event with all values" and set an interval for the plugin to get varying values for light and proximity. I now get different values with each interval and additionally when a gesture is being detected.

whatsupskip
Normal user
Posts: 125
Joined: 28 Feb 2018, 07:40
Location: Melbourne, Australia

Re: Plugin 64, APDS 9960, which "Collection"?

#9 Post by whatsupskip » 27 Mar 2024, 06:56

Thanks I will try those settings and see if that fixes it.
Friends with kangaroos and some time koala rescuer.

oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Re: Plugin 64, APDS 9960, which "Collection"?

#10 Post by oisisi » 28 Mar 2024, 18:16

oisisi wrote: 27 Mar 2024, 06:32 @whatsupskip, here's an observation I made. I had to uncheck "Single event with all values" and set an interval for the plugin to get varying values for light and proximity. I now get different values with each interval and additionally when a gesture is being detected.
This is cursed. I have to retract/correct that. When I set an interval the last registered gesture will be repeated with the interval. In sum, if I want gestures I have to disable intervals and get the unchanged light and proximity values published with each new gesture. When I want light and proximity I need to set an interval and have to ignore the gesture information.

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Plugin 64, APDS 9960, which "Collection"?

#11 Post by Ath » 30 Mar 2024, 15:11

oisisi wrote: 28 Mar 2024, 18:16 This is cursed. I have to retract/correct that. When I set an interval the last registered gesture will be repeated with the interval. In sum, if I want gestures I have to disable intervals and get the unchanged light and proximity values published with each new gesture. When I want light and proximity I need to set an interval and have to ignore the gesture information.
@oisisi, I've resolved your complaints in a new PR #5016. The build is running in this GH Actions run, can you please test if this resolves your issue? You'll need to have a Github account to be able to download (creating an account is free, if you don't have one yet).
Once installed, you should enable the "Separate Gesture events" option in the plugin settings, and change your event handler (Rules) from On <taskname>#Gesture Do to On <taskname>#Swipe Do (For backward compatibility I added a new event, so for existing users all works as it was.) Though this might be the better use-case for this plugin 8-)
Also, gestures are processed when measuring R/G/B Colors, making it all in all more versatile.
/Ton (PayPal.me)

oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Re: Plugin 64, APDS 9960, which "Collection"?

#12 Post by oisisi » 30 Mar 2024, 15:34

Thanks Ath, that wasn't necessary, thank you. I'll wait for the workflow to complete and will flash my board again. I sent a small donation your way.

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Plugin 64, APDS 9960, which "Collection"?

#13 Post by Ath » 30 Mar 2024, 16:11

Thank you ;)
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Plugin 64, APDS 9960, which "Collection"?

#14 Post by Ath » 07 Apr 2024, 23:06

oisisi wrote: 30 Mar 2024, 15:34 I'll wait for the workflow to complete and will flash my board again.
Have you been able to test the build?
/Ton (PayPal.me)

oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Re: Plugin 64, APDS 9960, which "Collection"?

#15 Post by oisisi » 08 Apr 2024, 11:47

Ath wrote: 07 Apr 2024, 23:06 Have you been able to test the build?
Yes. I have a working rule that publishes on 'gesture#Swipe'. Additionally, for testing, I publish Light/Proximity/Gesture values every 10 seconds via the regular controller settings. Values for all parameters are being published every ten seconds. The last detected gesture number is being repeated.

I assume that "0" relates to a specific gesture and does not mean 'no gesture'.

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Plugin 64, APDS 9960, which "Collection"?

#16 Post by Ath » 08 Apr 2024, 15:28

oisisi wrote: 08 Apr 2024, 11:47 Yes. I have a working rule that publishes on 'gesture#Swipe'. Additionally, for testing, I publish Light/Proximity/Gesture values every 10 seconds via the regular controller settings. Values for all parameters are being published every ten seconds. The last detected gesture number is being repeated.
That's how a Controller publish works, every Interval all values are published. We don't have a mechanism to select what values to publish. But you can now rename it and ignore it on the receiving side.
oisisi wrote: 08 Apr 2024, 11:47 I assume that "0" relates to a specific gesture and does not mean 'no gesture'.
According to the documentation 0 = None, so your rule can use an "if" check if you want to ignore that :)

Edit: Link to the updated documentation (pull request)
/Ton (PayPal.me)

oisisi
Normal user
Posts: 89
Joined: 06 Jul 2016, 13:47

Re: Plugin 64, APDS 9960, which "Collection"?

#17 Post by oisisi » 09 Apr 2024, 17:17

The updated documentation is very helpful, thanks. I am actually getting 0s as gesture info (from event "<device name>#Swipe").

Edit: It looks like I get a '0' where I should be getting a '5' ("Near (towards the sensor)").
Edit: I also get a '0' for unclear gestures. Perhaps my sensor is broken or I need to tweak the calibration.

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests