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

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.

@dmwilsonkc thanks for your quick response! that was my mistake :roll_eyes: i changed the port from magicmirror to 8081, that was the failure…
changed now the port in the init.py from your skill too and now everything is working again :nerd_face:

thank you for this great skill!!

@wuse_mann Glad to hear its working again! If you don’t mind, how about giving your feedback so we can get this skill into the Skills Marketplace. See below:

@dmwilsonkc my feedback: would be good, if the skill would be in the Marketplace, that the user can set ip address and port of the magic mirror in the skill settings section.

with mycroft 19.8.5 and magicmirror version 2.9.0 i had to change this two things within the __ init __ .py file:

  1. in row 341 and after i changed the following:

    print (“response json:”, r.json())
    if status[‘success’] == True:
    self.speak_dialog(‘success’)
    else:
    reason = status[‘reason’]

  2. in row 446 and following I did the same again.

before this change, the skill worked but after every command this error appears “an error occured while processing a request in magic mirror voice control skill”.

if you could implement this two fixes and the settings in mycroft home would be great! :ok_hand:

Just bought the acrylic mirror and now I’m preparing the wood, in a few weeks I will have my own magic mirror and I’ll test this awesome skill :grinning:
I’ll report back then :smiley:

1 Like

No matter what IP I give Mycroft it says it’s not valid, even if I’ve managed to connect through the browser on the same machine, can anyone help me

@Umivicci what device are you using? Can you get to the command line?

I’m using an old desktop computer I had collecting dust. I’m new to all this… what do you mean by command line?

reading through the tutorials again i realise i forgot MMM-kalliope, im going to install that now a test things out, not sure if it makes a difference

I tried it and it didnt make a difference

I just re installed the skill and it managed to solve my problem

1 Like

Hi, I installed the modules and it shows the listening and the responds on the magic mirror but when I try to control the magic mirror " there was an error processing a request in MM skill" and it shows that the error is in the init.py sile in ‘status’, can you please help me with that.

thank you.

That’s happening to me aswell.
me: refresh mirror

An error occurred while processing a request in Magic Mirror Voice Control Skill

11:16:07.524 | ERROR | 867 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:835 | 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 258, in handle_System_command
response = status[‘status’]
KeyError: ‘status’

Hope I help

First of all, thank you for the hard work.

I have a problem I get always the same error message, when I say swipe right or refresh mirror (An error occurred while processing a request in Magic Mirror Voice Control Skill)… But otherwise it works perfect… How do we get rid of this message.

I tried this but it didn’t work for me.

in row 341 and after i changed the following:

print (“response json:”, r.json())
if status[‘success’] == True:
self.speak_dialog(‘success’)
else:
reason = status[‘reason’]

Thank you