While talking about the constraints, I glossed over two more factors that affect the system’s behavior. The fan speed and the temperature of the fluid running through pipes. These two go hand in hand to specify the effectiveness of the system. The fluid temperature is out of our control since the building adjusts it based on the outside temperature. On the other hand, the fan has three adjustable speeds we get to control. Without worrying too much about the pipe’s temperature, I found that setting the fan speed to high resulted in a better heat distribution throughout the apartment, since the system was heating a bigger volume of air. I’m assuming the opposite would work better for a smaller space.
To position the temperature sensor in what I believed to be the ideal height, I did some experimentation with the help of an indoor thermometer. Many days later, I realized that the position of the sensor doesn’t matter, it’s our perception of the temperature that does. Our perception will adopt regardless of the thermostat’s reading. In other words, instead of always setting the temperature to 70, we’d either set it to 71 or even 72 degrees and achieve the same result.
Google Home Integration
This step turned out to be more complex than anticipated. The picture below shows the information follow from the user to the Google Assistant and eventually to the smart device:
Google’s Smart Home documentation outlines the integration as follows:
1) Setting up OAuth 2.0 for authorization and account linking.
2) Creating a Smart Home action in the Action Console.
3) Adding authentication.
Actions in Google’s landscape are the equivalent of Amazon’s Alexa skills. Smart Home is a type of action that deals with smart devices integration.
While going through the steps, I was disappointed to find out that regardless of whether I intent to publish my Smart Home action or not, I had to go through all of the steps. I couldn’t find a way that allows me to skip the OAuth and authentication steps in order to create a quick and easy test for my action. I don’t understand the reasoning behind such decision, since as of now, with everything setup, no one except me has access to my action unless I explicitly invite them.
Moreover, enforcing steps 1 and 3 means that anyone who plans to experiment with a Smart Home action must possess a publicly accessible URL. I was able to overcome this by using ngrok, an awesome tool that tunnels traffic from a public URL to your local machine. Since the free version of ngrok uses a new random URL after each restart, I decided to pay for their basic plan which gives me the ability to reserve URLs on their domain. I recommend doing this, since I now don’t have to worry about changing the URL settings after any restart.
Lastly, setting up the actions fulfillment endpoint that Google Cloud will call was a mix of looking at the documentation, samples, and reverse engineering.
Final thoughts
Like any project, I had my ups and downs while working on this but I’m very satisfied with the final product and how well it works. Before I sign off, I want to give a shoutout to the Pi-hole project, they help you setup a DNS black hole to achieve network-wide ad blocking, I strongly recommend setting it up if you have a Raspberry Pi or any compatible hardware.
from Hacker News https://ift.tt/37cjGdU
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.