Add a command from settings

Hello everyone,
I’m busy making my first skill. The idea is that you specify a short command, like ‘hello’, ‘bye’ or ‘good night’ in the skills configuration and if you then trigger this command a specified MQTT payload will be send to a specific topic. You can also set a response that Mycroft will speak out.

image

I’m gone use it to trigger openHAB scripts. So if I say “mycroft, bye” al the light go out and my alarm will turn on. Or when I say “Mycroft, good morning” a light will turn on and openHAB wil tell me schedule of that day.

I have all the MQTT stuff working bud have one last hiccup. I have it working when I put the commands in separate intent files. Bud this will mean that you will have to change the commands in those files. Is it possible to get a command from a config file. The same as that you can use .speak.(“hello world”) to let Mycroft talk bud then the other way around.

Thank you in advance, and if you have any other tips or suggestions, I’m all ears.

Greetings,

Sander

Have you seen my Mesh-Skill? Might be something there you can use. Others are already using the Mesh-Skill with openHAB.
https://community.openconversational.ai/t/testing-and-feedback-for-mesh-skill-mycroft-to-mycroft-communicator

1 Like

I did not see that before, looks great.

Bud I don’t think that it will help me. As I can see in the short time I have read about it you are still using the keyword “send”. It is the keyword I want to make variable by config.

I have it working now bud I don’t think it is like the creators of Mycroft intent it. When I change the settings of my skill the skill will just write directly to the .intent files.

image

This is interesting. I don’t need to write an MQTT section, but I am interested in being able to have an individual user write the equivalent of (dare I say the word) Alexa “routines”. Similar to what the original poster is asking for (but not quite), I’d like to add a setting that says essentially that “Mycroft, good morning” is equivalent to the statement (which is “hard coded” for Padatius to figure out) “turn on the lights”.

It looks like the original poster has caused a setting to create an intent file, and that is certainly do-able, but it means (I think) that the code needs to know the maximum number of intent files and what each one is equivalent to.

Any ideas for a less constrained way to essentially say “utterance1 is equivalent to utterance2” where u1 is specified in a setting and u2 is one of the hard-coded intents?

Clearly not following. But it might be possible you search something like skill routines

@SGee , I think you understood what I was asking for well even if I did not say it clearly. Skill routines seems to do a lot of what I was asking. Thank you!