Skip to content

Possibility to also add Plejd wall switch WPH-01? #24

@NonjSAme

Description

@NonjSAme

Hi!

I've been playing around with Plejd wall switch WPH-01 for a couple of days and trying to get it to work with my RPi 3B+/HA v 101.2 setup. I don't have any of the Plejd dimmers or controllers, just the wall switch. And though I thus couldn't set it up completely enough in the iOS app, to test it, at least I managed to find a crypto key from the iPhone back-up files. (Even though it wasn't stored in the same place as described here by iCarl)

So far I've managed to both get hcitool lescan to find the P mesh - but also the plejd custom component to - at least occasionally - find the device. But... as the Plejd component currently is only made up for lights and controllers, it of course brakes when it finds this switch device it doesn't understand anything about. At the moment this is what I get repeatedly in the log file:

2019-11-25 11:26:40 DEBUG (Thread-4) [custom_components.plejd.light] no match for device '00' (b'00011000160b03170a')

Unfortunately I have no clue what the device response b'00011000160b03170a' means. Besides it's some form of protocol for the device. But I thought i'd try repeatedly and in sequence press buttons in the order 'top right' 'top left' 'bottom left' and 'bottom right' to see what happened. And this is the result from the log file:

nov 25 13:49:40 hass[474]: 2019-11-25 13:49:40 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b02140a')

nov 25 13:49:46 hass[474]: 2019-11-25 13:49:46 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03140a')

nov 25 13:49:47 hass[474]: 2019-11-25 13:49:47 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03100a')

nov 25 13:49:54 hass[474]: 2019-11-25 13:49:54 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b030d0a')

nov 25 13:50:05 hass[474]: 2019-11-25 13:50:05 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03090a')

nov 25 13:50:16 hass[474]: 2019-11-25 13:50:16 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03060a')

nov 25 13:50:22 hass[474]: 2019-11-25 13:50:22 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b01060a')

nov 25 13:50:34 hass[474]: 2019-11-25 13:50:34 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b01020a')

nov 25 13:50:45 hass[474]: 2019-11-25 13:50:45 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00020a')

nov 25 13:50:50 hass[474]: 2019-11-25 13:50:50 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00ff09')

nov 25 13:50:53 hass[474]: 2019-11-25 13:50:53 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00fb09')

nov 25 13:51:01 hass[474]: 2019-11-25 13:51:01 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00f809')

nov 25 13:51:08 hass[474]: 2019-11-25 13:51:08 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b02f809')

nov 25 13:52:01 hass[474]: 2019-11-25 13:52:01 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03f809')

nov 25 13:52:26 hass[474]: 2019-11-25 13:52:26 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b01f809')

nov 25 13:52:48 hass[474]: 2019-11-25 13:52:48 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00f809')

nov 25 13:53:00 hass[474]: 2019-11-25 13:53:00 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00f409')

nov 25 13:53:14 hass[474]: 2019-11-25 13:53:14 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b02f409')

nov 25 13:53:22 hass[474]: 2019-11-25 13:53:22 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b02f109')

nov 25 13:53:34 hass[474]: 2019-11-25 13:53:34 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03f109')

nov 25 13:53:37 hass[474]: 2019-11-25 13:53:37 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03ed09')

nov 25 13:53:44 hass[474]: 2019-11-25 13:53:44 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b01ed09')

nov 25 13:53:52 hass[474]: 2019-11-25 13:53:52 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00ea09')

nov 25 13:53:57 hass[474]: 2019-11-25 13:53:57 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b02ea09')

nov 25 13:54:02 hass[474]: 2019-11-25 13:54:02 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03ea09')

nov 25 13:54:15 hass[474]: 2019-11-25 13:54:15 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b01ea09')

nov 25 13:54:20 hass[474]: 2019-11-25 13:54:20 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00ea09')

nov 25 13:54:41 hass[474]: 2019-11-25 13:54:41 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b02ea09')

nov 25 13:54:57 hass[474]: 2019-11-25 13:54:57 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b03ea09')

nov 25 13:55:12 hass[474]: 2019-11-25 13:55:12 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b01ea09')

nov 25 13:55:28 hass[474]: 2019-11-25 13:55:28 DEBUG (Thread-5) [custom_components.plejd.light] no match for device '00' (b'00011000160b00ea09')

(Note: for easier reading, I've only listed all those occurrences changed from the previous one here!)

Obviously byte 14 (perhaps 13 and 14) is directly connected to the buttons pressed. But I don't understand byte 15-18 that changes seemingly intermittent...

What are the possibilities for also including the wall switch as a known device in the code?
I guess it should be implemented as a binary sensor? Or am I wrong?
(As you probably understand, I'm just not so experienced programmer - yet at least...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions