{"id":2658,"date":"2017-12-31T17:53:07","date_gmt":"2017-12-31T08:53:07","guid":{"rendered":"http:\/\/1bed.allright.life\/?p=2658"},"modified":"2020-04-18T20:07:39","modified_gmt":"2020-04-18T11:07:39","slug":"post-2658","status":"publish","type":"post","link":"https:\/\/1bed.allright.life\/?p=2658","title":{"rendered":"Windows 10 (Windows Subsystem for Linux) \u3067 Google Home \u306b\u558b\u3089\u305b\u305f\u3044"},"content":{"rendered":"<p>\u591a\u304f\u306e\u4eba\u304c\u3084\u3063\u3066\u3044\u308b\u306e\u3067\u7279\u306b\u76ee\u65b0\u3057\u304f\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u500b\u4eba\u306e\u30e1\u30e2\u3068\u3057\u3066\u6b8b\u3057\u307e\u3059\u3002<\/p>\n<h2>\u3084\u308b\u3053\u3068<\/h2>\n<p>Windows Subsystem for Linux(\u4ee5\u4e0b\u3001WSL) \u306b google-home-notifier \u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u3066\u3001\u4f55\u304b\u3092\u558b\u3089\u305b\u308b<\/p>\n<h2>WSL \u3068\u306f\uff1f\u3068\u304b\u306a\u3089<\/h2>\n<p>\u3053\u3061\u3089\u3068\u3066\u3082\u308f\u304b\u308a\u6613\u3044\u306e\u3067\u3001\u8aad\u3093\u3067\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u307e\u3067\u3057\u3061\u3083\u3044\u307e\u3057\u3087\u3046\uff01<\/p>\n<ul>\n<li><a href=\"http:\/\/system-admin-girl.com\/comic\/begins\/sp-wsl\/\">\u30b7\u30b9\u7ba1\u7cfb\u5973\u5b50BEGINS \u7279\u5225\u7de8 \u307e\u3093\u304c\u3067\u308f\u304b\u308bWSL<\/a><\/li>\n<\/ul>\n<h2>Node.js \u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h2>\n<p>apt \u306e\u5411\u304d\u5148\u3092\u65e5\u672c\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5411\u3051\u3066\u3001\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre><code class=\"language-bash\">$ sudo sed -i -e &#039;s%http:\/\/.*.ubuntu.com%http:\/\/ftp.jaist.ac.jp\/pub\/Linux%g&#039; \/etc\/apt\/sources.list\n$ sudo apt-get update\n$ sudo apt-get install python-minimal make g++ libavahi-compat-libdnssd-dev<\/code><\/pre>\n<p>nodebrew \u3068 Node.js \u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/p>\n<pre><code class=\"language-bash\">$ curl -L git.io\/nodebrew | perl - setup\n$ echo &#039;PATH=&quot;$HOME\/.nodebrew\/current\/bin:$PATH&quot;&#039; &gt;&gt; ~\/.profile\n$ source ~\/.profile\n$ nodebrew install-binary latest\n$ nodebrew use latest<\/code><\/pre>\n<p>\u78ba\u8a8d(2017\/12\/31 \u73fe\u5728\u306e\u8868\u793a)<\/p>\n<pre><code class=\"language-bash\">$ node -v\nv9.3.0\n$ npm -v\n5.5.1<\/code><\/pre>\n<p>\u5fc5\u8981\u306a\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u3068\u81ea\u52d5\u8d77\u52d5\u5316<\/p>\n<pre><code class=\"language-bash\">$ sudo service dbus start\n$ sudo service avahi-daemon start\n$ sudo systemctl enable dbus\n$ sudo systemctl enable avahi-daemon<\/code><\/pre>\n<h2>google-home-notifier \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<pre><code class=\"language-bash\">$ cd ~\n$ git clone https:\/\/github.com\/noelportugal\/google-home-notifier.git\n$ npm init\n$ npm install google-home-notifier<\/code><\/pre>\n<h2>\u52d5\u304b\u3057\u3066\u307f\u308b<\/h2>\n<p>example.js \u3068\u3044\u3046\u4f8b\u304c\u3064\u3044\u3066\u3044\u308b\u306e\u3067\u3001\u4e0b\u8a18\u90e8\u5206\u3092\u4fee\u6b63\u5f8c\u306b\u4fdd\u5b58\u3059\u308b<\/p>\n<pre><code class=\"language-javascript\">var deviceName = &#039;Google Home&#039;;  \/\/ &lt;-- Google Home \u306b\u8a2d\u5b9a\u3057\u305f\u540d\u524d\u306b\u66f8\u304d\u63db\u3048\u308b\nvar ip = &#039;192.168.1.20&#039;; \/\/ &lt;-- Google Home \u306e IP \u30a2\u30c9\u30ec\u30b9\u306b\u66f8\u304d\u63db\u3048\u308b\nvar language = &#039;ja&#039;; \/\/ &lt;-- \u66f8\u304d\u63db\u3048\u308b\n<\/code><\/pre>\n<p>\u8d77\u52d5\u3055\u305b\u308b<\/p>\n<pre><code class=\"language-bash\">$ node example.js \uff06<\/code><\/pre>\n<p>\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6700\u5f8c\u306b\u4f8b\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u30b3\u30d4\u30da\u3067\u305d\u306e\u307e\u307e\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u300c\u3078\u308d\u3049\uff5e\u3045 \u3050\uff5e\u3050\u308b \u307b\uff5e\u3080\u300d\u3068\u8a71\u3057\u3057\u3066\u304f\u308c\u308b\u306f\u305a<\/p>\n<pre><code class=\"language-bash\">GET example:\ncurl -X GET https:\/\/xxxxxxxx.ngrok.io\/google-home-notifier?text=Hello+Google+Home\nPOST example:\ncurl -X POST -d &quot;text=Hello Google Home&quot; https:\/\/xxxxxxxx.ngrok.io\/google-home-notifier<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u591a\u304f\u306e\u4eba\u304c\u3084\u3063\u3066\u3044\u308b\u306e\u3067\u7279\u306b\u76ee\u65b0\u3057\u304f\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u500b\u4eba\u306e\u30e1\u30e2\u3068\u3057\u3066\u6b8b\u3057\u307e\u3059\u3002 \u3084\u308b\u3053\u3068 Windows Subsystem for Linux(\u4ee5\u4e0b\u3001WSL) \u306b google-home-notifier \u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113],"tags":[114,115],"class_list":["post-2658","post","type-post","status-publish","format-standard","hentry","category-smartspeaker","tag-google-home","tag-node-js"],"_links":{"self":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2658"}],"version-history":[{"count":3,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2658\/revisions"}],"predecessor-version":[{"id":3112,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2658\/revisions\/3112"}],"wp:attachment":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}