There is a tutorial example for an automation using the new API here.
I can get through it and see that smartthings is communicating with my webhook but it ultimately fails, probably because what I see on the form doesn’t match the instructions in one of the steps.
The instructions say:
-
For the Scope , click on Settings and select the following scopes:
r:devices:*
x:devices:*
r:schedules
w:schedules
Well, there is no Settings button, but I think they mean the Add button. When I click it I see a list of scopes which include r:devices.* and x:devices.* but r:schedules and w:schedules are not there.
If I just select the devices scopes and complete the rest of the instructions, when I try to install the automation, I can see the output of my webhook doing a configuration/installation step but the phone says Network/Server error and the webhook output includes the lines:
permissions:
- r:schedules
- w:schedules
which I’m guessing means that it’s complaining about no schedules scopes being provided by smartthings.
The full output is here.
$ npm start
> weather-color-light-SmartApp@1.0.0 start /Users/chet/prj/weather-color-light-smartapp-nodejs
> node server.js
Open: http://127.0.0.1:3005
CONFIGURATION lifecycle. Request body:
lifecycle: CONFIGURATION
executionId: 4bcd7ecc-fa58-f182-bbdb-4d4ec80413e7
locale: en
version: 0.1.0
client:
os: android
version: 1.7.20-25
language: en
configurationData:
installedAppId: 12cb52be-a74c-44d0-88b6-db5472a1b221
phase: INITIALIZE
pageId:
previousPageId:
config:
settings:
CONFIGURATION response:
configurationData:
initialize:
name: Weather bulb color
description: Bulb color by current temp
id: app
permissions:
- r:schedules
- w:schedules
firstPageId: 1
PING lifecycle. Request body:
lifecycle: PING
executionId: E5E199B1-6F81-4DC7-B8E7-4B55CB2C418C
locale: en
version: 0.1.0
pingData:
challenge: 301be901-3c2c-4d86-b011-e83fc15bf814
settings:
CONFIGURATION lifecycle. Request body:
lifecycle: CONFIGURATION
executionId: 7a1786bf-27d0-bac4-247f-26d1d5209cb3
locale: en
version: 0.1.0
client:
os: android
version: 1.7.20-25
language: en
configurationData:
installedAppId: 12cb52be-a74c-44d0-88b6-db5472a1b221
phase: INITIALIZE
pageId:
previousPageId:
config:
settings:
CONFIGURATION response:
configurationData:
initialize:
name: Weather bulb color
description: Bulb color by current temp
id: app
permissions:
- r:schedules
- w:schedules
firstPageId: 1
CONFIGURATION lifecycle. Request body:
lifecycle: CONFIGURATION
executionId: 4ac2485f-db65-f64c-e0bd-3afe19e21f13
locale: en
version: 0.1.0
client:
os: android
version: 1.7.20-25
language: en
configurationData:
installedAppId: 12cb52be-a74c-44d0-88b6-db5472a1b221
phase: INITIALIZE
pageId:
previousPageId:
config:
settings:
CONFIGURATION response:
configurationData:
initialize:
name: Weather bulb color
description: Bulb color by current temp
id: app
permissions:
- r:schedules
- w:schedules
firstPageId: 1
UNINSTALL lifecycle. Request body:
lifecycle: UNINSTALL
executionId: 42093ba2-12fb-6ed8-b87a-d8ffda1ad20e
locale: en
version: 0.1.0
uninstallData:
installedApp:
installedAppId: 12cb52be-a74c-44d0-88b6-db5472a1b221
locationId: b1c9b96b-1170-4278-adde-a29987ff2a77
config:
permissions:
(empty array)
settings:
Why can’t I see the schedules scopes?
Thanks