Hooking into the Mycroft output from the command line

For Python mbus commands, install package using: mycroft-pip install mycroft-messagebus-client, after activating the venv with source venv-activate.sh` in ~/mycroft-core/venv-activate.sh. From: MessageBus - Mycroft AI

Then python3 -m mycroft.messagebus.send 'speak' '{ "utterance": "test"}'

From: Message Types - Mycroft AI

python3 -m mycroft.messagebus.send 'mycroft.mic.listen' will trigger as a Wakeword.

python3 -m mycroft.messagebus.send 'recognizer_loop:utterance' '{ "utterances": "what is the weather"}' will trigger as an Utterance, but doesnt seem to work. I did remove some of the parameters, but there is no fail or error message. It does not show up in the mycroft-cli-client like the above to commands similarly truncated.

@baconator, @gez-mycroft and @andlo I dont see how to intercept the Utterance…?

I see this using python but it doenst use the messagebus as suggested: Catch and print what User Said - #2 by forslund
message.data.get('utterances')[0]) …or does it?

Is there a command line equivalent?

git clone https://github.com/MycroftAI/skill-speak /opt/mycroft/skills/skill-speak

Just created a skill following (Your First Skill - Mycroft AI) using mycroft-msk create and went to dir ll /opt/mycroft/skills/cli-command-skill/ but there is no ‘dialog’ dir as in the docs…?
There is a dialog file in /opt/mycroft/skills/cli-command-skill/locale/en-us/command.cli.dialog. Definitely some deviation from the Docs for QuickStart.

Also, is this stored in Mycrft repo or in my own? … my own. Interesting…

Console out in Python? Message Types - Mycroft AI Nope.

self.log.info("This is an info level log message.")

Bummer, basic skill template not functioning. Even after trying to use activate cli-command-skill in the mycroft-cli-client, and having it show up in the skills list. Even after restart all.

ERROR | 1263 | mycroft.skills.skill_loader:_communicate_load_status:287 | Skill cli-command-skill failed to load
'inconsistent use of tabs and spaces in indentation`

If I have to restart all services and reload the cli-client, development cycle will be very slow.

After restarting all several times and loading the cli-client, I now receive this error and the initialization messages are different in the cli-client and the custom skill doesnt load. Restart all again doesnt help, nor does mycroft-stop all. At a loss here on how to proceed, no stranded processes left to be found. Seems like some kind of device issue, maybe internet, but I have that disabled and am working locally. I did get the custom command to load once, and was working on an import error and then a @intent_handler versus #@intent_file_handler between the template skill and the ‘parrot skill’ I snipped some code from for the Utterance read.

2020-05-31 21:47:16.067 | WARNING  | 10696 | mycroft.api:check_remote_pairing:531 | Could not get device info: PermissionError(13, 'Permission denied')
2020-05-31 21:47:16.522 | INFO     | 10696 | mycroft.messagebus.load_config:load_message_bus_config:33 | Loading message bus configs