I am in the process of evaluating HONO for IOT stack. We have scenarios where an intermediary device would send telemetry data for other devices. Communication through an Intermediary device is referred as a Gateway in Hono. I have found how to send messages through Gateways.
I am not sure on the following queries.
How to register the Gateway? Should it be registered as an ordinary device or anything else should eb done?
How would Hono verify if the message is indeed sent from the device whose device ID is specified? Any option to authenticate the real sender of the message?
Yes, a gateway needs to be registered as a normal device with its own device ID and credentials.
In order for a gateway to be allowed to publish data on behalf of another device, that other device needs to have its via registration property be set to include the gateway's device ID. Example: your gateway device has ID GW1 and you have a device with ID DEV1. Then the registration information for the device should look like this:
{
"via": [ "DEV1" ],
...
}
When the gateway then connects to the adapter and is successfully authenticated, it can publish data on behalf of another device by means of indicating the device ID in the URI, topic, address as described by the user guides of the adapters. The adapters then verify, if the gateway ID is listed in the device's registration information's via property and if not, rejects the data. The adapter thus delegates authentication of the device to the gateway.
Related
I am trying to use Direct Method to invoke device OTA
The device I am using is Quectel EC21 and subscribe to the topic "$iothub/methods/POST/#"
When I Invoke the method in Azure IoT explorer,I always get the time out fail message that "message":"Timed out waiting for device to connect."
enter image description here
This error message confused me since I expect my device receive the method payload through MQTT from topic "$iothub/methods/POST/#" but I received nothing.
But at he same time, I can receive normal cloud to device MQTT message through topic "devices/deviceID/messages/devicebound/#"
So, is the Direct method connection and Iot hub connection are different connection?
After searching online and hint from Matthijs.
To make the direct method work, I found need to add api version in username field as below
For the Username field, use {iothubhostname}/{device_id}/?api-version=2018-06-30
In Byteball, Every device connects to its home hub using websockets, that is, communication between every devices and between light client and full nodes is done by websocket
Then how can communication between full nodes implemented?
For storing all status of byteball in full nodes database, connection between full nodes should be existed.
What is the way to communicate between full nodes?
The communication between two wallets is done via the hub. The sender wallet sends the message to the recipient's hub and the hub forwards it to the recipient. If the recipient is not online, the hub stores the messages and forwards them when the wallet reconnects again. Note that the communication is encrypted end-to-end between the sender and recipient, the hub cannot decrypt messages passed between wallets.
When using GH device integrated with Dialog Flow, while conversation starts from google home and back to webhook requests, can we get the the GH device details, like the speaker name, IP, WAN IP if used?
No, the data that would identify an individual device are not provided to your Dialogflow agent.
Each time that a new device connects to an IoT agent, the IoT agent sends an updateContext to the context broker and a new context entity is created. And if this device has some lazy attribute the IoT agent will send a contextentityRegistration in order to create a context registration, to indicate to the context broker how can connect to the device.
But when the Context Registration is created, I'm not sure about the value that will be assigned to the providingApplication attribute.
It is used the ip:port of the IoT agent where it listens to the context broker requests?
or should it be the URL of the device?
Although I'm not sure, I believe the correct one it's the first option, because the device normally won't understand the NGSI protocol, and the IoT agent should translate the request before sending it to the device. If that's the case, then:
It is necessary some initial configuration, or when the IoT agent creates a new context Registration automatically establishes itself as the context provider?
Regarding the property "commands" used when a new device is registered by the IoT agent, what's their functionality? Are they used by the IoT agent to translate any request from the context broker addressed to the device?
Thanks in advance, any help would be grateful.
2) The property "commands" is used to define attributes of the ContextBroker entity that will actually tirgger a command to the device if they are updated using the NGSI API. This means tahta developers are able to read observations and also send commands just using one API (NGSI) with no knowledge of the specific device technology or protocol.
1) In UL2.0 lazy attributes are not supported so far. Please refer to the other IoT Agents for that.
Normally the IoT Agent IP:Port should be used for that.
Cheers,
I am using Azure Notification Hubs to manage my device registrations.
I am using Azure Mobile Services to push notification request to Notification Hub.
Using tags, I am able to use notification hub to broadcast sender's message to a group of recipients.
My new requirement is, I want sender to be able to send notification to a particular device that belongs to a particular tag. Which means I need a way for sender to list all devices that is registered to, say... "football" tag, have sender choose which device to send to, and tell Notification Hub to send notification to that device.
How do I achieve that? I will need to write an api that returns all devices that belong to a certain tag to the sender right?
Notification Hubs allows users to extract all registrations associated with a single device. Take a look at https://msdn.microsoft.com/en-us/library/azure/dn223274.aspx, that should help.