openhab / openhab-mycroft

Mycroft skill for openHAB
Eclipse Public License 2.0
20 stars 45 forks source link

Configuration not recognized #97

Closed Owlbertz closed 4 years ago

Owlbertz commented 4 years ago

Hi,

I followed the tutorial, but I always got "Sorry, cannot get the items list". So I went ahead and added some log entries that output the request URL. Turns out, the skill is always using 127.0.0.1 and port 8080, no matter what I write into my /etc/mycroft/mycroft.conf-file (always performing mycroft-start restart all after each edit). Also the "no config set" branch within the code is somehow not triggered, but instead these (fallback?) values are being used.

My workaround now was to edit the fallback value in settingsmeta.yaml.

umglurf commented 4 years ago

Hi

The skill is configured using the mycroft skill settings. That means, after you install the skill, configuration will be available on https://home.mycroft.ai/skills. After it is updated there, reload configuration by saying: reload configuration. The new settings will downloaded to settings.json in the skill folder.

mortommy commented 4 years ago

@Owlbertz, it's very strange since there's no any part where is hardcoded the ip 127.0.0.1, if no setting it's set up as you noted an error is raised. @umglurf the skill it has not been approved to v19, I'm not sure the skill is configurable via https://home.mycroft.ai/skills.

umglurf commented 4 years ago

It does not need to be approved to show up on https://home.mycroft.ai/skills, when installed and run for the first time, the schema is uploaded and you are able to configure it. At least this has worked for me both for this skill and for another private skill I made for myself.

mortommy commented 4 years ago

Oh! I didn't know that! thank you.

Owlbertz commented 4 years ago

Yes, I can configure it online. However, the documentation states that I need to edit the config file (what I personally find a better approach because I can then store the configuration file to further installations.

The 127.0.0.1 is stored in the settingsmeta.yaml file.

umglurf commented 4 years ago

Where is the documentation that says you need to edit the config file? That was changed in the README together with moving to the new configuration system in #72

It's correct that the default in settingsmeta.yaml is 127.0.0.1, this was also the old default and seems like a reasonable default setting as many will run mycroft and openhab on the same machine.

After installing the skill there should be a settings.json file in the skill directory that you can edit instead of using the web interface. If not, restart mycroft, and it should appear.

Owlbertz commented 4 years ago

Yes, I got that working for me now using the web interface.

I was referring to the skill description over at the openHAB page. But I can understand that the latest changes to this repo are not necessarily being reflected there. However, as this is quite a breaking change the openHAB documentation should be updated.

umglurf commented 4 years ago

Great that you got it working! @mortommy is updating the openHAB page something you can do?

mortommy commented 4 years ago

Yes. I'll do it.