Mycroft Community Forum

Mycroft speaks twice with HomeAssistant confirmations

yes these two are debug messages i put inside. So in your instance, type is correct str, but it’s empty. Even if you have token inside settings.json. Is it running now when you add str() or it’s still not. Could you also check that ip is present in settings. json when mycroft run for about 5 minutes?

I edited my previous message :slight_smile:

This must be what a border collie feels like when it’s watching Jeopardy.

1 Like

could you check logs if above debug messages occure in logs more than one time?

2021-10-29 14:26:03.478 | INFO     |     1 | mycroft.skills.settings:save_settings:116 | Skill settings successfully saved to /home/mycroft/.config/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 14:26:03.479 | ERROR    |     1 | HomeAssistantSkill | type: <class 'str'>
2021-10-29 14:26:03.479 | ERROR    |     1 | HomeAssistantSkill | content: 
2021-10-29 14:26:48.741 | INFO     |     1 | ConfigurationSkill | Remote configuration updated
2021-10-29 14:30:04.075 | INFO     |     1 | mycroft.skills.settings:_emit_settings_change_events:435 | Emitting skill.settings.change event for skill @893deff4-aba2-4e94-87aa-8414c585e3aa|skill-homeassistant 
2021-10-29 14:30:04.089 | INFO     |     1 | mycroft.skills.mycroft_skill.mycroft_skill:handle_settings_change:360 | Updating settings for skill HomeAssistantSkill
2021-10-29 14:30:04.091 | INFO     |     1 | mycroft.skills.settings:save_settings:116 | Skill settings successfully saved to /home/mycroft/.config/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 14:30:04.091 | ERROR    |     1 | HomeAssistantSkill | type: <class 'str'>
2021-10-29 14:30:04.092 | ERROR    |     1 | HomeAssistantSkill | content: http://192.168.1.9

2021-10-29 14:36:12.770 | INFO     |     1 | mycroft.skills.settings:save_settings:116 | Skill settings successfully saved to /home/mycroft/.config/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 14:37:05.112 | INFO     |     1 | mycroft.skills.settings:_emit_settings_change_events:435 | Emitting skill.settings.change event for skill @893deff4-aba2-4e94-87aa-8414c585e3aa|skill-homeassistant 
2021-10-29 14:37:06.054 | INFO     |     1 | mycroft.skills.mycroft_skill.mycroft_skill:handle_settings_change:360 | Updating settings for skill HomeAssistantSkill
2021-10-29 14:37:06.417 | INFO     |     1 | mycroft.skills.settings:save_settings:116 | Skill settings successfully saved to /home/mycroft/.config/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 14:37:06.480 | ERROR    |     1 | HomeAssistantSkill | type: <class 'str'>
2021-10-29 14:37:06.483 | ERROR    |     1 | HomeAssistantSkill | content: http://192.168.1.97
2021-10-29 14:37:20.582 | INFO     |     1 | mycroft.skills.settings:save_settings:116 | Skill settings successfully saved to /home/mycroft/.config/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 14:45:13.383 | INFO     |     1 | TimerSkill | stopping repeating event to check for timer expiration
1 Like
rm -r /opt/mycroft/skills/skill-homeassistant*
rm -r /home/mycroft/.config/mycroft/skills/skill-homeassistant*

Then restart the skills service.

Happy to, do I need to worry about that skill being listed in some file somewhere that will confuse msm?

msm is not that smart :stuck_out_tongue:

Perfect! So problem is when mycroft initialize and before pulling configuration from mycroft.ai. Last time it returned None, for you it return empty string. I will prepare fix when I get home and send it here for test.

1 Like

So uh…will it not be helpful for me to also post my skills.log output?

You know what they say about the guy who’s two steps behind…he has…a lot of catching up to do. This is fun though, usually I’m the fastest guy in the room when I do my sort of programming. :stuck_out_tongue:

2 Likes

would be fine if msm would have remove option also, I will check that too

It does.

$ msm
usage: msm [-h]
           [-p {kde,respeaker,mycroft_mark_2pi,picroft,default,mycroft_mark_1,mycroft_mark_2}]
           [-u REPO_URL] [-b REPO_BRANCH] [-d SKILLS_DIR] [-c REPO_CACHE] [-l]
           [-r]
           {install,remove,search,info,list,update,default} ...
msm: error: the following arguments are required: action
1 Like

If you managed to install it, post it also. For me its allways better to have more feedback.

Oh, I’m aware of the remove option, but there’s no way to force removal of a given instance if there are identically-named skills, which apparently happened.

[Edit] Obviously, in normal circumstances, it shouldn’t happen at all.

2021-10-29 09:55:59.300 | ERROR    |   672 | mycroft.skills.skill_loader:_communicate_load_status:351 | Skill skill-homeassistant.tony763 failed to load
Regenerated skill-homeassistant.tony763:toggle.intent.
Regenerated skill-homeassistant.tony763:cover.open.intent.
Regenerated skill-homeassistant.tony763:tracker.intent.
Regenerated skill-homeassistant.tony763:add.item.shopping.list.intent.
2021-10-29 09:58:57.514 | INFO     |   762 | mycroft.skills.skill_loader:load:185 | ATTEMPTING TO LOAD SKILL: skill-homeassistant.tony763
2021-10-29 09:58:58.204 | INFO     |   762 | mycroft.skills.settings:get_local_settings:83 | /opt/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 09:58:58.207 | INFO     |   762 | mycroft.skills.settings:get_local_settings:83 | /opt/mycroft/skills/skill-homeassistant.tony763/settings.json
  File "/opt/mycroft/skills/skill-homeassistant.tony763/__init__.py", line 96, in initialize
  File "/opt/mycroft/skills/skill-homeassistant.tony763/__init__.py", line 37, in _setup
  File "/opt/mycroft/skills/skill-homeassistant.tony763/ha_client.py", line 53, in check_url
2021-10-29 09:58:58.477 | ERROR    |   762 | mycroft.skills.skill_loader:_communicate_load_status:351 | Skill skill-homeassistant.tony763 failed to load

Is this showing what you were looking for?

It hapened to me, too. But I cannot remember what I did to overcome it.

did you git checkout patch-8 inside ha skill folder?

I did, yes. It didn’t seem to really do anything, just printed a message that it switched to that branch.

(.venv) pi@picroft:/opt/mycroft/skills/skill-homeassistant.tony763 $ git checkout patch-8
Already on 'patch-8'
Your branch is up to date with 'origin/patch-8'.
(.venv) pi@picroft:/opt/mycroft/skills/skill-homeassistant.tony763 $

Do I need to make it update itself after I do this?

After this just restart mycroft. Then it should start up. and print debug messages.

I cleared skills.log so I could find things easier. Here seem to be the relevant bits:

2021-10-29 10:10:49.665 | INFO     |   671 | mycroft.skills.skill_loader:load:185 | ATTEMPTING TO LOAD SKILL: skill-homeassistant.tony763
2021-10-29 10:10:50.150 | INFO     |   671 | mycroft.skills.settings:get_local_settings:83 | /opt/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 10:10:50.153 | INFO     |   671 | mycroft.skills.settings:get_local_settings:83 | /opt/mycroft/skills/skill-homeassistant.tony763/settings.json
2021-10-29 10:10:50.268 | ERROR    |   671 | HomeAssistantSkill | type: <class 'NoneType'>
2021-10-29 10:10:50.269 | ERROR    |   671 | HomeAssistantSkill | content: None
2021-10-29 10:10:50.275 | INFO     |   671 | HomeAssistantSkill | Removing all handlers...
2021-10-29 10:10:50.279 | WARNING  |   671 | mycroft.skills.fallback_skill:remove_fallback:185 | Could not find matching fallback handler
2021-10-29 10:10:50.286 | ERROR    |   671 | mycroft.skills.skill_loader:_create_skill_instance:313 | Skill initialization failed with TypeError('expected string or bytes-like object')
Traceback (most recent call last):
  File "/home/pi/mycroft-core/mycroft/skills/skill_loader.py", line 307, in _create_skill_instance
    self.instance.initialize()
  File "/opt/mycroft/skills/skill-homeassistant.tony763/__init__.py", line 96, in initialize
    self._setup()
  File "/opt/mycroft/skills/skill-homeassistant.tony763/__init__.py", line 37, in _setup
    ip_address = check_url(ip_debug)
  File "/opt/mycroft/skills/skill-homeassistant.tony763/ha_client.py", line 53, in check_url
    matches = re.findall(IPV6_REGEX, ip_address)
  File "/usr/lib/python3.7/re.py", line 223, in findall
    return _compile(pattern, flags).findall(string)
TypeError: expected string or bytes-like object
2021-10-29 10:10:50.294 | ERROR    |   671 | mycroft.skills.skill_loader:_communicate_load_status:351 | Skill skill-homeassistant.tony763 failed to load