5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Arduino Cloud と Arduino IoT Cloud などの情報を整理してみる【未完】

Last updated at Posted at 2021-08-12

この記事は、Arduino MKR WiFi 1010 をゲットして Arduino IoT Cloud のお試しをする中(以下の記事を書いていく中)で得た情報や、その後に調べて知った内容をまとめたものです。

「Arduino Cloud と Arduino IoT Cloud が別物」というのを見かけて、これらの違いや詳細が気になったので、調べた内容を整理しておこうと思います。

Arduino Cloud と Arduino IoT Cloud の違いが書かれた記事

Arduino Cloud と Arduino IoT Cloud が別物だと知ったのは、以下の記事を読んだ時でした。

●Arduino、クラウド開発環境「Arduino Cloud」の機能や特徴を紹介 | fabcross
 https://fabcross.jp/news/2021/20210714_arduino_cloud.html

記事の中で『Arduinoは、2021年5月3日に、クラウド開発環境「Arduino Create」の名称を「Arduino Cloud」に改めるとともに、...』といった記載があったり、「なお、2016年5月20日付のArduino Createに関する公式ブログ記事でも『Arduino Cloud」という名称が使われているが、これはArduino IoT Cloudを意味するものであり、混同しないよう注意する必要がある。』といった記載もあります。

上記の記事で概要が分かったので、その後さらに詳細情報を知るため、上記の記事の元になっている以下の公式の記事を読んだりしていきました。

●14 awesome Arduino Cloud features you never knew existed
 https://blog.arduino.cc/2021/06/18/14-awesome-arduino-cloud-features-you-never-knew-existed/

そして、Arduino Cloud のページにアクセスして、説明などを確認していったりもしました。

Arduino Cloud について

Arduino Cloud は、記事執筆時点では以下のような URL でアクセスしたり等できます。
 https://create.arduino.cc/
 https://store.arduino.cc/digital/create
Arduino_Cloud.jpg

そして、アカウントを作成してログインすると、トップページは以下になります。
ArduinoCloudのトップ.jpg

このログイン後の画面のトップには、「IoT Cloud」・「Web Editor」・「Manager for Linux」という 3つの内容の表示があり、ログイン状態でこれらを選ぶと以下の URL のページに遷移しました。

●Arduino IoT Cloud
 https://create.arduino.cc/iot/things

●Arduino Editor
 https://create.arduino.cc/editor/

●Arduino Manager for Linux
 https://create.arduino.cc/devices/

この中の「Arduino IoT Cloud」は、冒頭に記載していた 2つの Qiitaの記事を書いた時に利用したものです。

有償・無償のプランについて

ページの下のほうを見ていくと、料金プランに関する記載がありました。
ArduinoCloudのプラン.jpg

上記の中で、無償で使える範囲は以下のように書かれています。

  • 2 Things
  • Unlimited dashboards
  • 100 Mb to store sketches
  • 1 day data retention
  • 200s/day of compilation time

自分がダッシュボード連携をした記事を試した記事で出てきた内容関連だと、このクラウドサービスに登録できるデバイス数は 2台になるようです。
また、ダッシュボードについては無制限に利用ができるようです。

その他にも記載がありますが、上記の料金プランが書かれた部分の下に、プラン毎の機能比較がもう少し詳しく書かれている部分があるので、そちらを見ていこうと思います。
プランの機能比較(詳細).jpg

とりあえず、無償プランで利用可能なもの・制限を書きだしてみました。

  • スケッチ関連
    • スケッチの数は無制限、保存容量が 100MB(※ ライブラリ含む)
    • スケッチのコードのチェックとボードへのアップロードが行える時間 「200 s/day」
  • デバイス関連
    • 登録可能なデバイス数(Things の数) 「2」
    • 各デバイス(Thing)毎に設定可能な変数の数 「5」
  • ダッシュボード関連
    • 利用可能なダッシュボードの数は無制限
    • 他ユーザとのダッシュボードの共有は不可能
  • API・Webhook関連
    • Arduino IoT Cloud からデバイス(Things)を操作する API は利用不可(仕組みとしては、REST APIs か JavaScript・Python・Go用の SDK を利用)
    • 他サービスとの Webhook を使った連携は利用可能
  • その他
    • OTA(Over the Air)アップデートは利用不可
    • クラウドでのデータ保持について、変数の変更履歴データは 1日分が残る
    • 「Custom Library editing(Possibility to edit existing libraries or modify your own imported ones)」は利用可能 ← 詳細は後で調査します
    • ESP32/ESP8266 と、Arduino IoT Cloud・Web Editor を組み合わせて利用可能
    • Arduino IoT Cloud Remote というスマホ用アプリが利用可能(ダッシュボードにスマホアプリからアクセス可能になったりする)

有償のプランに入ると、上記で利用不可だった機能が使えるようになったり、数値的な制限事項が緩和されたりするようです(利用可能なデバイス数が 2台から、10台 ⇒ 25台 ⇒ 100台になったり等)。

Arduino IoT Cloud について

それでは、ここから Arduino IoT Cloud について見ていきます。

公式ページを見ていく

Arduino Cloud のトップページ中ほどを見ると、以下のように書かれています。
IoT Cloud.jpg

ざっと読んでみると、「クラウドからデバイスにデータを送信できたり、ウィジェットと連携させて遠隔操作できたり、ということを簡単にセキュアに実現する」といった感じで書かれているようです。
また、AIアシスタントの Alexa との連携という話や、上で少し書いていたスマホ向けアプリという話も書かれていました。

そして、Arduino IoT Cloud へのリンクとともに、以下のドキュメントへのリンクも掲載されています。

●Getting started with the Arduino IoT Cloud | Arduino Documentation | Arduino Documentation
 https://docs.arduino.cc/cloud/iot-cloud/tutorials/iot-cloud-getting-started

また上記のドキュメントの中で、「さらに情報を得たい場合はこちらへ」という感じで、以下のページへのリンクも書かれていました。

●Arduino Cloud IoT | Arduino Documentation | Arduino Documentation
 https://docs.arduino.cc/cloud/iot-cloud
ドキュメントのトップ.jpg

ここには、以下の内容のページへのリンクが並んでいました。
以下には、タイトルと説明をそのまま載せてしましましたが、ざっくりトピックを拾い上げていくと「Alexa連携、環境センサーから得たデータをクラウドで可視化、ダッシュボードからリレーを利用、クラウド経由でのデバイス間連携、ESP32・ESP8266とクラウドを組み合わせる、など」という内容が書かれているようです。

  • Arduino IoT Cloud, MKR RGB Shield and Alexa integration
    • Learn how to build a smart lamp by integrating the Arduino IoT Cloud and Alexa.
  • Environmental data in the Arduino IoT Cloud
    • Learn how to collect environmental data from the MKR ENV Shield and display it in the Arduino IoT Cloud.
  • Controlling relays from the Arduino IoT Cloud
    • Learn how to control the relays onboard the MKR Relay Shield through the Arduino IoT Cloud dashboard.
  • Device to device with Arduino IoT Cloud
    • Learn how to connect two boards through the Arduino IoT Cloud, by syncing their variables.
  • Connecting ESP32 & ESP8266 to Arduino Cloud IoT
    • Learn how to send data between an ESP32 / ESP8266 development board and the Arduino Cloud IoT.
  • Getting started with the Arduino IoT Cloud
    • Learn how to configure devices, creating things and programming your boards.
  • Uploading sketches Over-The-Air (OTA)
    • Learn how to utilize Over-The-Air (OTA), a feature that allows you to upload sketches remotely.
  • Sharing dashboards
    • Learn how to share your dashboards with other Arduino Cloud users.
  • Thing to Thing communication with Arduino IoT Cloud
    • Learn how two Things can communicate with each other through variable syncing.

公式のブログ記事の情報をいくつかピックアップ

この記事の上のほうで書いていた公式ブログの記事からも、いくつか気になる内容のものを拾い上げてみようと思います。

●14 awesome Arduino Cloud features you never knew existed
 https://blog.arduino.cc/2021/06/18/14-awesome-arduino-cloud-features-you-never-knew-existed/

Trigger Actions on Cloud Events

14_awesome_Arduino_Cloud_features_you_never_knew_existed.jpg

「Trigger Actions on Cloud Events」と書かれた部分では、デバイスとクラウドの状態の同期の話が書かれたいたり、それを実現する処理のベースとなるサンプルコードとして、以下が紹介されていたりしました。

●ArduinoIoTCloud/ArduinoIoTCloud-Callbacks.ino at master · arduino-libraries/ArduinoIoTCloud
 https://github.com/arduino-libraries/ArduinoIoTCloud/blob/master/examples/ArduinoIoTCloud-Callbacks/ArduinoIoTCloud-Callbacks.ino

コメントを除いた状態のものは、以下のようになりました。

#include "arduino_secrets.h"
#include "thingProperties.h"

void setup() {
  Serial.begin(9600);
  for(unsigned long const serialBeginTime = millis(); !Serial && (millis() - serialBeginTime > 5000); ) { }

  initProperties();

  ArduinoCloud.begin(ArduinoIoTPreferredConnection);

  ArduinoCloud.addCallback(ArduinoIoTCloudEvent::CONNECT, doThisOnConnect);
  ArduinoCloud.addCallback(ArduinoIoTCloudEvent::SYNC, doThisOnSync);
  ArduinoCloud.addCallback(ArduinoIoTCloudEvent::DISCONNECT, doThisOnDisconnect);

  setDebugMessageLevel(DBG_INFO);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
}

void doThisOnConnect(){
  Serial.println("Board successfully connected to Arduino IoT Cloud");
}
void doThisOnSync(){
  Serial.println("Thing Properties synchronised");
}
void doThisOnDisconnect(){
  Serial.println("Board disconnected from Arduino IoT Cloud");
}

Arduino IDE のサンプルスケッチなどでは、「setup()」と「loop()」の中で処理が書かれているものが基本ですが、それに加えて「doThisOnConnect()」・「doThisOnSync()」・「doThisOnDisconnect()」といったクラウドとの接続・切断等のイベントに連動して実行される処理を書く部分があったりするようです。

Alexa Integration

Alexa連携.jpg

「Alexa Integration」と書かれた部分は、その名前のとおり Alexa との連携を行う話です。
記事の本文からは、以下のページへリンクがはられていました。

●Remote working with Arduino: Alexa and the Arduino IoT Cloud | Arduino Blog
 https://blog.arduino.cc/2020/05/13/remote-working-with-arduino-alexa-and-the-arduino-iot-cloud/

そこからさらに、以下の 4つのページへの導線がありました。

上記の一部をざっと見てみると、Arduino用の Alexaスキルが用意されていて、それを使ったりするようでした。

●Amazon.com: Arduino: Alexa Skills
 https://www.amazon.com/Arduino-LLC/dp/B07ZT2PK2H
Arduino用のスキル.jpg

Use IFTTT, Zapier and More with Webhooks

Webhook関連.jpg

「Use IFTTT, Zapier and More with Webhooks」と書かれた部分は、iPaaS(Integration Platform as a Service)などにも分類されたり、IoT や他の場面でのサービス連系でよく登場する IFTTT・Zapier などが登場していました。

そして、IFTTT と連携させる場合の手順が書かれた記事へのリンクが書かれていたりしました。

●Sending an email trough IFTTT with Nano 33 IoT | Arduino Documentation | Arduino Documentation
 https://docs.arduino.cc/tutorials/nano-33-iot/IFTTT_Connection

Node-RED Integration

Node-RED関連.jpg

そして、Node-RED連携の話が書かれている部分もありました。
その説明の中では、以下の GitHubリポジトリへのリンクが書かれていたりしました。

●arduino/node-red-contrib-arduino-iot-cloud: A Node-RED plugin to integrate Arduino IoT Cloud
 https://github.com/arduino/node-red-contrib-arduino-iot-cloud

そのページを見ていくと、Node-RED で利用可能なノードには以下のものがあるようでした。
利用可能なノード.jpg

また、Node-RED のノードのページも検索してみると、以下が出てきました。

●node-red-contrib-arduino-iot-cloud (node) - Node-RED
 https://flows.nodered.org/node/@arduino/node-red-contrib-arduino-iot-cloud/in/x6nLBn2zSj93
ノードのページ.jpg

上記のページの設定手順の部分を見ると、「the things webpage by clicking on Add API」と書かれた部分があるので、無償プランでは利用不可となっていた API を使った仕組みのように思われます。
利用手順.jpg

まとめ

Arduino Cloud と Arduino IoT Cloud について、公式の情報などを見ていきましたが、内容が多すぎて未完という感じの記事になりました。

ここからさらに続けて調査をする、というのも 1つのやり方としてありますが、手を動かせない状態になるのもつまらないので、面白そうなところを何か試していくようなことを次にやれたらと思っています。

【追記】 Alexa連携ができたという話

記事の中の Alexa Integration の部分で触れていた Arduino と Alexa の連携の件、試してできたという話が!

5
6
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
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?