ygerlovin
(Yakov Gerlovin)
September 28, 2021, 10:19pm
1
Hi,
Iβm getting the following error when trying to generate device config
smartthings.exe presentation:device-config:generate SmartThings-smartthings-ZLL_RGBW_Bulb
Error: Request failed with status code 500: {"requestId":"D5326E5D-2EC2-4981-8B20-D1E47EDF74B2","error":{"code":"UnexpectedError","message":"A non-recoverable error condition
occurred.","details":[]}}
However, presentation works fine:
smartthings.exe presentation SmartThings-smartthings-ZLL_RGBW_Bulb SmartThings
Basic Information
βββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β Presentation ID β SmartThings-smartthings-ZLL_RGBW_Bulb β
β Manufacturer Name β SmartThings β
β Icon URL β β
βββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ
Dashboard States
ββββββββββββββββββββ¬βββββββββββββββ¬ββββββββ
β Label β Alternatives β Group β
ββββββββββββββββββββΌβββββββββββββββΌββββββββ€
β {{switch.value}} β 2 β β
ββββββββββββββββββββ΄βββββββββββββββ΄ββββββββ
I tried several other devices and observed the same behavior.
What am I missing?
Thanks
iquix
(Jaewon Park)
September 29, 2021, 7:49am
2
smartthings.exe presentation:device-config:generate ID
where ID is the profile id (or legacy DTH id)) , not the name of the presentation.
You have to generata a profile or DTH before executing this command.
smartthings.exe presentation SmartThings-smartthings-ZLL_RGBW_Bulb SmartThings
shows the predefined presentation created by SmartThings company.
2 Likes
nayelyz
(SmartThings Developer Support)
September 29, 2021, 2:24pm
3
Do you want to create a βcopyβ of this presentation to use it in Edge drivers?
If so, you need to add the JSON flag to this command:
smartthings.exe presentation SmartThings-smartthings-ZLL_RGBW_Bulb SmartThings -j
This way, youβll see which capabilities are included in each view and check if some properties were modified.
Then, you have to generate your presentation by sending the profile ID (found in the device list properties when your device is installed). Eg:
smartthings.exe presentation:device-config:generate xxxx-xxxxx-xxxx-xxx -j
After this, you need to make the corresponding changes, eg. I see that the range of ColorTemperature
was modified to 2700 - 6500
Once itβs complete, you create the presentation using:
smartthings.exe presentation:device-config:create -i newDevConfigPres.json
1 Like
ygerlovin
(Yakov Gerlovin)
October 1, 2021, 1:49pm
4
@iquix thank you very much for your help
I was using VID instead of profile id.
ygerlovin
(Yakov Gerlovin)
October 1, 2021, 1:58pm
5
@nayelyz , thanks. I donβt want to create a copy, just take a glance to see how it should look like.
Is generating device config from json and yml works the same?
device-config:generate
has an option to work both JSON and YML files, but I never have seen someone recommending to use -y flag. Is there any reason for that?
Thanks
nayelyz
(SmartThings Developer Support)
October 1, 2021, 2:07pm
6
Yes, itβs the same.
No, itβs just because for some devs, JSON is the common format, but you can use the one you prefer
1 Like