Putting It All Together

Now that you have the individual pieces in place to check the weather and control the Hue lights, let’s put it all together by expanding the program to check the temperature status at any time from any other application that sends a request to the service. In addition, let’s also allow the results to be exported regularly to a Prometheus exporter that can be visualized in Grafana. Lastly, we’ll want to remove the statically defined values in our code and move it into a configuration file that can be easily edited. This way, if there are changes to the color scheme, API keys, locations, or other variables, we don’t have to edit and recompile the source code to activate those changes.

Start the final version by creating ...

Get Automate Your Home Using Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.