Testing and Feedback for Magic-Mirror-Voice-Control-Skill

@gras64 I will work on error handling for that event. Sorry.

How can we add more modules into the “availablemodules.json” file?

@Anthony_36 You can create a Pull Request for the modules you want and I can add them. You could add them yourself but they will be replaced on an update, so you could create a backup of that file after you’ve added the modules you’d like added in case the skill gets updated. If you look at it, it is a simple json file and the parts for each module you want added are pretty self explanatory. If you do a PR please include a link to the module’s url. I will update it, but not if I have to hunt for the module.

Submit the PR here

I thought that I must do much more for it to work. So if I add in availablemodules.json a small array containing the module’s url, mycroftname etc like all the others it will work just like that? If so I will do ti my self with a back up folder as you mentioned. Thank you for the tip.

@gras64 So I had the opportunity to identify instances in the code that throw the “There was an error processing a request in the MagicMirrorVoiceControl skill” error. I think I have made the necessary code changes to account for possible errors and address them so the annoying “error processing request” errors no longer happen. I also made changes in the code to check for connection and whether my fork of the MMM-kalliope is installed and configured. If you get a chance, go to the magic-mirror-voice-control-skill directory in the skills directory /mycroft-core/skills/magic-mirror-voice-control-skill/ and type

git pull

To update the skill.

Let me know if you find any other errors I need to address.

Thx,
Cheers!

1 Like

Hi @Jmh474, @gras64, and @Anthony_36

This Skill is currently being reviewed to be included in the public Skills Marketplace. It sounds like you are all using the skill currently so your experience is the best indicator of whether it’s functioning as expected.

Based on the skills current README.md, if a User installed this from the Marketplace, would they be able to get setup and perform all the actions described in the example intents?

Is there anything that you think needs to be modified before it is merged into the Marketplace?

hello, I have a problem with Magic-mirror-Voice-Control-Skill.
All works before yesterday.
Yesterday I update mycroft to the latest version 19.8.0 and now at the start of Mycroft I have the following error:

2019-09-27 22:47:28.701 | ERROR    |  9316 | mycroft.skills.skill_loader:_load_skill_source:209 | Failed to load skill: magic-mirror-voice-control-skill (ImportError("No module named 'mycroft.messagebus.client.ws'",))
Traceback (most recent call last):
  File "/home/pi/mycroft-core/mycroft/skills/skill_loader.py", line 202, in _load_skill_source
('.py', 'rb', imp.PY_SOURCE)
  File "/usr/lib/python3.5/imp.py", line 234, in load_module
return load_source(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 172, in load_source
module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/opt/mycroft/skills/magic-mirror-voice-control-skill/__init__.py", line 31, in <module>
from mycroft.messagebus.client.ws import WebsocketClient
ImportError: No module named 'mycroft.messagebus.client.ws'
2019-09-27 22:47:28.730 | ERROR    |  9316 | mycroft.skills.skill_loader:_communicate_load_status:280 | Skill magic-mirror-voice-control-skill failed to load

Any suggestion? how fix it?

Thanks a lot

I do not know why this error is occurring. Obviously if it happened after the update, something changed with Mycroft’s code. We can ask @gez-mycroft to look into what may have changed with Mycroft-core’s web socket.

Solved…
I made that change al the issue disappear:

I have the problem “No module named” also with many other skills. it seems to me that the dependent rent for updates are not installed properly. no idea.

Hey, checkout this change to the Reminder Skill to see how you can switch it over to the new format.

@gez-mycroft Thanks! I’ve been swamped at work so I haven’t really had a chance to look at this. I’ll update the skill to the MessageBusClient, but I probably won’t be able to get to it for a couple of weeks. Thanks, Dave.

1 Like

hey, i got this module with kalliope running.
But everytime a command for magic mirror is taken and working, for example “show clock” this message appears:

16:30:02.876 | ERROR | 12970 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:785 | An error occurred while processing a request in Magic Mirror Voice Control Skill
Traceback (most recent call last):
File “/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py”, line 66, in wrapper
handler(message)
File “/opt/mycroft/skills/magic-mirror-voice-control-skill/init.py”, line 451, in handle_module_command
response = status[‘status’]
KeyError: ‘status’
^— NEWEST —^`

how to fix that?

another question, how can i add other modules for showing and hiding?
for example: https://github.com/bendardenne/MMM-TomTomTraffic

tried some things, but then magic-mirror-voice-control-skill won’t start anymore…

regards

@wuse_mann Sorry, I’m just slammed with work. I’m not sure what is causing your error. I will look into it when I get some time. In the meantime, I have updated the skill to work with Mycroft version 19.8.0 .

1 Like

@wuse_mann I have added the skill to the availablemodule.json. Update the skill and it should work provided you installed the MagicMirror and all of the necessary modules properly. Also when you say you installed MMM-Kalliope, did you install my fork of the skill?? Found here?

If you want other modules added to the availablemodules.json, you can add them yourself, its just a simple .json array. Of course, it will be replace if you do an update. You could make a backup of the file and store it in a different folder. See reply 10 above.

1 Like

thanks got all up and running :slight_smile:

@wuse_mann Great to hear! Would you mind looking at this post and adding your feedback?

@dmwilsonkc

sorry didn’t have time for that… but now the skill is not working anymore. I cloned your new version from github today, skill is loading, but when i set the ip address of the magic mirror (with the command set ip address 192.xxx.xxx.xxx) i got this error:

 14:16:36.367 | ERROR    |  2496 | mycroft.skills.skill_loader:_create_skill_instance:240 | Skill initialization failed with JSONDecodeError('Expecting value: line 1 column 1 (char 0)')
Traceback (most recent call last):
  File "/home/pi/mycroft-core/mycroft/skills/skill_loader.py", line 234, in _create_skill_instance
    self.instance.initialize()
  File "/opt/mycroft/skills/magic-mirror-voice-control-skill/__init__.py", line 93, in initialize
    data = r.json()
  File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
 14:16:36.384 | ERROR    |  2496 | mycroft.skills.skill_loader:_communicate_load_status:277 | Skill magic-mirror-voice-control-skill failed to load

can you help me with that? i don’t know the reason, because i didn’t change anything… :frowning:

@wuse_mann looks to me like the mirror did not return a proper Json file of the installed modules. Did you make any changes to the mirror?

You can check the MagicMirror remote control module by using a browser to go to the Mirror’s IP address by typing the url:

http://192.168.xxx.xxx:8080/remote?action=MODULE_DATA

Replace the x’s with your Mirror’s IP of course.

I have not kept up on changes to the MMM-Remote-Control module. It looks to me as if it has changed to RESTful API and I may need to recode my skill to use the API instead of the method I am using. If the above URL does not work, that may be the issue.

You could also try:

http://192.168.xxx.xxx:8080/api/modules

If the second url works then I need to rewrite a good portion of the skill.

The ip of the web browser you use to try the URL’s must be whitelisted in your Mirror, otherwise they will both fail.

Try that and let me know what is returned.