Compare commits
4 Commits
458c87e9dd
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 3258ba8496 | |||
| cde98cc95a | |||
| 6db947e7ca | |||
| 2a067b62fe |
@@ -3,11 +3,11 @@
|
|||||||
"title": "Hazard Warning Button",
|
"title": "Hazard Warning Button",
|
||||||
"questions": [
|
"questions": [
|
||||||
"What is the Hazard Warning button",
|
"What is the Hazard Warning button",
|
||||||
"What happens when I press the warning button"
|
"What happens when I press the warning button",
|
||||||
|
"What does the warning button do"
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
"Hazard Warning button will activate the Hazard lights"
|
"Pressing the Hazard Warning button will activate the Hazard lights"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rear.defogger": {
|
"rear.defogger": {
|
||||||
@@ -17,8 +17,7 @@
|
|||||||
"How do I defog the rear window and mirror"
|
"How do I defog the rear window and mirror"
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
"It will defog the rear windows and mirrors",
|
"It defogs the rear windows and mirrors. Press the rear defogger and heated door mirror button to defog the rear window and mirrors when the ignition switch is in on"
|
||||||
"Press the rear defogger and heated door mirror button to defog the rear window and mirrors when the ignition switch is in on"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"heating.system": {
|
"heating.system": {
|
||||||
@@ -50,11 +49,12 @@
|
|||||||
"title": "Parking Break",
|
"title": "Parking Break",
|
||||||
"questions": [
|
"questions": [
|
||||||
"What is the use of Parking Break",
|
"What is the use of Parking Break",
|
||||||
|
"What is the use of Parking brake",
|
||||||
|
"Where can I find the parking brake",
|
||||||
"Where can I find the parking break"
|
"Where can I find the parking break"
|
||||||
],
|
],
|
||||||
"answers": [
|
"answers": [
|
||||||
"This button is used to keep vehicle stationary when it is parked. It can be applied manually or automatically release it",
|
"This button is used to keep vehicle stationary when it is parked. It can be applied manually or automatically release it. You can find it in the compartment between the seat on the front."
|
||||||
"You can find it in the compartment between the seat on the front"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"speed.manual.shift.mode": {
|
"speed.manual.shift.mode": {
|
||||||
|
|||||||
4
car-mode-switches-skill/.gitignore
vendored
Normal file
4
car-mode-switches-skill/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
__pycache__/
|
||||||
|
*.qmlc
|
||||||
|
settings.json
|
||||||
|
|
||||||
22
car-mode-switches-skill/README.md
Normal file
22
car-mode-switches-skill/README.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# <img src="https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/map-signs.svg" card_color="#FD9E66" width="50" height="50" style="vertical-align:bottom"/> Car Mode Switches
|
||||||
|
Switches to various modes from audio
|
||||||
|
|
||||||
|
## About
|
||||||
|
Switches to various modes from audio
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
* "Enable pet mode"
|
||||||
|
* "Start pet mode"
|
||||||
|
* "Turn on pet mode"
|
||||||
|
* "Enable child mode"
|
||||||
|
* "Start child mode"
|
||||||
|
* "Turn on child mode"
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
Firewalkers
|
||||||
|
|
||||||
|
## Category
|
||||||
|
**Productivity**
|
||||||
|
|
||||||
|
## Tags
|
||||||
|
|
||||||
37
car-mode-switches-skill/__init__.py
Normal file
37
car-mode-switches-skill/__init__.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
from mycroft import MycroftSkill, intent_file_handler
|
||||||
|
import requests
|
||||||
|
|
||||||
|
def emit(osd_url, event, data):
|
||||||
|
json = {
|
||||||
|
"event": event,
|
||||||
|
"data": data
|
||||||
|
}
|
||||||
|
print(json)
|
||||||
|
return requests.post(osd_url, json=json)
|
||||||
|
|
||||||
|
|
||||||
|
class CarModeSwitches(MycroftSkill):
|
||||||
|
def __init__(self):
|
||||||
|
MycroftSkill.__init__(self)
|
||||||
|
|
||||||
|
@intent_file_handler('switches.mode.pet.intent')
|
||||||
|
def pet_mode(self, message):
|
||||||
|
url = self.settings.get("OSD_API", "http://localhost:5050/send")
|
||||||
|
emit(url, "switchPlugin", {"plugin": "petMode"})
|
||||||
|
self.speak_dialog('switches.mode.pet')
|
||||||
|
|
||||||
|
@intent_file_handler('switches.mode.smart_home.intent')
|
||||||
|
def smart_home(self, message):
|
||||||
|
url = self.settings.get("OSD_API", "http://localhost:5050/send")
|
||||||
|
emit(url, "switchPlugin", {"plugin": "smartHome"})
|
||||||
|
self.speak_dialog('switches.mode.smart_home')
|
||||||
|
|
||||||
|
@intent_file_handler('switches.mode.maps.intent')
|
||||||
|
def maps(self, message):
|
||||||
|
url = self.settings.get("OSD_API", "http://localhost:5050/send")
|
||||||
|
emit(url, "switchPlugin", {"plugin": "maps"})
|
||||||
|
self.speak_dialog('switches.mode.maps')
|
||||||
|
|
||||||
|
|
||||||
|
def create_skill():
|
||||||
|
return CarModeSwitches()
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Showing maps
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
Enable maps
|
||||||
|
Start maps
|
||||||
|
Turn on maps
|
||||||
|
Display maps
|
||||||
|
Enable map
|
||||||
|
Start map
|
||||||
|
Turn on map
|
||||||
|
Display map
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Turning on pet mode
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Enable pet mode
|
||||||
|
Start pet mode
|
||||||
|
Turn on pet mode
|
||||||
|
Enable child mode
|
||||||
|
Start child mode
|
||||||
|
Turn on child mode
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Showing garage view
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Enable smart home
|
||||||
|
Start smart home
|
||||||
|
Turn on smart home
|
||||||
|
Show me my garage
|
||||||
|
Show me garage
|
||||||
|
Show me my house
|
||||||
10
car-mode-switches-skill/settingsmeta.yaml
Normal file
10
car-mode-switches-skill/settingsmeta.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
skillMetadata:
|
||||||
|
sections:
|
||||||
|
- name: API Paths
|
||||||
|
fields:
|
||||||
|
- name: OSD_API
|
||||||
|
type: text
|
||||||
|
label: OSD API URL
|
||||||
|
value: "http://localhost:5050/send"
|
||||||
|
placeholder: "http://localhost:5050/send"
|
||||||
4
car-smart-home-lights-skill/.gitignore
vendored
Normal file
4
car-smart-home-lights-skill/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
__pycache__/
|
||||||
|
*.qmlc
|
||||||
|
settings.json
|
||||||
|
|
||||||
22
car-smart-home-lights-skill/README.md
Normal file
22
car-smart-home-lights-skill/README.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# <img src="https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/lightbulb.svg" card_color="#FEE255" width="50" height="50" style="vertical-align:bottom"/> Car Smart Home Lights
|
||||||
|
Turns on/off the lights
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
* "Turn on lights"
|
||||||
|
* "Open the lights"
|
||||||
|
* "Turn the lights on"
|
||||||
|
* "Open garage lights"
|
||||||
|
* "Turn the garage lights on"
|
||||||
|
* "Turn on the garage lights"
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
Firewalkers
|
||||||
|
|
||||||
|
## Category
|
||||||
|
**IoT**
|
||||||
|
|
||||||
|
## Tags
|
||||||
|
|
||||||
24
car-smart-home-lights-skill/__init__.py
Normal file
24
car-smart-home-lights-skill/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
from mycroft import MycroftSkill, intent_file_handler
|
||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
class CarSmartHomeLights(MycroftSkill):
|
||||||
|
def __init__(self):
|
||||||
|
MycroftSkill.__init__(self)
|
||||||
|
|
||||||
|
@intent_file_handler('lights.on.intent')
|
||||||
|
def turn_on_lights(self, message):
|
||||||
|
lights = self.settings.get("LIGHTS_API", "http://192.168.1.51:5000/")
|
||||||
|
requests.get(f"{lights}/on")
|
||||||
|
self.speak_dialog('lights.on')
|
||||||
|
|
||||||
|
@intent_file_handler('lights.off.intent')
|
||||||
|
def turn_off_lights(self, message):
|
||||||
|
lights = self.settings.get("LIGHTS_API", "http://192.168.1.51:5000/")
|
||||||
|
requests.get(f"{lights}/off")
|
||||||
|
self.speak_dialog('lights.off')
|
||||||
|
|
||||||
|
|
||||||
|
def create_skill():
|
||||||
|
return CarSmartHomeLights()
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Turning off the lights
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Turn off lights
|
||||||
|
Open the lights
|
||||||
|
Turn the lights off
|
||||||
|
Open garage lights
|
||||||
|
Turn the garage lights off
|
||||||
|
Turn off the garage lights
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Turning on the lights
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Turn on lights
|
||||||
|
Open the lights
|
||||||
|
Turn the lights on
|
||||||
|
Open garage lights
|
||||||
|
Turn the garage lights on
|
||||||
|
Turn on the garage lights
|
||||||
10
car-smart-home-lights-skill/settingsmeta.yaml
Normal file
10
car-smart-home-lights-skill/settingsmeta.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
skillMetadata:
|
||||||
|
sections:
|
||||||
|
- name: API Paths
|
||||||
|
fields:
|
||||||
|
- name: LIGHTS_API
|
||||||
|
type: text
|
||||||
|
label: Lights API Base Path
|
||||||
|
value: "http://192.168.1.51:5000/"
|
||||||
|
placeholder: "http://192.168.1.51:5000/"
|
||||||
Reference in New Issue
Block a user