mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-03-02 02:27:46 +01:00
[WIP] refactor the mycroft installed skills to buildroot packages.
This commit is contained in:
parent
9e6b622d31
commit
6616f3fbc2
@ -174,4 +174,14 @@ menu "Mycroft A.I. Plugins"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-jarbas-stt-plugin-vosk/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-jarbas-wake-word-plugin-precise/Config.in"
|
||||
endmenu
|
||||
menu "Mycroft A.I. Skills"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skills-repo/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-balena-wifi-setup/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-date-time/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-enclosure/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-homescreen/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-mycroftgui/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-pairing/Config.in"
|
||||
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/mycroft-skill-ovos-volume/Config.in"
|
||||
endmenu
|
||||
endmenu
|
||||
|
@ -31,12 +31,3 @@ BOARD_DIR="$(dirname $0)"
|
||||
|
||||
cp -f ../buildroot-external/board/raspberrypi/config.txt ${BINARIES_DIR}/rpi-firmware/config.txt
|
||||
cp -f ../buildroot-external/board/raspberrypi/cmdline.txt ${BINARIES_DIR}/rpi-firmware/cmdline.txt
|
||||
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/.skills-repo/.git* ${TARGET_DIR}/opt/mycroft/.skills-repo/
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/skills/skill-balena-wifi-setup/.git* ${TARGET_DIR}/opt/mycroft/skills/skill-balena-wifi-setup/
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/skills/skill-ovos-enclosure/.git* ${TARGET_DIR}/opt/mycroft/skills/skill-ovos-enclosure/
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/skills/skill-ovos-mycroftgui/.git* ${TARGET_DIR}/opt/mycroft/skills/skill-ovos-mycroftgui/
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/skills/skill-ovos-pairing/.git* ${TARGET_DIR}/opt/mycroft/skills/skill-ovos-pairing/
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/skills/skill-ovos-homescreen/.git* ${TARGET_DIR}/opt/mycroft/skills/skill-ovos-homescreen/
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/skills/mycroft-date-time.mycroftai/.git* ${TARGET_DIR}/opt/mycroft/skills/mycroft-date-time.mycroftai/
|
||||
cp -fr ../buildroot-external/rootfs-overlay/opt/mycroft/skills/mycroft-volume.mycroftai/.git* ${TARGET_DIR}/opt/mycroft/skills/mycroft-volume.mycroftai/
|
||||
|
@ -377,7 +377,6 @@ BR2_PACKAGE_GDK_PIXBUF=y
|
||||
BR2_PACKAGE_GIFLIB=y
|
||||
BR2_PACKAGE_LIBEPOXY=y
|
||||
BR2_PACKAGE_LIBSVG_CAIRO=y
|
||||
BR2_PACKAGE_LIBWPE=y
|
||||
BR2_PACKAGE_OPENJPEG=y
|
||||
BR2_PACKAGE_TIFF=y
|
||||
BR2_PACKAGE_WAFFLE=y
|
||||
@ -564,3 +563,11 @@ BR2_PACKAGE_MYCROFT_SERVICE=y
|
||||
BR2_PACKAGE_PYTHON_JARBAS_STT_PLUGIN_CHROMIUM=y
|
||||
BR2_PACKAGE_PYTHON_JARBAS_STT_PLUGIN_VOSK=y
|
||||
BR2_PACKAGE_PYTHON_JARBAS_WAKE_WORD_PLUGIN_PRECISE=y
|
||||
BR2_PACKAGE_MYCROFT_SKILLS_REPO=y
|
||||
BR2_PACKAGE_MYCROFT_SKILL_BALENA_WIFI_SETUP=y
|
||||
BR2_PACKAGE_MYCROFT_SKILL_DATE_TIME=y
|
||||
BR2_PACKAGE_MYCROFT_SKILL_OVOS_ENCLOSURE=y
|
||||
BR2_PACKAGE_MYCROFT_SKILL_OVOS_HOMESCREEN=y
|
||||
BR2_PACKAGE_MYCROFT_SKILL_OVOS_MYCROFTGUI=y
|
||||
BR2_PACKAGE_MYCROFT_SKILL_OVOS_PAIRING=y
|
||||
BR2_PACKAGE_MYCROFT_SKILL_OVOS_VOLUME=y
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
/usr/sbin/resizeSD &&
|
||||
/usr/sbin/gitstash &&
|
||||
pip install /home/mycroft/vosk-0.3.17-cp38-cp38-linux_aarch64.whl &&
|
||||
rm /etc/firstboot
|
||||
|
@ -13,7 +13,6 @@ FIRSTBOOT_SERVICE_LICENSE_FILES = LICENSE
|
||||
define FIRSTBOOT_SERVICE_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -m 0755 $(@D)/resizeSD $(TARGET_DIR)/usr/sbin/
|
||||
$(INSTALL) -m 0755 $(@D)/firstboot $(TARGET_DIR)/usr/sbin/
|
||||
$(INSTALL) -m 0755 $(@D)/gitstash $(TARGET_DIR)/usr/sbin/
|
||||
$(INSTALL) -D -m 644 $(@D)/firstboot.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/firstboot.service
|
||||
touch $(TARGET_DIR)/etc/firstboot
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
printf "Git stashing pre-installed skills ..."
|
||||
cd /opt/mycroft/.skills-rep && git stash
|
||||
cd /opt/mycroft/skills/skill-balena-wifi-setup && git stash
|
||||
cd /opt/mycroft/skills/skill-ovos-enclosure && git stash
|
||||
cd /opt/mycroft/skills/skill-ovos-mycroftgui && git stash
|
||||
cd /opt/mycroft/skills/skill-ovos-pairing && git stash
|
||||
cd /opt/mycroft/skills/skill-ovos-homescreen && git stash
|
||||
cd /opt/mycroft/skills/mycroft-date-time.mycroftai && git stash
|
||||
cd /opt/mycroft/skills/mycroft-volume.mycroftai && git stash
|
||||
chown -R mycroft.mycroft /opt/mycroft
|
||||
echo "[OK]"
|
||||
|
@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILL_BALENA_WIFI_SETUP
|
||||
bool "mycroft-skill-balena-wifi-setup"
|
||||
help
|
||||
Mycroft AI - OVOS WiFI Setup Skill
|
||||
Provides the audio and visual elements for Connecting
|
||||
to Wifi via a secondary mobile device or computer.
|
||||
|
||||
https://github.com/OpenVoiceOS/skill-balena-wifi-setup
|
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skill-balena-wifi-setup
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILL_BALENA_WIFI_SETUP_VERSION = ee7a2f985967c7bd8ed912fb37375c8046bb2230
|
||||
MYCROFT_SKILL_BALENA_WIFI_SETUP_SITE = git://github.com/OpenVoiceOS/skill-balena-wifi-setup
|
||||
MYCROFT_SKILL_BALENA_WIFI_SETUP_SITE_METHOD = git
|
||||
MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRLOCATION = opt/mycroft/skills
|
||||
MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRNAME = skill-balena-wifi-setup
|
||||
|
||||
define MYCROFT_SKILL_BALENA_WIFI_SETUP_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRLOCATION)/$(MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRLOCATION)/$(MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILL_BALENA_WIFI_SETUP_DL_DIR)/git/.git* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRLOCATION)/$(MYCROFT_SKILL_BALENA_WIFI_SETUP_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILL_DATE_TIME
|
||||
bool "mycroft-skill-date-time"
|
||||
help
|
||||
Mycroft AI official Date and Time Skill, providing
|
||||
the current time, date and day of week for cities
|
||||
around the world.
|
||||
|
||||
https://github.com/MycroftAI/skill-date-time
|
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skill-date-time
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILL_DATE_TIME_VERSION = 20.08
|
||||
MYCROFT_SKILL_DATE_TIME_SITE = git://github.com/MycroftAI/skill-date-time
|
||||
MYCROFT_SKILL_DATE_TIME_SITE_METHOD = git
|
||||
MYCROFT_SKILL_DATE_TIME_DIRLOCATION = opt/mycroft/skills
|
||||
MYCROFT_SKILL_DATE_TIME_DIRNAME = mycroft-date-time.mycroftai
|
||||
|
||||
define MYCROFT_SKILL_DATE_TIME_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_DATE_TIME_DIRLOCATION)/$(MYCROFT_SKILL_DATE_TIME_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_DATE_TIME_DIRLOCATION)/$(MYCROFT_SKILL_DATE_TIME_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILL_DATE_TIME_DL_DIR)/git/.git* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILL_DATE_TIME_DIRLOCATION)/$(MYCROFT_SKILL_DATE_TIME_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILL_OVOS_ENCLOSURE
|
||||
bool "mycroft-skill-ovos-enclosure"
|
||||
help
|
||||
Mycroft AI - OVOS Enclosure Skill
|
||||
Mycroft skill to take control of OpenVoiceOS
|
||||
it's functions and tools.
|
||||
|
||||
https://github.com/OpenVoiceOS/skill-ovos-enclosure
|
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skill-ovos-enclosure
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILL_OVOS_ENCLOSURE_VERSION = 96f6b24faf146fb8811f0fdf753748991d414dcd
|
||||
MYCROFT_SKILL_OVOS_ENCLOSURE_SITE = git://github.com/OpenVoiceOS/skill-ovos-enclosure
|
||||
MYCROFT_SKILL_OVOS_ENCLOSURE_SITE_METHOD = git
|
||||
MYCROFT_SKILL_OVOS_ENCLOSURE_DIRLOCATION = opt/mycroft/skills
|
||||
MYCROFT_SKILL_OVOS_ENCLOSURE_DIRNAME = skill-ovos-enclosure
|
||||
|
||||
define MYCROFT_SKILL_OVOS_ENCLOSURE_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_ENCLOSURE_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_ENCLOSURE_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_ENCLOSURE_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_ENCLOSURE_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILL_OVOS_ENCLOSURE_DL_DIR)/git/.git* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_ENCLOSURE_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_ENCLOSURE_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILL_OVOS_HOMESCREEN
|
||||
bool "mycroft-skill-ovos-homescreen"
|
||||
help
|
||||
Mycroft AI - OVOS Homescreen Skill
|
||||
Provides custom resting face for OVOS
|
||||
|
||||
https://github.com/OpenVoiceOS/skill-ovos-homescreen
|
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skill-ovos-homescreen
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILL_OVOS_HOMESCREEN_VERSION = 6affba69d1bc42d93b29ad89a181c9402b226c35
|
||||
MYCROFT_SKILL_OVOS_HOMESCREEN_SITE = git://github.com/OpenVoiceOS/skill-ovos-homescreen
|
||||
MYCROFT_SKILL_OVOS_HOMESCREEN_SITE_METHOD = git
|
||||
MYCROFT_SKILL_OVOS_HOMESCREEN_DIRLOCATION = opt/mycroft/skills
|
||||
MYCROFT_SKILL_OVOS_HOMESCREEN_DIRNAME = skill-ovos-homescreen
|
||||
|
||||
define MYCROFT_SKILL_OVOS_HOMESCREEN_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_HOMESCREEN_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_HOMESCREEN_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_HOMESCREEN_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_HOMESCREEN_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILL_OVOS_HOMESCREEN_DL_DIR)/git/.git* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_HOMESCREEN_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_HOMESCREEN_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -0,0 +1,8 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILL_OVOS_MYCROFTGUI
|
||||
bool "mycroft-skill-ovos-mycroftgui"
|
||||
help
|
||||
Mycroft AI - OVOS MycroftGUI Skill
|
||||
Mycroft skill to take control of the Mycroft
|
||||
GUI QT application.
|
||||
|
||||
https://github.com/OpenVoiceOS/skill-ovos-mycroftgui
|
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skill-ovos-mycroftgui
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILL_OVOS_MYCROFTGUI_VERSION = d98871d8cac30534f08a3ea846f26a413d8a23be
|
||||
MYCROFT_SKILL_OVOS_MYCROFTGUI_SITE = git://github.com/OpenVoiceOS/skill-ovos-mycroftgui
|
||||
MYCROFT_SKILL_OVOS_MYCROFTGUI_SITE_METHOD = git
|
||||
MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRLOCATION = opt/mycroft/skills
|
||||
MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRNAME = skill-ovos-mycroftgui
|
||||
|
||||
define MYCROFT_SKILL_OVOS_MYCROFTGUI_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILL_OVOS_MYCROFTGUI_DL_DIR)/git/.git* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_MYCROFTGUI_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILL_OVOS_PAIRING
|
||||
bool "mycroft-skill-ovos-pairing"
|
||||
help
|
||||
Mycroft AI - OVOS Pairing Skill
|
||||
Connect your device to the Mycroft server
|
||||
|
||||
https://github.com/OpenVoiceOS/skill-ovos-pairing
|
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skill-ovos-pairing
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILL_OVOS_PAIRING_VERSION = 1973ad0978516f11f5217af9f8303d82831e507d
|
||||
MYCROFT_SKILL_OVOS_PAIRING_SITE = git://github.com/OpenVoiceOS/skill-ovos-pairing
|
||||
MYCROFT_SKILL_OVOS_PAIRING_SITE_METHOD = git
|
||||
MYCROFT_SKILL_OVOS_PAIRING_DIRLOCATION = opt/mycroft/skills
|
||||
MYCROFT_SKILL_OVOS_PAIRING_DIRNAME = skill-ovos-pairing
|
||||
|
||||
define MYCROFT_SKILL_OVOS_PAIRING_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_PAIRING_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_PAIRING_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_PAIRING_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_PAIRING_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILL_OVOS_PAIRING_DL_DIR)/git/.git* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_PAIRING_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_PAIRING_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILL_OVOS_VOLUME
|
||||
bool "mycroft-skill-ovos-volume"
|
||||
help
|
||||
Mycroft AI - OVOS Volume Skill
|
||||
Control the volume of your Device
|
||||
|
||||
https://github.com/OpenVoiceOS/skill-ovos-volume
|
@ -0,0 +1,20 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skill-ovos-volume
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILL_OVOS_VOLUME_VERSION = 20.08
|
||||
MYCROFT_SKILL_OVOS_VOLUME_SITE = git://github.com/OpenVoiceOS/skill-ovos-volume
|
||||
MYCROFT_SKILL_OVOS_VOLUME_SITE_METHOD = git
|
||||
MYCROFT_SKILL_OVOS_VOLUME_DIRLOCATION = opt/mycroft/skills
|
||||
MYCROFT_SKILL_OVOS_VOLUME_DIRNAME = skill-ovos-volume
|
||||
|
||||
define MYCROFT_SKILL_OVOS_VOLUME_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_VOLUME_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_VOLUME_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_VOLUME_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_VOLUME_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILL_OVOS_VOLUME_DL_DIR)/git/.git* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILL_OVOS_VOLUME_DIRLOCATION)/$(MYCROFT_SKILL_OVOS_VOLUME_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
9
buildroot-external/package/mycroft-skills-repo/Config.in
Normal file
9
buildroot-external/package/mycroft-skills-repo/Config.in
Normal file
@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_MYCROFT_SKILLS_REPO
|
||||
bool "mycroft-skills-repo"
|
||||
help
|
||||
Mycroft AI - Skills Repo
|
||||
The official home of Skills for the Mycroft
|
||||
ecosystem. These Skills are written by both
|
||||
the MycroftAI team and others within the Community.
|
||||
|
||||
https://github.com/MycroftAI/mycroft-skills
|
@ -0,0 +1,21 @@
|
||||
################################################################################
|
||||
#
|
||||
# mycroft-skills-repo
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MYCROFT_SKILLS_REPO_VERSION = 20.08
|
||||
MYCROFT_SKILLS_REPO_SITE = git://github.com/MycroftAI/mycroft-skills
|
||||
MYCROFT_SKILLS_REPO_SITE_METHOD = git
|
||||
#MYCROFT_SKILLS_REPO_GIT_SUBMODULES = yes
|
||||
MYCROFT_SKILLS_REPO_DIRLOCATION = opt/mycroft
|
||||
MYCROFT_SKILLS_REPO_DIRNAME = .skills-repo
|
||||
|
||||
define MYCROFT_SKILLS_REPO_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/$(MYCROFT_SKILLS_REPO_DIRLOCATION)/$(MYCROFT_SKILLS_REPO_DIRNAME)
|
||||
cp -dpfr $(@D)/* $(TARGET_DIR)/$(MYCROFT_SKILLS_REPO_DIRLOCATION)/$(MYCROFT_SKILLS_REPO_DIRNAME)
|
||||
cp -dpfr $(MYCROFT_SKILLS_REPO_DL_DIR)/git/* \
|
||||
$(TARGET_DIR)/$(MYCROFT_SKILLS_REPO_DIRLOCATION)/$(MYCROFT_SKILLS_REPO_DIRNAME)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -38,8 +38,8 @@
|
||||
"pulse_duck": true
|
||||
},
|
||||
"skills": {
|
||||
"blacklisted_skills": ["mycroft-pairing.mycroftai"],
|
||||
"priority_skills": ["skill-ovos-pairing", "skill-balena-wifi-setup", "skill-ovos-enclosure", "skill-ovos-mycroftgui"]
|
||||
"blacklisted_skills": ["mycroft-pairing.mycroftai", "mycroft-volume.mycroftai"],
|
||||
"priority_skills": ["skill-ovos-volume", "skill-ovos-pairing", "skill-balena-wifi-setup", "skill-ovos-enclosure", "skill-ovos-mycroftgui"]
|
||||
},
|
||||
"log_level": "INFO"
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
d /var/log/mycroft 700 mycroft mycroft
|
||||
Z /opt/mycroft 755 mycroft mycroft
|
||||
Z /opt/mycroft - mycroft mycroft
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 664e4f80e1fe79dd67496d1700b2e10b13e320bb
|
@ -1 +0,0 @@
|
||||
Subproject commit b5b7ded3149c1929b46c2e294fc6980325416cf6
|
@ -1 +0,0 @@
|
||||
Subproject commit d6527214faf8797b06c8db7ca271f9884c4fa01f
|
@ -1,5 +0,0 @@
|
||||
__pycache__/
|
||||
*.qmlc
|
||||
*.idea
|
||||
settings.json
|
||||
|
@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -1,21 +0,0 @@
|
||||
# <img src="https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/wifi.svg" card_color="#40DBB0" width="50" height="50" style="vertical-align:bottom"/> Wifi Connect
|
||||
Connect your mycroft device to Wifi
|
||||
|
||||
## About
|
||||
Provides the audio and visual elements for Connecting to Wifi via a secondary mobile device or computer.
|
||||
|
||||
## Examples
|
||||
|
||||
## Credits
|
||||
JarbasAI
|
||||
|
||||
## Category
|
||||
**Configuration**
|
||||
|
||||
## Tags
|
||||
#Wifi
|
||||
#Network
|
||||
#Internet
|
||||
#Connection
|
||||
#Connect
|
||||
|
@ -1,328 +0,0 @@
|
||||
from mycroft import MycroftSkill, intent_handler
|
||||
from mycroft.util import create_daemon, connected
|
||||
from mycroft.configuration import LocalConf, USER_CONFIG
|
||||
from mycroft.api import is_paired
|
||||
from mycroft.messagebus.message import Message
|
||||
import subprocess
|
||||
import pexpect
|
||||
from time import sleep
|
||||
|
||||
|
||||
class WifiConnect(MycroftSkill):
|
||||
def __init__(self):
|
||||
MycroftSkill.__init__(self)
|
||||
self.monitoring = False
|
||||
self.in_setup = False
|
||||
self.connected = False
|
||||
self.wifi_process = None
|
||||
self.debug = False # dev setting, VERY VERBOSE DIALOGS
|
||||
# TODO skill settings
|
||||
self.ssid = "OVOS"
|
||||
self.pswd = None
|
||||
self.grace_period = 45
|
||||
self.time_between_checks = 30 # seconds
|
||||
self.mycroft_ready = False
|
||||
self.wifi_command = "sudo /usr/local/sbin/wifi-connect --portal-ssid {ssid}"
|
||||
if self.pswd:
|
||||
self.wifi_command += " --portal-passphrase {pswd}"
|
||||
if "color" not in self.settings:
|
||||
self.settings["color"] = "#FF0000"
|
||||
if "stop_on_internet" not in self.settings:
|
||||
self.settings["stop_on_internet"] = False
|
||||
if "timeout_after_internet" not in self.settings:
|
||||
self.settings["timeout_after_internet"] = 90
|
||||
|
||||
def initialize(self):
|
||||
self.make_priority()
|
||||
self.add_event("mycroft.internet.connected",
|
||||
self.handle_internet_connected)
|
||||
self.add_event("mycroft.ready",
|
||||
self.handle_mycroft_ready)
|
||||
self.start_internet_check()
|
||||
|
||||
def handle_mycroft_ready(self):
|
||||
self.mycroft_ready = True
|
||||
|
||||
def make_priority(self):
|
||||
if not self.skill_id:
|
||||
# might not be set yet....
|
||||
return
|
||||
# load the current list of already blacklisted skills
|
||||
priority_list = self.config_core["skills"]["priority_skills"]
|
||||
|
||||
# add the skill to the blacklist
|
||||
if self.skill_id not in priority_list:
|
||||
priority_list.insert(0, self.skill_id)
|
||||
|
||||
# load the user config file (~/.mycroft/mycroft.conf)
|
||||
conf = LocalConf(USER_CONFIG)
|
||||
if "skills" not in conf:
|
||||
conf["skills"] = {}
|
||||
|
||||
# update the blacklist field
|
||||
conf["skills"]["priority_skills"] = priority_list
|
||||
|
||||
# save the user config file
|
||||
conf.store()
|
||||
|
||||
# internet watchdog
|
||||
def start_internet_check(self):
|
||||
create_daemon(self._watchdog)
|
||||
|
||||
def stop_internet_check(self):
|
||||
self.monitoring = False
|
||||
|
||||
def _watchdog(self):
|
||||
try:
|
||||
self.monitoring = True
|
||||
self.log.info("Wifi watchdog started")
|
||||
output = subprocess.check_output("nmcli connection show",
|
||||
shell=True).decode("utf-8")
|
||||
if "wifi" in output:
|
||||
self.log.info("Detected previously configured wifi, starting "
|
||||
"grace period to allow it to connect")
|
||||
sleep(self.grace_period)
|
||||
while self.monitoring:
|
||||
if self.in_setup:
|
||||
sleep(1) # let setup do it's thing
|
||||
continue
|
||||
|
||||
if not connected():
|
||||
self.log.info("NO INTERNET")
|
||||
if not self.is_connected_to_wifi():
|
||||
self.log.info("LAUNCH SETUP")
|
||||
try:
|
||||
self.launch_wifi_setup() # blocking
|
||||
except Exception as e:
|
||||
self.log.exception(e)
|
||||
else:
|
||||
self.log.warning("CONNECTED TO WIFI, BUT NO INTERNET!!")
|
||||
|
||||
sleep(self.time_between_checks)
|
||||
except Exception as e:
|
||||
self.log.error("Wifi watchdog crashed unexpectedly")
|
||||
self.log.exception(e)
|
||||
|
||||
# wifi setup
|
||||
@staticmethod
|
||||
def get_wifi_ssid():
|
||||
SSID = None
|
||||
try:
|
||||
SSID = subprocess.check_output(["iwgetid", "-r"]).strip()
|
||||
except subprocess.CalledProcessError:
|
||||
# If there is no connection subprocess throws a 'CalledProcessError'
|
||||
pass
|
||||
return SSID
|
||||
|
||||
@staticmethod
|
||||
def is_connected_to_wifi():
|
||||
return WifiConnect.get_wifi_ssid() is not None
|
||||
|
||||
def launch_wifi_setup(self):
|
||||
self.stop_setup()
|
||||
self.in_setup = True
|
||||
self.wifi_process = pexpect.spawn(
|
||||
self.wifi_command.format(ssid=self.ssid)
|
||||
)
|
||||
# https://github.com/pexpect/pexpect/issues/462
|
||||
self.wifi_process.delayafterclose = 1
|
||||
self.wifi_process.delayafterterminate = 1
|
||||
prev = ""
|
||||
restart = False
|
||||
if self.debug:
|
||||
self.speak_dialog("start_setup")
|
||||
while self.in_setup:
|
||||
try:
|
||||
out = self.wifi_process.readline().decode("utf-8").strip()
|
||||
if out == prev:
|
||||
continue
|
||||
prev = out
|
||||
if out.startswith("Access points: "):
|
||||
aps = list(out.split("Access points: ")[-1])
|
||||
self.log.info(out)
|
||||
if self.debug:
|
||||
self.speak_dialog("wifi_scanned")
|
||||
elif out.startswith("Starting access point..."):
|
||||
if self.debug:
|
||||
self.speak_dialog("ap_start")
|
||||
elif out.startswith("Access point ") and \
|
||||
out.endswith("created"):
|
||||
self.prompt_to_join_ap()
|
||||
if self.debug:
|
||||
self.speak_dialog("ap_created")
|
||||
elif out.startswith("Starting HTTP server on"):
|
||||
self.log.debug(out)
|
||||
if self.debug:
|
||||
self.speak_dialog("http_started")
|
||||
elif out.startswith("Stopping access point"):
|
||||
if self.debug:
|
||||
self.speak_dialog("ap_stop")
|
||||
elif out.startswith("Access point ") and \
|
||||
out.endswith("stopped"):
|
||||
if self.debug:
|
||||
self.speak_dialog("ap_stopped")
|
||||
elif out == "User connected to the captive portal":
|
||||
self.log.info(out)
|
||||
self.prompt_to_select_network()
|
||||
if self.debug:
|
||||
self.speak_dialog("user_connected")
|
||||
elif out.startswith("Connecting to access point"):
|
||||
if self.debug:
|
||||
self.speak_dialog("connecting")
|
||||
elif out.startswith("Internet connectivity established"):
|
||||
self.log.info(out)
|
||||
self.report_setup_complete()
|
||||
if self.debug:
|
||||
self.speak_dialog("wifi_connected")
|
||||
elif "Error" in out or "[Errno" in out:
|
||||
self.log.error(out)
|
||||
self.report_setup_failed()
|
||||
|
||||
# TODO figure out at least the errors handled gracefully
|
||||
accepted_errors = [
|
||||
"Password length should be at least 8 characters"
|
||||
]
|
||||
for e in accepted_errors:
|
||||
if e in out:
|
||||
continue
|
||||
else:
|
||||
restart = True
|
||||
break
|
||||
|
||||
if self.debug:
|
||||
self.log.debug(out)
|
||||
except pexpect.exceptions.EOF:
|
||||
# exited
|
||||
self.log.info("Exited wifi setup process")
|
||||
break
|
||||
except pexpect.exceptions.TIMEOUT:
|
||||
# nothing happened for a while
|
||||
pass
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
except Exception as e:
|
||||
self.log.exception(e)
|
||||
break
|
||||
self.stop_setup()
|
||||
if restart:
|
||||
# handle bugs in balena, sometimes it fails to come back up
|
||||
# seems to happen on
|
||||
# Error: Getting access points failed
|
||||
self.launch_wifi_setup()
|
||||
elif self.debug:
|
||||
self.speak_dialog("end_setup")
|
||||
|
||||
# intents
|
||||
@intent_handler("launch_setup.intent")
|
||||
def wifi_intent(self, message):
|
||||
self.launch_wifi_setup()
|
||||
|
||||
# bus events
|
||||
def handle_internet_connected(self, message=None):
|
||||
"""System came online later after booting."""
|
||||
self.enclosure.mouth_reset()
|
||||
self.stop_setup() # just in case
|
||||
self.gui.release()
|
||||
|
||||
# GUI events
|
||||
def prompt_to_join_ap(self, message=None):
|
||||
"""Provide instructions for setting up wifi."""
|
||||
self.manage_setup_display("join-ap", "prompt")
|
||||
# allow GUI to linger around for a bit, will block the wifi setup loop
|
||||
sleep(2)
|
||||
|
||||
def prompt_to_select_network(self, message=None):
|
||||
"""Prompt user to select network and login."""
|
||||
self.manage_setup_display("select-network", "prompt")
|
||||
# allow GUI to linger around for a bit, will block the wifi setup loop
|
||||
sleep(2)
|
||||
|
||||
def report_setup_complete(self, message=None):
|
||||
"""Wifi setup complete, network is connected."""
|
||||
# once first connected to internet increase time between checks
|
||||
self.connected = True
|
||||
self.time_between_checks = self.settings["timeout_after_internet"]
|
||||
# stop watchdog on internet connection
|
||||
if self.settings["stop_on_internet"]:
|
||||
self.monitoring = False
|
||||
self.manage_setup_display("setup-completed", "status")
|
||||
# allow GUI to linger around for a bit, will block the wifi setup loop
|
||||
sleep(3)
|
||||
if not is_paired():
|
||||
self.bus.emit(Message("mycroft.not.paired"))
|
||||
self.gui.release()
|
||||
else:
|
||||
self.manage_setup_display("not-ready", "status")
|
||||
|
||||
def report_setup_failed(self, message=None):
|
||||
"""Wifi setup failed"""
|
||||
self.speak_dialog("wifi_error")
|
||||
self.manage_setup_display("setup-failed", "status")
|
||||
# allow GUI to linger around for a bit, will block the wifi setup loop
|
||||
sleep(2)
|
||||
|
||||
def manage_setup_display(self, state, page_type):
|
||||
self.gui.clear()
|
||||
if state == "join-ap" and page_type == "prompt":
|
||||
self.gui["image"] = "1_phone_connect-to-ap.png"
|
||||
self.gui["label"] = "Connect to the Wi-Fi network"
|
||||
self.gui["highlight"] = self.ssid
|
||||
self.gui["color"] = self.settings["color"]
|
||||
self.gui["page_type"] = "Prompt"
|
||||
self.gui.show_page("NetworkLoader.qml", override_animations=True)
|
||||
elif state == "select-network" and page_type == "prompt":
|
||||
self.gui["image"] = "3_phone_choose-wifi.png"
|
||||
self.gui["label"] = "Select local Wi-Fi network to connect"
|
||||
self.gui["highlight"] = "OVOS Device"
|
||||
self.gui["color"] = self.settings["color"]
|
||||
self.gui["page_type"] = "Prompt"
|
||||
self.gui.show_page("NetworkLoader.qml", override_animations=True)
|
||||
elif state == "setup-completed" and page_type == "status":
|
||||
self.gui["image"] = "icons/check-circle.svg"
|
||||
self.gui["label"] = "Connected"
|
||||
self.gui["highlight"] = ""
|
||||
self.gui["color"] = "#40DBB0"
|
||||
self.gui["page_type"] = "Status"
|
||||
self.gui.show_page("NetworkLoader.qml", override_animations=True)
|
||||
elif state == "setup-failed" and page_type == "status":
|
||||
self.gui["image"] = "icons/times-circle.svg"
|
||||
self.gui["label"] = "Connection Failed"
|
||||
self.gui["highlight"] = ""
|
||||
self.gui["color"] = "#FF0000"
|
||||
self.gui["page_type"] = "Status"
|
||||
self.gui.show_page("NetworkLoader.qml", override_animations=True)
|
||||
elif state == "not-ready" and page_type == "status":
|
||||
self.gui.show_page("NotReady.qml", override_animations=True)
|
||||
|
||||
# cleanup
|
||||
def stop_setup(self):
|
||||
if self.wifi_process is not None:
|
||||
try:
|
||||
if self.wifi_process.isalive():
|
||||
self.log.debug("terminating wifi setup process")
|
||||
self.wifi_process.sendcontrol('c')
|
||||
sleep(1)
|
||||
self.wifi_process.close()
|
||||
sleep(1)
|
||||
if self.wifi_process.isalive():
|
||||
self.log.warning('wifi setup did not exit gracefully.')
|
||||
self.wifi_process.close(force=True)
|
||||
sleep(1)
|
||||
if self.wifi_process.isalive():
|
||||
self.log.warning('trying to terminate wifi setup process')
|
||||
self.wifi_process.terminate()
|
||||
sleep(1)
|
||||
else:
|
||||
self.log.debug('wifi setup exited gracefully.')
|
||||
except Exception as e:
|
||||
self.log.exception(e)
|
||||
self.wifi_process = None
|
||||
self.in_setup = False
|
||||
|
||||
def shutdown(self):
|
||||
self.monitoring = False
|
||||
self.stop_setup()
|
||||
|
||||
|
||||
def create_skill():
|
||||
return WifiConnect()
|
@ -1 +0,0 @@
|
||||
access point created
|
@ -1 +0,0 @@
|
||||
starting captive portal
|
@ -1 +0,0 @@
|
||||
stopping captive portal
|
@ -1 +0,0 @@
|
||||
captive portal stopped
|
@ -1 +0,0 @@
|
||||
Connecting to selected wifi, see logs
|
@ -1 +0,0 @@
|
||||
wifi setup finished
|
@ -1 +0,0 @@
|
||||
started http server
|
@ -1,4 +0,0 @@
|
||||
launch wifi connect
|
||||
launch wifi setup
|
||||
change wifi network
|
||||
add wifi network
|
@ -1 +0,0 @@
|
||||
wifi setup started
|
@ -1 +0,0 @@
|
||||
user connected to captive portal
|
@ -1 +0,0 @@
|
||||
Connected to wifi
|
@ -1 +0,0 @@
|
||||
failed to connect to wifi, verify credentials and try again
|
@ -1 +0,0 @@
|
||||
I have scanned for access points, see logs for results
|
@ -1 +0,0 @@
|
||||
pexpect
|
Binary file not shown.
Before Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
@ -1,24 +0,0 @@
|
||||
import QtQuick.Layouts 1.4
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 2.0
|
||||
import org.kde.kirigami 2.5 as Kirigami
|
||||
import Mycroft 1.0 as Mycroft
|
||||
|
||||
Mycroft.Delegate {
|
||||
id: mainLoaderView
|
||||
|
||||
property var pageType: sessionData.page_type
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
bottomPadding: 0
|
||||
topPadding: 0
|
||||
|
||||
contentItem: Loader {
|
||||
id: rootLoader
|
||||
}
|
||||
|
||||
onPageTypeChanged: {
|
||||
console.log(sessionData.page_type)
|
||||
rootLoader.setSource(sessionData.page_type + ".qml")
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
import QtQuick.Layouts 1.4
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 2.0
|
||||
import org.kde.kirigami 2.4 as Kirigami
|
||||
|
||||
import Mycroft 1.0 as Mycroft
|
||||
import org.kde.lottie 1.0
|
||||
|
||||
Mycroft.Delegate {
|
||||
id: mainLoaderView
|
||||
|
||||
property var pageType: sessionData.page_type
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
bottomPadding: 0
|
||||
topPadding: 0
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "#000000"
|
||||
|
||||
ColumnLayout {
|
||||
id: grid
|
||||
anchors.fill: parent
|
||||
anchors.margins: Kirigami.Units.largeSpacing
|
||||
|
||||
Label {
|
||||
id: statusLabel
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pixelSize: parent.height * 0.075
|
||||
wrapMode: Text.WordWrap
|
||||
renderType: Text.NativeRendering
|
||||
font.family: "Noto Sans Display"
|
||||
font.styleName: "Black"
|
||||
text: "Starting Up"
|
||||
color: "white"
|
||||
}
|
||||
|
||||
Label {
|
||||
id: statusLabel2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pixelSize: parent.height * 0.075
|
||||
wrapMode: Text.WordWrap
|
||||
renderType: Text.NativeRendering
|
||||
font.family: "Noto Sans Display"
|
||||
font.styleName: "Black"
|
||||
text: "Loading..."
|
||||
color: "#ff0000"
|
||||
}
|
||||
|
||||
LottieAnimation {
|
||||
id: statusIcon
|
||||
visible: true
|
||||
enabled: true
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
loops: Animation.Infinite
|
||||
fillMode: Image.PreserveAspectFit
|
||||
running: true
|
||||
source: Qt.resolvedUrl("animations/installing.json")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 by Aditya Mehra <aix.m@outlook.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
import QtQuick.Layouts 1.4
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 2.0
|
||||
import org.kde.kirigami 2.4 as Kirigami
|
||||
import Mycroft 1.0 as Mycroft
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
property var spacingUnit: 30
|
||||
property bool horizontalMode: root.width > root.height ? 1 : 0
|
||||
anchors.fill: parent
|
||||
color: "#000000"
|
||||
|
||||
GridLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Kirigami.Units.largeSpacing
|
||||
columns: horizontalMode ? 2 : 1
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
Kirigami.Heading {
|
||||
id: sentence
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: horizontalMode ? Qt.AlignLeft : Qt.AlignHCenter | Qt.AlignVCenter
|
||||
Layout.leftMargin: horizontalMode ? spacingUnit : 0
|
||||
horizontalAlignment: horizontalMode ? Text.AlignLeft : Text.AlignHCenter
|
||||
verticalAlignment: horizontalMode ? Text.AlignVCenter : Text.AlignTop
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideRight
|
||||
font.family: "Noto Sans"
|
||||
font.bold: true
|
||||
font.weight: Font.Bold
|
||||
font.pixelSize: horizontalMode ? root.width * 0.065 : root.height * 0.075
|
||||
text: sessionData.label
|
||||
}
|
||||
Kirigami.Heading {
|
||||
id: url
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: horizontalMode ? spacingUnit : 0
|
||||
Layout.alignment: horizontalMode ? Qt.AlignLeft : Qt.AlignHCenter | Qt.AlignTop
|
||||
horizontalAlignment: horizontalMode ? Text.AlignLeft : Text.AlignHCenter
|
||||
verticalAlignment: horizontalMode ? Text.AlignVCenter : Text.AlignTop
|
||||
wrapMode: Text.WordWrap
|
||||
elide: Text.ElideRight
|
||||
font.family: "Noto Sans"
|
||||
font.bold: true
|
||||
font.weight: Font.Bold
|
||||
font.pixelSize: horizontalMode ? root.width * 0.065 : root.height * 0.075
|
||||
color: sessionData.color
|
||||
text: sessionData.highlight
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: img
|
||||
source: sessionData.image
|
||||
Layout.preferredWidth: horizontalMode ? parent.width / 2 : parent.width
|
||||
Layout.preferredHeight: horizontalMode ? parent.height * 0.9 : parent.height / 2
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
fillMode: Image.PreserveAspectFit
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
import QtQuick.Layouts 1.4
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 2.0
|
||||
import org.kde.kirigami 2.4 as Kirigami
|
||||
|
||||
import Mycroft 1.0 as Mycroft
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
anchors.fill: parent
|
||||
color: sessionData.color
|
||||
property bool horizontalMode: root.width > root.height ? 1 : 0
|
||||
|
||||
ColumnLayout {
|
||||
id: grid
|
||||
anchors.fill: parent
|
||||
|
||||
Image {
|
||||
id: statusIcon
|
||||
visible: true
|
||||
enabled: true
|
||||
Layout.preferredWidth: horizontalMode ? parent.width / 4 : parent.width / 2
|
||||
Layout.preferredHeight: width
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
source: sessionData.image
|
||||
}
|
||||
|
||||
Label {
|
||||
id: statusLabel
|
||||
Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter
|
||||
Layout.bottomMargin: Kirigami.Units.largeSpacing
|
||||
font.pixelSize: parent.width * 0.075
|
||||
wrapMode: Text.WordWrap
|
||||
renderType: Text.NativeRendering
|
||||
font.family: "Noto Sans Display"
|
||||
font.styleName: "Black"
|
||||
font.capitalization: Font.AllUppercase
|
||||
text: sessionData.label
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="check-circle.svg"
|
||||
id="svg4"
|
||||
version="1.1"
|
||||
viewBox="0 0 512 512">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg4"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="255.3616"
|
||||
inkscape:cx="157.36658"
|
||||
inkscape:zoom="1.5664062"
|
||||
showgrid="false"
|
||||
id="namedview6"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1"
|
||||
id="path2"
|
||||
d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z" />
|
||||
</svg>
|
Before Width: | Height: | Size: 1.8 KiB |
@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 512 512"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="info-circle.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="724"
|
||||
inkscape:window-height="480"
|
||||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="256"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm0-338c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"
|
||||
id="path2"
|
||||
style="fill:#ffffff" />
|
||||
</svg>
|
Before Width: | Height: | Size: 2.0 KiB |
@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="times-circle.svg"
|
||||
id="svg4"
|
||||
version="1.1"
|
||||
viewBox="0 0 512 512">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg4"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="30"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="255.3616"
|
||||
inkscape:cx="157.36658"
|
||||
inkscape:zoom="1.5664062"
|
||||
showgrid="false"
|
||||
id="namedview6"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1"
|
||||
id="path2"
|
||||
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z" />
|
||||
</svg>
|
Before Width: | Height: | Size: 1.8 KiB |
@ -1,129 +0,0 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -1,2 +0,0 @@
|
||||
# skill-ovos-enclosure
|
||||
Skill to take control of OpenVoiceOS it's functions and tools as Mycroft skill.
|
@ -1,227 +0,0 @@
|
||||
# Copyright 2019 j1nx - http://www.j1nx.nl.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
from mycroft.api import is_paired
|
||||
from mycroft.messagebus.message import Message
|
||||
from mycroft.skills.core import MycroftSkill
|
||||
from mycroft.util.log import LOG
|
||||
from mycroft.util.parse import normalize
|
||||
from mycroft.util import play_wav
|
||||
from mycroft import intent_file_handler
|
||||
|
||||
class MycroftOS(MycroftSkill):
|
||||
"""
|
||||
The MycroftOS skill handles much of the screen and audio activities
|
||||
related to Mycroft's core functionality.
|
||||
"""
|
||||
def __init__(self):
|
||||
super().__init__('MycroftOS')
|
||||
self.skip_list = ('MycroftOS')
|
||||
self.loading = True
|
||||
self.airplay_enabled = False
|
||||
self.sshd_enabled = True
|
||||
self.spotify_enabled = False
|
||||
self.btspeaker_enabled = False
|
||||
self.snapclient_enabled = False
|
||||
self.airplay_enabled = self.settings.get('airplay')
|
||||
self.sshd_enabled = self.settings.get('sshd')
|
||||
self.spotify_enabled = self.settings.get('spotifyd')
|
||||
self.btspeaker_enabled = self.settings.get('btspeaker')
|
||||
self.snapclient_enabled = self.settings.get('snapclient')
|
||||
|
||||
def initialize(self):
|
||||
""" Perform initalization.
|
||||
Registers messagebus handlers.
|
||||
"""
|
||||
|
||||
# Handle settings change
|
||||
self.settings_change_callback = self.on_websettings_changed
|
||||
|
||||
try:
|
||||
# Handle Device Ready
|
||||
self.bus.on('mycroft.ready', self.reset_screen)
|
||||
|
||||
# Handle volume setting via PulseAudio
|
||||
#self.add_event('mycroft.volume.set', self.on_volume_set)
|
||||
#self.add_event('mycroft.volume.get', self.on_volume_get)
|
||||
#self.add_event('mycroft.volume.duck', self.on_volume_duck)
|
||||
#self.add_event('mycroft.volume.unduck', self.on_volume_unduck)
|
||||
|
||||
# Administrative messages
|
||||
self.bus.on('system.shutdown', self.on_shutdown)
|
||||
self.bus.on('system.reboot', self.on_reboot)
|
||||
|
||||
except Exception:
|
||||
LOG.exception('In MycroftOS Enclosure Skill')
|
||||
|
||||
def on_websettings_changed(self):
|
||||
if self.sshd_enabled != self.settings.get('sshd'):
|
||||
if self.settings.get('sshd') is True:
|
||||
self.enable_ssh()
|
||||
else:
|
||||
self.disable_ssh()
|
||||
|
||||
if self.airplay_enabled != self.settings.get('airplay'):
|
||||
if self.settings.get('airplay') is True:
|
||||
self.enable_airplay()
|
||||
else:
|
||||
self.disable_airplay()
|
||||
|
||||
if self.spotify_enabled != self.settings.get('spotifyd'):
|
||||
if self.settings.get('spotifyd') is True:
|
||||
self.enable_spotify()
|
||||
else:
|
||||
self.disable_spotify()
|
||||
|
||||
if self.btspeaker_enabled != self.settings.get('btspeaker'):
|
||||
if self.settings.get('btspeaker') is True:
|
||||
self.enable_btspeaker()
|
||||
else:
|
||||
self.disable_btspeaker()
|
||||
|
||||
if self.snapclient_enabled != self.settings.get('snapclient'):
|
||||
if self.settings.get('snapclient') is True:
|
||||
self.enable_snapclient()
|
||||
else:
|
||||
self.disable_snapclient()
|
||||
|
||||
# System volume
|
||||
#def on_volume_set(self, message):
|
||||
# self.muted = False
|
||||
# self.set_pulse_volume(vol)
|
||||
|
||||
#def on_volume_get(self, message):
|
||||
# self.bus.emit(message.response(data={'percent': self.volume, 'muted': self.muted}))
|
||||
|
||||
#def on_volume_duck(self, message):
|
||||
# self.muted = True
|
||||
# call(['pactl', 'set-sink-mute', '0', '1'])
|
||||
|
||||
#def on_volume_unduck(self, message):
|
||||
# self.muted = False
|
||||
# call(['pactl', 'set-sink-mute', '0', '0'])
|
||||
|
||||
# Device is fully started
|
||||
def reset_screen(self, message):
|
||||
"""Triggered after skills are initialized."""
|
||||
self.loading = False
|
||||
if is_paired():
|
||||
self.speak_dialog('finished.booting')
|
||||
|
||||
|
||||
# System actions
|
||||
def on_shutdown(self):
|
||||
self.speak('Till next time')
|
||||
sleep(5)
|
||||
os.system('sudo halt')
|
||||
|
||||
def on_reboot(self):
|
||||
self.speak('I will be right back')
|
||||
sleep(5)
|
||||
os.system('sudo reboot')
|
||||
|
||||
# System services
|
||||
def enable_ssh(self):
|
||||
self.settings['sshd'] = True
|
||||
if not os.path.isfile('/etc/systemd/system/multi-user.target.wants/sshd.service'):
|
||||
# Service not yet enabled
|
||||
os.system('sudo systemctl enable sshd.service')
|
||||
self.speak_dialog('EnabledSSH')
|
||||
if os.system('sudo systemctl is-active --quiet sshd.service') != 0:
|
||||
# Service not currently running
|
||||
os.system('sudo systemctl start sshd.service')
|
||||
|
||||
def disable_ssh(self):
|
||||
self.settings['sshd'] = False
|
||||
if os.path.isfile('/etc/systemd/system/multi-user.target.wants/sshd.service'):
|
||||
# Service is enabled
|
||||
os.system('sudo systemctl disable sshd.service')
|
||||
self.speak_dialog('DisabledSSH')
|
||||
os.system('sudo systemctl stop sshd.service')
|
||||
|
||||
self.sshd_enabled = False
|
||||
self.sshd_started = True
|
||||
|
||||
|
||||
def enable_airplay(self):
|
||||
os.system('sudo systemctl enable shairport-sync.service')
|
||||
os.system('sudo systemctl start shairport-sync.service')
|
||||
self.settings['airplay'] = True
|
||||
self.airplay_enabled = True
|
||||
self.airplay_started = True
|
||||
self.speak_dialog('EnabledAirPlay')
|
||||
|
||||
def disable_airplay(self):
|
||||
os.system('sudo systemctl disable shairport-sync.service')
|
||||
os.system('sudo systemctl stop shairport-sync.service')
|
||||
self.settings['airplay'] = False
|
||||
self.airplay_enabled = False
|
||||
self.airplay_started = False
|
||||
self.speak_dialog('DisabledAirPlay')
|
||||
|
||||
def enable_spotify(self):
|
||||
os.system('sudo systemctl enable spotifyd.service')
|
||||
os.system('sudo systemctl start spotifyd.service')
|
||||
self.settings['spotifyd'] = True
|
||||
self.spotify_enabled = True
|
||||
self.spotify_started = True
|
||||
self.speak_dialog('EnabledSpotify')
|
||||
|
||||
def disable_spotify(self):
|
||||
os.system('sudo systemctl disable spotifyd.service')
|
||||
os.system('sudo systemctl stop spotifyd.service')
|
||||
self.settings['spotifyd'] = False
|
||||
self.spotify_enabled = False
|
||||
self.spotify_started = False
|
||||
self.speak_dialog('DisabledSpotify')
|
||||
|
||||
def enable_btspeaker(self):
|
||||
os.system('sudo systemctl enable btspeaker.service')
|
||||
os.system('sudo systemctl start btspeaker.service')
|
||||
self.settings['btspeaker'] = True
|
||||
self.btspeaker_enabled = True
|
||||
self.btspeaker_started = True
|
||||
self.speak_dialog('EnabledBTspeaker')
|
||||
|
||||
def disable_btspeaker(self):
|
||||
os.system('sudo systemctl disable btspeaker.service')
|
||||
os.system('sudo systemctl stop btspeaker.service')
|
||||
self.settings['btspeaker'] = False
|
||||
self.btspeaker_enabled = False
|
||||
self.btspeaker_started = False
|
||||
self.speak_dialog('DisabledBTspeaker')
|
||||
|
||||
def enable_snapclient(self):
|
||||
os.system('sudo systemctl enable snapclient.service')
|
||||
os.system('sudo systemctl start snapclient.service')
|
||||
self.settings['snapclient'] = True
|
||||
self.snapclient_enabled = True
|
||||
self.snapclient_started = True
|
||||
self.speak_dialog('EnabledSnapclient')
|
||||
|
||||
def disable_snapclient(self):
|
||||
os.system('sudo systemctl disable snapclient.service')
|
||||
os.system('sudo systemctl stop snapclient.service')
|
||||
self.settings['snapclient'] = False
|
||||
self.snapclient_enabled = False
|
||||
self.snapclient_started = False
|
||||
self.speak_dialog('DisabledSnapclient')
|
||||
|
||||
|
||||
def create_skill():
|
||||
return MycroftOS()
|
@ -1 +0,0 @@
|
||||
Airplay is already started
|
@ -1 +0,0 @@
|
||||
Bluetooth speaker is already started
|
@ -1 +0,0 @@
|
||||
Secure shell is already started
|
@ -1 +0,0 @@
|
||||
Snapcast client is already started
|
@ -1 +0,0 @@
|
||||
Spotify connect is already started
|
@ -1 +0,0 @@
|
||||
Airplay is already stopped
|
@ -1 +0,0 @@
|
||||
Bluetooth speaker is already stopped
|
@ -1 +0,0 @@
|
||||
Secure shell is already stopped
|
@ -1 +0,0 @@
|
||||
Snapcast client is already stopped
|
@ -1 +0,0 @@
|
||||
Spotify connect is already stopped
|
@ -1 +0,0 @@
|
||||
Airplay is stopped and disabled
|
@ -1 +0,0 @@
|
||||
Bluetooth speaker is stopped and disabled
|
@ -1 +0,0 @@
|
||||
Secure shell is stopped and disabled
|
@ -1 +0,0 @@
|
||||
Snapcast client is stopped and disabled
|
@ -1 +0,0 @@
|
||||
Spotify connect is stopped and disabled
|
@ -1 +0,0 @@
|
||||
Airplay is enabled and started
|
@ -1 +0,0 @@
|
||||
Bluetooth speaker is enabled and started
|
@ -1 +0,0 @@
|
||||
Secure shell is enabled and started
|
@ -1 +0,0 @@
|
||||
Snapcast client is enabled and started
|
@ -1 +0,0 @@
|
||||
Spotify connect is enabled and started
|
@ -1 +0,0 @@
|
||||
Airplay is started
|
@ -1 +0,0 @@
|
||||
Bluetooth speaker is started
|
@ -1 +0,0 @@
|
||||
Secure shell is started
|
@ -1 +0,0 @@
|
||||
Snapcast client is started
|
@ -1 +0,0 @@
|
||||
Spotify connect is started
|
@ -1 +0,0 @@
|
||||
Airplay is stopped
|
@ -1 +0,0 @@
|
||||
Bluetooth speaker is stopped
|
@ -1 +0,0 @@
|
||||
Secure shell is stopped
|
@ -1 +0,0 @@
|
||||
Snapcast client is stopped
|
@ -1 +0,0 @@
|
||||
Spotify connect is stopped
|
@ -1,4 +0,0 @@
|
||||
I have now finished booting up.
|
||||
I am now ready.
|
||||
Hi, this is mycroft and I am ready to work.
|
||||
You can get started with mycroft.
|
@ -1 +0,0 @@
|
||||
{"__mycroft_skill_firstrun": true, "sshd": true, "airplay": false, "spotifyd": false, "btspeaker": false, "snapclient": false}
|
@ -1,40 +0,0 @@
|
||||
skillMetadata:
|
||||
sections:
|
||||
- name: Smart speaker functionality
|
||||
fields:
|
||||
- type: label
|
||||
label: <p>You can enable or disable smart speaker services and functionality currently present on the MycroftOS system. As every user has different requirements and is using different hardware, devices and network protocols, all these services are disabled by default. You can easily enable or disable any of the below services here, by selecting the enabled checkbox (slightly delayed as you need to wait for settings synchronisation). If you only want to start the service now without enabling them, you can also use your voice command to your MycroftOS device (For example Hey Mycroft, start spotify).</p>
|
||||
- type: label
|
||||
label: <hr><br><strong>Airplay audio player (v1)</strong><p>AirPlay is a proprietary protocol stack/suite developed by Apple Inc. that allows wireless streaming between devices of audio, video, device screens, and photos, together with related metadata.</p>
|
||||
- name: airplay
|
||||
type: checkbox
|
||||
label: Enabled
|
||||
value: "false"
|
||||
- type: label
|
||||
label: <br><strong>Spotify Connect</strong><p>Make your Mycroft device available as Spotify Connect device so you can select it as possible output device from within the Spotify app. Be aware this only makes it available within the app, if you want to control spotify by voice you need to install the Spotify skill and configure it.</p>
|
||||
- name: spotifyd
|
||||
type: checkbox
|
||||
label: Enabled
|
||||
value: "false"
|
||||
- type: label
|
||||
label: <br><strong>Bluetooth speaker</strong><p>Make your Mycroft device available as bluetooth speaker. With this enabled you can pair your phone or other device and use your Mycroft as sound output. It should ask for a PIN, which is 0000.</p>
|
||||
- name: btspeaker
|
||||
type: checkbox
|
||||
label: Enabled
|
||||
value: "false"
|
||||
- type: label
|
||||
label: <br><strong>Snapcast client</strong><p>Make your Mycroft device available as Snapcast client. With this enabled you can configure your device as multiroom audio playing device. Anything played on the network via Snapcast server will be played on the device. (NOTE This still needs to be configured on an OS level through SSH and configuration files)</p>
|
||||
- name: snapclient
|
||||
type: checkbox
|
||||
label: Enabled
|
||||
value: "false"
|
||||
- name: MycroftOS system configuration
|
||||
fields:
|
||||
- type: label
|
||||
label: <p>MycroftOS is based on a minimalistic linux OS called Buildroot. However, although small and minimalistic in size, MycroftOS comes with certain linux services and applications. This is for advanced users that would like to tinker with their box and or do more with it than only Mycroft related things.</p>
|
||||
- type: label
|
||||
label: <br><strong>Secure Shell (SSH)</strong><p>Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network.[1] Typical applications include remote command-line, login, and remote command execution.</p>
|
||||
- name: sshd
|
||||
type: checkbox
|
||||
label: Enabled
|
||||
value: "true"
|
@ -1 +0,0 @@
|
||||
Subproject commit 6affba69d1bc42d93b29ad89a181c9402b226c35
|
@ -1 +0,0 @@
|
||||
Subproject commit d98871d8cac30534f08a3ea846f26a413d8a23be
|
@ -1 +0,0 @@
|
||||
Subproject commit 6950c592735f4082ce8ac2f7f0be5835d96b0979
|
Loading…
x
Reference in New Issue
Block a user