How does the rise of AI sit with you?

I am not a developer and the only programming I know is from my ZX81 days (10. PRINT "Robbie" 20. GOTO 10) but I have been using AI to write Apps and Drivers for my Habitat devices. To me this is great, as I now have an ability I have not needed to invest time to learn. Feels a little like cheating, but good cheating.
My career has always been around the physical transmission of data and not the software side, so far AI has been an advantage in my career and not a threat.
I do see a lot of career IT guys on this forum, many retired. I am curious to know how the emergence of AI makes you feel. I imagine you have pride in your programming knowledge, which no doubt took some effort to achieve.
How does the rise of AI sit with you?

1 Like

I have mixed feelings. I applaud its use in developing quick prototypes and analyzing code for errors, and really don't object if someone uses it to develop an app or driver that may not exist otherwise. Where I take issue is when it is used to fly a false flag, i.e. a claim to knowledge or skill that one does not possess based upon an AI product use that is unacknowledged. Not as serious as a Stolen Valor transgression, but a lower level of that category (actually a much lower level).

For years many of us put our code out in the public space so that others could learn, copy, utilize, and extend it. Many developers are automators of pattern, so an example often is enough to spur other thoughts and evolve into more complex pattern automations with multiple interactions and inputs; and sometimes the pattern, once realized, becomes evident in situations not fully understood before - this is how we advance our craft as developers.

AI is taught to code similarly, but unless directed carefully its quality of code does not naturally improve over time. Currently the code quality has seen generally overall improving quality of output because the models are still being fed coding examples from millions of sources, and because the standard to date has been generally held high due to the pride each developer has in their creations. I fear that as time goes on, the pride that produced innovation and creativity will, if not nutured somehow, be washed from the code by models that are merely splicing together fragments of code without fully understanding the beauty of the patterns they originally automated. When we reach that crossroad, if there are not enough real referenced developers to spur innovation, AI will begin a slow spiral into mediocrity.

Another danger if we look at code targets beyond the home automation landscape is pattern bias. Pattern bias in decision engines that are used to determine production patterns, or provide assistance to at risk populations could yield undesirable results and because these results will be automated their effect could multiply rapidly. Humans generally understand that any given a set of rules is normally targeted to hand 90-95% of the case scenarios encountered, and will question the 5-10% that are not handled well and if they have the descretion may weigh factors outside of the rule set to achieve a favorable result. Automation does not make quality decisions, either the situation applies or it doesn't. Therefore, each use of AI should include some type of audit to determine if it is producing a biased result outside of the desired outcome set.

Use AI or don't, but if used acknowledge its product and be aware of its flaws and biases. If someone who has not produced a meaningful line of code in 5-10 years suddenly is cranking out multiple "advanced" versions of apps be aware that something else may be behind the curtain and closely examine the outcomes produced.

22 Likes

Just like AI generated art, I think people try to take credit for code that AI generates, passing it off like they wrote it.

Is a bit of a new frontier, but Google says best practices in using AI code is to document in the comments what AI tool was used, the tool version, and what specific prompts were used to generate that section of code. I'm not sure that is really happening, and it seems that people just think, "I wrote the prompt, so I'm taking credit for writing the code."

6 Likes

I am a bit conflicted. As a whole, the power and water requirements for AI just do not seem sustainable. It seems like a waste of resources we need for more important things. I can't help feeling like I am contributing to all the downsides of running AI data centers every time I use AI.

On the other hand, AI is so useful. I have used it to write code, and it can be a handy tool, especially for complicated math and equations. Where it really seems to fail is answering questions from internet sources. I have had it confidently tell me things that turn out not to be true, too many times now.

AI is good at focused tasks. I'm using Copilot with MS 365 at work now, and it does really well at finding emails or teams chats where I want to know when something was mentioned. It also summarizes long email chains, which is very handy and saves time. It also is great at making Power Point presentations for you, it takes all the tedious work out of that. I haven't played with Excel AI much, but it apparently can do a lot of fun stuff with data in a spreadsheet.

The attitude seems to be to get on board or get left behind, and companies are afraid of where they will be if they do not use it. I know at my work it is now a company directive to incorporate AI into our work, and we had to add a specific AI goal to our commitments for this year, as well as take new required AI training courses.

6 Likes

For many applications, AI helps to leverage the sound logic of the prompter. The primary challenge that I see in my work is when people use AI to mask their lack of sound logic. My first use of AI tools was to reverse engineer the most likely prompts that resulted in the hot garbage that crossed my desk, so I could fix underlying problems.

The secondary challenge that I see is attempting to do something novel using a tool that typically summarizes the mean of its feedstock. It doesn't have any logical checks for something new or the creative capacity to explore something unconventional.

Disclaimer: I am a Luddite, so my standard position on most new tech is "nope".

9 Likes

I think I fall in the same boat as others in that AI is potentially a greet tool, but to many take what it creates as truth without verifying it.

I actually got into a argument with my sister because she refused to question what AI told her over some research i did on the topic that conflicted with her 30 second prompt response from Gemini.

The quality of AI output varies so drastically based on a ton of criteria.

It is also important to remember AI only knows what we train it, so it can't really be innovative or create something out of nothing.

My fear really comes down to AI is being given to much weight. There are going to be some significant pains as companies or orgs try to remove the human factor and depend on AI that will simply result in a the change being reversed.

6 Likes

For now, AI is only as good as the person who audits the code that AI generates.

As the databases used by LLMs increase in size and improve in quality, the quality of AI generated code will improve.

For now, there’s a fair amount of AI generated slop on this community and elsewhere.

6 Likes

AI is the digital hammer. Can be very useful, but also can break things beyond recognition. :rofl:

11 Likes

I feel AI has its place, but we cannot allow it to go unchecked. I use AI to assist is some of the complex math and code generation. It seems to do a good job for the most part, but the user has to be able to check its work.

I have had some catastrophic experiences where it does indeed get over confident and miss the mark. Its almost like each time you open up a new chat its a different personality some better than others.

3 Likes

(post deleted by author)

2 Likes

:100:

I don't doubt it, but seems completely futile. I know it's a flawed analogy but would someone want to take credit for bytecode generated by the JVM ("prompted" with e.g. Groovy) or assembly code from the compiler (which they "prompted" in C) ? Code is a program delivery medium.

What we're seeing with agentic coding (e.g. Claude Code) is a new level of indirection, above code. Agents are a game changer. I've now got Claude Code skills set up that know how to upload code to the hub, instantiate an app or driver from that code, add devices to the app, control said devices with MakerAPI to run tests on the automation designs, and listen to the logs and event websockets for tracing & errors. More skills (tools) could be added to track performance and other metrics. It's a very efficient workflow.

The proof will be in the pudding: if it works, it works.

7 Likes

We have 1200 programmers. We are all using Ai. We thought it might lead to reductions, but it hasn't. The shift is unreal and the mixture of old ways and new ways are mixing to make Ai development powerful.

It's not going away. Anyone in the industry that isn't using it will most certainly be left behind.

1 Like

AI is great. My career was mostly on the business side of technology, with a couple years leading an application support group in IT. At one point I had high competence in VB6 within Excel. While my modest coding skills have withered my analytical skills have not (at least not as much). Groovy in the Hubitat environment is a step up in complexity for me, but not a huge one. I find that I am able to moderately efficiently use AI to build Hubitat drivers and apps. I've got enough skills to find most of the BS that the AIs still sometimes deliver. It's important to use more than 1 AI model especially when doing QA tasks. The paid versions are a lot better than the free ones. I've only released one driver to the community, I tried to make sure I went through a fairly robust review process.

Once we get to AGI what language will the AIs choose? I bet it is something closer to assembly than Java. How difficult will humans find it to understand?

Would you mind sharing your Hubitat skills?

I have a kid who is going to college next fall to become a mechanical engineer. This is about as exciting a time as I could think of to go to school. These major shifts only come around once in a while, this is probably the most consequential shift since the invention of the mainframe computer. Hopefully the world doesn't blow up soon.

3 Likes

I’m in the higher ed sector and was just talking about AI and its usage in Academia with my class on Tuesday. Most of the undergraduates were generally in favor of AI, but limited in its application: putting in syllabi to identify key dates, study guides, help with presentations, course planning, etc. Most were generally opposed of using it for written assignments, which gave me some hope for the future.

I then asked them about its uses by Faculty and Administration. They came up with basic ideas like identifying scholarships, helping with financial aid, schedules, and other similar things. What really got them going is when I asked how they felt if a faculty member created an AI agent to help with the grading of the course. 20 undergraduates went immediately into anti-AI rants for that particular usage. It was a blast of a conversation when the students started to realize that efficiency and effectiveness cuts two ways when using something like AI.

As for the more relevant idea of AI and Hubitat, I freely admit to using it with no coding background at all. However, I use it to create apps and drivers for my own personal use that fill in gaps with the way I want to design my smart home. For instance, I created an app that modifies a Hue scene every couple of minutes for circadian lighting. This allows me to pre-stage my lights and activate the scene directly. The app then sees the scene being activated and will update it periodically and resend the On command to keep it active. This is all embedded within a Hue Smart Scene that drives all of my lighting. I run it this way so that my family can easily adjust things as they want. It turns off by just changing the scene. Right now, I’m testing this app to be a Ketra-lite system with Hue bulbs by sending XY coordinates rather than Color Temperature. It’s working really well.

3 Likes

Here's a couple of them - feel free to use them at your own risk and without any expectation of support.

push code to hub

name: hubitat-push
description: Push Groovy app or driver code to Hubitat hub and report compile status
argument-hint: "[filepath]"
allowed-tools: Bash, Read, Glob, Grep

Hubitat Push Skill

Push a local Groovy file to the Hubitat hub, compile it, and report the result.

Instructions

Follow these steps exactly:

Step 1: Read Configuration

Read .hubitat.json from the project root. Parse the multi-hub config:

  1. Check if $ARGUMENTS starts with @hubname (e.g., @myhubitat somefile.groovy). If so, use that hub name and strip the @hubname from arguments before further parsing. Otherwise, use default_hub.
  2. Look up the hub in hubs[hubname] to get hub_ip.
  3. If the hub has username and password (non-null), it has hub security enabled. Authenticate first:
    curl -s -c /tmp/hubitat_cookies_{hubname} -X POST "http://{hub_ip}/login" \
      -d "username={username}&password={password}"
    
    Then add -b /tmp/hubitat_cookies_{hubname} to all subsequent curl commands for this hub.

Step 2: Identify the File

  • If $ARGUMENTS (after stripping any @hubname) contains a filepath, use that file.
  • Otherwise, find the most recently modified .groovy file using: ls -t apps/*.groovy drivers/**/*.groovy 2>/dev/null | head -1
  • Confirm the file exists and read its contents.

Step 3: Determine Type (App vs Driver)

  • If the file path contains apps/ β†’ it's an app
  • If the file path contains drivers/ β†’ it's a driver
  • This determines the API endpoints to use:
    • Driver: /hub2/userDeviceTypes, /driver/ajax/code, /driver/ajax/update
    • App: /hub2/userAppTypes, /app/ajax/code, /app/ajax/update

Step 4: Extract Name from Source

Read the file and extract the name value from the definition() block. The format looks like:

definition(
    name: "My Driver Name",
    namespace: "johndoe",
    ...
)

Extract the name string (the value after name:).

Step 5: Find the Hub ID

Query the hub for the list of user code to find the matching ID:

  • Drivers: curl -s "http://{hub_ip}/hub2/userDeviceTypes"
  • Apps: curl -s "http://{hub_ip}/hub2/userAppTypes"

The response is a JSON array. Find the entry where name matches the name extracted in Step 4. Get the id field. Also note the usedBy field for later.

If no match is found, the code is not yet on the hub. Use the /hubitat-install skill to create it, then stop (install will handle creation and report the result). Tell the user you are invoking /hubitat-install.

Step 6: Get Current Version

Fetch the current version number (required for the update API):

  • Drivers: curl -s "http://{hub_ip}/driver/ajax/code?id={ID}"
  • Apps: curl -s "http://{hub_ip}/app/ajax/code?id={ID}"

Extract the version field from the JSON response.

Step 7: Push the Code

POST the updated source to the hub:

  • Drivers: POST http://{hub_ip}/driver/ajax/update
  • Apps: POST http://{hub_ip}/app/ajax/update

Use curl with:

curl -s -X POST "http://{hub_ip}/{type}/ajax/update" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "id={ID}" \
  --data-urlencode "version={VERSION}" \
  --data-urlencode "source@{FILEPATH}"

Where {type} is driver or app.

Note: --data-urlencode "source@{FILEPATH}" reads and URL-encodes the file contents automatically.

Step 8: Report Result

Parse the JSON response:

  • On success: {"id":..., "version":..., "status":"success"}
    • Report: "Successfully pushed {name} to hub (version {new_version})"
  • On error: The response will contain error/status details
    • Report the compilation errors clearly so the user can fix them

Step 9: Show Usage

From the data retrieved in Step 5, show which devices or app instances use this code:

  • For drivers: list the devices using this driver (from usedBy in the userDeviceTypes response)
  • For apps: list the installed instances (from usedBy in the userAppTypes response)

Format as a simple list with device/app IDs and names.

publish code from one hub to others on same account

name: hubitat-publish
description: Publish a driver or app to other Hubitat hubs on the same account
argument-hint: "[driver/app name, filepath, or ID]"
allowed-tools: Bash, Read, Glob, Grep

Hubitat Publish Skill

Publish a driver or app's code to all other Hubitat hubs linked to the same account, and report distribution status.

Instructions

Follow these steps exactly:

Step 1: Read Configuration

Read .hubitat.json from the project root. Parse the multi-hub config:

  1. Check if $ARGUMENTS starts with @hubname (e.g., @myhubitat mydriver). If so, use that hub name and strip the @hubname from arguments before further parsing. Otherwise, use default_hub.
  2. Look up the hub in hubs[hubname] to get hub_ip.
  3. If the hub has username and password (non-null), it has hub security enabled. Authenticate first:
    curl -s -c /tmp/hubitat_cookies_{hubname} -X POST "http://{hub_ip}/login" \
      -d "username={username}&password={password}"
    
    Then add -b /tmp/hubitat_cookies_{hubname} to all subsequent curl commands for this hub.

Step 2: Identify the Code and Type

Check $ARGUMENTS (after stripping any @hubname):

  • If a numeric ID β€” use it directly. You'll need to determine the type (driver or app) by checking both userDeviceTypes and userAppTypes.
  • If a filepath β€” determine the type from the path:
    • Path contains drivers/ β†’ it's a driver
    • Path contains apps/ β†’ it's an app
    • Extract the name from the file's definition() block and resolve to an ID.
  • If a name β€” search both userDeviceTypes and userAppTypes for a case-insensitive match. Get the id and determine the type from which list matched.
  • If no argument β€” find the most recently modified .groovy file using ls -t apps/*.groovy drivers/**/*.groovy 2>/dev/null | head -1, then resolve as above.

To resolve names to IDs:

  • Drivers: curl -s "http://{hub_ip}/hub2/userDeviceTypes"
  • Apps: curl -s "http://{hub_ip}/hub2/userAppTypes"

If no match is found on the hub, report the error and stop.

Step 3: Publish the Code

Initiate publishing by calling:

curl -s "http://{hub_ip}/hub/publishCode/{type}/{id}"

Where {type} is driver or app.

Report the initial response to the user. The response is JSON like:

{"success":true,"completed":false,"hubs":[{"id":"...","name":"MyHubitat","status":"Pending"},...]}

Step 4: Check Distribution Status

Poll the publish status endpoint:

curl -s "http://{hub_ip}/hub/publishCode/status"

The response is JSON:

{"success":true,"completed":false,"hubs":[{"id":"...","name":"MyHubitat","status":"Pending"},{"id":"...","name":"MyOtherHub","status":"Done"}]}
  • If completed is false, wait 2 seconds and poll again (up to 15 attempts).
  • Once completed is true (or on error/timeout), report the final status.

Step 5: Report Result

Summarize what happened:

  • Name, type (driver/app), and ID that was published
  • A markdown table of target hubs with columns: Hub Name, Status
  • Any errors encountered

IMO skills and memories matter more than code in this workflow. If you have a code base already, you can tell Claude Code to leverage it in order to generate code based on your coding styles, idioms, libraries, etc.

It still helps (a lot) to have a software engineering background to steer the implementation and avoid algorithmic complexity, etc. but it is not required to get started and it is possible to learn a lot by trial and error.

2 Likes

Strictly from a home automation perspective, I've found AI very helpful.

I mostly use Hubitat, but I have some things in Home Assistant. I had always pulled my hair out trying to figure out YAML scripts, but now I can just paste them into AI and ask it to point out my errors, or for that matter ask AI to create them from scratch. It might not work on the first try, but it only takes seconds for it to provide a revision.

This may not bode well for Hubitat, since there is no free text editing of rules, and no simple copy/paste ability.

2 Likes

I think AI will find its place. It will change things up for a while, but it will bed in and become business as usual. Some jobs will disappear, but new ones will replace them. Our pre-AI days will fade into memory and history along with us.
In the meantime, I'm having great fun creating weird, wonderful and totally over complex rules and apps.

2 Likes

This! I've wanted to be be able to open up a rule in vi and go wild for years. Yes, the code would then to be validated by some sort of rule validator. Well, that was simply a "nice to have" for an aged (experienced) coder like me. But, the lack of ability for free text does indeed become a market differentiator in the future and Hubitat may need to rethink this if they want to be relevant when AI code generation is the default way of generating rules. I would love to say "Grok create a rule that turns on the lights in the main level when someone comes home but only when it's dark out, but not past bed time unless someone has turned on stargazing mode in which case turn on only the hallway light, but only at 20% etc etc etc." I'm pretty good at rules, but the more complex they get the more I would love a cheat code like AI to help me generate them.

2 Likes

Maybe HE developers could use AI to generate an RM pre-processor? :wink:

3 Likes

I work with Data, so it sits pretty well.... :slight_smile:

For a home automation context it is a positive sign that people around Home Assistant talking about AI and voice assistants. Similarly, it is good to see similar movements within Hubitat, both in the platform and the Community.

If I think about my first ventures into messing with automation, including rules in Stringify, my lighting rules on my Philips Hue bridge and ultimately in Hubitat, plus conversations here around the concept of rule triggers AND logic.... It feels like AI can likely act as a bridge for many who don't have that logical mindset that ultimately computer systems need when setting up the automations we all need and want. For those of us who know what we are doing... or think we do... it is a little messy trying to navigate what is useful vs what is wrong or gets in the way with AI... Ultimately I think we will approach a time where we can harness mostly positive outcomes with AI for us tech's.... :crossed_fingers:t2: But obviously that is not a blanket outcome...

The other stuff about jobs and alike is worth talking about.... but ultimately, like so many things, will be guided by economics more than human sentiment, as much as we would like to think we will influence it... Not a nice thought, but likely the truth... If not, then I am happy if I am wrong...

2 Likes