Skip to content

jamiehoward430/mycroft-mymqtt

bbfd5773fa
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

MQTT for MycroftAI

This is a skill written for mycroft to publish commands over an mqtt broker for home automation or any other purpose.

Commands

Currently it will publish the action to a topic built from the commands said, for example

  • say hey mycroft, turn the light on and mycroft will publish on to /mycroft/turn/light/on.
  • say hey mycroft, switch the tv on and mycroft will publish on to /mycroft/switch/tv/on.

Installing the skill

This skill requires paho-mqtt to be installed in your mycroft virtual enviroment.

If you already have mycroft running stop it and enter the following commands,

  • to enter the virtual enviroment workon mycroft.
  • now to install paho-mqtt pip install paho-mqtt.
  • now you can exit the virtual enviroment by entering deactivate

If you have not yet setup mycroft then simply add paho-mqtt==1.1 to the requirments.txt file before running dev_setup.sh

Now you have paho-mqtt installed move the mycroft skills directory and download the skill.

  • Move into the directory cd ~/mycroft-core/mycroft/skills
  • Clone the repository git clone https://github.com/jamiehoward430/mycroft-mymqtt.git
  • Rename it mv mycroft-mymqtt MyMQTT

Setup mycroft.ini

Add the following lines to your config file and adjust to your needs. currently tls is not supported, coming soon! [MyMQTTSkill]

protocol = "mqtt"

mqtt-host = "test.mosquitto.org"

mqtt-port = "1883"

mqtt-auth = "yes"

mqtt-user = "youruser"

mqtt-pass = "yourpass"

Thas it, now start mycroft and start turning your light on and off.

About

mqtt for MycroftAI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages