change to using skill settings instead of old config (#72)
Signed-off-by: Håvard Moen <post@haavard.name>pull/73/head
parent
965067e1b9
commit
a09bf3b1ee
15
README.md
15
README.md
|
@ -64,19 +64,6 @@ cd skill-openhab
|
|||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Add the block below to your `mycroft.conf` file:
|
||||
|
||||
```json
|
||||
"openHABSkill": {
|
||||
"host": "openHAB server ip",
|
||||
"port": "openHAB server port"
|
||||
}
|
||||
```
|
||||
|
||||
Restart mycroft for the changes to take effect.
|
||||
|
||||
## Examples
|
||||
* " Hey Mycroft, turn on Diningroom Light"
|
||||
* "Hey Mycroft, switch off Kitchen Light"
|
||||
|
@ -106,4 +93,4 @@ Restart mycroft for the changes to take effect.
|
|||
#smarthome
|
||||
#IoT
|
||||
#Automation
|
||||
#opensource
|
||||
#opensource
|
||||
|
|
|
@ -48,7 +48,7 @@ class openHABSkill(MycroftSkill):
|
|||
def __init__(self):
|
||||
super(openHABSkill, self).__init__(name="openHABSkill")
|
||||
|
||||
self.url = "http://%s:%s/rest" % (self.config.get('host'), self.config.get('port'))
|
||||
self.url = "http://%s:%s/rest" % (self.settings.get('host'), self.settings.get('port'))
|
||||
|
||||
self.command_headers = {"Content-type": "text/plain"}
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
name: openHAB
|
||||
skillMetadata:
|
||||
sections:
|
||||
- name: Connection
|
||||
fields:
|
||||
- name: host
|
||||
label: openHAB server IP
|
||||
type: text
|
||||
- name: port
|
||||
label: openHAB server port
|
||||
type: number
|
||||
value: 8080
|
Reference in New Issue