Raspberry Pi Web Simulator- Azure IoT Hub- blank chart - azure

I'm using Raspberry Pi simulator with IoT hub azure, I followed the steps correctly but when I checked the chart, I got a blank chart, even I set the connection string and Device Id and consumer group on the web settings.
PS: I can see the messages in Raspberry simulator and Azure IoT tools with visual studio code.
any advice?
thanks in advance

It looks like your web app and IoT Hub is not connected. I would suggest you, recheck your connection string generated along with consumer group and make sure you set these values correctly.
I followed the official documentation to Visualize real-time sensor data from your Azure IoT hub in a web application and able to see the data without any issues.
Here is my output:
Please follow the documentation and let me know if you need further help.

Related

Azure IoT Hub Telemetry Data to Mobile Application

I'm trying to get data from arduino yun to azure iot hub and read data from mobile app. So I created IoT Hub on Azure and able to read telemetry data with nodejs on my computer. It's working good. But trying to create react app for reading data. What should I do for best way to handle this. I must use react native for mobile application part.
Project info:
Load cell reading data, if change then it will provide info to iot hub as telemetry. Then it should inform mobile application created with react native for users.
For testing using button press right now. Main code for load cell will deploy in the future. Sending data from arduino yun to local computer and pushing with nodejs application to Azure.
I manage to solve issue with some escape resolutions:
Used a localhost to get messages from yun and transfer them to iot hub with nodejs backend and libraries.
Used a webapp for visualize. Also now I am able to make a get request from anywhere on my mobile app load. Integrated that in webapp code with endpoint.
Also used websocket to get information from webapp to mobile device.
Created custom png file to show different stats and pressed values to text.
I wish that I can send telemetry from device directly to azure. But couldn't manage to solve that.

Connectivity via a Field Gateway with IoT Central

I am building an IoT Solution based on non programmable devices. I can just configure a host where they can connect to send data and receive commands.
Now, supposed that I know the messaging protocol of the device, I would like to build a field gateway to apply protocol and identity translation with the IoT Hub behind IoT Central.
Is that doable ? If yes, may you drive me to the solution please ?
AFAIk, this scenario is not implemented yet. Please provide your feedback on the UserVoice.
All the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.
Reference: How to create IoT edge device on IoT central?

Sample C code for Azure IOT Central device

I'm trying to develop a device suing Azure SDK C. I'm able to send telemetry messages (using the "iothub_ll_telemetry_sample" sample) but I'm NOT able to receive settings (I define a setting, FanSpeed, but when I change the value on IOT Central then I don't receive any callbacks).
There is it a working sample? possibly for Windows.
Thanks
You can find the Azure iot central firmware examples on github. I would suggest you to look at AZ3166 example for azure iot central
For Azure IOT Central I have found the most useful examples to be located on the Azure IOT Central firmware github:
https://github.com/Azure/iot-central-firmware
The repository has been reorganized a bit since the earlier answer from Ozzz. You can find a C code example in the MXChip example.

Possible to remotely update Windows 10 IOT Core App without Azure or Windows Store?

I am in the process of finishing up a Windows 10 IOT Core app to be deployed on Raspberry Pi 3 devices for a single location beta test. The app is consumer facing and reads from a sensor so I am sure there are going to be at least 1 or 2 updates per week as we perfect the app. Everything I am reading says you can only achieve app updates from Windows Device Portal, Windows Store, or Azure.
Windows Device Portal works fine for local management/deployment right now but won't work remotely because the devices will eventually be installed all throughout the country behind different firewalls, etc. We don't want to have to keep up with customer firewall port forwarding.
Windows Store probably won't work because we don't want to have to wait for up to 48 hours for update approvals. Also not sure if Windows 10 IOT fully supports Windows Store yet.
I have not figured out how Azure IOT Hub manages app updates but I would really like to avoid having to use Azure if possible since we prefer to keep everything on our own servers and not pay cloud providers for stuff we can do on our own servers.
Has anyone figure out how to run a background service to download an app update and apply it?
I am just going to have to deal with Azure IOT Hub?
There is another option: Using OMA-DM.
Using OMA-DM: The app is updated using an OMA-DM compliant device
management channel such as Intune or System Center Configuration
Manager (SCCM)
The OMA-DM interface is supported in Windows 10 IoT Core and any
OMA-DM compliant management solution can be used to install and update
applications. Read the documentation for EnterpriseModernAppManagement
CSP for usage instructions.
NOTE: Some information of EnterpriseModernAppManagement CSP relates to prereleased product which may be substantially modified before it's commercially released.
You do need a type of (online/internet) service to connect to your IoT Core devices. Reference:
Microsoft Store: The app is published and updated from the Microsoft Store
Using Component Update Service: The app is published to Windows Update and updated like any other OEM package (driver package) Coming soon
Using Azure IoT Device Management: The app is published to Azure Storage and updated through the Azure DM channel New for Windows 10, version 1709
Using OMA-DM: The app is updated using an OMA-DM compliant device management channel such as Intune or System Center Configuration Manager (SCCM)
With Store, you'll be using the Microsoft Store service; Azure IoT Device Management will be using Azure IoT hub; OMA-DM can use Intune/SCCM or your own infrastructure (OMA-DM Server)

Push notifications on android emulator using Xamarin Forms via Azure Notification Hubs

I am embarking on setting up a Xamarin Forms project for proof of concept with an aim of having an Android app running in the Android emulator registering and receiving google cloud notifications sent via Azure's notification hub.
In researching this I have found some sample code which assumes a backend which uses Microsoft Azure's Mobile Services back end.
I'd prefer not to have a dependency in my client code on Mobile Services backend if possible. However, maybe this is unavoidable (or inadvisable) when using Azure Notification Hubs. That is really the central issue I am raising with this question.
The tutorial linked below shows an approach to register and receive notifications using a Xamarin forms app which is dependent on the Azure Mobile Services backend.
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-xamarin-forms-get-started-push/
Whereas, this second tutorial shows an approach where the mobile client app (developed using Xamarin Android) registers to the Google messaging cloud rather than Azure notification hubs).
https://developer.xamarin.com/guides/android/application_fundamentals/notifications/remote_notifications_in_android/
Where I am coming unstuck is trying to figure out which is the right approach to enabling a Xamarin forms app to register and receive notifications which are pushed via Azure notification hub.
Will the approach of the 2nd tutorial (device registers for push notifications directly with Google cloud) work when notifications are sent via Azure Notification Hubs (configured with the correct API credentials for google messaging) or am I missing something ?
In other words am I making life difficult for myself by adopting the 2nd approach ?
My focus is on developing using Xamarin forms but with Android as the lead device type for initial prototype , proof of concept and then moving on to iOS and Windows Universal 10 at a later stage.
My 2 cents.
The whole point of using Azure Notification Hubs is to abstract away the need to handle Google and iOS push notification systems. Since you are planning to eventually do both iOS and Android, I would suggest registering through Azure.
Azure will handle the iOS feedback channel when registering devices which is nice and you are able to use message templates in Azure which means you can send a single notification hub message and it will be automatically transformed into a message that Android's GCM expects to see and another message that iOS' APNS expects to receive (they both expect different notification message formats).
Since it sounds like no matter which option you choose, you are planning to send messages through Azure, you are going to have to deal with the same Notification Hub limitations, meaning you do not gain much from registering directly through the native server interfaces (limitations in the number of tags a message can have is what I am mainly thinking about).
There is also a library for both platforms if you want to register directly from the device or you can, like we did, have the mobile device call one of your own backend server which can do some initial processing before sending the registration request to azure for the device.
*Edit: Though if you just want to get something working, I do not see a problem with registering directly to GCM and then later on switching out the code to do it through Azure later on.

Resources