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

Not sure it is related, but are there any log items that might indicate where the problem is?

1 Like

Likely related to this…

1 Like

Oh, OK. that kinda makes sense, as the only things I could clearly see were a bunch of 500 errors.

So, I am trying to use Home Assistant as my MQTT broker. (It’s actually Mosquitto, but you know what I mean.)

I am unable to send a message from one Mycroft to another. Even though Mycroft A will say it’s sending the message to Mycroft B, Mycroft B never says anything.

However, I am able to use HA’s MQTT tool to successfully send a message to any Mycroft device in the house.

I apologize for the screenshots. The VU meter in the CLI makes it difficult to copy and paste.

Looking like mqtt may be disabled on the websettings. Try disabling it, save, then enable and save. In your logs it says mqtt disabled in websettings. Therefore it will still receive from HA but won’t send.

how about that. I was looking for it, but didn’t see it.

1 Like

Ah, that worked like a charm.
I’m never really sure when to use the Mycroft-CLI and when to use just the OS CLI

Thanks, now to get the time to get the MQTT structure to update my old Node-Red Snips flows<?>.

2 Likes

Is there an easy way to get a single mycroft to subscribe to a new topic? For example if i wanted to sub to a topic like <based topic>/RemoteDevices/ALL and have all my devices sub to that topic so i can essentially “broadcast” to all my Mycrofts?

MQTT permits the use of wildcards for subscription although I have not tried this. Here are some examples.

Thank you for the suggestion. FYI i’ve been able to integrate Mycroft to OpenHab2 using your MQTT skill. Thank you very much. I see a lot of people talking about Home Assistant but no one mentioning Openhab. I just wanted to call out that it is working nicely on the competiting platform as well.

Definitely appreciate the feedback. If you can think of anything to move this skill to the next level feel free to pass it along.

I’m looking at your skill but I got this error (from skills.log):
2021-11-12 14:27:44.756 | INFO | 28544 | mesh-skill:send_MQTT:234 | MQTT has been disabled in the websettings at https://home.mycroft.ai
But MQTT has not been disabled. I’m using MQTT very intensive (python scripts for home automation, my-tasmota-de-skill, …). Second question: Although the placement field of my devices is filled with unique names, your script takes the MAC address as identifier. How come? Last question for the moment: What are GetDetailsContextKeyword.voc and GetLocationContextKeyword.voc used for? The content is not natural language. Seems to be a variable.

First Question: The message you showed is not an error but a notice that the skill has not been enabled in the mycroft backend websettings. You need to ensure that you have set the backend with the proper settings for your broker.
Second Question: The mac address is used to provide a unique id that can be used as a secondary mqtt topic. This topic is used for all mycroft utterances and responses not just the ones specific to this skill. The skill related topic that is linked to the location name of your unit can be used to direct messages to other topics. There is an overview on my github page and here is a screenshot of the backend settings that you need to configure to enable the MQTT function of the skill.

Since I work with my own skill (my-tasmota-de-skill), I already know the meaning of the MQTT protocol. I have set the configuration correctly in the backend. Here are the corresponding lines from the skill.log:

2021-11-12 16:35:27.318 | INFO | 3501 | mesh-skill:<module>:42 | Client re-created
2021-11-12 16:35:27.327 | INFO | 3501 | mycroft.skills.settings:get_local_settings:83 | /home/pi/.config/mycroft/skills/mesh-skill/settings.json
2021-11-12 16:35:27.904 | INFO | 3501 | mesh-skill:on_websettings_changed:155 | Websettings Changed! 192.168.178.20, 1883
2021-11-12 16:35:27.908 | INFO | 3501 | mesh-skill:on_websettings_changed:156 | This device location is:
2021-11-12 16:35:27.913 | INFO | 3501 | mesh-skill:mqtt_init:165 | MQTT Is Enabled
2021-11-12 16:35:27.917 | INFO | 3501 | mesh-skill:mqtt_init:167 | Connecting to host: 192.168.178.20, on port: 1883
2021-11-12 16:35:27.921 | INFO | 3501 | mesh-skill:mqtt_init:173 | MQTT Loop Started Successfully
2021-11-12 16:35:27.929 | INFO | 3501 | mesh-skill:get_mac_address:183 | MQTT using UUID: b827eb4498f9
2021-11-12 16:35:27.962 | INFO | 3501 | mesh-skill:on_disconnect:84 | MQTT has Dis-Connected
2021-11-12 16:35:27.966 | INFO | 3501 | mesh-skill:mqtt_init:165 | MQTT Is Enabled
2021-11-12 16:35:27.974 | INFO | 3501 | mesh-skill:mqtt_init:167 | Connecting to host: 192.168.178.20, on port: 1883
2021-11-12 16:35:27.978 | INFO | 3501 | mesh-skill:mqtt_init:173 | MQTT Loop Started Successfully
2021-11-12 16:35:27.992 | INFO | 3501 | mesh-skill:on_connect:70 | Connection Verified
2021-11-12 16:35:28.462 | INFO | 3501 | mesh-skill:initialize:133 | Location: Workshop
2021-11-12 16:35:28.465 | INFO | 3501 | mesh-skill:initialize:134 | Host: 192.168.178.20
2021-11-12 16:35:28.492 | INFO | 3501 | mesh-skill:on_connect:71 | This device location is: Workshop

``



The skill works in the sense that I can enter the following via the console:

send a message

workshop

hello world
and then the error message comes that location has the length 0 and at the MQTT broker also nothing arrives for the topic Picroft.