3
1

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 1 year has passed since last update.

Pixoo64のREST APIを使ってみた④

Last updated at Posted at 2022-10-29

animation function

いよいよメインのアニメーション機能です。
http://doc.divoom-gz.com/web/#/12?page_id=195

play gif

GIFファイルを再生するAPIです。
FileType(0:SDカード内のファイル, 1:SDカード内のフォルダ, 2:インターネットファイル)の指定ができるようです。
FileNameはSDカード内のフォルダ名やファイル名、URLを指定するようです。
SDカード?特に仕様に記載は無かったけど、後ろに挿入口があり、SDカードが入っていました。
SDカードはファームウェアが搭載されているので抜いてはいけないらしい。

リクエスト
{
  "Command": "Device/PlayTFGif",
  "FileType": 0,
  "FileName": "divoom_gif/1.gif"
}

Get sending animation PicId

send animationで送るデータにはPicIdを割り振る必要があり、その値を取得するAPIです。

リクエスト
{
  "Command": "Draw/GetHttpGifId"
}
レスポンス
{
  "error_code": 0,
  "PicId": 2
}

Reset sending animation PicId

send animationで送ったPicIdをリセットするAPIです。

リクエスト
{
  "Command": "Draw/ResetHttpGifId"
}

Send animation

アニメーションを送信するAPIです。

項目 説明
PicNum ピクチャー枚数
PicWidth サイズ16,32,64がサポートされます。Pixoo64なのでフルで使うには64です。
PicOffset ピクチャーフレーム番号(0 ~ PicNum-1)
PicID ユニークなピクチャーID
PicSpped ピクチャー切り替えスピードms
PicData: RGBデータのbase64エンコード文字

※ピクチャーIDはユニークな数値で前回より大きい値指定する必要があります。
Reset sending animation PicIdのAPIでリセットもしくはGet sending animation PicIdのAPIで前回の値を取得してから設定しましょう。

PicDataのRGBデータは24ビットカラー(赤1byte,緑1byte,青1byte)で左上から右下に向かって64列×64行のデータなので、
byte[36464]の12288byteのバイナリをbase64エンコードした文字列です。

リクエスト
{
  "Command": "Draw/SendHttpGif",
  "PicNum": 1,
  "PicWidth": 64,
  "PicOffset": 0,
  "PicID": 1,
  "PicSpped": 500,
  "PicData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}

四角形で色塗りつぶししてみました。
animation_1.jpeg

Send Text

テキストを表示するAPIです。
Send display listでもテキスト表示できるので、簡略版のテキスト表示のようです。
Send animationで背景アニメーションを送信後にテキストを送信する必要があります。
fontは固定で0-7の指定ができます。

リクエスト
{
  "Command": "Draw/SendHttpText",
  "TextId": 0,
  "x": 0,
  "y": 0,
  "dir": 0,
  "font": 0,
  "TextWidth": 64,
  "TextString": "Hello World!!!",
  "speed": 100,
  "color": "#FFFFFF",
  "align": 1
}

おなじみのHello world!!です。ちょっと幅がはみ出てスクロールしています。
animation_2.jpeg

Clear all text area

送信されているテキストをクリアするAPIです。

リクエスト
{
  "Command": "Draw/ClearHttpText"
}

Get font list

Send display lsitで使えるフォントを取得するAPIです。
POSTパラメータはないので、URLにアクセスするだけです。
リクエストURL
https://app.divoom-gz.com/Device/GetTimeDialFontList

レスポンス
{
  "ReturnCode": 0,
  "ReturnMessage": "",
  "FontList": [
    {
      "id": 2,
      "name": "16*16 English letters, Arabic figures,punctuation",
      "width": "16",
      "high": "16",
      "Type": 0,
      "charset": ""
    },
    {
      "id": 4,
      "name": "14*14 all font",
      "width": "14",
      "high": "14",
      "Type": 0,
      "charset": ""
    },
    ・・・
  ]
}
項目 説明
id 26 フォントのID
name 7*7 English letters, Arabic figures フォント名サイズと使える文字種の名前
width 7 幅ピクセル
height 7 高さピクセル
Type 0 0:スクロール不可、1:スクロール対応
charaset 0123456789km-/:%cfABCDEFGHIJKLMNOPQRSTUVWXYZ 使える文字

サイズが色々ありますが、数字のみだったりアルファベットのみだったり、.や:や/などの記号が使えないなどあるので、ちょうど良いフォント探すのに苦労します。日本語も出せそうなのはall fontのみのようです。

Send display list

画面に表示する項目を送信するAPIです。
表示する項目はListItemになっており一括送信することができます。
表示項目

項目 説明
TextId 1 テキストID項目につけるユニークなIDです。0~39までの範囲なので最大40個、配置できそうです。
type 22 表示する項目のタイプです。定数が定義されています。
x 0 横ピクセルの開始位置
y 12 縦ピクセルの開始位置
dir 0 スクロール方向(0:左、1:右)
font 2 Get font listで取得したフォントのIDを指定します。フォントにより表示できる文字が決まっています。
TextWidth 64 テキストエリアの幅
Textheight 12 テキストエリアの高さ
TextString hello world!! UTF8の表示文字列(type:22の場合) またはリクエストURL(type:23の場合)
speed 100 スクロールされる場合のスピード、指定したミリ秒で動く
color #FF8888 フォントのRGBカラー
update_time 60 URLリクエストの更新時間
align 1 テキストの配置(1:左揃え、2:中央揃え、3:右揃え)

表示する項目のtype値

定数 説明
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_SECOND = 1 時計の秒
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_MIN = 2 時計の分
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_HOUR = 3 時計の時
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_TIME_AM_PM = 4 時計のamまたはpm
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_HOUR_MIN = 5 時計の時:分
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_HOUR_MIN_SEC = 6 時計の時:分:秒
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_YEAR = 7
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_DAY = 8
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_MON = 9
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_MON_YEAR = 10 月と年(例: 10 2022)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_ENG_MONTH_DOT_DAY = 11 英語の月と日(例: OCT 29)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_DATE_WEEK_YEAR = 12 日と英語の月と年(例: 29 OCT 2022)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_ENG_WEEK = 13 2文字の曜日(SU,MO,TU,WE,TH,FR,SA)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_ENG_WEEK_THREE = 14 3文字の曜日(SUN,MON,TUE,WED,THU,FRI,SAT)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_ENG_WEEK_ALL = 15 フルの曜日(SUNDAY,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_ENG_MON = 16 英語の月(JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_TEMP_DIGIT = 17 気温(例: 13c)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_TODAY_MAX_TEMP = 18 最高気温(例: 16c)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_TODAY_MIN_TEMP = 19 最低気温(例: 9c)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_WEATHER_WORD = 20 天候(例: Cloudy)
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_NOISE_DIGIT = 21 騒音値
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_TEXT_MESSAGE = 22 任意のテキスト文字
DIVOOM_DISP_CUSTOM_DIAL_SUPPORT_NET_TEXT_MESSAGE = 23 URLリクエストの結果JSON文字列 {"DispData":"2022-10-29 03:52:27"} "DispData"の値が表示される。
リクエスト
{
  "Command": "Draw/SendHttpItemList",
  "ItemList": [
    {
      "TextId": 1,
      "type": 6,
      "x": 0,
      "y": 0,
      "dir": 0,
      "font": 42,
      "TextWidth": 64,
      "Textheight": 16,
      "TextString": "",
      "speed": 100,
      "color": "#7777FF",
      "update_time": 60,
      "align": 1
    },
    {
      "TextId": 2,
      "type": 22,
      "x": 0,
      "y": 16,
      "dir": 0,
      "font": 26,
      "TextWidth": 64,
      "Textheight": 16,
      "TextString": "HELLO WORLD!!",
      "speed": 100,
      "color": "#FF7777",
      "update_time": 60,
      "align": 2
    },
    {
      "TextId": 3,
      "type": 22,
      "x": 0,
      "y": 32,
      "dir": 0,
      "font": 2,
      "TextWidth": 64,
      "Textheight": 16,
      "TextString": "テキスト漢字",
      "speed": 100,
      "color": "#77FF77",
      "update_time": 60,
      "align": 2
    }
  ]
}

時計とHELLO WORLD!!、テキスト漢字の3つの表示項目を設定しました。
フォントは限られますが、日本語も出力できるようです。
animation_3.jpeg

Play Buzzer

電子音を鳴らすAPIです。
ActiveTimeInCycle:鳴っているミリ秒、OffTimeInCycle:止まっているミリ秒、PlayTotalTime:トータル時間ミリ秒
下記だと500ミリごとにビビィと3秒間、目覚まし時計のような電子音がなります。

リクエスト
{
  "Command": "Device/PlayBuzzer",
  "ActiveTimeInCycle": 500,
  "OffTimeInCycle": 500,
  "PlayTotalTime": 3000
}

play divoom gif

Get Img Upload ListまたはGet My Like Img ListのAPIで取得できるアニメーションを再生するAPIです。
FileIdを指定します。

リクエスト
{
  "Command": "Draw/SendRemote",
  "FileId": "group1/M00/10/15/L1ghbmLP02yEE7HYAAAAAGQWSkA4840400"
}

Get Img Upload List

自分がアップロードしたイメージリストを取得します。
Find DeviceのAPIで取得できるDeviceIdとDeviceMacの値を指定します。

リクエストURL
https://app.divoom-gz.com/Device/GetImgUploadList

リクエスト
{
  "DeviceId": xxxxxxxx,
  "DeviceMac": "123456789abc",
  "Page": 1
}

登録されいるアップロードしたイメージリストが返ってきます。

レスポンス
{
  "ReturnCode": 0,
  "ReturnMessage": "",
  "ImgList": [
    {
      "FileName": "みどりぷよ",
      "FileId": "group1/M00/12/C5/L1ghbmMrE7KEEbmkAAAAALXzd7w0854132"
    }
  ]
}

Get My Like Img List

自分がお気に入り登録したイメージリストを取得します。
Find DeviceのAPIで取得できるDeviceIdとDeviceMacの値を指定します。

リクエストURL
https://app.divoom-gz.com/Device/GetImgLikeList

リクエスト
{
  "DeviceId": xxxxxxxx,
  "DeviceMac": "123456789abc",
  "Page": 1
}

登録されいるアップロードしたイメージリストが返ってきます。

レスポンス
{
  "ReturnCode": 0,
  "ReturnMessage": "",
  "ImgList": [
    {
      "FileName": "クッキー食べるこはねちゃん",
      "FileId": "group1/M00/10/15/L1ghbmLP02yEE7HYAAAAAGQWSkA4840400"
    }
  ]
}

以上、アニメーション機能でした。

3
1
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?