<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>2022/06/27 on Yano&#39;s digital garage</title>
    <link>https://www.bravotouring.com/~yano/archives/2022/06/27/</link>
    <description>Recent content in 2022/06/27 on Yano&#39;s digital garage</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 27 Jun 2022 23:39:08 +0900</lastBuildDate>
    <atom:link href="https://www.bravotouring.com/~yano/archives/2022/06/27/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Gosundスマートプラグ</title>
      <link>https://www.bravotouring.com/~yano/diary/it/20220627_gosund.htm</link>
      <pubDate>Mon, 27 Jun 2022 23:39:08 +0900</pubDate>
      <guid>https://www.bravotouring.com/~yano/diary/it/20220627_gosund.htm</guid>
      <description>&lt;p&gt;子どもたちが夜遅くまでTVを見れないようにするために、リモートON/OFFできる&lt;a href=&#34;https://www.switchbot.jp/collections/all/products/switchbot-plug&#34;&gt;SwitchBotプラグ&lt;/a&gt;で21時以降は強制的に見れなくしていたのだが、コンセント給電を止めると録画もできない事になって奥さんからクレームが上がっていた。&lt;/p&gt;&#xA;&lt;table align=&#34;right&#34; class=&#34;Panorama&#34;&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;&lt;img alt=&#34;ゴウサンド(Gosund) スマートプラグ&#34; src=&#34;https://www.bravotouring.com/~yano/images/2022/20220627_gosund.jpg&#34;/&gt;&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td class=&#34;PhotoMemo&#34;&gt;ゴウサンド(Gosund) スマートプラグ&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;SwitchBotのアプリからは消費電力が確認できることに気づいたので、消費電力からREGZAの状態(ON/OFF)を推定できれば、コンセント給電を切らずとも&lt;a href=&#34;https://www.bravotouring.com/~yano/diary/it/20220611_irkit.htm&#34;&gt;IRKit&lt;/a&gt;で遠隔OFFできる（≒録画はできる）なぁ…と思ったのだが、&lt;a href=&#34;https://www.bravotouring.com/~yano/diary/it/20220625_switchbot_api.htm&#34;&gt;SwitchBot API&lt;/a&gt;では&lt;a href=&#34;https://www.switchbot.jp/collections/all/products/switchbot-plug&#34;&gt;SwitchBotプラグ&lt;/a&gt;のON/OFF状態しか採れないことが判明し、挫折。&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://intellectualcuriosity.hatenablog.com/?page=1589806973&#34;&gt;スマートプラグ（コンセント）とラズパイで洗濯機や乾燥機の終了をLINEに通知できて稼働状況もわかるシステムを作った&lt;/a&gt;からGosundのスマートプラグだとAPIで採れそうな事がわかったので、さっそく置き換え。&lt;a href=&#34;https://play.google.com/store/apps/details?id=com.cuco.smart&amp;hl=ja&amp;gl=US&#34;&gt;Go Smart&lt;/a&gt;アプリに登録し消費電力が表示される事を確認。&lt;/p&gt;&#xA;&lt;p&gt;ワクワクしながら&lt;a href=&#34;https://iot.tuya.com/&#34;&gt;Tuya Smart Developer Center&lt;/a&gt;に登録し、&lt;a href=&#34;https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md#listing-tuya-devices-from-the-tuya-smart-or-smart-life-apps&#34;&gt;Listing Tuya devices from the Tuya Smart or Smart Life app&lt;/a&gt;に倣って&#xA;&lt;blockquote&gt;&#xA;yano@Focal:~/iot/tuya$ tuya-cli wizard&lt;br/&gt;&#xA;? The API key from tuya.com: &lt;span class=&#34;Warning&#34;&gt;acvwuxxknsXXXXXXXXX&lt;/span&gt;&lt;br/&gt;&#xA;? The API secret from tuya.com &lt;span class=&#34;Warning&#34;&gt;3b81eb715f334YYYYYYY&lt;/span&gt;&lt;br/&gt;&#xA;? Provide a &#39;virtual ID&#39; of a device currently registered in the app: 18261828c4dd5713b47b&lt;br/&gt;&#xA;[ { name: &#39;Gosund_Plug1&#39;,&lt;br/&gt;&#xA;    id: &#39;18261828c4ddXXXXXXXX&#39;,&lt;br/&gt;&#xA;    key: &#39;7e5f08baYYYYYYYY&#39; },&lt;br/&gt;&#xA;  { name: &#39;Gosund_Plug2&#39;,&lt;br/&gt;&#xA;    id: &#39;182618287003XXXXXXXX&#39;,&lt;br/&gt;&#xA;    key: &#39;294924a4YYYYYYYY&#39; } ]&lt;br/&gt;&#xA;yano@Focal:~/iot/tuya$&lt;br/&gt;&#xA;&lt;/blockquote&gt;でデバイスID&#39;18261828c4ddXXXXXXXX&#39;とローカルキー&#39;7e5f08baYYYYYYYY&#39;を取得できた。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
