LoginSignup
2
0

Azure IoT Centralでカスタムデバイステンプレートを作成する

Last updated at Posted at 2021-02-11

電源が ON になったらデータ 1 を送信するデバイスのテンプレートを作成します。

公式ドキュメント:デバイス テンプレートとは(https://docs.microsoft.com/ja-jp/azure/iot-central/core/concepts-device-templates)

カスタムデバイステンプレートを作成する

Image from Gyazo

Image from Gyazo

Image from Gyazo

Image from Gyazo

カスタムモデルを設定する

Image from Gyazo

Image from Gyazo

Image from Gyazo

ビューを設定する

Image from Gyazo

Image from Gyazo

忘れずに公開する。

Image from Gyazo

Image from Gyazo

公開すると、デバイスに表示される。
Image from Gyazo

ハマったところ

デバイステンプレート公開後にビューを追加できない→新しいバージョンを作成する

ビューを設定するのステップを飛ばしてテンプレートを公開しまった後に、ビューの設定を行おうとすると、以下のようなエラーが発生しました。

Cannot edit published modelDefinition document: {デバイステンプレートID}
エラー コード: 400.470.006.314 / 6wsbu0dav8.1

Image from Gyazo
そのような場合はバージョン管理を行いましょう。
Image from Gyazo
無事ビューを追加できました。
Image from Gyazo
デバイステンプレートを更新したので、デバイスを新しいデバイステンプレートに移行させる必要があります。
Image from Gyazo
Image from Gyazo
以下の通知が表示されれば OK です。
Image from Gyazo
無事新しいデバイステンプレートに移行されています。
Image from Gyazo

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0