1

Could someone suggest me the easiest way to send data from my android phone to my local Orion Broker Instance via MQTT? I have installed locally Orion Broker and IoT Agent for the Ultralight 2.0 protocol.

fgalan
  • 11,732
  • 9
  • 46
  • 89

1 Answers1

1

Assuming that IoTAgent is correctly configured to interact with Orion and with MQTT broker, the steps would be as follow:

  1. Provision your phone device at IoTAgent, using the IoTAgent provisioning API
  2. Start sending data using MQTT transport, from your device to the MQTT broker. IoTAgent will get that data and publish at Orion Context Broker.
  3. Get your data from Orion Context Broker, either using synchronous queries or subscriptions/notifications.

The step by step guide at IOTAgent documentation explains bullets 1 and 2 with more detail. However, note this document is based in JSON payloads, so you have to adapt them to UltraLight 2.0. For example, the UltraLigth 2.0 equivalent for

mosquitto_pub -t /1234/sensor01/attrs -m '{"l":4,"t": "31.5"}'

would be

mosquitto_pub -t /1234/sensor01/attrs -m 'l|4|t|31.5'
frb
  • 3,738
  • 2
  • 21
  • 51
fgalan
  • 11,732
  • 9
  • 46
  • 89
  • You shouldn't create such entity, the IoTAgent will create as a consequence of the provisiniong step (step 1). Having a entity created by you which matches the one that IoTAgent created will cause conflict and unexpected behaviour. – fgalan Mar 24 '17 at 11:56