MycroftAI / skill-homeassistant

Mycroft Skill/Integration for Homeassistant
GNU Lesser General Public License v3.0
114 stars 62 forks source link

Mycroft times out on homeassistant commands #106

Open robertsawko opened 2 years ago

robertsawko commented 2 years ago

Since about a month now my Mycroft homeassistant skill running on Picroft stopped working. Using the client in debug mode I write

turn on corner lamp

which used to work pretty flawlessly, but now I am getting:

 22:54:19.415 | INFO     |   609 | WolframAlphaSkill | WolframAlpha query: turn on corner lamp
 22:54:19.426 | INFO     |   609 | WolframAlphaSkill | Non-question, ignoring: turn on corner lamp
 22:54:20.179 | INFO     |   609 | QuestionsAnswersSkill | Timeout occured check responses

Environment (please complete the following information):

I have regenerated the long term key for homeassistant and pasted it in the skill as a way to force a restart, but that didn't help. It did however uncover a problem with the log in:

2022-08-20 23:30:49.894 | INFO     |   558 | mycroft.skills.skill_loader:load:185 | ATTEMPTING TO LOAD SKILL: skill-homeassistant.mycroftai
2022-08-20 23:30:51.172 | INFO     |   558 | mycroft.skills.settings:get_local_settings:83 | /home/pi/.config/mycroft/skills/skill-homeassistant.mycroftai/settings.json
2022-08-20 23:30:51.179 | INFO     |   558 | mycroft.skills.settings:get_local_settings:83 | /home/pi/.config/mycroft/skills/skill-homeassistant.mycroftai/settings.json
2022-08-20 23:30:51.663 | INFO     |   558 | mycroft.skills.skill_loader:_communicate_load_status:344 | Skill skill-homeassistant.mycroftai loaded successfully
(.venv) pi@picroft:~/mycroft-core$ grep homeassi /var/log/mycroft/skills.log  | tail 
FANN Error 2: Unable to open configuration file "/home/pi/.local/share/mycroft/intent_cache/skill-homeassistant.mycroftai:{/tmp/mycroft/cache/HomeAssistantSkill/tracker}.intent.net" for writing.
2022-08-20 23:30:49.894 | INFO     |   558 | mycroft.skills.skill_loader:load:185 | ATTEMPTING TO LOAD SKILL: skill-homeassistant.mycroftai
2022-08-20 23:30:51.172 | INFO     |   558 | mycroft.skills.settings:get_local_settings:83 | /home/pi/.config/mycroft/skills/skill-homeassistant.mycroftai/settings.json
2022-08-20 23:30:51.179 | INFO     |   558 | mycroft.skills.settings:get_local_settings:83 | /home/pi/.config/mycroft/skills/skill-homeassistant.mycroftai/settings.json
2022-08-20 23:30:51.663 | INFO     |   558 | mycroft.skills.skill_loader:_communicate_load_status:344 | Skill skill-homeassistant.mycroftai loaded successfully
2022-08-20 23:31:19.876 | INFO     |   558 | mycroft.skills.settings:_emit_settings_change_events:435 | Emitting skill.settings.change event for skill @e4cc7a57-38bc-4a74-b27c-64ada459203a|homeassistant|21.02 
2022-08-20 23:31:19.915 | INFO     |   558 | mycroft.skills.settings:save_settings:116 | Skill settings successfully saved to /home/pi/.config/mycroft/skills/skill-homeassistant.mycroftai/settings.json
FANN Error 2: Unable to open configuration file "/home/pi/.local/share/mycroft/intent_cache/skill-homeassistant.mycroftai:{/tmp/mycroft/cache/HomeAssistantSkill/tracker}.intent.net" for writing.
Regenerated skill-homeassistant.mycroftai:{/tmp/mycroft/cache/HomeAssistantSkill/tracker}.

And at the same time I am seeing home assistant complaining about the failed login. It looks to me that maybe the token is now being downloaded?

Please let me know if there's anything I can do or check more detail to improve this description?

robertsawko commented 2 years ago

I've also tried to remove homeassistant skill with:

./bin/mycroft-msm remove homeassistant 
INFO - building SkillEntry objects for all skills
INFO - Best match (1.0): homeassistant by MycroftAI
MultipleSkillMatches: homeassistant, homeassistant

but that is behaving bizarrely. It seems I've got two skills installed?

Tony763 commented 2 years ago

Hi @robertsawko, sorry for late reaction. This is caused by issue #104 or at least partially. PR #112 will fix FANN Error 2: Unable to open configuration file. If you are still interested, You could test it. If login error still persist, send a new log here, please.

robertsawko commented 2 years ago

Thanks, @Tony763. I will see if I can get some time in the week to test it, but if not it may be next or the following weekend where I properly look at it.

Tony763 commented 2 years ago

That's perfectly fine. I did not have time half a year so week or two are like nothing :slightly_smiling_face:

robertsawko commented 2 years ago

Thanks. It does work now. What joy! It's like Mycroft returned from a long holiday.

Tony763 commented 2 years ago

Wow, glad to hear it work. Thanks for testing it out. Now we have to wait for Kris to merge it.

This post track needed changes in order to update HA skill version in marketplace.