Mycroft Community Forum

[SOLVED] OpenHAB Skill not working after upgrade

Hi,
I have logged in today via SSH to mycroft and it upgraded itself automatically.
After reboot, openHAB skill that I had installed and used is no longer working.
Should I disable auto update? Are those kind of issues common?
Skill looks installed, the folder in skills is still there, it refuses to install it as it’s already installed…
Also, openhab server and port settings are still there in mycroft.conf
mycroft is running on picroft.
mycroft-core version 19 oh 8, release 0 - you are on the latest version.

Is this development branch? Should I switch to stable?

What are the recommended steps, force-reinstall the skill? how? delete it from skills?
Grep does not find any mention of openhab in skills.log

thanks,
regards,
Vanja

A post was split to a new topic: CmdSkill not working on 19.08

Hi Vanja,

The 19.08.0 version is our latest stable version. The major releases are the only time when we introduce breaking changes, so this does mean that older Skills may not by functional, but I haven’t looked at OpenHAB specifically.

Strange that there’s no result from grepping openhab. Is the Skill in your /opt/mycroft/skills directory?
If not then reinstall it using:
mycroft-msm install https://github.com/openhab/openhab-mycroft

If it is already there, from the CLI type :skills to see a list of the loaded skills. Any listed in red have not loaded correctly.

Hi Gez,
skill is in /opt/mycroft/skills/openhab-skill.openhab

command :skills lists skins and openhab skill is red. all other are yellow except for mycroft-playback-control that I had blacklisted as I have read it takes “play” keywords so kodi-skill is not working properly

so, openhab does not load properly on the new version…

Yeah I just tried to install it myself and see that they’re using a deprecated method. I’ve sent them a PR which you can see at:

If you are confident to do so you can make two small changes to __init.py__ and it should load from there.

great, I have replaced the whole init.py file with the one you recommended, and the skill is loaded now

thanks for the great support!

1 Like

I also had my OpenHAB broken by the update. Your changes and a quick reboot cleared that up. Thanks.

Now to find out what else is broken…

Hi I am very new to Mycroft, and trying it out with the main purpose to use the OpenHAB skill. I ran into the same issue as reported by the OP and tried to apply the suggested fix, unfortunately without success. I am running Mycroft 19.8.0 master.

First I installed the OpenHAB skill with the following command:

> mycroft-msm install https://github.com/openhab/openhab-mycroft

After that I replaced the __init.py__ file in

> /opt/mycroft/skills/openhab-mycroft.openhab/

with the suggested changed file from GitHub. I rebooted and tried several things, however the OpenHAB skill remains listed in RED.

Looking forward to suggestions on how to proceed.

Hi, can you tell me what user permission is needed to replace this file?

Thanks!
Guy

Hi

I’ve followed the instructions for adding the openHAB2 skill, including changing / editing the __init__.py file

I now have a RED openhab skill in Mycroft.

So I assume I only need to tell Mycroft where my openHAB2 controller can be found.

Where (exactly) should I put the configuration block?

"openHABSkill": {
        "host": "openHAB server ip",
        "port": "openHAB server port"
      }

Obviously with my correct details

I have tried putting it at the end of the ./mycroft-core/mycroft/configuration/mycroft.conf file but that just causes Mycroft to crash when loading.

I moved the closing } but that didn’t help.

Any advice would be gratefully received.

Cheers

Stuart

Hi Stuart,

Any mycroft.conf changes should be made in the User or System level. The easiest way to edit these is to run the new configuration manager as it will automatically check your changes to make sure they don’t contain any syntax errors.

So you should be able to run:
mycroft-config edit user

Alternatively you can set individual values using the command:
mycroft-config set <var> <value>
So in this case it should be:

mycroft-config set openHABSkill.host "192.168.xxx.xxx"
mycroft-config set openHABSkill.port "xxxx"
1 Like

I’m the classic Mycroft User - Just managed to get Picroft installed and stumbling at the first hurdle in using Mycroft - I was hoping to use the Openhab Skill to control my Openhab instance with Mycroft.

From what I can discern the Openhab skill is not currently available in the Marketplace because breaking changes have not been validated to ( https://github.com/openhab/openhab-mycroft/issues/96 ).

Can anyone enlighten on how I could assist in getting this skill back into the MyCroft Marketplace and/or if using the step below would allow me to side install the skill. Would proceeding on this basis cause issues if the skill were to become available in the marketplace at a later date?

Hey there,

A Skill not being in the Marketplace means that the Mycroft project hasn’t reviewed it’s code and validated that it works. So installing via a url like you’ve highlighted means that you are taking on that responsibility yourself.

There won’t be any issue with conflicts if the Skill does get added back into the Marketplace as we actually install from their repo using git submodules, rather than keeping a copy of every Skill ourselves.

It would be great to hear how it goes. One of the challenges with big Skills like this that require an independent server setup is verifying that it works as intended. If you install the Skill and everything works great, we’d love to know about it.

Thanks. I did try and install it and can report that it works perfectly … detected all the items I had exposed by the hue emulation and controlled them. Indeed pairing seems to work much more easily than for Alexa.

Can wait to see this back in the Skills marketplace - I think this is a headline skill for Mycroft.

1 Like

On the brink of finally setup my new fedora homeserver (integration of multiple rootless podman orchastrated container is HELL), so i definitely will have a look at this one once it’s all said and done.