Both of examples (Node.js and Python) execute the following flow:
- Authenticate (Node.js example authenticates by default credentials, meanwhile Python directly by access token)
- Create device
- Subscribe for commands and notifications for just created device
- Send command, command update and notification
So as a result of execution you will see notification and command payloads received from DeviceHive.
pip install CoAPthon
- Set your access token to
ACCESS_TOKEN
variable inpython.py
python python.py
- Execute
npm i
in app root - Set your access token to
ACCESS_TOKEN
variable innode.js
node node.js