Live data from Hacker News

Using ChatGPT for home automation

atomic14.com

91–100 of 117 posts

Re: Using ChatGPT for home automation

#91
post #20

I have been using chat GPT to control my light colours for about a month now. It's too tedious to properly set the colours and temperatures of our lights manually and too complex to consider all factors like activity, weather, music, time of day and season. Chat GPT is now our personal lighting DJ, giving us dynamic and interesting light combinations that respect our circadian rhythm. Here's my prompt - the output of…

I don't get it. Do you not tell it the current primary and complementary hues? Seems like it gives you the same back. And in the reason it incorrectly says it adjusted the hue.

It hallucinates a bit, yes. But in general it gives me suitable colours for when I need them. I've yet to try this with GPT-4 or some of the other models suggested in the comments here.

Re: Using ChatGPT for home automation

#93
post #20

I have been using chat GPT to control my light colours for about a month now. It's too tedious to properly set the colours and temperatures of our lights manually and too complex to consider all factors like activity, weather, music, time of day and season. Chat GPT is now our personal lighting DJ, giving us dynamic and interesting light combinations that respect our circadian rhythm. Here's my prompt - the output of…

This is awesome. How do you feed this into home assistant?

Thanks - The flow is pretty simple:

1. Every hour a Node Red flow runs 2. It generates a prompt using a Home Assistant Jinja template 3. The prompt is sent to Open AI 4. The response gets parsed from JSON and sent to Home Assistant's "input_number" entities 5. Lights in Home assistant pick up the state change and set the new colours

If you're keen, I can share the Node Red flow diagram (or JSON).

Re: Using ChatGPT for home automation

#94
post #20

I have been using chat GPT to control my light colours for about a month now. It's too tedious to properly set the colours and temperatures of our lights manually and too complex to consider all factors like activity, weather, music, time of day and season. Chat GPT is now our personal lighting DJ, giving us dynamic and interesting light combinations that respect our circadian rhythm. Here's my prompt - the output of…

Could you elaborate more on the setup? Like if I were a technologically competent person, but unfamiliar with how to set up a system that keep GPT live, and then feeds that output into Home Assistant

Re: Using ChatGPT for home automation

#95
post #49

Earlier quoted context omitted.

Yes, see my example above. I use Node Red to get chat GPT and Home Assistant talking to each other. No code required (unless you count the prompt template).

Hmm do you have a node red template? Never used it so confused how to set this up. Is it voice activated?

It activates upon certain activities or at every hour - I haven't thought about voice activation though.

Here's an export and screenshot of the flow (these links will expire in 2 weeks):

https://pastes.io/5dfmorqw1d

https://ibb.co/gF55h46

I use a few custom "nodes" to make it easy to query and parse the response though:

* node-red-contrib-string

* node-red-contrib-custom-chatgpt

* node-red-contrib-home-assistant-websocket

On the Home Assistant side, you'll need to create some "Helpers" or "input_number" entities and an "input_text" entity for the reason.

Hopefully that helps you get up and running.

Re: Using ChatGPT for home automation

#96
post #20

I have been using chat GPT to control my light colours for about a month now. It's too tedious to properly set the colours and temperatures of our lights manually and too complex to consider all factors like activity, weather, music, time of day and season. Chat GPT is now our personal lighting DJ, giving us dynamic and interesting light combinations that respect our circadian rhythm. Here's my prompt - the output of…

Could you elaborate more on the setup? Like if I were a technologically competent person, but unfamiliar with how to set up a system that keep GPT live, and then feeds that output into Home Assistant

Certainly, I've just shared this in another comment here:

https://news.ycombinator.com/item?id=36018291

The flow is pretty simple in Node Red - render the prompt from Home Assistant and pass it to Chat GPT. The response from Chat GPT is parsed and sent back to Home Assistant in some "Helper" variables known as "input_number" and "input_text".

Once the values are in Home Assistant, it's pretty easy to change the colours of lights in an automation.

Re: Using ChatGPT for home automation

#97
post #85
post #20

I have been using chat GPT to control my light colours for about a month now. It's too tedious to properly set the colours and temperatures of our lights manually and too complex to consider all factors like activity, weather, music, time of day and season. Chat GPT is now our personal lighting DJ, giving us dynamic and interesting light combinations that respect our circadian rhythm. Here's my prompt - the output of…

This is super cool, I would love to implement something like this. Are you willing to post the node red yaml for it?

Certainly - just posted it in this comment here: https://news.ycombinator.com/item?id=36018291

Happy to answer any questions if you hit a snag.

Re: Using ChatGPT for home automation

#98
post #30
post #13

Earlier quoted context omitted.

> If I say "it's too chilly in here" in a house with only lights, it will turn them on as a way of "warming things up". is it bad that I'm on GPT's side on this, i mean if they are incandescent lights they are small electric heaters and what else do you expect it to do

Yeah but I think the idea is that it is a knob that calls to be turned. "It's warm in here" -> "I'll make the light blue so you feel nice and cool". "How fast do sparrows fly?" -> "Making the light brown". Like it might want to do _something_ and tweaking the hue or brightness are all it can do. Good reason to always try to include in a prompt a way-out, a do-nothing or I-don't-understand answer.

  > Good reason to always try to include in a prompt a way-out, a do-nothing or I-don't-understand answer.
Do you have a good way of including such a provision?

Re: Using ChatGPT for home automation

#99
post #12

I'm not against idea of having LLM be smart assistant for home, but I do have problem with sending any of that to cloud. It's one thing to use it as convenient way to change anything remotely but linking home automation not only into constant internet connectivity but also "that one particular cloud thing that might disappear at any moment" (hello google) just seems like setting yourself for problems later. At least…

This is broadly the ethos behind Home Assistant. It runs on a Pi or similar box and it acts as an abstraction layer on top of a bunch of drivers for smart sensors and actuators. It's totally offline, though if you're really against being connected that also means you can't access it remotely (unless you SSH into a local machine). The dashboarding is competent, though there are often little things that are frustrating to modify (but it's open source, so the opportunity is there).

The whole system is a sort of IFTTT and quite powerful. Since every entity is exposed as a generic device with some capabilities, you can easily set up little automation routines or you can interact with the local API.

At this point pretty much all the "big" names are supported - I have a mix of Hue, Aqara, iRobot, IKEA and other devices and they mostly just connect. There's also support for unusual things like Octoprint and router status. And now there's also ESPHome so you can make your own sensor nodes.

The biggest challenge with offline voice control is latency between speech to text, inference and text to speech. Running offline is less of a problem and open source models will eventually get good enough, but the really impressive aspect of Alexa, Siri, etc is how fast they can respond to you.

https://www.home-assistant.io/

Re: Using ChatGPT for home automation

#100
post #71

From the beginning I was ridiculing AGI dommsdayers, but just one month later I am waitng for an article about "Isn't it a great idea to connect LLM to NORAD system?"

The June issue of the Atlantic has an article about giving control of nuclear weapons to AI

https://www.theatlantic.com/magazine/archive/2023/06/ai-warf...

Post reply on HN