#!/usr/bin/env python
# -*- coding:utf-8 -*

# Plugin for FSTA
# the main FSTA.installation object is named "maison"
# To add a new group :
#	maison.add_group(name = "mongroupe", hotword = "mongroupe.pmdl")
# 
# To add a new scenario (here or (better) in another file (ie my_rule.scenario))
#	maison.group("mongroupe").add_scenario(name = "monscenario", _
#											phrases = [u"do this",u"do that"], _ or phrases = u"éteint la lumière",
#											actions = [
#												action_mqtt(
#													topic = "T-HOME/SALON/LUMIERES",
#													payload = "ON",
#													text = "ON"),
#												action(callback_function, text = "Oooh"),
#												action_os(cmd="my_cmd_line", text = "cmd_line")]
from FSTA.action import *
maison.group("maison").add_scenario(name = "MUSIQUE ON",
									phrases = [u"musique",
												u"allume la musique",u"musique aléatoire"],
									actions = action_mqtt(
											topic = "T-HOME/SQUEEZE/PISQUEEZE",
											payload = "randomplay,tracks",
											text = "Musique On"))
maison.group("maison").add_scenario(name = "MUSIQUE PLAY",
									phrases = [u"musique play", u'musique joue'],
									actions = action_mqtt(
											topic = "T-HOME/SQUEEZE/PISQUEEZE",
											payload = "play",
											text = "Musique play"))
maison.group("maison").add_scenario(name = "MUSIQUE PAUSE",
									phrases = [u"musique pause", u'musique reprend', u'musique continue'],
									actions = action_mqtt(
											topic = "T-HOME/SQUEEZE/PISQUEEZE",
											payload = "pause",
											text = "Musique pause"))
maison.group("maison").add_scenario(name = "MUSIQUE OFF",
									phrases = [u"stop la musique",
												u"éteins la musique",
												u"arrête la musique"],
									actions = action_mqtt(
											topic = "T-HOME/SQUEEZE/PISQUEEZE",
											payload = "stop",
											text = "STOP"))
maison.group("maison").add_scenario(name = "MUSIQUE NEXT",
									phrases = [u"musique suivante",
												u"change la musique"],
									actions = action_mqtt(
											topic = "T-HOME/SQUEEZE/PISQUEEZE",
											payload = "button,jump_fwd",
											text = "Next"))
maison.group("maison").add_scenario(name = "FRANCE INTER",
									phrases = [u"France Inter", u'Met la radio', u'Allume la radio'],
									actions = action_mqtt(
											topic = "T-HOME/SQUEEZE/PISQUEEZE",
											payload = "favorites,playlist,play,item_id:3",
											text = "Musique pause"))