cmaneu / Azure-Blinking-IoT-Compressor

This repository contains the "Azure Blinking IoT Compressor" workshop.
MIT License
3 stars 1 forks source link

Create a "registry" website #3

Closed cmaneu closed 4 years ago

cmaneu commented 5 years ago

In step 1, attendees will register their Azure Functions to the proctor's registry. We need a small web page to allows them to auto register.

Data Storage Let's store it in an Azure Table Storage. PartitionKey : event code (like devfestnantes19) RowKey : deviceId from IoT Hub Device Registry callbackUrl : an HTTP/s URL of the attendee Azure Function

Interface

No need for AJAX, if an MVC web app is easier.

Features

About the test message I'll confirm Thursday morning the JSON schema, but just send a dummy JSON by doing an HTTP Post request to the specified URI. The JSON will look like this :

{
    "deviceId": "device-24",
    "temperature": 23.4,
    "pressure": 1004.9,
    "humidity": 52.7
}

(P1 or P2): You should also display the result of that request. The response format should like this:

{
    "state": "running/idle",
    "led": 
    {
        "r": 255,
        "g": 0,
        "b": 0
    }
}
fbouteruche commented 4 years ago

The ComboBox, the input field and the Save button are implemented and deployed. It reads the list of devices from the IoT Hub registry and populate a DropDownList. It also reads the previously saved callback urls. When the user selects a device in the DropDownList, if there is a previously saved callback url for this device, it is displayed in the input field. When the user clicks on the Save button, the callback url is written to a table storage. If there is a previsous callback url, it is replaced.

fbouteruche commented 4 years ago

The test button is implemented