stephack
(Stephan H.)
January 9, 2018, 7:08pm
5
thoward1234:
I tried using a Composite Device Handler, but the sendEvent functionality from a Device Handler is unreliable (i.e. any commands after the sendEvent command are lost, and multiple sendEvent commands from a Handler method do not seem to be reliable). I was hoping a Smart App would do better.
This was not always the case with Composite DTH’s. A few of us have been seeing this unreliable event handling but this only started recently. May be related to your smarApp issue as well.
See threads below:
Hey everyone,
Ok, after talking to an ST engineer, we’ve found the issue and it explains why only Inovelli 2-Channel devices are affected.
Long story short, the calls to the child devices aren’t working properly.
In other words, the call to, “childDevice.sendEvent” is not returning anything and they have confirmed they are still having cloud issues (as you all know our custom handler operates in the cloud – vs locally – because it’s a custom handler)
For more info about the childDevice.sendEvent issues, please see here:
So, while I know this doesn’t help things work – it does explain why it’s not working (while your other non-multi-channel devices are).
Hang in there guys, we’ll all get through it together!
-Eric
The events show up, but there’s something else weird going on as if I setup a push event on a child device with SharpTools I don’t get the push events either (but I can query the device status and get the correct status). IIRC, ActionTiles is dependent on push events too, so I’d hazard a guess it’s related.
[image]
I’ll look into it further… maybe run some tests with the sample virtual composite DTH SmartThings put together as it could just be something fundamentally weird with composite devices and the way the child calls actions in the parent and the parent updates state in the children.
I have a DTH that has worked perfectly for the past year that suddenly stop updating properly a few days ago. For some reason I can’t send “switch” events to child devices. I can update all other custom attributes with sendEvents but not “switch” events. In the code below, it does not throw any errors in the logs but the “each loop” gets broken and does not update the switch attribute for all the child devices. If I remove the 2 lines (commented out below) the “each loop” completes. Anyone know what’s changed or how I can fix this?
def fanSync(whichFan) {
def children = getChildDevices()
children.each {child->
def childSpeedVal = child.getDataValue('speedVal')
if(childSpeedVal == whichFan) {
child.sendEvent(name:"fanSpeed", value:"on${childSpeedVal}")
…
1 Like