Action code for the Turn on/off [Relay] bundle. It can control the relay connected on Raspberry Pi.
"Hey snips, please turn on my light"
"Sure, it's done"
- Create a Snips account here
- Create an English assistant in Snips console
- Add APP Turn on/off [Relay] (Available soon)
- Deploy assistant by Sam
- (On Pi) Add permission to
_snips-skill
user to access gpio:sudo usermod -a -G i2c,spi,gpio,audio _snips-skills
- (On Pi) Restart snips-skill-server:
sudo systemctl restart snips-skill-server
- Have fun ;-)
sam install actions -g https://github.com/snipsco/snips-app-relay-switch.git
Config | Description | Value | Default |
---|---|---|---|
mqtt_host |
MQTT host name | <ip address> /<hostname> |
localhost |
mqtt_port |
MQTT port number | <mqtt port> |
1883 |
To make satellite work correctly, please change here
Config | Description | Value | Default |
---|---|---|---|
site_id |
Snips device ID | Refering to the actual snips.toml |
default |
To make satellite work correctly, please change here
Config | Description | Value | Default |
---|---|---|---|
gpio_bcm_relay |
The BCM GPIO number | Available BCM pin number | 12 |
Please see the Contribution Guidelines.
This library is provided by Snips as Open Source software. See LICENSE for more information.