Linux Format

Process your smarthome sensor data

This article is the second of a three-part series, where we are working on the program that we started last month. Our aim is to pull data from the Home Assistant API and then render it on screen in a GUI. We’ve split the program into two and last month we wrote the library that interacts with the API. This time, we are beginning to write the GUI portion and then use the library to authenticate with the API and grab the data.

So, let’s discuss a few of the basics. The Qt library has been chosen for this project, partly because it is cross-platform and has a freely licensed Python binding for open source usage (commercial licences are needed for some types of application) and partly because your author hasn’t used it before and wanted to learn about it. See the boxout (opposite) for a description of alternatives.

comes with its own application and this can be used to create the GUI design using a dragand-drop tool. Once the GUI definition has been saved, it can be imported into a Python program and used, or the definition can be converted into native Python code. In this article, we are hand-coding the GUI and some explanation of how everything

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format1 min read
Vector Vexations
Why does MySQL not support vectors in its community edition? Generative AI is the hot topic in tech. GenAI relies on vector data. Yet Oracle has no plans to support vectors in the community edition of MySQL. If you want to try out vector data with ot
Linux Format5 min read
Tips For Managing Docker Containers
Everyone knows how containers revolutionised application building and deployment. Using a E disposable stack of containers that make up an app that aren’t using the docker-compose command to manage the stack are missing a trick. It allows the shippin
Linux Format1 min read
Wine For Wayland
2023 was a great year for the Wayland driver for Wine. The goal was to move forward from the experimental phase and make the driver a proper upstream component. A year later, after several merge requests, many people are now already able to use the l

Related Books & Audiobooks