[BETA] Hue Dimmer Switch DTH (No Hue bridge) rewritten

@BazGee
In my case, enabling insecure rejoin disables secure mode, as you can see in those capture images

The latest iOS app update has suddenly fixed my ‘secure mode being backwards’ issue. It is as if someone is watching! :stuck_out_tongue:

Anyway my ZigBee Devices are still disconnecting! :frowning:

After more testing I can confirm, a new battery in the hue dimmer switch is dead after 2 days. So this seems like the zigbee device is eating up the battery very quickly…

I cannot get the switch to pair with Smarthtings, it just isn’t finding it. I don’t know what I could be doing wrong.

Anyone else seeing that when you push the button once, it sends SEVERAL Pushed/Released Commands

have tried this device handler and it does work but keep getting dropouts like the original ZHA device handler, no idea why, tired many things like changing the phillips hue zigbee chanel and wifi channel, I have 8 smartthings plugs spread around my house to give me a strong mesh connection.

My Smart hub is on zigbee channel 25, hue system is on channel 11 and 2.4ghz wifi is on channel 6, have tried multiple combinations of channels TNA so frustrating trying to get these small remotes to stay connected, they work fine direct with the hue system.

This device looks far better than the previous one as I now get the history in the smartthings app which I did not get with the previous device handler but for some reason if I dont use the dimmer swtich for say 5 - 10 minutes, I press it, get a green light but nothing happens, the next press is followed by a red light.

if I press the buttons on it a few times it will eventually reconnect and start working again which is quite annoying as when you are going to bed you dont want to stand there fiddling around till it works, really have no idea why this works for some people keeeps getting drop outs for others.

Any help or guidance in diagnosing the issue would be greatly apprecaited.

Here is some of the stats from the device page.

Metrics * Last Hop LQI: 120

  • Last Hop RSSI: -70
  • Received Messages From Device: 380
  • Received Messages From Device (Duplicates): 0
  • Messages Transmitted to Device: 310
  • Messages Transmitted to Device (Failures): 40
  • Updated Time: 2020-06-24 10:02 PM BST
    Data * application: 02
  • endpointId: 01
  • manufacturer: Philips
  • model: RWL021
  • zigbeeNodeType: SLEEPY_END_DEVICE

Exact same issue for me. I am currently waiting on support to change my zigbee channel and will report back.

@DeekB
Mine has better signal. I have 4 zigbee repeaters (wall switch, 2 zigbee bulbs, zigbee curtain) in the room where I use this device.

I am using ST V2 hub, channel 15, unsecure rejoin enabled.

Metrics * Last Hop LQI: 255

  • Last Hop RSSI: -70
  • Received Messages From Device: 2505
  • Received Messages From Device (Duplicates): 2
  • Messages Transmitted to Device: 1816
  • Messages Transmitted to Device (Failures): 685
  • Updated Time: 2020-06-25 12:45 오후 KST

Data * application: 02

  • endpointId: 01
  • manufacturer: Philips
  • model: RWL020
  • zigbeeNodeType: SLEEPY_END_DEVICE

Thanks, I only have 3 zibgee sockets in the room, I live in the UK and the light fittings in my house do not have a nuetral wire so I seem to be soemwhat limited on what p[roducts I can buy, I also have a V3 hub and I cannot change the channel on this.

One thing I noticed is there is a lot of failures coming out of messages being transmitted to the device.

I have a couple of HUE outdoor Motion sensors using a custom device handler and here are the stats from them.

  • Last Hop LQI: 128

  • Last Hop RSSI: -68

  • Received Messages From Device: 271

  • Received Messages From Device (Duplicates): 0

  • Messages Transmitted to Device: 261

  • Messages Transmitted to Device (Failures): 0

  • Updated Time: 2020-06-25 9:02 AM BST
    Data * zigbeeNodeType: SLEEPY_END_DEVICE

  • application: 02

  • endpointId: 02

  • manufacturer: Philips

  • model: SML002

  • Last Hop LQI: 140

  • Last Hop RSSI: -65

  • Received Messages From Device: 460

  • Received Messages From Device (Duplicates): 0

  • Messages Transmitted to Device: 435

  • Messages Transmitted to Device (Failures): 0

  • Updated Time: 2020-06-25 9:02 AM BST
    Data * application: 02

  • endpointId: 02

  • manufacturer: Philips

  • model: SML002

  • zigbeeNodeType: SLEEPY_END_DEVICE

Both of these are located outside of any rooms and they dont seem to have any failures and they never drop off the network but they are a bit larger so maybe they are better at not failing as they are a little larger, I also have multiple hue indoor sensors, I have heavily invested in the hue eco system prior to buying smartthings and everything just seems to work with hue, the bulbs are all currently connected via the hus bridgem wondering if bringing them direct into smartthings would make a differece.

@DeekB
I’m also using hue motion sensor directly connected to ST hub using custom DTH. I’ll take a look at hue motion sensor dth, and see if I could make an improvement.

1 Like

Thanks I really apprecaite this! I would really like to learn how to code\debug these device handlers myself.

I work in tech as a problem manager but previously from a support back ground. next step is getting into coding for me I think as it interests me.

moved some stuff aorund in the house and have managed to get one of the remotes to have a better signal,

Route This Device (45DB) SERVER POWER (509C) SmartThings Hub
Metrics * Last Hop LQI: 212
  • Last Hop RSSI: -47
  • Received Messages From Device: 335
  • Received Messages From Device (Duplicates): 0
  • Messages Transmitted to Device: 168
  • Messages Transmitted to Device (Failures): 16
  • Updated Time: 2020-06-26 4:05 PM BST|
    |Data|* application: 02
  • endpointId: 01
  • manufacturer: Philips
  • model: RWL021
  • zigbeeNodeType: SLEEPY_END_DEVICE|

Will see how it goes from here and report back, still not as strong a singla as yours but closer.

Even with the good signal above I get the same drop outs, have reverted back to the original device handler so I can monitor to see if I get the same errors like above.

“Messages Transmitted to Device (Failures)” <-- this is not related to signal strength. I think it is related to battery query command from my DTH, as refresh command, which device is not responding (since it’s a sleepy end device)
I’m thinking of removing refresh capability, and periodic automatic refresh from my DTH.

Once you have it updated let me know and I will go back to it, I am back on the original one from Stephen McLaughlin and the drop outs are not as bad but I do still get the failures’s to trasmit. will report back tomorrow with the stats but here they are for the last 6 hours for one of the remotes I am using.

  • Last Hop LQI: 196
  • Last Hop RSSI: -51
  • Received Messages From Device: 188
  • Received Messages From Device (Duplicates): 0
  • Messages Transmitted to Device: 31
  • Messages Transmitted to Device (Failures): 2
  • Updated Time: 2020-06-27 5:38 PM BST
    Data * zigbeeNodeType: SLEEPY_END_DEVICE
  • application: 02
  • endpointId: 01
  • manufacturer: Philips
  • model: RWL021

Hello again :slight_smile:

Been reading about device handlers all day and looking on various home automation forums to try and gain information around this dimmer switch, I am wondering if there is maybe a missing in cluster for the RWL021 model for the device handler, It seems that from reading on the forums most people with problems seem to have the later model RWL021 and not RWL020, from what I can find online the differences between the RWL021 and RWL020 are hardware revision differences for the circuit board itself and the software should be the same.

I am wondering if the device handler which you have written is sufficent for the RWL020 and not the RWL021, I assume the RWL021 may have extra communication properties that are required to be added to the device handler to prevent the drop outs we are seeing here.

I see people have managed to packet sniff the device using wireshark to get the relevant bindings and properties for the device and was wondering if anyone has ever done as such with the RWL021 model, I am currently interesting in doing so but need to do a lot more reading to understand how to execute this.

my 2 dimmers have just started working and no longer dropping out, totally astounded by this, I am running on the original device handler from Stephen McLaughlin. As above posts indicates I went back to the original device handler, the dimmer does not pair correctly unless you change the model to RWL021, I done this and paired the dimmer, I kept getting drop outs so I started removing certain parts of the code in the device handler to see what effect if any it would have, Anyway long story short it didnt have any effect on the drop outs, I kept getting the red light flashing every so often when I tried to use them, last night before I went to bed I pasted in the orginal device handler back in from github, It has the old model number in there (RWL020) and all the original code (unedited) I then got up this morning to find both of them worked straight away when using the dimmers and have worked flawlessly allnight tonight, I am totally astounded that they are working as the only thing that has changed really is the model info is using the old model number (I didnt need to re-pair them I just saved and published the code not realising I had left the old model number) I then went to bed.

I had ordered 2 Osram bulbs to use in place of my hue bulbs in the hope I can boost the signal but now I am not so sure it was even a signal issue as both have been working flawlessly all night, they have been left in the plastic magnet part overnight so maybe the mesh signal has sorted it out. Here is the stats from both the dimmers

  • Last Hop LQI: 188

  • Last Hop RSSI: -53

  • Received Messages From Device: 647

  • Received Messages From Device (Duplicates): 0

  • Messages Transmitted to Device: 176

  • Messages Transmitted to Device (Failures): 1

  • Updated Time: 2020-06-29 10:29 PM BST

  • Last Hop LQI: 152

  • Last Hop RSSI: -62

  • Received Messages From Device: 845

  • Received Messages From Device (Duplicates): 0

  • Messages Transmitted to Device: 205

  • Messages Transmitted to Device (Failures): 5

  • Updated Time: 2020-06-29 10:29 PM BST

it doesnt make any sense to me, the only thing is is different is the model in the device handler is now RWL020 rather than RWL021, but now they are working.