TAILIEUCHUNG - Smart Home Automation with Linux- P24

Smart Home Automation with Linux- P24:I will end on a note of carefree abandon—learn to steal! Once you’ve learned the pieces of the puzzle and how to combine them, there is very little new to invent. Every new idea you discover is a mere permutation of the old ideas. And ideas are free! Every cool feature discussed on TV shows or presented in the brochures or web sites of commercial HA companies can be taken, adapted, and implemented with the information presented here using very little effort | CHAPTER 6 DATA SOURCES In Chapter 7 you ll learn how Minerva supports even more complex actions by sending a status message to different places according to whether you are at home at work or on the train. Occasional Control with At In addition to the periodic events you will often want to invoke extra events such as a reminder in ten minutes to check on the cooking. Again Linux is prepared with the at command such as the following echo say default Check on dinner at now 10 minutes This syntax is necessary because by default at accepts the commands interactively from the command line finishing with a Ctrl D . Every at event goes into a queue enabling complete recipes to be produced for multipart events. Alas this example works fine in its current scenario but has a fatal issue for tasks requiring finer granularity since the scheduler works only with whole minutes meaning that a task for now 1 minute actually means at the start of the next minute which might be only five seconds away So you need to employ the sleeping seconds trick echo sleep date S say default Check on dinner at now 10 minutes It is also possible to use at to trigger events at a specific time echo say default Time for CSI at 21 00 This always takes place when that time is next reached meaning it could be on the following day. Error Handling In any development reporting and handling the errors are the most time-consuming parts of the project. HA is unfortunately no different. You have some things in your favor primarily that you re in control of the house and most of the other software running on the machine so you can work out in advance if there are likely to be problems. But if you send a text message to your video for example you have no way of knowing whether the command worked or where in the chain it failed. There are three rules here Always acknowledge commands and requests. Always reply using the same medium. Always log the replies into a local file and optionally send them by e-mail. The .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.