REST control on Pi returning 404

Hi,

I’m new to most of this, but I’m pleased to say that I’ve got bibliopixed installed on a Raspberry Pi in a virtual env and have it successfully controling a long strip of APA102s going around a roof lantern - looks great and I’m really pleased so far!

Now I’m trying to include the REST control in a project file (with external_access: true) so that I can control and change the active animations from a web browser, then I’ll be able to auto-run the script and just have the whole lot turned on/off via a regular light switch (OK, there’ll be a delay while the Pi boots, but I can live with that!). The problem I have is that when I try to access the API (http://:8787) from a web browser on another device I get a 404 error - resulting in a “Not Found” page being displayed. It isn’t a network timeout, so I’m assuming the request is making it to the Pi, but it can’t find the file to return?

Could it be running in the virtual environment is confusing the path used to look for index.html? Any other ideas? It is probably something simple and obvious that I’ve missed, but I’ve run out of ideas!

Thanks,
Pete

Nothing exists at the root level of the REST API url, you need to choose one of the endpoints: See the docs here: https://github.com/ManiacalLabs/BiblioPixel/blob/master/bibliopixel/control/rest/README.rst

···

On Thu, Feb 7, 2019 at 8:52 AM Peter Gibbs pete@pegibbs.co.uk wrote:

Hi,

I’m new to most of this, but I’m pleased to say that I’ve got bibliopixed installed on a Raspberry Pi in a virtual env and have it successfully controling a long strip of APA102s going around a roof lantern - looks great and I’m really pleased so far!

Now I’m trying to include the REST control in a project file (with external_access: true) so that I can control and change the active animations from a web browser, then I’ll be able to auto-run the script and just have the whole lot turned on/off via a regular light switch (OK, there’ll be a delay while the Pi boots, but I can live with that!). The problem I have is that when I try to access the API (http://:8787) from a web browser on another device I get a 404 error - resulting in a “Not Found” page being displayed. It isn’t a network timeout, so I’m assuming the request is making it to the Pi, but it can’t find the file to return?

Could it be running in the virtual environment is confusing the path used to look for index.html? Any other ideas? It is probably something simple and obvious that I’ve missed, but I’ve run out of ideas!

Thanks,
Pete

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/05ab43c0-e8e5-4420-8177-e975627af1a6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Sadly no, you have to interact with it all directly through the API, there’s no UI.
And no, no UI examples… only people I’ve known to use the feature are using it to control the animations from some other application. Which is really what it’s intended for.

···

On Fri, Feb 8, 2019 at 2:33 AM Peter Gibbs pete@pegibbs.co.uk wrote:

Thanks - that would explain it!

I was following the docs here https://maniacallabs.github.io/BiblioPixel/topic-papers/using-rest-api.html which suggests a very simple form would be shown in the browser to build some requests. I guess it’s time to run up a web browser and write a page to drive this API then! Do you know of any tutorials/examples of this? Must have been done many times before.

On Thursday, 7 February 2019 14:11:57 UTC, Adam Haile wrote:

Nothing exists at the root level of the REST API url, you need to choose one of the endpoints: See the docs here: https://github.com/ManiacalLabs/BiblioPixel/blob/master/bibliopixel/control/rest/README.rst

On Thu, Feb 7, 2019 at 8:52 AM Peter Gibbs pe...@pegibbs.co.uk wrote:

Hi,

I’m new to most of this, but I’m pleased to say that I’ve got bibliopixed installed on a Raspberry Pi in a virtual env and have it successfully controling a long strip of APA102s going around a roof lantern - looks great and I’m really pleased so far!

Now I’m trying to include the REST control in a project file (with external_access: true) so that I can control and change the active animations from a web browser, then I’ll be able to auto-run the script and just have the whole lot turned on/off via a regular light switch (OK, there’ll be a delay while the Pi boots, but I can live with that!). The problem I have is that when I try to access the API (http://:8787) from a web browser on another device I get a 404 error - resulting in a “Not Found” page being displayed. It isn’t a network timeout, so I’m assuming the request is making it to the Pi, but it can’t find the file to return?

Could it be running in the virtual environment is confusing the path used to look for index.html? Any other ideas? It is probably something simple and obvious that I’ve missed, but I’ve run out of ideas!

Thanks,
Pete

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/05ab43c0-e8e5-4420-8177-e975627af1a6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “Maniacal Labs Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to maniacal-labs-users+unsubscribe@googlegroups.com.

To post to this group, send email to maniacal-labs-users@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/maniacal-labs-users/de613441-e339-4ba4-8909-9deebaad0ba8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Thanks for the quick reply and help Adam. The rest control is working perfectly!

I’m going to put a quick UI together for my wife to use, while I tinker with other apps to control it (Google home and home assistant) and get the kids writing some of their own animations :slight_smile: