...
Prerequisites
- complete the node pico-engine quickstart Pico Engine Quickstart
- have a ruleset registered, installed in the pico-engine, and added to a pico
- have installed the event console in Google Chrome
...
Here is a sample URL that sends an event to a pico like the one you created in the node pico-engine quickstart Pico Engine Quickstart:
Code Block |
---|
http://localhost:8084/sky/event/citdel5gz00012aaoo5ucc613/5/echo/hello |
...
Be sure to use the "validate" button to make sure there are no syntax errors in your ruleset. Once you get the "ok" go ahead and register, enable, and install your modified ruleset. (Review the node pico-engine quickstart Pico Engine Quickstart page if necessary)
Refresh your "My Picos" page, and click on the "Testing" tab.
...
You should see entries like this one:
Code Block |
---|
[DEBUG] event { { rid: 'hello_world', event: { eci: 'citdel5gz00012aaoo5ucc613citeh9si400022aao04assjxy', eid: '5', domain: 'echo', type: 'hello', attrs: {}, timestamp: '2016-09-22T16:03:42.797Z' }, pico_id: 'citdel5gm00002aaos8jbbe6n', rid: 'hello_world', rule_name: 'hello_world' } fired |
You may find this information useful in debugging events.
...
The console of your web server should now show this a the expected message like this (embedded in other logging messages):
Code Block |
---|
[DEBUG] { rid: undefined, event: { eci: 'ciu4b6zui0001jfs0nmki6z1y', eid: '5', domain: 'echo', type: 'hello' } } rule selected: hello_world -> hello_world [KLOG] our passed in name: Bob [DEBUG] { rid: 'hello_world', event: { eci: 'citeh9si400022aao04assjxy', eid: '5', domain: 'echo', type: 'hello' } } fired |
Congratulations!
You now know how to send events to, and make queries of, a pico. You have also learned some debugging techniques.
...