Learn by doing
Table of contents
-
Thingularity Partition API v0.2.244
Payload drivers¶
Thingularity platform introduces the concept of device drivers for IoT solutions. Device driver similarly to device drivers for operating systems is a set of functions and specific data which fully describes connected device to IoT network and provides following key functionality:
-
payload decoding
-
functions for device configuration (if supported by device)
-
functions to provide specific device information (device status, health, versioning, etc)
-
static data describing device itself (model number, actual configuration, picture, other information).
Some device drivers functions can be accessed by applications via corresponding API.
Below you may find the list of supported devices, including payload description.\n\n
Command line interfaceCommand line interfaceCommand line interface
Auto generated by spf13/cobra on 19-Dec-2019
Services
-
Example
Below example is APIs format, its not intended for your login.
http://monitoring.vtc-chaiwan.demo.thingularity.online/placeholders/list
http://monitoring.pixel02.iot.pn/plans
http://monitoring.pixel02.iot.pn/placeholders/list
http://monitoring.pixel02.iot.pn/placeholders/list/e52b384b-adbe-42d1-a152-c63c209cf9cb
http://monitoring.pixel02.iot.pn/placeholders/list/217bd38b-f30c-4a9a-a4fc-7c23a54b7a99/location
Thingularity Partition API
http://api.thingularity.online/0.2.244/
http://api.thingularity.online/doc/main/
To connect to Web-socket:
1. Generate WebSocket API token via calling API. Take a look at the example by this link: http://api.thingularity.online/doc/examples/login/
API: http://api.vtc-chaiwan.demo.thingularity.online/
2. Once you got API token you can connect to WebSocket at ws://ws.vtc-chaiwan.demo.thingularity.online/?token=<API_TOKEN>
Kirill Nosov
PIXEL NETWORK LoRa
Manual
http://api.thingularity.online/doc/
http://api.thingularity.online/0.2.28/#operation/addPlaceholder
Work ok, housing department
http://monitoring.pixel02.iot.pn
Panel Device
http://monitoring.pixel02.iot.pn/placeholders/list/d9f937d0-ce5e-4dfc-bcd5-caee524b6416
/placeholders/list/{deviceID}
http://monitoring.pixel02.iot.pn/placeholders/list/217bd38b-f30c-4a9a-a4fc-7c23a54b7a99
http://monitoring.pixel02.iot.pn/placeholders/list/127b92bd-a3e3-4b19-bd56-03897c0f21b4
http://ttcwc.pixel02.iot.pn/console?token=gv1d8D5NI6YN00-mep49jCe0Wp0tAOLn6eHx10Jr8
Dashboard
http://monitoring.pixel02.iot.pn/dashboard/FqGMe9zLTjQr36MGQ
Settings
http://monitoring.pixel02.iot.pn/settings
http://monitoring.pixel02.iot.pn/users/list
user: A
http://monitoring.pixel02.iot.pn/users/list/8wna4hnZwv99JJpkm
user: B
http://monitoring.pixel02.iot.pn/users/list/ZqnZPsfDkGpCYWTTk
user: C
http://monitoring.pixel02.iot.pn/users/list/nMenw2t3Ch9iWjabc
http://monitoring.pixel02.iot.pn/users/QAZGgrDQTv9fuWZ9H/list/nMenw2t3Ch9iWjabc
Plan is the map
http://monitoring.pixel02.iot.pn/plans
Location Mapper
The Things Network
https://www.thethingsnetwork.org/
Learn Thingularity API documentation
http://api.thingularity.online/doc/examples/readgps/ ç
Learning Resources
Web socket demo Hussein Nasser
WebSockets technology is a bidirectional, full-duplex protocol for communication between client and server over the web. It has been standardized in 2011 and its fully compatible with HTTP. This protocol enables real time applications such as chatting, notifications, live feed, multiplayer gaming and other use cases. In this video we will explain what WebSockets are and why it was invented. we will then build a server and client using WebSockets. We will also talk about the pros and cons of WebSockets, and discuss some alternatives to this technology Source Code in the video for WebSockets
Topic: Build A Weather App With Vanilla Javascript Tutorial | Javascript For Beginners
https://darksky.net/forecast/40.7127,-74.0059/us12/en
Icon: https://darkskyapp.github.io/skycons/
Topic : EXPRESS JS
Topic: Traversy Media @ youtube channel
Good learning information: http://www.brython.info
Book store REST API code
Youtube Part 1 “RESTful API From Scratch Using Node, Express and MongoDB”
Youtube Part 2 “RESTful API From Scratch - Part 2 - Angular Frontend”
Topic: Free Code Camp
Topic: React JS
http://github.com/facebook/create-react-app
-
npm create-react-app
-
npm start
localhost:3000
https://api.github.com/graphgl
Topic: JWT token (JSON Web Token)
>npm install jsonwebtoken
Topic: websocket
http://pycon.dionmisic.com/feed
const socket = new WebSocket(‘ws://localhost:8000’);
>npm install websocket
Topic: darksky.net
Topic: Handtrack.js
Handtrack.js is a library for prototyping realtime hand detection (bounding box), directly in the browser. Underneath, it uses a trained convolutional neural network that provides bounding box predictions for the location of hands in an image.
https://github.com/victordibia/handtrack.js
Topic: AJAX crash course(youtube)
In this video we will dive into AJAX with Vanilla JS and NO JQUERY. We will examine the XHR object and how it works. This is a beginner friendly tutorial for anyone that has very basic JavaScript knowledge. We will make xhr requests to a txt file, local json files, an external API and even PHP files. CODE: Files for this course
Topic: Artificial Intelligence Machine Learning JS Youtube
This is a very basic intro to machine learning and neural networks using brain.js which is a machine learning library for JavaScript. Code files
Topic: Artificial intelligence using Brain.js Youtube
This course gives you a practical introduction to building neural networks in the browser and in Node.js using the Brain.js JavaScript library. To complete the course’s interactive challenges, simply head over to the Scrimba version: https://scrimba.com/g/gneuralnetworks
Topic: Neural Network with Javascript Youtube
This origin from Machine Learning Movement in Javascript: http://bri.im
Teacher is Robert Plummer at http://scrimba.com
Academind REST API youtube
AXIOS youtube
React Axios tutorial is about using the promised based HTTP client with a ReactJS application to perform Get requests, Post requests, etc. We will see why using Axios makes accessing a REST api easy, as well as passing JSON data to and from the server.
We go over how to use axios with react, starting by how to install axios in our react app. We will import axios into the react project and initiate an instance of axios to an API endpoint with a baseURL. This will let us perform get, post, patch and delete requests to the server.
Using react axios api, we will then perform some HTTP get requests and set that response data into a react state. This will be updated when we later delete or update that same data.
React axios crud is about using react axios HTTP requests to make it easier to access REST. It can be used in plain javascript, in react native applications, or even in plain javascript. Ideally, you can set an instance of axios to run in the store of an application with custom headers, such as a token or api key. We also look at using react axios async await functions to allow our code to run much better and cleaner, with try catch loops. If you don't use the latest async functions, you can also run then / catch events in axios as part of it's api in order to identify if there was an error in getting the response from the server.
AXIOS crash course youtube Github
Developer web-design github
Discussion
-
REST API return HTML click
-
Authentication like OAUTH etc., pure by ID number as a password?
-
What kind of security measure takes?
-
What kind of database, is it noSQL like MongoDB etc.?
Partition is created. Here are some useful info:
-
Your partition is named pixel02.
-
You can access the monitoring portal at http://monitoring.pixel02.iot.pn. Upon accessing the portal for the first time you will be offered to create an admin user.
Your LoRaWAN console services:
-
Visit http://api.thingularity.online/doc/ to read the Thingularity Application Server documentation.
Swagger
https://swagger.io/docs/specification/about/
What Is OpenAPI?
OpenAPI Specification (formerly Swagger Specification) is an API description format for REST APIs. An OpenAPI file allows you to describe your entire API, including:
-
Available endpoints (/users) and operations on each endpoint (GET /users, POST /users)
-
Operation parameters Input and output for each operation
-
Authentication methods
-
Contact information, license, terms of use and other information.
API specifications can be written in YAML or JSON. The format is easy to learn and readable to both humans and machines. The complete OpenAPI Specification can be found on GitHub: OpenAPI 3.0 Specification
What Is Swagger?
Swagger is a set of open-source tools built around the OpenAPI Specification that can help you design, build, document and consume REST APIs. The major Swagger tools include:
-
Swagger Editor – browser-based editor where you can write OpenAPI specs.
-
Swagger UI – renders OpenAPI specs as interactive API documentation.
-
Swagger Codegen – generates server stubs and client libraries from an OpenAPI spec.
Why Use OpenAPI?
The ability of APIs to describe their own structure is the root of all awesomeness in OpenAPI. Once written, an OpenAPI specification and Swagger tools can drive your API development further in various ways:
-
Design-first users: use Swagger Codegen to generate a server stub for your API. The only thing left is to implement the server logic – and your API is ready to go live!
-
Use Swagger Codegen to generate client libraries for your API in over 40 languages.
-
Use Swagger UI to generate interactive API documentation that lets your users try out the API calls directly in the browser.
-
Use the spec to connect API-related tools to your API. For example, import the spec to SoapUI to create automated tests for your API.
-
And more! Check out the open-source and commercial tools that integrate with Swagger.
Chai Wan VTC
http://monitoring.vtc-chaiwan.demo.thingularity.online/login
SenML
https://tools.ietf.org/html/draft-ietf-core-senml-13
Steves internet guide
http://www.steves-internet-guide.com/mqtt-apis-iot-guide/