Announcing: ChatGPT Driver for Hubitat - Beta!
Hello All!
I'm new here, though a long time lurker, user and developer, but not so much contributor! However, I'm excited to share the beta release of a driver I've been using for a while now. ChatGPT. This driver harnesses the power of OpenAI's GPT models, bringing advanced and contextual responses directly into the Hubitat system.
Features:
- Direct communication with OpenAI GPT models from Hubitat.
- Intelligent responses to user questions.
- Supports both general inquiries and true/false styled questions.
- Customizable settings to control OpenAI model behavior.
Beta Version Highlights:
- Interactive Responses: Ask your Hubitat anything, and get insightful answers powered by GPT.
- True/False with Detail Mode: Specific mode for boolean queries with added explanations.
- User-Friendly Configuration: Easily tweak the model's behavior to your liking.
How to Get Started:
- Signup for an OpenAI API key at (OpenAI Platform)
- Add the driver to your Drivers Code section.
- Configure the driver with your OpenAI API Key and preferred settings.
- Create a virtual device and use the ChatGPT Driver.
- Start asking questions!
Beta driver is here: GitHub - xagon0/chatgpt-for-hubitat: A ChatGPT driver for Hubitat
Feedback:
Since this is a beta release, I'm eager to get your feedback. Bugs, features, or just sharing your experience.
I've had quite the enjoyment in building rules around it's answers, and have some plans to further expand the driver, maybe with custom function support, or similar.
But why?!:
Lots of people asked me why, my initial use case was for better control of various heating devices in my house. It's easy to say - oh the room is cold, turn on the heat. However, now I can chain together a few variables and say "It's {9:00pm}, the bedroom is {18c} and the entryway is {20c}. It's {expected to snow tonight, with an overnight low of -28}. The preference of the bedroom temperature is {16} to {19}, and entryway is {18} to {21}. Should the heat be turned on, and at what ideal temperature?"
I get a response of:
responseAnswer: The heat could be turned on in the bedroom to maintain a temperature within the preferred range. An ideal temperature would be around 18c, as it's within the accepted comfort range and closer to the lower limit to conserve energy while considering the significantly cold overnight forecast.
responseValue: true
Another integration I've enjoyed is just passing it the state of the house, and having a nice summary (that varies) each evening, played over EchoSpeaks.
System Content: You are a home automation system. Produce a concise narration to be played over the home based on the following information. Include only items you feel are relevant.
User Question:
Current time: 9:07PM Front Door: Last Locked at {8:45PM} Garage Door: Unlocked by Sam at {7:42AM} Back Door: Last Locked at {Yesterday at 3:02PM} Current Weather: {-9c, Cloudy. Wind northwest 20 km/h gusting to 40 becoming light near noon. High plus 3. UV index 2 or low. Snowing} Overnight Weather: {Partly cloudy. Wind up to 15 km/h. Low minus 7. Wind chill minus 10 overnight.} Security System: {Armed, No Faults} Lights: {Basement Lights: On, Living Room Lights: On} Thermostats: {House: 18C, Garage: 12C, Shower Floor: Off} Emergency Alerts: {None} Schedule Reminders: {None} Local News Summary: {State of emergency was lifted. No longer a need to conserve water.} ChatGPT Context notes: {reminders for plugging in cars below -10, or if I'm going to have to snowblow in the morning, maybe remind me to check if it's fueled up? You know, the standard stuff.}
responseAnswer: Good evening. The time is 9:07PM and the security system is fully armed with no faults. All doors are locked, except for the garage door that was last unlocked by Sam this morning. Please remember to check the status of the garage door. The current weather outside is -9C degrees and it's snowing, with winds gusting up to 40 km/h. You can expect it to be partly cloudy overnight with a low of minus 7C degrees. Inside, the house thermostat is set to 18C degrees while the garage is at 12C degrees. The basement and living room lights are currently on. Regarding your water consumption, the state of emergency has been lifted, so there's no longer a need to conserve water. Given the current temperature, consider plugging in your cars. Also, check if your snowblower is fueled up in case you need it tomorrow morning. There are no major emergency alerts or reminders for tonight. Enjoy your evening.
So...:
Ultimately, I hope I'm not the only person that finds it useful, and I hope I didn't miss a similar driver elsewhere!