センサー読み取りカード

ゲージまたはタイルでのライブ計測値:温度、湿度、CO2、光、騒音。警告はテーマの警告色で表示されます。

ライブカード

このカードはブラウザでプレーヤーと同じコードで描画され、サンプルデータを使用します。

カテゴリ: 運用。タグ: 数値と指標、チャートとゲージ、工場と倉庫、オフィスと職場。

レイアウト

この全画面カードはランドスケープまたはポートレートで画面全体を埋め、コーナー、チップ、ストリップとして配置されません。

レイアウト:フル。フォーム:ランドスケープ、ポートレート。

カードレイアウト、テーマ、公開。カードを閲覧。

データとプライバシー

このカードは設定されたプロパティとライブカードデータを使用します。

プロパティ

テーマ、背景、アクセント、位置については共通プロパティを参照してください。

カードの作成時に、静的プロパティをカードのparamsに設定します。データドキュメントは動的プロパティのみを保持します。ネストされた行は親プロパティの内容を説明します。

静的プロパティ

名前タイプデフォルト値と制限説明
titlestring""maxLength:60
intervalSecondsinteger6最小値:3;最大値:60コーナービューの回転周期。
backgroundColor文字列、nullnullパターン:"^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$"カードの背景とプレートをフラットなCSS順序の色で上書きします。#RRGGBBAAは不透明度を指定します。background noneが優先されます。
textColor文字列、nullnullパターン:"^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$"メインとセカンダリのテキスト色を上書きします。アクセントと意味的な状態色はそのまま維持されます。

動的プロパティ

名前タイプデフォルト値と制限説明
sensorsarrayminItems:1;maxItems:12;必須
sensors[].labelstringmaxLength:24;必須
sensors[].valuenumber必須
sensors[].unitstring""maxLength:8
sensors[].minnumber0
sensors[].maxnumber100
sensors[].warnAbove数値、nullnull
sensors[].warnBelow数値、nullnull
sensors[].alarmAbove数値、nullnullこの値を上回るとアラーム:Primetimeの赤色警告モード(すべてのテーマで警告)。
sensors[].alarmBelow数値、nullnullこの値を下回るとアラーム:Primetimeの赤色警告モード(すべてのテーマで警告)。
sensors[].decimalsinteger0最小値:0;最大値:3
sensors[].trendarray[]maxItems:96
sensors[].iconnull、文字列nullnull, "activity-01", "air-vent", "airplane-01", "alert-01", "alert-02", "american-football", "analytics-up", "apple", "arrow-down-01", "arrow-down-right-01", "arrow-up-01", "arrow-up-right-01", "award-01", "baseball", "basketball-01", "battery-full", "bell-ring", "bicycle", "birthday-cake", "bitcoin", "bus-01", "calendar-03", "calendar-04", "calendar-add-01", "calendar-check", "call-02", "camera-01", "cancel-circle", "car-01", "champion", "chart-decrease", "chart-increase", "checkmark-circle-02", "clock-01", "clock-02", "cloud", "cloud-angled-rain", "cloud-angled-zap", "cloud-big-rain", "cloud-drizzle", "cloud-fog", "cloud-hailstone", "cloud-snow", "coffee-01", "coffee-02", "contact-01", "container-truck-01", "cricket-bat", "crown", "delivery-truck-01", "dices", "discord", "discount-tag-01", "dollar-02", "door-closed-locked", "door-open", "drink", "droplet", "ethereum", "euro", "exchange-01", "facebook-01", "factory", "fast-wind", "favourite", "ferry-boat", "fire", "fire-02", "first-aid-kit", "flag-01", "flag-02", "flash", "flower-01", "football", "gauge", "gift", "git-branch", "globe-02", "google", "hand-prayer", "heart", "help-circle", "home-01", "hourglass", "humidity", "ice-hockey", "information-circle", "instagram", "lamp-01", "lantern", "leaf-01", "leaf-02", "lightbulb", "link-01", "linkedin-01", "litecoin", "location-01", "location-04", "mail-01", "medal-first-place", "medical-mask", "meeting-room", "megaphone-01", "message-01", "money-exchange-02", "moon-02", "moon-cloud", "moon-star", "music-note-01", "navigation-03", "new-releases", "new-twitter", "news", "news-01", "noodles", "package-delivered", "parking-area-square", "party", "party-popper", "pause-circle", "percent-circle", "pinterest", "pizza-01", "play-circle", "play-store", "podium", "pound", "pumpkin", "qr-code", "qr-code-01", "queue-01", "quote-down", "quote-up", "ranking", "restaurant-01", "rocket-01", "rss", "running-shoes", "sale-tag-01", "security-check", "shop-sign", "shopping-bag-01", "siren", "smart-phone-01", "snapchat", "snowflake", "sparkles", "spotify", "star", "star-half", "star-off", "stop-circle", "store-01", "sun-03", "sun-cloud-02", "sunrise", "sunset", "swimming", "tag-01", "target-02", "temperature", "tennis-ball", "thermometer", "thermometer-cold", "thermometer-warm", "threads", "ticket-01", "tiktok", "time-quarter-pass", "timer-01", "tornado-02", "train-01", "tram", "trophy", "tropical-storm", "tsunami", "user-02", "user-group", "user-love-01", "vegetarian-food", "volleyball", "volume-high", "vote", "walking", "warehouse", "waves", "whatsapp", "wheat-off", "wifi-01", "wifi-full-signal", "wifi-lock", "wrench-01", "yen", "youtube"
sensors[].prevnumber最新の読み取り値の前の値。updatedAtで、Primetimeはゲージをそこから新しい読み取り値までバネで動かす。
updatedAt文字列、nullnull読み取りのISO 8601時刻。Primetimeはそこからすべてのスクリーンで同時にデータティックを再生します。

キャンバス例

静的プロパティを params.json として保存し、カードを作成します。結果にはその crd_ ID が含まれます。

{
  "theme": "neomustard"
}
screenrig card create --type sensors --major 1 --file params.json

このアイテムをプレイリストページのprimitivesに追加し、サンプルの ID をその ID に置き換えます。プレイリストを公開してスクリーンに割り当ててください。

{
  "id": "sensors",
  "primitive": "card",
  "card": "crd_01EXAMPLECARD000000000",
  "layout": "full",
  "content_fit": "fill"
}

ライブデータを書き込む

カードを作成した後にドキュメントを書き込み、画面を再公開せずに更新するには置き換えます。カードは書き込みのたびに動的プロパティと照合し、受け付けないドキュメントは拒否します。プレイリストと同じプロジェクトを使用してください。

ドキュメントを card-data.json として保存します。CLIはラッパーなしでドキュメント自体を読み取ります。

{
  "sensors": [
    {
      "label": "Example",
      "value": 1
    }
  ],
  "updatedAt": null
}
screenrig card data put crd_01EXAMPLECARD000000000 --file card-data.json

またはAPIを直接呼び出します。APIは同じドキュメントをdocumentフィールドにラップします。エージェントトークンはすでにプロジェクト名を含むため、プロジェクトヘッダーは送信しません。ScreenRig-Projectを送信する場合はトークンのプロジェクトと一致する必要があります。API認証は環境変数で提供してください。詳細はAPI認証を参照。

curl --request PUT "https://api.screenrig.ai/api/cards/crd_01EXAMPLECARD000000000/data" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"document":{"sensors":[{"label":"Example","value":1}],"updatedAt":null}}'