Homekit Beta - Child Device Support

I think that the problem it has with Homekit integration is that it uses the Metering child device driver which is not made by Hubitat. I think the guy who wrote this created the child driver in order to utilize the power metering which was not available in the native child device driver by Hubitat (Generic Component Switch).
I can only speak to myself but I do not really use the power metering and I will be happy with a solution that utilizes the Generic Component Switch for the child devices. If Hubitat as a Generic Component Switch with metering option this is awesome but I am not sure there is one.

Just found out that Hubitat has the Generic Component Metering Switch but I am not sure if this is the right one

I have no idea how much debugging I may need to do here, but Ive forced the basics over to the standard generic child device with the code here

You'll need to change the device handler for the parent to this one, and then you'll need to change the child devices to the Generic Component Switch. Let me know how you get on.

2 Likes

Thanks for looking into this @cjcharles . :+1:t2:

Im not sure it does actually.... and there is nothing published on their main github page or documentation (only the one with contributions, so may not be fully supported). Either way, there is a reasonable chance that the native way Hubitat works will allow this information to display in the Generic Switch device handler, even if it doesnt have a proper attribute for it.

1 Like

Thank @cjcharles ,
As it is becoming very late in my location (or should I say early morning :slight_smile: ) I will have to test and report tomorrow.

1 Like

Cool, Im sure we can get it working fairly easily as it still uses component/children in the same way.

For the sake of getting the driver properly listed on the forum I have republished the driver on my Fibaro FGS 22x page

I've changed the driver for the 223 to your modified one (and just appended the name in the code with 'CJ' so I can easily differentiate). I also changed the child drivers to Generic Component Switch.

Using 'On' 'Off' on the parent device switches both channels On/Off. However if I try and use the 'On' 'Off' in the child device it throws an error as shown.

I've deleted the child devices and in the parent device done a configure. That recreated the two child devices and automatically assigned the 'Generic Component Switch'. However they are still not controllable and throw the error:

1 Like

Sorry I was lazy, missed the definition. Have updated that now so maybe give it another go please? If not I'll do it properly at the weekend when I'm not tired after work.

1 Like

No problem I’ll give it a try and report back. Thanks

Edit: I'm getting the same error unfortunately. I've pasted the new driver over the old and saved, deleted the child devices. Configure on the parent recreates the two generic component switches but an On from the device gives the following output:

Shouldn't need to remove the children but I spotted the original driver used a slightly different command definition so have swapped over to the hubitat standard and that hopefully will get it working! But coding at midnight is never good!

2 Likes

@cjcharles - midnight coding worked. Thank you!

The two endpoints are now switchable independently and no longer log errors. Although its now using the Generic Component Switch rather than the Metering Switch Child Device, it does show power in the current states while On:

After the switch is turned off, 'power' goes to 0, then when I return to the device page later, the 'power' heading is no longer shown in current states (but is restored if I switch the device back on). That doesn't affect my use and I'm not sure whether that 'power : 0' should be persistent in Current States or not, but thought I'd mention it.

If you do update this on HPM, you might want to rename it in the code - 'Fibaro Double Switch' is the old Z Wave device, this Z Wave Plus one is 'Fibaro Double Switch 2'

@amithalp - I can confirm the individual child devices now show under "Switches' in the Hubitat Homekit beta app:

...and it all works from the Home app.

Thanks again @cjcharles

2 Likes

Good to hear. Will add to HPM with the updated name so its easy for people to find.

I dont have control of the child device persisting the power information as it is a Default device built into Hubitat, but the power information is still there in the parent as I understand it, so hopefully all ok.

2 Likes

I tested the new driver and did this process:
Installed using HPM - OK
Assigned the new driver to an existing parent device - OK
Manually changed the child devices from Metering Switch Child Device to Generic Component switch - had to be done manually - OK
Assigned the child device to Homekit integration - OK

All in all, a great job done. Thank you very much @cjcharles

3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.