Offline mode with Home Assistant?

I’m not really sure if this is possible, but is there a way we can get Mycroft to talk to HA directly, without pinging the online server first? I have random internet outages in my rural area. Obviously Mycroft loses any ability to perform internet requests when the interwebs is down, but I assumed he would be performing a local push transmit/ receive with Home Assistant. I use him for controlling automations and scenes, and receiving notifications about motion sensors and other stuff. Is there anything we can change, or does the skill always rely on the internet? I keep a clone of my sd card, so I’d be willing to be a guinea pig for trying something new.

I think this is more an issue of Mycroft relying on the internet then the “skill”. A standard installation of Mycroft relies on the internet for much of it’s text to speech (tts) and speech to text (stt) services. Mycroft also uses the hosted web service for many of it’s configuration options. All of these transactions are anonymized to some degree in keeping with the Mycroft “privacy” ethos.
That said there are options (not for the faint at heart) to operate Mycroft completely “offline”. Search the forum for “Selene Backend” check the documents for STT configurations as there are easy options for this the TTS options are scattered around the forum as well. Good luck!

That seems overkill. Having to build a high-end server just for offline access to HA is not on my priorities right now. So the only way for it to process commands to HA is to send the TTS/STT to the mycroft servers, then back to Mycroft, then to over to HA? Is there any way to de-couple the skill from needing an internet connection, and also storing, say, 10-15 SST/TTS hard-coded commands locally? Only two people would ever be issuing those commands. Hell, it would be more privacy-focused that way. Excuse my ignorance. I know enough about Mycroft to get me this far. @gez-mycroft or @JarbasAl is there anything like that possible?

@nerlins Not quite ready for prime time but since you tagged me explicitly…

HolmesV is a mycroft version packaged as a library, with some extra .conf options. One of the (experimental) things it can do is run offline, but expect individual skills to have issues when they unavoidably try to use the internet (not much you can do about skills like wolfram alpha).

Documentation is barely existent, look at release notes and commit history (not PRs) as each commit should have somewhat detailed info. I’m still getting the hang of how to manage this project, the constant rebases and commit drops to sync with mycroft-core make the PRs pretty useless

Running offline implies you also need some offline STT/TTS plugin, maybe check out vosk for STT, accuracy is not great for most general purpose queries…

the plugin can be used with regular mycroft-core

To avoid using HolmesV, you can instead use some offline STT/TTS plugin with regular mycroft-core, and setup the mock-backend, but core will still refuse to load skills without internet connection

NOTES:

Good luck!

3 Likes

Thanks for the feedback! I hope you don’t mind me tagging, but I knew you’re a major player in this project.

FWIW, you’re overestimating the server requirements. It’s the fact of needing to host this stuff, not the raw power.

The heaviest components are, naturally, STT and TTS. The heaviest self-hostables are probably Coqui (for both) and Mimic2 (for TTS.) Their heaviest component is, unsurprisingly, Tensor.

A typical homeserver can handle it. Mine can’t. YMMV.

2 Likes