Make a web request

i guess you have to use mycroft-stop ; mycroft-start all if changed locally

Another thing: Like coded atm, the intent file is overwritten with the new intent

settings.yaml or settings.json are created on device, not from repo.

edting settingsmeta will only change the web ui, you are not changing any settings on disk, you are just telling the web ui to show different text

https://mycroft-ai.gitbook.io/docs/skill-development/skill-structure/skill-settings

just use the web ui and wait for changes to sync, might take a few minutes.

i havent looked into gez skill, but this seems an odd thing to set utterance in web ui. just make a regular skill using intents like everyone else? that is literally what intents are for

1 Like

@JarbasAl: Iā€™m a total noob here, just trying to make gez skill work in a very simple scenario.
That said, I think Iā€™m getting closer.
Iā€™ve edited the .py file to speak the variable instead of speaking the error, and one of the problems seems to be that even it the command (in the web ui) is
turn lights {status}
when I say ā€œturn lights onā€
the command that is returned is turn lights (ie, the variable staysā€¦ null)
Iā€™ve deleted and re-cloned the repo to be sure to have a clean start, and Iā€™ve modified ONLY the data in the webui to these values:
image
yet, even when writing in the cli
turn lights on
the parameter stays null

@Sgee: Iā€™ve given up on updating locally, and Iā€™m just using the WebUI trying to make things as easy and replicable as possible. If you read my above post, Iā€™m not really managing to have the variable you suggested get a value.
Iā€™m banging my head at this since hoursā€¦ I didnā€™t expect this to be so hardā€¦
Thanks for the help

Obviously you have to create param_value2 in settingsmeta.yaml

- name: param_value2
  type: text
  label: Parameter value
  value: ""

@SGee: But hasnā€™t @JarbasAl said that settingsmeta.yaml is useless (locally at least?) since it is just what the webui will display?

for updating purposes, yes. But to create those parameter (that are needed for your application) you have to edit settingsmeta.yaml. And after that you set up the actual values in home.mycroft.ai

@Sgee
so in the webui I should list the actual possible values?
ie:
Param1=on
Param2=off
?

And anyway, shouldnā€™t {status} have a value when configured with
turn lights {status}
and pronouncing
turn lights on
?

Ok, finally made it!
I had to edit
skills/make-get-request-skill.krisgesling/__init__.py
and replace
value = self.settings.get('param_value')
with
value=message.data.get('status')
as @Sgee suggested!
I also had to edit manually
skills/make-get-request-skill.krisgesling/locale/en-us/make.request.intent
since it was not updating to reflect the command
and make it: turn lights {status}
Everything else left as in the github repo.
Thanks @Sgee and @JarbasAl!

Hold your horses. That replacement just makes sure that the param_values are circumvented alltogether. That just works as status=value (request = turn on/off), but what if you want to use an other command? Just a bandaid. (if you want to stick to Gezā€™ logic)

and youā€™re actually confusing me with

the skills reside in /opt/mycroft/skills/*
the (local) configuration at ~/.config/mycroft/skills/*

you might want to log your code importing
from mycroft.util.log import LOG
and log the variables (to cli) with
self.log.info(variable)

Cause something is pretty fishy

Maybe Iā€™ve missed it but how do you have more then one request? Great skill btw since this is a great and basic way of smarthome control but how do you set it up to send more then one get request and more then one way to ask it. So that I can control my entire smarthome like lights, plugs and devices with get commands?

The simplicity (/universality) yet becomes its problem. Since you can go in every direction with this, you are pretty much on your own with this to taylor it to your needs (which means: coding)

(I would maybe rework (settingsmetasā€™) trigger -> device/s (/array of devices), and the trigger with ā€œ[skill name] [action] {device} {status}ā€)

BTW - more of a general feature request - What does it take to make the metasettings expandable/contractable (i.e. new value/key (+/-))? From ā€œHomeā€ that is.