Philips Hue Tap Dial Switch - ZHA

Thanks for the suggestions but no luck yet.

The error print is here:
zigpy/zigpy/zcl at 6fe13fa7e59665bf9d12aa375c44dc3cd3b92d66 · zigpy/zigpy · GitHubinit.py#L230

I added debug prints to print the commands but both the server and client command arrays are empty.

Should I have added some cluster configuration myself or should those “just work”?

Thanks to the very helpful people at the HA’s Discord server’s zigbee channel, I got my setup to work! Although at the end it seems that it was just about pairing it enough many times that it happens to work. I think initially HA wasn’t able to query all the information from the Tap Dial so it didn’t know what to expect from the device. I think that’s visible in the “reconfigure” as e.g the OnOff failed there always.

But I was able to update my FW from 0x02003b13 to 0x02003b19 with HA, even though it probably didn’t affect anything here.

And maybe we even get a quirk for the RDM002 at some point so that its buttons show up correctly.

@apollo1220 Thanks to you too, you also helped me a lot here!

1 Like

How did you update the firmware? Thx

Instructions for OTA updates are here:

Basically you add this to your configration.yaml, add the FW file there and reboot:

zha:
  zigpy_config:
    ota:
      otau_directory: /path/to/your/ota/folder

It was a bit unclear to me though how to trigger the update. I.e. should the device do it automatically. I did eventually use the zha toolkit’s ota_notify for it:

But I’m not sure if that was needed. It took 34 minutes(!) for the FW to be uploaded to the Tap Dial. And maybe 25% of the battery.

The FW link is mentioned here:

I didn’t rename it, just copied it to the ota directory I created.

2 Likes

Thank you for blueprint.
Is there and option to execute script?

Or can I create Automation and handle events like First button clicked, hold down, rotate left, rotate right wit amount of rotate?

I prefer to use button for scenes or script and hold function to control my blinds.

I can do it if i integrate it intk Hue Bridge, but there is no option to see how fast I rotated.

This one cannot be used for scripts as it uses the toggle service. But there was a variation made which calls full actions here.

There is a parameter which comes in from a spin that tells you how much spin to a degree. You can look at the dimming part of this blueprint for reference.

Amazing. Thank you for link.
That variations is good.
I just missing 2 options. Is there a way how can i create it?

  1. I dont want to turn off light to dim level 0. I prefere to 1%.

  2. I would like to setup dial options.
    Scenario: When light is off and when I turn dial left, i want turn on light to level 1%. WHen I turn right, I want 100%.
    So I just miss function to add action when you dial clockwise or counterclockwise.

Yes, that would be great indeed. So +1

The blueprint says “no compatible device was found”.
Dont really know what i’m doing wrong…?
The buttons work in regular automations.

ZHA, never mind, i need to learn… A lot :slight_smile:

It might be obvious but I’m really new to all this. I know the script only works for ZHA.
I have my Tap Dial visible in HA through the Philips Hue bridge. What exactly do I need to change to the blueprint to make it work for that type of integration?

The device filtering might need to change (not sure as I don’t have a Huge bridge). Then all the event triggers as well as event data would need adjusted to however the Hue events come through HA.

Can be blueprint adjus to work with zigbee2mqtt device?
So far this is best solution for Philips Tap Dial Switch.

Probably. I don’t use that and have no experience with it. But I don’t see any reason someone couldn’t adjust this to work with it.

@apollo1220 Thank your very much for sharing this very useful blueprint. It works like a charm. I have one question and would like to ask if you could give me a hint as to how I might be able to alter the blueprint to change the current behavior:

when I want to dim any of the 4 lights and the light is already on, it is first turned off when I select it before I can start dimming it.

How can I add a condition to check if the light I switch to is already on and if so leave it on and just enable dimming via the dial?

Thanks!

For each of the recall cases in the actions, you would need to add a choose or if-then which checks the lights current state first. If it’s on, just do the part where it sets the selected light.

Or even easier, just change the toggle service call to a turn_on service call. Then you would always have to turn off via dimming, but it wouldn’t turn off when you press.

1 Like

Thanks for the hint. I would like to be able to also toggle the lights with the button press so I am trying to implement the choose action but alas I am having a very rough time getting the choose part right. I tried vairous options but can’t get my head wraped around it. Would you be so kind and give me some more guidance?

  - choose:
      - conditions:
          - "{{ command == 'recall' }}"
          - "{{ scene == 1 }}"
        sequence:
          - choose:
            - conditions: "{{ is_state(!input 'first_light', 'off') }}"
              sequence:
                - service: homeassistant.toggle
                  target: !input "first_light"
          - choose:
              - conditions: "{{ current_light != none }}"
                sequence:
                  - service: input_text.set_value
                    target:
                      entity_id: !input "current_light"
                    data:
                      value: first_light

I would change it a bit. For the condition you have checking for the first_light being off, I would make that an AND for both the first_light being on and current_light being anything other then first_light. Then that would set current_light to first_light. Then you can fall through on the second choose to just toggle the first_light.

So that should result in, first_light is off, it will turn on.
First_light is on, but current_light isn’t first_light, current_light becomes first_light (enabling dimming)
First_light is on, but current_light is first_light, first_light will turn off.

I’d write out the formatted code, but I’m at work and don’t have time :grin:

1 Like

Thank you very much for your support and patiences. The logic makes sense but I am struggeling with the correct yaml formating and choose sequence syntax.

I currently have:

  - choose:
      - conditions:
          - "{{ command == 'recall' }}"
          - "{{ scene == 1 }}"
        sequence:
          - choose:
            - conditions: "{{ is_state(!input 'first_light', 'on') }}"
            - conditions: "{{ current_light != first_light }}"
              sequence:
                - service: input_text.set_value
                  target:
                    entity_id: !input "current_light"
                  data:
                    value: first_light   
          - choose:
              - conditions: "{{ current_light != none }}"
                sequence:
                  - service: homeassistant.toggle
                    target: !input "first_light"

But get the following error in the logs:

Blueprint Philips Tap Dial Switch Dim generated invalid automation with inputs OrderedDict([('remote', '155716c88273e5ca8560480cac6109c2'), ('first_light', OrderedDict([('entity_id', 'light.esstisch')])), ('second_light', OrderedDict([('entity_id', 'light.kuche')])), ('third_light', OrderedDict([('entity_id', 'light.wohnzimmer')])), ('current_light', 'input_text.philips_tab_dial_switch_helper')]): Expected a dictionary @ data['action'][1]['choose'][0]['sequence'][0]['choose'][0]['conditions'][0]. Got None extra keys not allowed @ data['action'][1]['choose'][0]['sequence'][0]['sequence']. Got None required key not provided @ data['action'][1]['choose'][0]['sequence'][0]['choose'][0]['sequence']. Got None

@ufulu you’re really close

  - choose:
      - conditions:
          - "{{ command == 'recall' }}"
          - "{{ scene == 1 }}"
        sequence:
          - choose:
            - conditions:
                - "{{ is_state(first_light, 'on') }}"
                - "{{ current_light != 'first_light' }}"
              sequence:
                - service: input_text.set_value
                  target:
                    entity_id: !input "current_light"
                  data:
                    value: first_light

An idea: To select the device you are dimming, double-click a button.
i.e. the dial does not dim the last device but the selected one. That way you can turn on/off the rest of the devices without changing that you are dim-control the primary device. Sistem can even remember the dim levels for all devices separately.