The best Z-wave hubs: How to choose

got any links that helped you? i would love to get into it, but every time i look into it, i get overwhelmed by so many links

To be honest, I spent a lot of time taking apart drivers/apps and figuring them out and how they worked. I referenced a lot of the old smartthings documentation on writing stuff and then used the HE documentation to fill in the gaps.

Groovy is a pretty standard language so you can google for information on groovy syntax etc.

Then I would probably take a simple app that you want to customize and tear it apart and build it how you would like it. From there maybe move onto a virtual driver to get familiar and then onto zwave/zigbee drivers if you want to get into writing those.

I always found taking something and rewriting it from scratch in my own style helped me to understand it and learn the flow and process.

Ya, it sounds like a lot of work but their wasn't much in terms of documentation when I learned it and even though it looks like it got a lot better it still seems to be lacking.

1 Like

As @gavincampbell suggests, learning Groovy as it's used in Hubitat mostly has to do with drivers and apps. Therefore, looking at some simple ones will be less about the language than about the structure of drivers and apps.

For example, there's a virtual driver for presence that does not contain any Z-device code... it's a virtual driver. It is good for identifying the minimum, stripped back structure.

That driver merges a virtual presence driver with a virtual switch. It interconnects them so that a change in presence ALSO causes a change in the switch. And that a change to the switch, also changes presence. Add into your hub and remove some pieces and see what happens.. watch the logs too.

Next up would be the very few drivers and apps that Hubitat has published:

2 Likes

Has anyone written up anything on setting up a development environment? I look at that code and I think "Where do log, device,createEvent, and sendEvent come from?" There's no import and I'm not sure what's available.

You will need to look at a combination of HE documentation and ST documentation.

https://docs.hubitat.com/index.php?title=Developer_Documentation

https://docs.smartthings.com/en/latest/

Between the two you should be able to get an idea of things.

2 Likes

Echoing what @gavincampbell said, if you want something more like a tutorial, I highly recommend the SmartThings Classic Developer Documentation (even though it feels blasphemous and dirty!):

https://docs.smartthings.com/en/latest/

I used those to learn, and it was a good introduction to the differences between drivers and apps, when to use each one, how events work, when to use capabilities, how to handle dates & times, etc.

2 Likes

@mikee385 @gavincampbell Do you guys still use the SmartThings IDE to develop, or can I do this in a local IDE?

If you’re on a computer, editing code directly in the Hubitat IDE works fine. If you’re on a mobile device, it’s not bad, but not a great experience either.

Personally, I put all of my code in GitHub and use Working Copy on my phone for development. After I’ve made changes, I commit and push the changes to GitHub from Working Copy. I have a custom repository set up for Hubitat Package Manager that points to all my code in GitHub, so I can just run an update in HPM, which pulls the changes into the Hubitat environment. If I made any small mistakes, I may tweak the code in the Hubitat IDE to make it work, and then make the corresponding changes in Working Copy later.

Might not work for everyone, but that workflow has worked well for me.

3 Likes

I just use the Hubitat IDE... works fine for me and I've done a lot in it.

I found this and, if it works, it'll let me stay in my IDE and do TDD:

1 Like

thanks for all the links. i don't know why i didn't think of checking HE docs for this.

Funny article.
Best overall would be Athom Homey according to the article.
I have used Homey for over a year, and ditched it because of constant connection issues.
(also the "flows, the Athom name for rules" are limmeted and kind of teletubby)

When I first got my Hubitat I hade allot of connection issues, both in Z-Wave and Zigbee.
After tinkering for a few weeks, decided to litteraly follow the Best Pratice from Hubitat on those networks.
Reset the entire hub, and then first place the repeaters. Wait for a Day, and then add devices in batches, waiting a day in between batches.

Been rock steady ever sinds.

3 Likes

Still not on the market and it's been a while... I've reach out just to followup on but waiting to hear from them.

1 Like