The node pico engine includes a UI consisting of two web pages,
- the My Picos page which lets you see a visual representation of your picos, including their parent/child relationships and subscriptions
- the Engine Rulesets which lets you see the list of rulesets registered with the engine
Although you can use the pico engine directly* from your own applications, you may find these UI pages useful to get things set up, and to have an independent view of the state of your application's picos.
Assuming your pico engine is running on localhost
port 8080
, the two pages are located, respectively, at
http://localhost:8080/index.html
http://localhost:8080/ruleset.html
Using the pico engine through the UI
Pico Engine UI -- My Picos page
Pico Engine UI -- Engine Rulesets page
*Using the pico engine directly
You can make requests to your engine over HTTP (using curl
in a linux shell, or Postman, or a browser location bar). For example,
http://localhost:8080/api/engine-version
will allow you to know which version of the pico engine you are running. For example, {"version":"0.7.2"}
http://localhost:8080/api/owner-eci
will give you the secret event channel identifier (ECI) for your owner pico, so that you can begin interacting with it programmatically. For example, {"eci":"cj12o992p0001lnddcx1owv2s"}
The pico engine installs two rulesets in the owner pico : io.picolabs.pico
and io.picolabs.visual_params
. The first of these is required in every pico. The second is expected by the UI to be installed in every pico.
Requests like http://localhost:8080/api/ruleset/register?url=<URL to raw KRL ruleset source code>
can be used to register your own rulesets with the engine.
To install one of your registered rulesets in a pico, make a request like http://localhost:8080/sky/event/<ECI>/<EID>/pico/new_ruleset?rid=<RID>
including an ECI for the pico, an event identifier (EID) or your choice, and the ruleset identifier (RID) of your ruleset.
Once you have an ECI for your pico, and have given it rulesets, you can send it other events and queries.