Orion Context Broker Configuration to Cloudino
Configurations the server Orion Context Broker - FIWARE. Enter to the configuration Cloudino "Context Broker Orion", define the next fields.
Active: True
DNS: Orion.lab.fi-ware.org
Port: 1026
User Token: (generate token fiware site, for example kvx0QWD8CEMd3Yl4B1Ugefnr6WcThI. That more information https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_Quick_Start_for_Programmers )
Entity ID: (Instance name, for example “MyHouse”)
##Example
Curl https://orion.lab.fi-ware.org:1026/ngsi10/contextEntities/MyHouse -X GET -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header "X-Auth-Token: kvx0QWD8CEMd3Yl4B1Ugefnr6WcThI" | python -mjson.tool
####The example MyHouse send results
#include <Cloudino.h>
#include <dht11.h>
#define DHT11PIN 8
Cloudino cdino;
dht11 DHT11;
void getSensor()
{
int chk = DHT11.read(DHT11PIN);
cdino.post("temperature",String((float)DHT11.temperature,2));
cdino.post("humidity",String((float)DHT11.humidity,2));
cdino.print("Timer done!");
}
void setup()
{
cdino.setInterval(10000,getSensor);
cdino.begin();
}
void loop()
{
cdino.loop();
}
Cloudino is developed and maintained by INFOTEC (Public Research Center of CONACYT) as an Open Source and Open Hardware Platform. Av. San Fernando 37, Toriello Guerra, Mexico City | soportewb@infotec.com.mx Copyright © Cloudino 2015-2020. All rights reserved.