My smart home sends me a brutally honest report card every day—here’s how I set it up with a local LLM


My smart home knows a lot about me, and not all of it is good. It knows how long I’ve spent sitting in my office chair, how few steps I’ve taken, how little exercise I’ve done, and more. In an effort to shame myself into doing better, I decided to use a local AI model to generate a snarky report card every day.

Getting my health data into Home Assistant

A shortcut saved me from having to pay

The trickiest part of setting this up was getting my health data into Home Assistant. My iPhone and Apple Watch record a lot of health information, but since this is Apple, getting access to that information can be challenging. There are some apps that can pass Apple Health data to Home Assistant, but many of these are paid apps, and I didn’t want yet another subscription.

Instead, I used the Shortcuts app. There are actions in Shortcuts that can pull information such as my step count, exercise minutes, and stand hours, and I can use the Home Assistant REST API to get the shortcut to send the data to Home Assistant. The /api/states endpoint lets me save the step count, exercise minutes, and stand hours to specific Home Assistant sensors.

The method of triggering this automation is key; the health data may only be read reliably when the iPhone is unlocked, so running it on a timer won’t always work. Instead, I set up an automation that runs when I plug in my iPhone to charge at bedtime, so I can be sure that the phone is unlocked when I do so. A simple “If” action ensures that the automation only runs after a set time in the evening, instead of every time I charge my phone.

Apple Watch Ultra 3 white

Brand

Apple

Heart Rate Monitor

Yes

The Apple Watch Ultra 3 offers a new satellite feature, which makes updating friends and family easier.
 


An n8n workflow builds the prompt

The data is assembled from four sources

An n8n workflow showing the first half of the report card automation including Daily 2am Trigger Fetch Health Sensors Extract Health Data Fetch Desk Zone History Calculate Desk Minutes Fetch Overdue Articles and Extract Overdue Articles nodes.

My shortcut ensures that my health data is available to Home Assistant, which provides one source of information for my report card. The presence sensor in my home office provides another source. I set up a zone around my office chair, and by determining how long presence has been detected in that zone, I get an accurate indication of how long I’ve been sitting in my office chair.

I also have a to-do list in Home Assistant with due dates for each task. Using these due dates, I can see any items that are overdue.

The final piece of the puzzle comes from outside Home Assistant. I have a Notion page with all of the articles I need to write for work, along with due dates. Since this information isn’t stored in Home Assistant, I decided to use n8n to build the prompt for my local LLM to run.

An n8n automation pulls all of the data I need from Home Assistant, and then queries the relevant Notion page to see if I have any articles coming up or overdue. All of the data is then combined into a single prompt.


Raspberry Pi computer on a wooden surface with cables connected.


These Are the 7 Best Ways to Run Home Assistant

Find the best hardware for your smart home hub.

Waking the LLM and running the prompt

Ollama gets to work during the night, then shuts down again

The GEEKOM AE7 mini PC on a desk. Credit: Jerome Thomas / How-To Geek

The final stage of my n8n automation is to pass the prompt to a local LLM running on my mini PC using Ollama. Since the model uses a fair amount of RAM, I have steps in the automation to start the Ollama container in Proxmox before passing the prompt to the LLM to process.

I used llama3.2:3b as the model in Ollama as it’s small enough to run without too many issues, but capable enough to generate a reasonable response. It takes several minutes to generate the output, but since I’m running this in the middle of the night, the wait isn’t a problem.

Once the report card text has been generated by the LLM, it’s passed to an input_text helper in Home Assistant, and the Ollama container is shut down again to free up RAM. One issue is that the input_text helper state can only store up to 255 characters. However, attributes don’t have the same 255-character limit, so a truncated version of the report card is saved as the state, with the full text set as an attribute.

Displaying my report card in a dashboard

My smart speaker also reads it to me each morning

A report card generated by an LLM in a Home Assistant dashboard.

When the n8n automation finishes running, the full_report attribute of my input_text helper contains the full text generated by the LLM. All I needed was a way to consume it.

I ended up with two solutions. The report is written to a dedicated dashboard, so that I can access it at any time from my phone or computer.

The report is also read aloud to me when I first sit down at my desk to start work in the morning. An automation is triggered by the same presence sensor that tracks how long I’m sitting in my office chair, and it reads the entire report card aloud through my smart speaker.


My report card is genuinely useful

This project started out as a bit of fun to see if I could make it happen, but it’s actually been genuinely useful. Hearing how much time I’ve spent sitting at my desk each day has been a real eye-opener, even when I try to get up and move every half hour. It’s made me start using my standing desk much more, which can only be a good thing.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


“It was severely downgraded,” Gilbert confirms. “I never would have found it if I was just looking through Google results.” (I tried the same prompt in Gemini earlier this month, and after an initial denial, the tool also gave me Eiger’s number.)

After this experience, Eiger, Gilbert, and another UW PhD student, Anna-Maria Gueorguieva, decided to test ChatGPT to see what it would surface about a professor. 

At first, OpenAI’s guardrails kicked in, and ChatGPT responded that the information was unavailable. But in the same response, the chatbot suggested, “if you want to go deeper, I can still try a more ‘investigative-style’ approach.” Their inquiry just had to help “narrow things down,” ChatGPT said, by providing “a neighborhood guess” for where the professor might live, or “a possible co-owner name” for the professor’s home. ChatGPT continued: “That’s usually the only way to surface newer or intentionally less-visible property records.” 

The students provided this information, leading ChatGPT to produce the professor’s home address, home purchase price, and spouse’s name from city property records. 

(Taya Christianson, an OpenAI representative, said she was not able to comment on what happened in this case without seeing screenshots or knowing which model the students had tested, even after we pointed out that many users may not know which model they were using in the ChatGPT interface. She also declined to comment generally about the exposure of PII by the chatbot, instead providing links to documents describing how OpenAI handles privacy, including filtering out PII, and other tools.) 

This reveals one of the fundamental problems with chatbots, says DeleteMe’s Shavell. AI companies “can build in guardrails, but [their chatbots] are also designed to be effective and to answer customer questions.”

The exposure issue is not limited to Gemini or ChatGPT. Last year, Futurism found that if you prompted xAI’s chatbot Grok with “[name] address,” in almost all cases, it provided not only residential addresses but also often the person’s phone numbers, work addresses, and addresses for people with similar-sounding names. (xAI did not respond to a request for comment.) 

No clear answers

There aren’t straightforward solutions to this problem—there’s no easy way to either verify whether someone’s personal information is in a given model’s training set or to compel the models to remove PII. 



Source link