carstenagerskov / skill-mosquito-speak Goto Github PK
View Code? Open in Web Editor NEWNotification skill for Mycroft
License: GNU General Public License v3.0
Notification skill for Mycroft
License: GNU General Public License v3.0
Hi,
thank you for your great skill!
My mosquitto has "allow_anonymous false", so the clients need to provide a username and password.
Maybe this would be a good time to learn how to make a pull request, but it's such a tiny change that it's perhaps not necessary...
In __init__.py
I added
client.username_pw_set(self.username, self.password)
just above
client.connect_async(self.host, self.port, 60)
and
self.username = self.settings.get('username')
self.password = self.settings.get('password')
below
self.retainLast = self.settings.get('retainLast')
And in settingsmeta.json
I added:
{
"name": "username",
"type": "text",
"label": "Mqtt username",
"value": ""
},
{
"name": "password",
"type": "text",
"label": "Mqtt password",
"value": ""
},
(I also edited settings.json
to have username
and password
fields, but that was probably not needed.)
After a reboot I could add username and password on the mycroft.ai site, and it works.
Best regards...
Michael
I'm a newbie in using Mycroft resp. Picroft. This are my first steps. I've been working with SNIPS, which is currently running. But the public support has ended on January 31. So I'm looking for alternatives. I've some experiences on working with mqtt and wrote a python-script, which is analyzing the hermes/intent topic and gives output to hermes/tts.
There is a problem using your script: The mqtt server's ip is always "forgotten" after rebooting. And I'm not sure where the mqtt ip has to be stored. First I edited __init__py and changed the class MosquitoSpeak(MycroftSkill) with this parameters:
self.host = '192.168.178.20'
self.port = '1883'
self.topic = 'my-out/text'
self.alertTopic = 'my-alert'
I got a Error: no host an nothing worked (e. g. sending a text to my-out/text, nothing was spoken)
Then I edited settings.json:
"host": "192.168.178.20", "port": 1883, "topic": "my-out/text", "alertTopic": "my-alert"
After a reboot of Picroft a messsage sended to my-out/text -m "Hallo World" is spoken by Mycroft. But after the next reboot it does not work again and the values for host, topic and alertTopic in settings.json are empty again. What is my failure?
I am getting following error while running this skill.
File "/opt/mycroft/skills/skill-mosquito-speak/__init__.py", line 23, in <module>
import paho.mqtt.client as mqtt
ImportError: No module named paho.mqtt.client
I've tried installing the with pip. Nothing works! Any idea?
When trying to use the _utterance option an error occurs saying that "MosquitoSpeak has no attribute emitter".
Apparently emitter has been renamed as bus (I tested it locally and it worked). See also following threads:
https://community.mycroft.ai/t/cmd-skill-not-work-anymore-since-28-feb-update/5991/3
forslund/cmd_skill@0d8a649
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.