Download lifx api12/7/2023 ![]() ![]() ![]() Cloud Scheduler and interactive apps simply publish the desired state of the bulb to the Pub/Subtopic. When a message is sent to the Pub/Subtopic, it triggers the function which calls the LiFX API. ![]() The core of the app is a Google Cloud Pub/Subtopic to which we connect the Cloud Scheduler, Google Cloud Function, and an interactive CLI application. The architecture of the application is pretty simple. We can also use the same configuration to interactively change the bulb settings such as the color, brightness, and its state. We will utilize the API of LiFX bulbs, Google Cloud Scheduler, Google Cloud Pub/Sub and Google Cloud Functions to automatically switch on the bulbs at 6 p.m. If you already own a bulb, all you need is an API token that needs to be embedded in the HTTP calls made to the endpoint. LiFX bulbs are WiFi enabled that can be controlled via simple REST API. I am a big fan of LiFX Smart Bulbs and their programmability. In this installment, we will build an application based on Functions as a Service (FaaS) to control a Smart Bulb. In the first part of this tutorial, I introduced Google Cloud Functions as a Serverless platform. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |