I am trying to automate the process of device creation in azure IOT Hub. Not able to find the code in ARM templet. Can anyone help me on it?
You can't register devices through ARM API.
The IoTHub Rest API documentation can be found here.
You can also use the az iot device registration create command to register device:
# Register an IoT device using an individual enrollment.
az iot device registration create -n {dps_name} --rid {registration_id}
# Register an IoT device using a group enrollment.
az iot device registration create -n {dps_name} --rid {registration_id} --gid {group_enrollment_id}
There is no ARM template for device creation. This is because ARM usually covers Azure resources and not the data plane of those resources. You can still automate device creation, the Azure CLI is an excellent way of doing that!
You can use the az iot device-identity create command to create a new device.
Related
I'm building a small iot project, in this project I want to turn on/off a LED connected to ESP32 through a website (wix/wordpress) and aws in the middle.
I've managed to do that between the ESP32 and aws iot core service, but I'm not sure how can aws communicate with the website (it doesn't matter which platform, the easiest, and free).
I wish to make a button on the website, when it pressed it turns on/off the light, how can i transfer the relevant information from a button click to aws (and then to ESP32)?
Thanks.
You would need to create an AWS Lambda function that sends the on/off code to your IoT thing. You would expose that Lambda function via an HTTP or REST (AWS API Gateway) endpoint.
Then in your website, you would call that endpoint when the button is clicked. Wordpress and Wix are two totally different website platforms, so the fact that you are asking about both makes the question unclear. In general you would lookup the method of communicating with an HTTP endpoint, REST endpoint, or "webhook" in the web platform you are using.
I am trying to integrate GCP with loraserver using LorixOne Gateway, I am following the guide at https://www.loraserver.io/guides/google-cloud-platform/
However my messages not reaching to loraserver through pubsub.
My setup is as below:
lora end device—>LorixOne Gateway with Lora base OS —> GCP IoT core -> GCP Pubsub —> VM running loraserver
I can see that all messages are reaching to IoT core but nothing can be seen on the pubsub or lora-app-server.
I am following the guide https://www.loraserver.io/guides/google-cloud-platform/ however something is not working ok with GCP PUBSUBHere is picture from GCP logs that I am getting messages to IOT core however nothing reaches to VM via pubsub
So issue here was not from Google cloud iot. there were 2 issues here.
1) gateway id is case sensitive
2) end lorwan device was not transmitting on right AU_915 band
Now all looks good.
Regards
Jayesh
I am very new to Bluez and I want to create some custom profile (GATT server) with one service and 2 Characteristics by using Bluez5.49 version.
I don't know how to start. I want to write this as a C application via Dbus. I don't want to use any command line operation for advertise.
I have doubt like if I advertise my device by using Dbus how I know whether I got scan request from Master (Central device). Which Dbus method is used to read the event of the BLE? How to proceed further?
Is there any option in Kaa when device contacted the Kaa platform with some data, Is it able to send the same information to our external systems through message broker? For example when a temperature sensor updated the current temperature value to the Kaa, Is kaa able to send the same information to the Messaging brokers like ActiveMQ.
Maybe you can try the Kafka or Flume appender of Kaa.
I try to use the Kafka appender to send the data from some sensor to storm server like below reference and it works fine.
https://www.kaaproject.org/iot-real-time-data-processing-in-storm-using-kaa/
And you also can custom your appender by following below url:
https://kaaproject.github.io/kaa/docs/v0.10.0/Customization-guide/Log-appenders/
There are many possibilities to do that which are better or not depending on your particular use case.
But, usually the most efficient way would be to use one of the existing Log Appenders that are running on the Kaa server side and were specifically created for such messaging.
With the last release of BlueZ (5.30) the highlight was the completion of the GATT D-Bus apis. My goal is to programmatically (in C), as a BLE client:
scan for ble devices (which I can do with the hci layer)
Connect to an advertising BLE device
Get the UUIDs
Execute Read and Write to handles
The BlueZ community is strongly suggesting to use the GATT-Dbus api to accomplish this. After multiple searches and head scratching I was not successful to find a proper way or example that would perform this through GATT-DBUs api. It seems more complicate than just use directly the GATT layer. Unfortunately BlueZ removed direct access to make calls to gatt.
I'm very close to just pull the GATT source files out from Bluez, compile it as it's own independent library and directly use the GATT layer and calls to connect and execute reads/writes to ble device server. I know it is not the suggested way compared to the DBUS-GATT api but I'm out of options.
If anybody has any input on this or suggestion (with some sample code) please advise.
thank you in advance!
The best way to start with DBUS GATT API is to hace a look at the source code here: http://git.kernel.org/cgit/bluetooth/bluez.git/tree/
Under client folder you can find a full sample of how to use the DBUS GATT API. Actually that is the source of bluetoothctl tool.
Note that DBUS GATT API is still experimental but you can enable it running bluetoothd service with -E flag.
I had a similar issue which is to interact with a BLE device with a GATT C/C++ API.
In my case I had to use Bluez v4.101 - the latest Bluez version available in Ubuntu 14.04 LTS (read my story). In Bluez v4.x, there is no DBus API.
And actually, I have recently worked with Bluez v5 DBus API and I discovered if you do not use at least Bluez v5.39 (from April 2016) it is likely you will have issue with the DBus API. And as said before the DBus API is still experimental.
So to solve my Bluez v4.x dependency I had to pull the GATT source files out from Bluez and create my own library 'gattlib'. The project is Open-Source to encourage feedback and contribution.
I am using this library in my own GATT client project.
I wrote few examples to help people to start using it see the folder /examples of the project.
EDIT March 2017: I have just added DBus support to gattlib (https://github.com/labapart/gattlib/). From Bluez v5.42, gattlib automatically uses DBus API (DBus gattlib backend can also be forced when building the library to use it before v5.42).