I have a switch that also has an endpoint that I’d like to break out as a child device. I can create the child device but then it all goes sideways. For one thing, the child device shows up as “unavailable” after a bit of time. I’m not quite positive how to address that but I think it’s related to the parent device issues I’m having. The child device will call parent routines and such, but the parent won’t actually send any commands to the device, either the root or the child.
Are there any good docs on this anywhere? Or anyone have any suggestions?
Note that all of the above is the classic app so far.
Interesting read here. I’ve had to do something like this, except I had to have hubaction calls in the parent in order to receive a response. Parent is a music server and handles all the children player activity.
So in my situation I have the child call a parent command requesting an action using
Parent then takes that and builds the appropriate hubaction. It then parses the response. Since I can determine the child involved in the response I can then send status updates through
I’m pretty sure I had to explicitly define updateChild command for this to work. The child device then does it’s updating from the info received.
These aren’t the exact names I used, can’t remember off the top of my head. There was almost no documentation on how to do this, it took a lot of trial and error due to the async nature of hubaction responses.
Here’s the link to actual code if you want to see exactly what I did. The Server is the parent and the player is the child.