mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-04-15 10:58:02 +02:00
MycroftOS: Bump enclosure skill once again
This commit is contained in:
parent
90b897481c
commit
554fc0003e
@ -40,13 +40,6 @@ class MycroftOS(MycroftSkill):
|
|||||||
self.snapclient_enabled = self.settings.get('snapclient')
|
self.snapclient_enabled = self.settings.get('snapclient')
|
||||||
self.snapserver_enabled = self.settings.get('snapserver')
|
self.snapserver_enabled = self.settings.get('snapserver')
|
||||||
self.mpd_enabled = self.settings.get('mpd')
|
self.mpd_enabled = self.settings.get('mpd')
|
||||||
self.airplay_started = False
|
|
||||||
self.sshd_started = False
|
|
||||||
self.spotify_started = False
|
|
||||||
self.btspeaker_started = False
|
|
||||||
self.snapclient_started = False
|
|
||||||
self.snapserver_started = False
|
|
||||||
self.mpd_started = False
|
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
""" Perform initalization.
|
""" Perform initalization.
|
||||||
@ -344,162 +337,6 @@ class MycroftOS(MycroftSkill):
|
|||||||
self.mpd_started = False
|
self.mpd_started = False
|
||||||
self.speak_dialog('DisabledMPD')
|
self.speak_dialog('DisabledMPD')
|
||||||
|
|
||||||
def start_ssh(self):
|
|
||||||
os.system('sudo systemctl start sshd.service')
|
|
||||||
self.speak_dialog('StartedSSH')
|
|
||||||
|
|
||||||
def stop_ssh(self):
|
|
||||||
os.system('sudo systemctl stop sshd.service')
|
|
||||||
self.speak_dialog('StoppedSSH')
|
|
||||||
|
|
||||||
def start_airplay(self):
|
|
||||||
os.system('sudo systemctl start shairport-sync.service')
|
|
||||||
self.speak_dialog('StartedAirplay')
|
|
||||||
|
|
||||||
def stop_airplay(self):
|
|
||||||
os.system('sudo systemctl stop shairport-sync.service')
|
|
||||||
self.speak_dialog('StoppedAirplay')
|
|
||||||
|
|
||||||
def start_spotify(self):
|
|
||||||
os.system('sudo systemctl start spotifyd.service')
|
|
||||||
self.speak_dialog('StartedSpotify')
|
|
||||||
|
|
||||||
def stop_spotify(self):
|
|
||||||
os.system('sudo systemctl stop spotifyd.service')
|
|
||||||
self.speak_dialog('StoppedSpotify')
|
|
||||||
|
|
||||||
def start_btspeaker(self):
|
|
||||||
os.system('sudo systemctl start btspeaker.service')
|
|
||||||
self.speak_dialog('StartedBTspeaker')
|
|
||||||
|
|
||||||
def stop_btspeaker(self):
|
|
||||||
os.system('sudo systemctl stop btspeaker.service')
|
|
||||||
self.speak_dialog('StoppedBTspeaker')
|
|
||||||
|
|
||||||
def start_snapclient(self):
|
|
||||||
os.system('sudo systemctl start snapclient.service')
|
|
||||||
self.speak_dialog('StartedSnapclient')
|
|
||||||
|
|
||||||
def stop_snapclient(self):
|
|
||||||
os.system('sudo systemctl stop snapclient.service')
|
|
||||||
self.speak_dialog('StoppedSnapclient')
|
|
||||||
|
|
||||||
def start_snapserver(self):
|
|
||||||
os.system('sudo systemctl start snapserver.service')
|
|
||||||
self.speak_dialog('StartedSnapserver')
|
|
||||||
|
|
||||||
def stop_snapserver(self):
|
|
||||||
os.system('sudo systemctl stop snapserver.service')
|
|
||||||
self.speak_dialog('StoppedSnapserver')
|
|
||||||
|
|
||||||
def start_mpd(self):
|
|
||||||
os.system('sudo systemctl start mpd.service')
|
|
||||||
self.speak_dialog('StartedMPD')
|
|
||||||
|
|
||||||
def stop_mpd(self):
|
|
||||||
os.system('sudo systemctl stop mpd.service')
|
|
||||||
self.speak_dialog('StoppedMPD')
|
|
||||||
|
|
||||||
|
|
||||||
# Intent handlers
|
|
||||||
@intent_file_handler('StartSSH.intent')
|
|
||||||
def on_start_ssh(self, message):
|
|
||||||
if self.sshd_started is False:
|
|
||||||
self.start_ssh()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStartedSSH')
|
|
||||||
|
|
||||||
@intent_file_handler('StopSSH.intent')
|
|
||||||
def on_stop_ssh(self, message):
|
|
||||||
if self.sshd_started is True:
|
|
||||||
self.stop_ssh()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStoppedSSH')
|
|
||||||
|
|
||||||
@intent_file_handler('StartAirPlay.intent')
|
|
||||||
def on_start_airplay(self, message):
|
|
||||||
if self.airplay_started is False:
|
|
||||||
self.start_airplay()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStartedAirPlay')
|
|
||||||
|
|
||||||
@intent_file_handler('StopAirPlay.intent')
|
|
||||||
def on_stop_airplay(self, message):
|
|
||||||
if self.airplay_started is True:
|
|
||||||
self.stop_airplay()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStoppedAirPlay')
|
|
||||||
|
|
||||||
@intent_file_handler('StartSpotify.intent')
|
|
||||||
def on_start_spotify(self, message):
|
|
||||||
if self.spotify_started is False:
|
|
||||||
self.start_spotify()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStartedSpotify')
|
|
||||||
|
|
||||||
@intent_file_handler('StopSpotify.intent')
|
|
||||||
def on_stop_spotify(self, message):
|
|
||||||
if self.spotify_started is True:
|
|
||||||
self.stop_spotify()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStoppedSpotify')
|
|
||||||
|
|
||||||
@intent_file_handler('StartBTspeaker.intent')
|
|
||||||
def on_start_btspeaker(self, message):
|
|
||||||
if self.btspeaker_started is False:
|
|
||||||
self.start_btspeaker()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStartedBTspeaker')
|
|
||||||
|
|
||||||
@intent_file_handler('StopBTspeaker.intent')
|
|
||||||
def on_stop_btspeaker(self, message):
|
|
||||||
if self.btspeaker_started is True:
|
|
||||||
self.stop_btspeaker()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStoppedBTspeaker')
|
|
||||||
|
|
||||||
@intent_file_handler('StartSnapclient.intent')
|
|
||||||
def on_start_snapclient(self, message):
|
|
||||||
if self.snapclient_started is False:
|
|
||||||
self.start_snapclient()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStartedSnapclient')
|
|
||||||
|
|
||||||
@intent_file_handler('StopSnapclient.intent')
|
|
||||||
def on_stop_snapclient(self, message):
|
|
||||||
if self.snapclient_started is True:
|
|
||||||
self.stop_snapclient()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStoppedSnapclient')
|
|
||||||
|
|
||||||
@intent_file_handler('StartSnapserver.intent')
|
|
||||||
def on_start_snapserver(self, message):
|
|
||||||
if self.snapserver_started is False:
|
|
||||||
self.start_snapserver()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStartedSnapserver')
|
|
||||||
|
|
||||||
@intent_file_handler('StopSnapserver.intent')
|
|
||||||
def on_stop_snapserver(self, message):
|
|
||||||
if self.snapserver_started is True:
|
|
||||||
self.stop_snapserver()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStoppedSnapserver')
|
|
||||||
|
|
||||||
@intent_file_handler('StartMPD.intent')
|
|
||||||
def on_start_mpd(self, message):
|
|
||||||
if self.mpd_started is False:
|
|
||||||
self.start_mpd()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStartedMPD')
|
|
||||||
|
|
||||||
@intent_file_handler('StopMPD.intent')
|
|
||||||
def on_stop_mpd(self, message):
|
|
||||||
if self.mpd_started is True:
|
|
||||||
self.stop_mpd()
|
|
||||||
else:
|
|
||||||
self.speak_dialog('AlreadyStoppedMPD')
|
|
||||||
|
|
||||||
|
|
||||||
def create_skill():
|
def create_skill():
|
||||||
return MycroftOS()
|
return MycroftOS()
|
@ -1,6 +0,0 @@
|
|||||||
Start airplay
|
|
||||||
Start air play
|
|
||||||
Start shareport sync
|
|
||||||
Start share port sync
|
|
||||||
Start shareport
|
|
||||||
Start share port
|
|
@ -1,2 +0,0 @@
|
|||||||
Start bluetooth
|
|
||||||
Start blue tooth
|
|
@ -1,4 +0,0 @@
|
|||||||
Start M P D
|
|
||||||
Start M.P.D.
|
|
||||||
Start MPD
|
|
||||||
Start Media Player Daemon
|
|
@ -1,4 +0,0 @@
|
|||||||
Start S S H
|
|
||||||
Start S.S.H.
|
|
||||||
Start SSH
|
|
||||||
Start secure shell
|
|
@ -1,2 +0,0 @@
|
|||||||
Start snapclient
|
|
||||||
Start snap client
|
|
@ -1,2 +0,0 @@
|
|||||||
Start snapserver
|
|
||||||
Start snap server
|
|
@ -1 +0,0 @@
|
|||||||
Start Spotify
|
|
@ -1,6 +0,0 @@
|
|||||||
Stop airplay
|
|
||||||
Stop air play
|
|
||||||
Stop shareport sync
|
|
||||||
Stop share port sync
|
|
||||||
Stop shareport
|
|
||||||
Stop share port
|
|
@ -1,2 +0,0 @@
|
|||||||
Stop bluetooth
|
|
||||||
Stop blue tooth
|
|
@ -1,4 +0,0 @@
|
|||||||
Stop M P D
|
|
||||||
Stop M.P.D.
|
|
||||||
Stop MPD
|
|
||||||
Stop Media Player Daemon
|
|
@ -1,4 +0,0 @@
|
|||||||
Stop S S H
|
|
||||||
Stop S.S.H.
|
|
||||||
Stop SSH
|
|
||||||
Stop secure shell
|
|
@ -1,2 +0,0 @@
|
|||||||
Stop snapclient
|
|
||||||
Stop snap client
|
|
@ -1,2 +0,0 @@
|
|||||||
Stop snapserver
|
|
||||||
Stop snap server
|
|
Loading…
x
Reference in New Issue
Block a user