Testing and Feedback for Mesh Skill (Mycroft to Mycroft Communicator)

Will try to do some testing between my KDE laptop and my RPI3 development board. Hope I will not forget as I keep (re)flasing my rpi sd card with all kinds of different test versions of MycroftOS. But hopefully somewhere in between, I will quikcly install the skill on bot and us my MQTT broker on my server that i currently use for Zigbee2MQTT.

Will report back somewhere later this week.

1 Like

This is pretty awesome. Thanks for the hard work on this. Iā€™m looking forward to trying it out.

1 Like

Maybe a quick piece of info for those who want to try this out:

  1. When Mycroft asks you where to send the message, you need to answer with whatever is entered in your device profile under placement: ā€œOfficeā€
    I know itā€™s mentioned above but I had some trouble finding it under ā€˜My Account - Devicesā€™
    image
  2. Donā€™t try to be nice and say ā€œTo the office!ā€ - it really needs to be exactly whatā€™s in the field: ā€œOfficeā€
  3. If you change the entry in the placement field, you should re-start your Mycroft - I tried to do a config reload and it was not sufficient.

Itā€™s working great now - thanks to @pcwii for creating this!

1 Like

Thanks for the tips, and for testing. I have some ideas to try and simplify the send message/command request so it would recognise a single command, something likeā€¦
Hey Mycroftā€¦
Send a message to the office
I could also try to do some intent parsing whereas when a location is multiple words like,
ā€œto the Officeā€, or ā€œthe officeā€ and extract the location from there.

Again, thanks for testing and if you find some interesting use cases communicating to other mqtt enabled device let us know.

This should be corrected now, you can be nice and say ā€œTo the office!ā€ or you can skip the location request and just say ā€œsend a message to the officeā€.
I have also made a bit of a non breaking change to the <base_topic> this can now be any MQTT compatible path topic, with multiple topic levels separated with the topic level separator ā€œ/ā€
Thanks again for testing.

This seems to work great now - I like especially the fact that I can use the location straight away!

As soon as I can free up one of my other RPis Iā€™ll set up another PiCroft :slight_smile:

Iā€™m still struggling with some of the MyCroft basics, though.
Couldnā€™t find a way to force the skill update other than a full reboot :frowning:
But itā€™s working fine now.

2 Likes

If you can ssh into the unit or have access to the mycroft command line you can run ā€œmsm updateā€ and this will update your skills.

2 Likes

Can;t get it to work.

 21:25:16.942 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:220 | MQTT: Mycroft/RemoteDevices/dca6327aadc9/response, "speak your, message"
 21:25:16.946 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:222 | address: 10.0.0.5, Port: 1884
 21:25:16.968 | INFO     |   331 | mesh-skill_pcwii:handle_speak:202 | Response Location Length: 0
 21:25:18.486 | INFO     |   331 | ReSpeaker_4mic_hat | Pixel Ring: Off
 21:25:19.289 | INFO     |   330 | mycroft.client.speech.__main__:handle_record_end:43 | End Recording...
 21:25:19.367 | INFO     |   331 | ReSpeaker_4mic_hat | Pixel Ring: Off
 21:25:19.461 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:220 | MQTT: Mycroft/RemoteDevices/dca6327aadc9/request, "Hi there"
 21:25:19.463 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:222 | address: 10.0.0.5, Port: 1884
 21:25:19.516 | INFO     |   331 | mesh-skill_pcwii:handle_send_message_intent:268 | Preparing to Send a message to Bedroom
 21:25:19.527 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:220 | MQTT: Mycroft/RemoteDevices/bedroom, {"source": "livingroom", "message": "Hi there"}
 21:25:19.529 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:222 | address: 10.0.0.5, Port: 1884
~~~~ INFO     |   331 | mesh-skill_pcwii:send_MQTT:220 | MQTT: Mycroft/RemoteDevices/dca6327aadc9/response, "I am preparing to send a, message, to the, Bedroom, device"
 21:25:19.549 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:222 | address: 10.0.0.5, Port: 1884
 21:25:19.555 | INFO     |   331 | mesh-skill_pcwii:handle_speak:202 | Response Location Length: 0

But nothing received on the other endā€¦

Secondly, if I after that and any other after that, ask mycroft something. It keep trying the MQTT stuff. See below;

 21:27:10.394 | INFO     |   330 | mycroft.client.speech.__main__:handle_wakeword:59 | Wakeword Detected: hey mycroft
 21:27:10.902 | INFO     |   330 | mycroft.client.speech.__main__:handle_record_begin:37 | Begin Recording...
 21:27:12.917 | INFO     |   330 | mycroft.client.speech.__main__:handle_record_end:43 | End Recording...
 21:27:12.990 | INFO     |   331 | ReSpeaker_4mic_hat | Pixel Ring: Off
 21:27:13.946 | INFO     |   330 | mycroft.client.speech.__main__:handle_utterance:64 | Utterance: ["what's the weather"]
 21:27:13.966 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:220 | MQTT: Mycroft/RemoteDevices/dca6327aadc9/request, "what's the weather"
 21:27:13.970 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:222 | address: 10.0.0.5, Port: 1884
 21:27:14.276 | INFO     |   331 | ReSpeaker_4mic_hat | Pixel Ring: Think
~~~~:14.421 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:220 | MQTT: Mycroft/RemoteDevices/dca6327aadc9/response, "It's currently a clear sky and 2 degrees celsius."
 21:27:14.425 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:222 | address: 10.0.0.5, Port: 1884
 21:27:14.439 | INFO     |   331 | mesh-skill_pcwii:handle_speak:202 | Response Location Length: 0
 21:27:14.447 | INFO     |   331 | ReSpeaker_4mic_hat | Pixel Ring: Speak
 21:27:17.608 | INFO     |   331 | ReSpeaker_4mic_hat | Pixel Ring: Off
~~~~7.618 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:220 | MQTT: Mycroft/RemoteDevices/dca6327aadc9/response, "Today's forecast is for a high of 2 and a low of 1."
 21:27:17.620 | INFO     |   331 | mesh-skill_pcwii:send_MQTT:222 | address: 10.0.0.5, Port: 1884
 21:27:17.627 | INFO     |   331 | mesh-skill_pcwii:handle_speak:202 | Response Location Length: 0

Have Mosquitto running without user/passwd on the local network.

A couple things here.

  1. The skill is set to always send the ā€œrequestā€ and ā€œresponseā€ messages to an mqtt topic based on the mac (UUID) of the device that is what you are seeing hereā€¦
MQTT: Mycroft/RemoteDevices/dca6327aadc9/request, "what's the weather"
MQTT: Mycroft/RemoteDevices/dca6327aadc9/response, "It's currently a clear sky and 2 degrees celsius."

My intention here is that these topics could be subscribed to by any non-mycroft mqtt device, thought it might be useful.

  1. It looks like the skill is executing correctly. Sending the message to the bedroom device.
Mycroft/RemoteDevices/bedroom, {"source": "livingroom", "message": "Hi there"}

when the bedroom device loads the skill does it indicate that it has successfully subscribed to the topic. You should see something in the logs likeā€¦

Connection Verified
This device location is: bedroom

likewise you should see your livingroom device report itā€™s location when the skill loads.

Do you have a method to for monitoring the mqtt traffic?
Also you can attempt to send a message to the current device. ie send a message to the bedroom from the bedroom and it should receive it since it is subscribed to that topic.
3. if you have a method to send an mqtt message try sending to one of your two topics

Mycroft/RemoteDevices/bedroom
Mycroft/RemoteDevices/livingroom

a payload that looks like this

{"source": "test", "message": "this is a test"}
  1. Thought so. Wasnā€™t bothering me, so no worries there

  2. Yes indeed, both show those messages. Restarted Mycroft for that just in case and saw them flying by on both devices.

  3. Doh, never realised the easiest for testing is/was sending to the same device. Will do some digging and report back.

1 Like

So while testing your mycroftOS I may have found an issue with the mesh skill.
For some reason my devices are reporting that the MQTT is disabled even though it is clearly enabled in the websettings. This might have been what you discovered as well.


image
Testing of your OS is going well but will report more on that in your post later.

1 Like

Great, because I ran out of time with testing.

If there is anything that needs to be changed on a OS level, let me know.

To get the mqtt working I had to disable the checkbox in the websettings, save it then re-enable it.
I think this occurred due to the fact that i default it in the skill to disabled but the new mycroft device did not detect a change in the websettings so didnā€™t update anything. MQTT is now working from my original mycroft to the MycroftOS unit. If you can confirm the same behaviour that would be great. I will likely report on my preliminary findings on MycroftOS then provide more information as i get more testing time. Initially it came up without any major problems on this rpi4. Well done!

Ok will do some testing, toggling the settings. To be honest, didnā€™t actually looked at the we settings. Could well be the issue.

Does anyone know if there is a way to determine what skill has a message on the message bus?
I would like to modify this skill so that the mqtt publishing is done to a different topic based on what skill has a message on the messagebus? @andlo, @j1nx, @JarbasAl you have all done quite a bit of messgebus work maybe you know? Or others?

No sorry, canā€™t help with that. Still havenā€™t ā€œplayedā€ properly with Python and / or skill development.

I know Iā€™m doing something wrong trying to install this.

In the CLI I am entering msm install https://github.com/pcwii/mesh-skill.git

Mycroft is responding with: " I didnā€™t find any skill named https : / / github com / pcwii / mesh
git."

What am I doing wrong?

You need to exit out of the mycroft console (ctrl+c) then type

msm install https://github.com/pcwii/mesh-skill.git

After it is installed you can type the following to return to the console

mycroft-cli-client

Lastly you will need to go to the mycroft.ai skills page and update the skill details there.

I believe within the mycroft-cli you can just remove the msm part. (Not sure though)

>> I'm having trouble communicating with the Mycroft servers. Please wait few minutes before trying to speak to me.

I have 3 Picrofts and they all started doing this shortly after installing this skill. is anyone else experiencing this? Think itā€™s unrelated?