Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
2020.07.14「Node-REDで可視化してみた」
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
KMiura
July 14, 2020
Science
580
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2020.07.14「Node-REDで可視化してみた」
2020.07.04「IoT縛りの勉強会! IoTLT vol.65 @Youtube」
KMiura
July 14, 2020
More Decks by KMiura
See All by KMiura
運用しているアプリケーションのDBのリプレイスをやってみた
miura55
1
1.2k
Amazon Rekognitionを使ったインターホンハック
miura55
0
140
Pythonでルンバをハックしてみた
miura55
0
270
あなたの知らないクラフトビールの世界
miura55
0
480
Storage Browser for Amazon S3を触ってみた + α
miura55
0
340
Cloudflare R2をトリガーにCloudflare Workersを動かしてみた
miura55
0
340
あのボタンでつながるSORACOM
miura55
0
200
Postman Flowsで作るAPI連携LINE Bot
miura55
0
460
Lambdaと共に歩んだAWS
miura55
3
1.1k
Other Decks in Science
See All in Science
Anomalies de terrain remontées à l'ONAB
institutdelelevage
PRO
0
150
[Webinaire InnOvin] Coup de Chaud : Comment préserver la santé des animaux
institutdelelevage
PRO
0
220
自社のレビュー履歴からAIコードレビュアーをつくる方法
estie
5
1.6k
Cross-Media Technologies, Information Science and Human-Information Interaction
signer
PRO
3
33k
摂理と合理の肉体改造 — AI時代の減量を支える観測・制御・継続
kiyoshi
0
3.6k
[Relay webinaire eBIS actu n°16] Amélioration de la survie des JB avec la génétique - Introduction
institutdelelevage
PRO
0
240
機械学習 - K近傍法 & 機械学習のお作法
trycycle
PRO
1
1.7k
O(log n)-Approximation Algorithms for Bipartiteness Ratio
tasusu
0
260
データベース15: ビッグデータ時代のデータベース
trycycle
PRO
1
600
ゲームと人工知能
miyayou
0
250
Controller Design for Symbolic Input-Output Systems Using Feedforward Neural Networks
konakalab
0
130
HOLO: Homography-Guided Pose Estimator Network for Fine-Grained Visual Localization on SD Maps
tomoaki0705
0
160
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Crafting Experiences
bethany
1
380
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
290
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
The Invisible Side of Design
smashingmag
301
52k
Agile that works and the tools we love
rasmusluckow
331
22k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
620
Producing Creativity
orderedlist
PRO
348
41k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Transcript
Node-REDでDBを可視化してみた KMiura
自己紹介 • 三浦 耕生(こうき) • 名古屋のゲーム会社 のサーバーエンジニア
SORACOMから小包が • SORACOMのブログ投稿キャンペーン に応募したらノベルティが届いた • 思ってたよりも早く着いた(ありがとうご ざいます!)
とりあえず動かしてみた • SORACOMコンソールから受け取り確認を 入れてデバイス登録すると開通する • これでSORACOM Harvestから温湿度を とってみる 1時間おきに点滅→
もう少しなにかしたいな • IBM Cloud Functionsでデータを取ってCloudantにためてみる • SORACOM FuncではIBM Cloud Functionsと連携できない(知っ
てた • SORACOM BeamでRest API経由でデータを送信してみることに
続きを書いてみた https://qrgo.page.link/KoPoB
今回はその続編
データの可視化 • せっかくDBにためてるならデータを可視化したい • とりあえずNode-RED使うか • Dashboard使う ここまでがテンプレ
しかし、罠が… Dashboardを使うときには今動かしているデバイスの データを一定間隔で取得してグラフにプロットする DBのデータを可視化するにはあまり使えない…
完
さすがに初参加の方に失礼
他の手段はないのか?? • どうやらChartjsをNode-REDで使えるっぽい • 予めグラフに使う値を定義して出力させるっぽい https://github.com/masalinas/node-red-contrib-chartjs
フロー • Cloudantのデータに全文検索かけて直近 の100件に絞り込み • Chartjsノードに渡せる形に成形
完成 • トリガーを実行することでプロットが 行われる • 配列の立て方もシンプルでグラフの カスタムが自由にできそう
なんとグラフを出力出来る • PNGとPDF • でもPDFは出力されず…
複数のグラフを表示する • iframeで自力で組み込むしかない • 安定のBootstrap
DEMO
まとめ • リアルタイムでモニタリング • Dashboard • DBから持ってくる • Chartjs •
Node-REDを使えばパーツ単位でUIを管理できる Node-RED最高!
次回予告 • Raspberry Piでこのご時世に使い たいもの作ってみる • 絶賛準備中
END