I’ve added a ZWave/ZigBee thing on the gateway, great! Now I’d like to have other web apps interact with these things. Is a Web Thing API created for these devices and where can the URL be found?
I put together a simple example of interacting with a device (ZigBee light) using bash/curl. You can find these examples here:
If you look at the get-things.sh example output, you’ll see that each property has an href which combined with your custom domain name, gives you the URL.
The domain name will be custom-name.mozilla-iot.org and you can check what yours is by looking at Settings->Domain. So your URL will wind up being something like:
https://custom-name.mozilla-iot.org/things/HttpOnOffDevice-F714A9/properties/on
You can find out more about the API in this document:
https://iot.mozilla.org/wot/
I don’t see any example on how to register a call back…or create a socket in order to get notified upon state changes of zigbee input. For example, I would like to get a notification when a zigbee button gets pressed. Is this possible without polling the status of a webthing?, thanks Nick,
Our UI uses websockets to get notified of button presses. Unfortunately, the current curl examples don’t have an example. I’ve thought about doing an example in python, but haven’t done that yet.