The entrance door of my home is digitized with a smart lock "Sesami MINI".You can operate the key open and close from the smartphone application, and just touch the widget in cooperation with the automated tool IFTTT.You can check for forgetting to close even on the go and operate.Thanks to that, I almost lost my physical key.
普段よく使っているのはホーム画面に置いたウィジェット。タップするだけで解錠・施錠できるIt's convenient to say it's convenient, but after using it for a long time, it's troublesome to launch the app one by one, and it has come to think it's loud to touch the widget.No, to be honest, it was a lot from the beginning.
In the first place, a mysterious waiting time tends to be generated before it becomes operated on the app, and it takes at least 10 seconds from the operation to the actual locking and unlocking in a widget in collaboration with IFTTT.It is rarely that the IFTTT server is heavy, it can take 20 seconds or 30 seconds, so it is not unusual for the key to be taken out.
セサミのアプリ画面。この「Waiting for」や「接続中」などの表示が延々続くことがあるIFTTTで作成したウィジェット。数十秒以上かかったり、操作に失敗することもIn order to end this issue, the feature of the smartphone is the feature of a smartphone.My V30+ L-01K supports Felica and NFC, so I decided to use it.
Recently, the image of "Osaifu -Keitai = electronic money" has been established, but the NFC is originally a technology that communicates at a short distance, as the name shows Near Field Communication.For example, if you approach an Osaifu -Keitai to a tag with a built -in IC chip called an NFC tag, you can receive the information contained in the tag.I forgot half of that, and I remembered that I could do that.
NFCのリーダー/ライター機能をもつL-01K。NFCタグにかざして情報をやりとりできるThat's why I prepared an NFC tag seal that can be obtained for 11 pieces for 890 yen.When the smartphone is approached, the two smart locks attached to the entrance door can be locked and unlocked.Of course, there is no information written on the newly purchased NFC tag, so you must first create a smart lock operation order here.
Thankfully, Sesami mini supports not only apps and IFTTTs, but also operations using Web APIs.What this means is that if you access a specific URL with parameters in advance, you can send instructions according to the content to your Sesami mini.
Roughly explaining the usage procedure of the Web API, first access the website for managing Sesami mini and get a certification code.After that, I accessed a specific URL using the authentication code and obtained an ID to identify my smart lock.After that, you can access a specific URL with a parameter that controls opening and closing in the same way.
セサミ miniの管理用Webサイトにアクセスし、APIを利用するための認証コード(API Key)を取得するIn other words, if you read this "access to a specific URL with a control parameter" when you read the NFC tag, the purpose will be reached.
However, even if the URL character string with a parameter is written to the NFC tag as it is, the API mechanism cannot be certified.So, I decided to create a web page to actually call the URL, and write the URL of the web page to the NFC tag.The web page is created by PHP and hits the Sesami mini API with a command called Curl.
So, you have to be careful here where you put the page.Because if you put it on the public server, the URL may be accessed and unlocked by others if the URL is known.So, so that there is no problem even if the URL is known, I decided to use the web server that runs on the NAS at home and operate it with a local IP address.
セサミ miniを操作するためのAPIを呼び出すコードの一部。これを自宅NASで動かしているWebサーバーに置いたBy doing so, you should not be able to access the web page unless you are connected to your home Wi-Fi access point (home LAN).Of course, the minimum security will be protected because smart locks are not operated.Ideally, when I was accessed to the home LAN, Ideally, I would like to consider some security on the page and the web server itself.By the way, the Wi-Fi radio wave at home reaches a little outside the site, so you can access it without any problems when you go out or return home.
Writing the web page URL to the NFC tag uses a "TRIGGER" that allows you to read the web page in the background.The two smart locks are unlocked all at once, and two locks are made, and the mission is completed to paste it outside the entrance.
「Trigger」アプリでNFCタグに書き込むWebページのURLを記入NFCタグをスマートフォンにかざして書き込み完了HTTPSでもアクセスできるようにしているが、その場合は証明書の関係でドメイン名が必須。公開URLになるので現在はローカルIPでHTTPで利用中By converting the unlocking and locking of smart locks, NFC has no trouble opening and touching the app, and the unlocking / lock that has been taking at least 10 seconds to be reduced to about 6 seconds.The certainty has also increased.The combination of Osaifu -Keitai and smart home equipment is compatible, and it seems that there are many other applications.
2つのNFCタグを屋外に貼り付け。解錠と施錠が簡単、やや高速に