Custom driver changes--what must I do with devices?

New to Hubitat. Wrote one (trivial) custom driver for controlling X10 devices that works Ok.

Now, I'm working on a another custom driver that controls my legacy audio/video devices via IR commands. I need to test with at least two devices that use the driver to see if setting a scene works like I think (at least want).

When I change the driver to add or change preferences, commands, etc, do I need to delete and re-create devices that reference the driver?

If the devices somehow "magically" pick up the updated driver, do I need to do something in the driver to make that happen? Maybe having something to do with the "updated" mehod?

As the driver code is updated the devices pick up the new code. Don’t generally need to do anything except for maybe refresh the device page if you’re on it when you add a new command or preference.

2 Likes

Thanks!

Actually, as I started to set up a scene I found it's not as flexible as I thought. I was thinking I could use a scene to not only set colors, dimmer level, switch state, or push a button, but also select an active input on something with a MediaInputSource.

Bad assumption, it seems.

I can get what I want by using Rules or making a button for each scene supported by the device type.

Is there a better approach?

Augmenting scenes with a rule or two (although I usualy use webCoRE pistons) sounds like the easier option to me, but YMMV. Really depends on what you’re most comfortable doing, HE allows you multiple ways of getting to the goal.

I know I can make it work with Rules, but I never heard of webCore pistons.

Thanks for mentioning -- back to doing some homework.

Thanks!

Nah, don't want webCore. For me, I working hard to stay out of the cloud as much as possible.

YMMV

webCoRE on HE is local….

1 Like

Hmm, I'll keep reading then. The doc I found was for SmartThings, I guess.

Thanks

ST was/is cloud based.

Couple of things.

First, I do see "weirdness" in how my custom driver worked until I deleted and re-created the device. I kept getting complaints about not finding a valid signature for the push command that's used in PushableButton capability.

I probably did have it declared wrong initially. Maybe left off the def, had a void keyword for the "return" part of the "signature", or something else from my hind-brain making a "C++" style of method definition.

But, as a I tried everything I could think of to change the signature, nothing would work. When I finally deleted the device and re-created, the obvious signature of :

def push(buttonNumber) {
}

worked fine.

Maybe I just needed to "refresh" the browser page where the devices prefs and commands are shown--I thought I did, but maybe not.

Also--

Sorry to digress on the thread, but @thebearmay, I don't see any significant difference between Rules 4 and webCore pistons. Am I missing something important? Maybe you had webCore pistons and you ported them over to Hubitat?

I was on ST originally, so was an easier transition for me. Interface is different but the end result and general operation is the same.

2 Likes

History Lesson Time...

Once upon a time, SmartThings existed with a rather poor set of tools for Automation. They had "Simple Lighting", etc and some guy * decided that wasn't good enough and created a tool called Rule Machine. It was a big hit.

Samsung/SmartThings caused the Rule Machine guy to pull the plug. he took his toys and left :slight_smile: There was a huge gap, obviously. The SmartThings Community created a replacement called CoRE (Community's Own Rule Engine) and things were great again until the hub ran outta gas on both create/edit/compile, along side run time. So the create/edit/compile portion was moved out to a website and thus... WebCoRE.

Fast forward and the Rule Machine is the built in automation tool on Hubitat. It's grown over time as software loves to do and now it's started spawning 'family members' such as Simple Automation Rules and Basic Rules.

But in the early days of Hubitat, when so many of the purchasers were SmartThings owners too, WebCoRE would simplify migration. WebCoRE was ported but wasn't originally built to work in a small computer environment and was unstable. All of that changed over time and the WebCoRE distributed today is not a problem anymore, as far as we know. WebCoRE continues to be a two part tool though.. the Web portion is still the means to create/edit/compile while the App does only run time. It's also possible to host the Web portion on your own Server and thus have it all local.

It's entirely possible I got more than a few things oversimplified or outright wrong, because I've never even tried WebCoRE on Hubitat. I had to use it back in my SmartThings days and it was a great tool.

  • some guy & Rule Machine is Bruce Ravenel, founder of Hubitat @bravenel
2 Likes

Thanks for the explanation.

I used to be into Home Automation WAY back when, but haven't paid much attention until lately, so background information like this is interesting and useful.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.