smartgic / docker-mycroft

Mycroft AI Voice Assistant Docker images and docker-compose.yml files for x86_64, arm7vl and aarch64 CPU architectures.
https://hub.docker.com/u/smartgic
Apache License 2.0
41 stars 8 forks source link

Impossible to update configuration because device isn't paired #5

Closed goldyfruit closed 3 years ago

goldyfruit commented 3 years ago

Once docker-compose process finished, Mycroft doesn't provide the pairing code.

From the mycroft_skills container logs, the Impossible to update configuration because device isn't paired is recurrent with a 401.

2021-03-16 00:27:28.305 | DEBUG    |     1 | urllib3.connectionpool | Starting new HTTPS connection (1): api.mycroft.ai:443
2021-03-16 00:27:28.565 | DEBUG    |     1 | urllib3.connectionpool | https://api.mycroft.ai:443 "GET /v1/device//setting HTTP/1.1" 401 34
2021-03-16 00:27:28.569 | WARNING  |     1 | ConfigurationSkill | Impossible to update configuration because device isn't paired
goldyfruit commented 3 years ago
2021-03-16 01:15:40.348 | WARNING  |     1 | mycroft.messagebus.client.client:emit:168 | Could not send register_vocab message because connection has been closed
2021-03-16 01:15:40.351 | WARNING  |     1 | mycroft.messagebus.client.client:emit:168 | Could not send register_vocab message because connection has been closed
2021-03-16 01:15:40.354 | WARNING  |     1 | mycroft.messagebus.client.client:emit:168 | Could not send register_intent message because connection has been closed
2021-03-16 01:15:40.356 | DEBUG    |     1 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: mycroft-singing.mycroftai:handle_sing
2021-03-16 01:15:40.359 | DEBUG    |     1 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: mycroft.sing
2021-03-16 01:15:40.361 | WARNING  |     1 | mycroft.messagebus.client.client:emit:168 | Could not send mycroft.skills.loaded message because connection has been closed
2021-03-16 01:15:40.363 | INFO     |     1 | mycroft.skills.skill_loader:_communicate_load_status:344 | Skill mycroft-singing.mycroftai loaded successfully
2021-03-16 01:15:40.364 | INFO     |     1 | mycroft.skills.skill_manager:_load_on_startup:274 | Skills all loaded!
2021-03-16 01:15:40.366 | WARNING  |     1 | mycroft.messagebus.client.client:emit:168 | Could not send mycroft.skills.initialized message because connection has been closed
2021-03-16 01:15:40.439 | INFO     |     1 | __main__:on_ready:185 | Skills service is ready.
2021-03-16 01:15:42.445 | INFO     |     1 | mycroft.messagebus.client.client:on_open:114 | Connected
goldyfruit commented 3 years ago

Solution

Remove the lang option from mycroft.conf configuration file, or make sure the lang option is set to en-us.

0x5ECF4ULT commented 3 years ago

Unfortunately I have to reopen this issue because it still persists (pairing code not showing up in the logs) on my deployment. I managed to shrink it down to the bus, skills and cli container (the latter isn't needed tho). I did this because I want other devices to communicate to the ws:// and not the host to itself. Another interesting thing is that the "pair my device" command doesn't do anything. Anyways... Here is a debug log of my deployment:


2021-05-15 11:47:48.490 | DEBUG    |     1 | msm.skill_entry | Attempting to retrieve the remote origin URL config for skill in path /opt/mycroft/skills/mycroft-pairing.mycroftai,
2021-05-15 11:47:48.491 | DEBUG    |     1 | git.cmd | Popen(['git', 'config', 'remote.origin.url'], cwd=/opt/mycroft/skills/mycroft-pairing.mycroftai, universal_newlines=False, shell=None, istream=None),
2021-05-15 11:47:48.850 | DEBUG    |     1 | msm.skill_entry | Generating skill_gid for mycroft-pairing,
2021-05-15 11:47:48.851 | DEBUG    |     1 | git.cmd | Popen(['git', 'status', '--porcelain', '--untracked-files=no'], cwd=/opt/mycroft/skills/mycroft-pairing.mycroftai, universal_newlines=False, shell=None, istream=None),
2021-05-15 11:47:48.868 | DEBUG    |     1 | git.cmd | Popen(['git', 'rev-parse', 'HEAD'], cwd=/opt/mycroft/skills/mycroft-pairing.mycroftai, universal_newlines=False, shell=None, istream=None),
2021-05-15 11:47:50.033 | INFO     |     1 | mycroft.skills.skill_loader:load:185 | ATTEMPTING TO LOAD SKILL: mycroft-pairing.mycroftai,
2021-05-15 11:47:50.051 | INFO     |     1 | mycroft.skills.settings:get_local_settings:83 | /home/mycroft/.config/mycroft/skills/mycroft-pairing.mycroftai/settings.json,
2021-05-15 11:47:50.076 | DEBUG    |     1 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: mycroft-pairing.mycroftai.set,
2021-05-15 11:47:50.089 | DEBUG    |     1 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: mycroft-pairing.mycroftai:PairingIntent,
2021-05-15 11:47:50.093 | DEBUG    |     1 | mycroft.skills.mycroft_skill.event_container:add:146 | Added event: mycroft.not.paired,
2021-05-15 11:47:50.107 | INFO     |     1 | mycroft.skills.skill_loader:_communicate_load_status:344 | Skill mycroft-pairing.mycroftai loaded successfully,
2021-05-15 11:47:56.597 | INFO     |     1 | __main__:_ensure_device_is_paired:131 | Device not paired, invoking the pairing skill,
2021-05-15 11:47:56.624 | DEBUG    |     1 | mycroft.skills.intent_service:_normalize_all_utterances:73 | Utterances: [('pair my device',)],
2021-05-15 11:47:57.185 | DEBUG    |     1 | PairingSkill | Kicking off pairing sequence,
2021-05-15 11:48:57.750 | WARNING  |     1 | ConfigurationSkill | Impossible to update configuration because device isn't paired,
2021-05-15 11:49:57.836 | WARNING  |     1 | ConfigurationSkill | Impossible to update configuration because device isn't paired

This is all I get. Maybe the skill can be configured to output the code to the logs? I tried following your solution with no success. Here is what I customized:

{
  "websocket": {
    "host": "mycroft_bus",
    "port": 8181,
    "route": "/core",
    "ssl": false
  },
  "log_level": "DEBUG"
}
goldyfruit commented 3 years ago

@0x5ECF4ULT It's always better to open a new issue if one is already closed :)

I'll need a little more information, such as:

As mentioned above, having the lang option set to fr_fr into the mycroft.conf broke the pairing and the initialization process for reasons that I don't know (I raised the point on Mycroft chat).

Even after removed the lang option, I had to delete the volumes (certainly due to some failed steps during the previous try with the lang option) and re-run the process.

0x5ECF4ULT commented 3 years ago

Thanks for your quick answer!

Tbh I did not try that one. I will delete the vols and ping back.

0x5ECF4ULT commented 3 years ago

Yep purging the volumes did the trick. I am now running on Docker swarm with only the bus and skill_repo. Thanks for your suggestion!

goldyfruit commented 3 years ago

Yep purging the volumes did the trick. I am now running on Docker swarm with only the bus and skill_repo. Thanks for your suggestion!

Awesome!