App and driver porting to Hubitat

Are you writing habitat, or hubitat?

3 Likes

Not sure if its spell check doing this but you are using habitat not hubitat

2 Likes

Oops, sorry, typo. I'm writing hubitat in the code.

2 Likes

As autocorrect struck again, just to be clear, the code is:

hubitat.app.DeviceWrapper macChild = getChildDevice(mac)

Try simplifying the code just to...

def macChild = getChildDevice(mac)

Also, take a looks at Hubitat’s examples in their public GitHub repository. This one may be useful...

3 Likes

That simplification worked beautifully, thank you!

1 Like

my hub is in the country, once set up i would like to get my yale intergration working, could someone ave a quick skim of my app (i dont want to brick my hub the 1st day) and let me any obvious errors.

I probably wouldn't put the Yale auth token directly in the code - make it a preference option, assuming that's personal to you.

that token is a generc, used in conjunction with username/pass, to obtain a proper token (if that makes sense)

1 Like

I'm sitting here writing my first HE app and just found this thread. I'm both happy and disappointed. Happy that the information is somewhere, and disappointed that I had to find an old thread where a user had to dig through this.

Yes I know HE developers are busy but can I just nudge you to prioritize docs and examples for a week? I know it's boring and obviously deprioritized but there are so many developers that want to start helping you guys out. I have been doing professional software development for 30+ years and I want to help out writing drivers and apps, but when I find myself copying and pasting snippets from classic SmartThings doc websites and seeing the "An unexpected error has occurred trying to load the app. Check Logs for more information." over and over again, the fun and excitement starts fading away.

So. Know that you are probably losing thousands of man-hours for free because your documentation and examples are really bad to be frank. I would fix right away it to leverage your users' free time and expertise better.

Ping @mike.maxwell @bravenel and @chuck.schwer

2 Likes

Unfortunately for some, this will always be a low priority.
It has been said many times that Hubitat is not a developer platform.
It is designed to be a consumer platform where you can also develop, if you have the skills.

Andy

2 Likes

The documentation is sometimes sourced by the community voluntary on purpose. This topic is well indexed, easy to find and also tagged with a wiki tag. You will find gaps in the documentation but I don't think porting drivers and apps is one of those areas. Especially when you take into account all of the examples. You can diff so many before and after drivers.

I think that you will find you greatly exaggerated the time lost as well. The learning curve isn't steep enough for most to justify the time on documentation. Discourse is pretty easy to search and the community is super responsive if you play well with others.

Welcome to the platform!

2 Likes

@MFornander, you are not alone on those thoughts.

I completely disagree with this comment. Even with the major advances I have seen over my year with HE, I would still not call this a consumer platform. Your calling a hub that allows a user to create a program that could completely crash the entire system, designed for consumers.

I honestly don't feel the loss of time was over exaggerated. It is difficult to know how many people might have gotten more involved that decided not to. I find it extremely annoying to have to search community member posts to find details similar to what this thread contains. It just adds yet another bookmark for programming in HE, and you have to read the whole thread just in case someone posts something later with an improvement.

@MFornander, I'm not sure what devices or functionality you are looking to add to HE. There is a long list of supported devices and a lot of community members have created apps for tasks not handled by the factory install. However, as devices are created and this industry grows, helping new users get up to speed faster with better documentation would be a great strategy to combat the increasing competition. Especially now that the larger companies are looking at local automation too.

I would tend to agree with this.
However; I was quoting HE staff on their idea of the platform use

It has been stated a number of times that the platform was created for consumers not developers.

4 Likes

It may seem like splitting hairs, but I would argue there’s actually a big difference between “not ready for primetime” as a consumer platform that happens to allow for an individual development environment (the product of which can even be shared with others), and “developer platform.”

I believe Andy has stated pretty accurately what hubitat staff have made clear re: the platform’s overall priorities.

I am not a developer so I say the following with the utmost respect to those who give their time freely to other community members in order to make this a very cool place to be for DIYers interested in home automation.

Even though devs are willing to donate their time, hubitat as a company and platform may have perfectly valid reasons for not prioritizing or even rejecting those offers.

I'll also just throw out there that the wiki pages are editable/commentable by end users.

The fact that no budding developer took the time to update the docs either, as they we're learning "the hard way", reinforces Andy's comment that the learning curve isn't that steep.

Don't like the docs? Get to writing and submit updates. (Assuming you like working for free for a commercial hub/company.... :wink: ).

7 Likes

Is there a middle ground here where the Hubitat team turns the documentation into a editable surface by this community, or heck even on something like Github where we do pull requests for helping to keep it up to date and help document things like this that we all run into?

Edit:

Where are you seeing that?

https://community.hubitat.com/t/hubitat-elevation-documentation-wiki-announcement/4609?u=ogiewon

Hmm, yeah, that seems like a pretty high bar.
Create a new account, request edit permission, etc.

If someone sees an issue, it's so much easier to just suggest specific edits to the owners, like Gitlab, Matter most and others do. https://www.gitbook.com/ is a good example of this.

Invalid argument. You're telling me that cars aren't a consumer product? You can kill yourself and others just by operating a car. There are other reasons HE is not perfectly geared towards consumers but being able to write apps is not one of them. Every good product has an API or customization options.

What's the difference in between searching Discourse and searching through documentation?

3 Likes