Mycroft Skill For Hubitat Ready To Try Out

it was pretty rough but i got it going.. whew.. had to hardcode all the values like you said, then it appeared in my settings.

the device discovery url is also different for my local maker api installation.

1 Like

@burns_hub I've added a thermostat set mode intent, to handle controlling the operating mode of AC thermostats, unfortunately I had to remove set <dev> to <XXX> from the level.intent to avoid triggering the set level intent. Therefore the set level intent now only triggers if you include the word "percent" in your command, and the thermostat mode intent triggers anytime you set <dev> to <xxx>

So now you can control the operating mode of thermostats by issuing commands like
set <thermostat> to <cool, heat, off, auto, emergency heat> etc.

Ok, glad to know you have it running. I'd like very much to fix this so it works generically for most things that people want to do without having to customize the code. That was why I added some device names in the settings page. Perhaps that is not general enough to do what you want.

Did you fix the issue with getting it to run the first time in any general way or just by manually entering the values the first time? I'd like to fix that too if you have not already.

If you wish, feel free to put your code on a git branch and give me a pull request so I can see what you were trying to do and maybe (some time) think of a way to improve it. Or if you feel like trying to generalize it, go ahead.

Hi There,
Yes, I've already forked and created a couple of issues in your project.
Yes, I've fixed the initial first time run issues, I basically added a boolean flag that prevents running of any intents prior to a proper configuration pull, i.e. if any value is None, the intents are skipped (the token value is set to null in the settings yaml).

Finally, I decided to take a slightly more nuanced approach to thermostat controls, instead of adding a new thermostat mode intent, I simply added some logic to check if the level is in the supported thermostat modes attribute. If it is, the sent command is setThermostatMode rather than setLevel.

Feel free to pull anything / everything into your project.

Feel free to pick and choose from what I've got.

1 Like

I'd like very much to fix this so it works generically for most things that people want to do without having to customize the code.

We're very much on the same train of thought.

I'm planning on rewriting the skill to accommodate more features and functionality with a class based approach. That is, essentially create some abstract classes for the different device types, e.g. Thermostat, Switch, etc. . Then using some fancy factory methods, we can instantiate each device returned as it's own class object instance automatically using an abstract factory design pattern. That way each device gets instantiated and you can call class methods on each device and it will either work or not.

Also, the current model searches the json and pulls out a command dict, I was wondering, why not just load the entire json into one big dict, and then do all searches and operations on the in memory dict.

let me know what you think.

Sounds like a great idea! This version was my first try at a skill so I was not too famiiar with creating "dynamic" intents etc. Once I got it working "well enough" I went on to another project. So I look forward to seeing a big improvement. I'm also happy to see what you do with the full json into a big dict.

BTW, I think someone is attempting to make a generic "smart home" skill for Mycroft; it might be good to attempt to integrate Hubitat into that.

Finally, I wonder if we should move this discussion to the Mycroft community rather than the Hubitat community. It is probably interesting to more Mycroft people.

2 Likes

Just to let you all know, I recently acquired a Mycroft Mark II hardware box. It was intended to run MyCroft and I was going to port to it if anything was required. However, it turns out that Mycroft.ai, the company, is pretty much defunct. They are still selling the hardware, but there are no more developers. However, the rights seem to have been taken over by a company named neon.ai (not quite the right name, but the right URL). Neon has an improved set of software for the Mark II.

In any case, I have checked the Hubitat integration skill with it, and it works ok, although it is a pretty fussy job installing it. I have upgraded the readme in the skill to explain how to install it. If you have a Mark II , feel free to try it.

4 Likes

A recent internet outage in my area reminded me how an offline assistant is relevant to my interests today. I was reading about the Mycroft MkII. I'm glad to see you have an integration running. Care to elaborate any on how the device works now with Neon.ai running the show? Could be the hobbyist nature of it, but their site looks...very unprofessional. I see they are selling them, but the price is a bit steep. Also, any idea why it seems there's new hardware too? It appears an odd pack or dongle is now plugged into the device to support it using Neon.ai's software.

Sorry to ask so many question. I'm tempted to order one and see what I can find out on my own, but again, somewhat steep price tag to just try it out.

Hi @mikage.kun. I'm happy to update you on what has been happening. First I can't comment on the professionalism of the Neon web site. I have generally been paying attention to a chat site called "Element" that they use to talk to each other (which I might add that I hate). There are also at least two different groups collaborating there and I have to say that I don't fully understand how that all works. And finally about the overall experience, my MkII died--apparently a non-uncommon experience--and they replaced it without any problem. Last I knew they were not charging for the Neon version the supports the MkII, but home "smart speaker" is not their main market in the long run, I think. A few of their guys follow the Mycroft forum, so you could ask there.

All in all, I would say they are very responsive, both in terms of replacing hardware, and responding to questions about the software. But see the next paragraph:

That chat site is so hard to follow that I have not been following it regularly lately (not to mention having been busy!). The last thing that happened was the I upgraded to the latest software and apparently with this major upgrade I have to re-install the hubitat skill and I just have not had time. So I've fallen back to using my old PiCroft (the old MyCroft software running on a Raspberry Pi). To be honest, the Pi is not as cute as the MkII but it works better than things did on the MkII before I upgraded. In particular, it understands my speech more reliably.

Regarding the "things sticking out", the program for the MkII is always on a USB flash drive. But the Mycroft flash drive is tiny...maybe 1/2" long, while the one you get from Neon is a "normal" size, and Neon works even better with a USB solid state drive, which is much bigger. I think the initial smaller flash drive is slower. Certainly the solid state drive is much faster.

One more thing: Neither Neon nor Mycroft really do work fully offline at the moment. It may fall back to offline (something like that happened to me once, but I don't remember the details), but it works way better online. Not what I hoped for, but as I understand it, they are moving in the fully offline direction.

I hope this helps!

This all does help but, how disappointing that things still haven't solidified for a fully offline assistant, even in this age of "AI". I really just want something that can listen to voice commands and hit a virtual button, which is what Alexa primarily does now.

I did see some talk about a custom board developed that could be put in a Google Home Mini to make it an offline voice assistant. Seems there's considerable work to put in to get any payoff though, and it's highly experimental. The boards just make the Google Home a marginally affordable speaker/mic for a centralized "AI" you run yourself. I'm afraid it's all above my skill level at this point.

For all the hype, I really wish the AI craze yielded something for me as a consumer.

1 Like

Yes, I agree. I'd be happy (and it may actually be) if the STT and TTS that is now online somewhere could run on a home server...maybe it has to be bigger or more powerful than the Pi or MkII, but even that would be ok. I don't object to connecting things locally (as we do with the Hubitat skill.

1 Like