w35l3y
(Wesley Menezes)
January 5, 2023, 12:20pm
1
A user reported this driver didn’t work for him.
We checked the logs and got it:
[string “tuyaEF00_generic_defaults.lua”]:88: attempt to call a nil value (method ‘get_child_by_parent_assigned_key’)
So we found out he uses an old firmware (43.5)
But there wasn’t any warning or something in the screen. It just failed silently.
gasDetectorDatapoints = "child-gasDetector-v1",
veryFineDustSeDatapoints = "child-veryFineDustSensor-v1",
formaldehydeMeDatapoints = "child-formaldehydeMeasurement-v1",
humidityMeasurDatapoints = "child-relativeHumidityMeasurement-v1",
illuminanceMeaDatapoints = "child-illuminanceMeasurement-v1",
keypadInputDatapoints = "child-keypadInput-v1",
momentaryStdDatapoints = "child-momentary-v1",
motionSensorDatapoints = "child-motionSensor-v1",
occupancySensoDatapoints = "child-occupancySensor-v1",
powerMeterDatapoints = "child-powerMeter-v1",
presenceSensorDatapoints = "child-presenceSensor-v1",
smokeDetectorDatapoints = "child-smokeDetector-v1",
temperatureMeaDatapoints = "child-temperatureMeasurement-v1",
thermostatCoolDatapoints = "child-thermostatCoolingSetpoint-v1",
thermostatHeatDatapoints = "child-thermostatHeatingSetpoint-v1",
thermostatModeDatapoints = "child-thermostatMode-v1",
thermostatOperDatapoints = "child-thermostatOperatingState-v1",
tvocMeasuremenDatapoints = "child-tvocMeasurement-v1",
valveDatapoints = "child-valve-v1",
voltageMeasureDatapoints = "child-voltageMeasurement-v1",
waterSensorDatapoints = "child-waterSensor-v1",
I would like to report the user that its action didn’t go well for some reason.
How I could accomplish that ?
I can use pcall
at create_child
to catch the error, but how can I send this to the screen ?
fido
(Mike )
January 5, 2023, 1:03pm
2
@nayelyz may be able to help your issue
1 Like
nayelyz
(SmartThings Developer Support)
January 5, 2023, 3:16pm
3
You cannot send a notification from the Edge driver, so, in this case, the device was never created, right?
As you mentioned the user uses firmware 43.5, it means he has a Wi-Fi Hub which is the only one with that firmware version, so, you need to mention that having v45 or higher is a requirement to use your driver which implements the parent-child model.
Thanks for the tag, @fido
1 Like
w35l3y
(Wesley Menezes)
January 5, 2023, 3:22pm
4
Where is the best place to mention that the driver requires it ?
I tried to use these fields, but I don’t know how to fill them.
Descrição → Description
Informações de suporte → Support Informations
w35l3y
(Wesley Menezes)
January 5, 2023, 3:30pm
5
The device is created, but the child device isn’t because I check if the child device exists before calling try_create_device
.
In this case, child devices are created in the preferences.
nayelyz
(SmartThings Developer Support)
January 5, 2023, 3:33pm
6
Then, you could use a custom capability to show a message of “success” or “failure” when they request the creation of the child device.
1 Like
w35l3y
(Wesley Menezes)
January 5, 2023, 3:37pm
7
What about these fields ?
Do you know how I could define some texts there ?
nayelyz
(SmartThings Developer Support)
January 5, 2023, 3:59pm
9
Thanks, @philh30
Just to clarify, @w35l3y , they cannot change dynamically as they are part of the config.yaml
file.
1 Like
csstup
(Corey Stup)
January 5, 2023, 6:52pm
10
It would be nice if one of the permissions of a driver was version or other firmware capability flags.
2 Likes