Skip to content

Conversation

@tyeth
Copy link
Member

@tyeth tyeth commented Jun 25, 2024

User feedback (support issue) was:

Running a bit of the sample code from https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/blob/main/examples/adafruit_io_http/adafruit_io_groups.py
I get this error:
Adafruit IO Error 404: not found - API documentation can be found at https://io.adafruit.com/api/docs
It seems that the API call add_feed_to_group(..) is not working

It appears the code has changed since the example was written and there is a newer "create_feed_in_group" method.
It's also the case that the add_feed_to_group method always required an existing feed (at least according to the comments in code).

I've expanded the example to:

  1. instead first create a feed in a group
  2. then use the add a feed to a group method (with a newly created feed)
  3. then after deleting the group only one of the feeds will be automatically removed (the one created in the group), as it has no references left to groups.
    Whereas the humidity one was created in the Default group and simply gained association to a second group.
  4. remove the humidity feed as a final step.

Fixes #119

…roup feeds

User feedback was: "add_feed_to_group() is not working - used adafruit_io_groups.py example as a test case."
Fixes #119
@tyeth tyeth requested a review from brentru June 25, 2024 13:01
@brentru brentru merged commit 2076935 into main Jun 25, 2024
@brentru brentru deleted the tyeth/issue119 branch June 25, 2024 13:28
@wavesailor
Copy link

That's fixes one of the issues.

But I still get an error when I try add an existing feed to the sensors group using add_feed_to_group(group_key: str, feed_key: str) link to API Doc

The API has the error or the error is in code of the library file adafruit_io.py

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

Successfully merging this pull request may close these issues.

add_feed_to_group() is not working - used adafruit_io_groups.py example as a test case.

4 participants