The wrapper implements OS dependent services for libweave
enable user-service-publishing in avahi daemon file: /etc/avahi/avahi-daemon.conf check: disable-user-service-publishing=no restart: sudo service avahi-daemon restart
Goto https://developers.google.com/oauthplayground/
copy the ticket “id” generated above 93019287-6b26-04a0-22ee-d55ad23a4226
go to terminal, register and start the daemon with
sudo out/Debug/weave_daemon_sample --registration_ticket=93019287-6b26-04a0-22ee-d55ad23a4226 you should see something like: Publishing service Saving settings to /var/lib/weave/weave_settings.json
note: in second and future runs, --registration_ticket options is not necessary anymore
get your device id with sudo cat /var/lib/weave/weave_settings.json you should see ... “device_id”: 0f8a5ff5-1ef0-ec39-f9d8-66d1caeb9e3d ...
this device_id shall be used for future communication with your device. it does not expire and no need to register.
verify device is up with Weave Device Manager at android: https://play.google.com/apps/testing/com.google.android.apps.weave.management chrome: https://chrome.google.com/webstore/detail/weave-device-manager/pcdgflbjckpjmlofgopidgdfonmnodfm [need your whitelisted EAP account]
go to the oauthplayground used for registration ticket command in “Step 3”, send command with HTTP Method: POST Request URI: https://www.googleapis.com/weave/v1/commands Enter request body: { “deviceId”: “0f8a5ff5-1ef0-ec39-f9d8-66d1caeb9e3d”, “name”: “_sample.hello”, “component”: “sample”, “parameters”: { “name”: “cloud user” } } “Send the request”, you command will be “queued” as its “state”
verify the command execution observing daemon console logs
verify the command history with oauthplayground Similar to “Acquire Registration Ticket” section in this document, except in “step 3”, do:
HTTP Method: GET [not POST anymore] Request URI: https://www.googleapis.com/weave/v1/commands?deviceId=0f8a5ff5-1ef0-ec39-f9d8-66d1caeb9e3d
“Send the request”, you get all of the commands executed on your device, find something like “kind”: “weave#command”, “name”: “_sample.hello”, ...