HNHacker News
TopNewBestAskShowJobs

kingo55

545 karma · joined November 14, 2010

submissionscomments
kingo55··on Using ChatGPT for home automation
Haha, probably not. The logic for my activities and the complexity for the complimentary colours made it a little tough to maintain and extend. Plus there's a nice warming feeling knowing an LLM is busy designing my lighting throughout the day.
kingo55··on Using ChatGPT for home automation
I like the idea of storing the colours locally - better for privacy too! Definitely a novelty factor that AI is "designing" my apartment's colours.

Here's a snapshot of how it works in my office - bedroom and living room have similar setups and draw from the same colours:

https://ibb.co/ysxY3Lf https://ibb.co/9VgYVTb

And details on the setup in Node Red/Home Assistant: https://news.ycombinator.com/item?id=36018291

Prompt:

kingo55··on Using ChatGPT for home automation
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.

kingo55··on Using ChatGPT for home automation
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.

kingo55··on Using ChatGPT for home automation
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.

kingo55··on Using ChatGPT for home automation
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).

kingo55··on Using ChatGPT for home automation
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.
kingo55··on Using ChatGPT for home automation
Thanks! This is a great find... I'll have a look. Fingers crossed my hardware can run this.
kingo55··on Using ChatGPT for home automation
Making IOT API calls is a solved problem with Home Assistant - plus it works locally.

Where I see this working best is giving Chat GPT some context about the situation in your home and having it work out complex automation logic that can't be implemented through simple rules.

kingo55··on Using ChatGPT for home automation
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).

kingo55··on Using ChatGPT for home automation
Thanks, that's a good pickup -I'll refine my prompt.
kingo55··on Using ChatGPT for home automation
Yes, I access the API through Node Red which fills out the prompt template and returns Chat GPT's output to Home Assistant.

Costs about $3/year in API quota.

kingo55··on Using ChatGPT for home automation
LAN of things - this is a fascinating idea. Can you share where you are paraphrasing this from or link to more info on this concept? Sounds familiar with the self hosted applications people now run on their NAS/routers these days.
kingo55··on Using ChatGPT for home automation
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 which feeds Home Assistant:

Set the hue for my home's lights using the HSL/HSB scale from 0-360 by providing a primary and complementary colour which considers the current situation. The HSL color spectrum ranges from 0 (red), 120 (green), to 240 (blue) and back to 360 (red). Lower values (0-60) represent warmer colors, while higher values (180-240) represent cooler colors. Middle values (60-180) are neutral.

Consider these factors in setting the primary hue (in order of importance):

1. Preferences throughout the day: - When about to wake: Reds, oranges or hot pinks - Approaching bedtime: Hot pinks or reds - During worktime: Blues, greens or yellows - Other times: Greens, yellows or oranges

2. Current activity: Bedtime

3. Sleep schedule: Bedtime 23:00, Wake-up time 07:00

4. Date & time: Sunday May 21, 05:40

5. Current primary hue: 10

6. Current complementary hue: 190

7. Weather: 13°C, wind speed 9 km/h, autumn

Respond in this format and provide a reason in <250 characters:

{"primary_hue": PRIMARY_HUE, "complementary_hue: COMPLEMENTARY_HUE, "reason": REASON }

The output looks like this:

{primary_hue: 10 complementary_hue: 190 reason: "Approaching bedtime and early hours of morning, so a warm and calming hue is needed. Complementary hue adjusted slightly to 195 to maintain balance."}

kingo55··on Thriving on China's Belt and Road, Laos border town ditches kip for yuan
At least there is now precedent for breaking these contracts now too.
kingo55··on RStudio is now Posit
It's Hadley Wickham of R's tidyverse though, so I'm more inclined to believe the claim.
kingo55··on The top layer: a solution to z-index:10000
.futureproofHeaderMax { z-index: 10000 !important; top-layer: 10000 !important; -webKit-actually-paint-me-last: true !important; -webkit-no-backsies: true !important;}
kingo55··on The top layer: a solution to z-index:10000
Wait till we need to place elements higher than on the top layer. This will surely be abused by plugins.
kingo55··on Hertz paid Accenture $32M for a website that never went live (2019)
100x cheaper.
kingo55··on Do kwon sent $80M a month to secret wallets?
He may be alluding to the fact that money laundering is easier to get away with using regular trace-less cash than through an immutable public ledger where your criminal activity is stored in perpetuity.
kingo55··on Listerine Mouthwash Royalties
Very interesting... So does that mean avoiding mouthwash altogether and only brushing with very simple fluoride toothpaste?

I'm guessing you don't cater to Australia.

kingo55··on De-AMP: Cutting out Google and enhancing privacy
> sometimes weird actor

Like that time Brave replaced links to a site with their own affiliate links? Yeah, I no longer trust them.

kingo55··on Attacking an Ethereum L2 with Unbridled Optimism
RE: Monero, I agree. One shortfall - how do we verify no one on the network has found and exploited an inflation bug?
kingo55··on Bitcoin's fungibility graveyard
Russia and China have a long history of banning/blocking freedom-preserving technology.

Bitcoin continues to thrive despite their bans.

kingo55··on Bitcoin's fungibility graveyard
I've been paid for work in Monero before. It's not a far stretch.

As long as governments begin to accept Bitcoin, it becomes trivial to accept altcoins because they're often easily exchanged for Bitcoin.

kingo55··on To my surprise and elation, the Webb Space Telescope is going to work
On the plus side, we'll get the best view of HD84406 that we've ever seen.
kingo55··on Ask HN: Good open source alternatives to Google Analytics?
We use Superset and R markdown reports mostly.

It's quite common for us to rely on Snowplow as a source of truth, but use GA for quick exploration. Certain reports in GA are setup so nicely, like "navigation summary" and the more intuitive session definition for marketing. And while Snowplow is real time, there's no effective way to see the same reports as produced by GA.

kingo55··on Ask HN: Good open source alternatives to Google Analytics?
For sure... Bit overkill for that unless you're using Snowplow mini. A good rule of thumb to decide on Snowplow is whether you're considering GA 360.
kingo55··on Ask HN: Good open source alternatives to Google Analytics?
I've been a Snowplow user for nearly a decade. It's a bit of work to set up, but it's the best engineered of all those options.

Snowplow's JSON schema events and contexts give you complete flexibility to define a data model that suits your business. Combined with DBT and a BI tool, like Apache Superset, it's vastly more capable than Google Analytics. We have clients running Google Analytics 360 that can't do the stuff we're able to with Snowplow.

kingo55··on Mozilla Foundation pausing cryptocurrency donations
I wonder whether the credit card transaction energy includes the energy spent by thousands of bankers traveling to work each day in petrol powered cars to issue the fiat loans that fuel our modern currencies.
← PreviousPage 3 of 6Next →