Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Python(+α)でスマートプラグを制御してみた
Sora Arakawa
March 01, 2022
Programming
0
130
Python(+α)でスマートプラグを制御してみた
サポーターズ学生ライトニングトーク ~2022春の始まり編~
Sora Arakawa
March 01, 2022
Tweet
Share
More Decks by Sora Arakawa
See All by Sora Arakawa
ヤフオクで原付買った話
arkw
0
67
パソコンの消費電力と省エネ化のおはなし
arkw
0
100
"成果物"を作ろう(提案)
arkw
0
70
学情絶叫ウェブシステムGX
arkw
0
67
C++とDXライブラリでLTタイマーを作った話
arkw
0
93
Googleの新デザイン言語 Material You
arkw
0
67
Amazon Echo Show向けウェブアプリの開発
arkw
0
220
HTML5 Canvasによる2Dウェブゲーム開発
arkw
0
54
1500円で始める自宅ウェブサーバ
arkw
0
280
Other Decks in Programming
See All in Programming
YATA: collaborative documents and how to make them fast
horusiath
1
160
Pluggable Storage in PostgreSQL
sira
1
190
Untangling Coroutine Testing (Droidcon Berlin 2022)
zsmb
1
490
レビュー駆動学習のススメ_StaPy#83
soogie
0
320
ベストプラクティス・ドリフト
sssssssssssshhhhhhhhhh
1
210
パラメタライズドテスト
ledsun
0
220
kintone × LINE Bot で餃子検定Botを作った話
naberina
0
330
ZOZOTOWNにおけるDatadogの活用と、それを支える全社管理者の取り組み / 2022-07-27
tippy
1
3.3k
Google I/O 2022 Android関連概要 / Google I/O 2022 Android summary
phicdy
0
390
クラウド KMS の活用 / TOKYO BLOCKCHAIN TECH MEETUP 2022
odanado
PRO
0
190
Cloudflare WorkersでGoのHTTPサーバーを動かすライブラリを作った話
syumai
0
150
Babylon.jsで作ったsceneをレイトレーシングで映えさせる
turamy
1
210
Featured
See All Featured
Happy Clients
brianwarren
89
5.6k
A Tale of Four Properties
chriscoyier
149
21k
Practical Orchestrator
shlominoach
178
8.7k
What's new in Ruby 2.0
geeforr
335
30k
How GitHub Uses GitHub to Build GitHub
holman
465
280k
Designing for Performance
lara
597
64k
Facilitating Awesome Meetings
lara
29
4.1k
We Have a Design System, Now What?
morganepeng
35
3k
The Invisible Side of Design
smashingmag
290
48k
Unsuck your backbone
ammeep
659
55k
Learning to Love Humans: Emotional Interface Design
aarron
261
37k
What the flash - Photography Introduction
edds
62
10k
Transcript
Python +α Sora Arakawa (arkw) 2022/03/01 LT@ CAMP
Sora Arakawa arkw • B2 →B3 • etc… • →
• Android 940 • Alexa 915 • … • https://arkw.net/
• • Windows GitHub arkwnet/LTTimer
IoT
Internet of Things
IoT Internet of Things • https://aws.amazon.com/jp/iot/what-is-the-internet-of-things/
None
• TP-Link Tapo P105 1000 1500W 1
• TP-Link Tapo
• N W OK NG N W
!
• • 20% ON 80% OFF
• Tapo P100 PyP100 https://github.com/fishbigger/TapoP100
Python
Python
• Python • pip3 install PyP100
from PyP100 import PyP100 p105 = PyP100.P100("192.168.X.X", "aaa@bbb.com", "password") p105.handshake()
p105.login() p105.turnOn()
from PyP100 import PyP100 p105 = PyP100.P100("192.168.X.X", "aaa@bbb.com", "password") p105.handshake()
p105.login() p105.turnOn() # IP TP-Link ID
• → →IP
• IP
from PyP100 import PyP100 p105 = PyP100.P100("192.168.X.X", "aaa@bbb.com", "password") p105.handshake()
p105.login() p105.turnOff()
from PyP100 import PyP100 p105 = PyP100.P100("192.168.X.X", "aaa@bbb.com", "password") p105.handshake()
p105.login() setup_args = p105.getDeviceInfo() print(setup_args)
print(setup_args)
print(setup_args['result']['device_on'])
• 5 API •
GUI
Python
C#
(Python) GUI (C#)
None
None
(Linux+Python) Android (Java) 20% ON 80% OFF •
• IoT • • TP-Link Python • IP
• GitHub https://github.com/arkwnet/tapo-p105
None