I've been using the same code for years for creating root/parent devices and child devices.
When I create the root, I also do:
When I then create child devices I do (for each child):
I had better luck by also adding this:
... but WHY has this started to be a problem?! 
... and what am I doing different from others?
The user can fix it by deleting all devices, restart HomeSeer, and then set it up again. My code stays the same, but the restart makes a difference for some reason.
When I create the root, I also do:
Code:
'Setting it as a root device rootDevice.Relationship(hs) = HomeSeerAPI.Enums.eRelationship.Parent_Root
Code:
childDevice.Relationship(hs) = HomeSeerAPI.Enums.eRelationship.Child rootDevice.AssociatedDevice_Add(hs, childDevice.Ref(hs))
Code:
childDevice.AssociatedDevice_ClearAll(hs) childDevice.AssociatedDevice_Add(hs, rootDevice.Ref(hs))

... and what am I doing different from others?
The user can fix it by deleting all devices, restart HomeSeer, and then set it up again. My code stays the same, but the restart makes a difference for some reason.
Comment