Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xfinity Keypad XHK1-UE #4560

Closed
a1ad opened this issue Mar 11, 2021 · 298 comments · Fixed by #5168
Closed

Xfinity Keypad XHK1-UE #4560

a1ad opened this issue Mar 11, 2021 · 298 comments · Fixed by #5168

Comments

@a1ad
Copy link

a1ad commented Mar 11, 2021

Device

  • Product name: Xfinity Keypad XHK1-UE / URC4450BC0-X-R
  • Manufacturer: Universal Electronics Inc
  • Model identifier: URC4450BC0-X-R
  • Device type :
    • Switch (i think)

afbeelding

Screenshots

Required screenshots:

  • Endpoints and clusters of the node:
    deconz-basic

  • Node Info panel
    deconz-node

Power Configuration

afbeelding

Identify

afbeelding

Poll Control

afbeelding

Temperature measurement

afbeelding

ISA Zone

afbeelding

Diagnostics

afbeelding

OTAU

afbeelding

IAS ACE

afbeelding
afbeelding
afbeelding

Here is a Reddit post from someone that successfully added the keypad to zigbee2mqtt and with some more info.

Greets,

@Mimiix
Copy link
Collaborator

Mimiix commented Mar 11, 2021

@Smanar Would you like this one?

@Smanar
Copy link
Collaborator

Smanar commented Mar 11, 2021

Hu will need to create more field.

I have searched some information about this device, I think we need to create/use as field

  • config/armed = true/false
  • state/alert = last action like "armed" "emergency"

But do we need state/alarm ?
IDK it s a good idea to use this device as ZHAalarm, as he don't need to trigger alarm but more send armed/disarmed infoirmation.

And there is some comment about temperature and sensor ?

@a1ad
Copy link
Author

a1ad commented Mar 11, 2021

If it can send the 4 digit code to home assist that would be a great start. Let me know if i can help with something.
I think its a great little device and really nice to have.

@Smanar
Copy link
Collaborator

Smanar commented Mar 12, 2021

I think it s possible from that I m reading about it.
Do you have a linux machine to test code modification ?

@a1ad
Copy link
Author

a1ad commented Mar 12, 2021

Ofc, i have a fedora workstation or plenty of lxc servers on my proxmox host. The conbee is connected to the PI3B

@Smanar
Copy link
Collaborator

Smanar commented Mar 12, 2021

Ok so first try

You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin#install-deconz-development-package-optional-linux-only
So for you

sudo apt install deconz-dev
git clone --branch keypad https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

This code will do nothing, just create the entry in the API.
If you can show me the entry created to check how decone reconize the device ?
I can explain how to use the API if you need ?

@a1ad
Copy link
Author

a1ad commented Mar 12, 2021

Just on the pi or do i need a new Linux machine? I don't want to lose my ZB network of course.

@Smanar
Copy link
Collaborator

Smanar commented Mar 12, 2021

As you want, just need a linux OS (not docker), raspbian or other.
But yes if you have your production network on the proxmox, better to use the pi, on a new network, you can just switch the conbee 10mn, time of tests, and switch it again after.

Devices configuration are stored on the host, network configuration on the conbee.

@a1ad
Copy link
Author

a1ad commented Mar 12, 2021

Ok so first try

You have the procedure here https://github.com/dresden-elektronik/deconz-rest-plugin#install-deconz-development-package-optional-linux-only
So for you

sudo apt install deconz-dev
git clone --branch keypad https://github.com/Smanar/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

This code will do nothing, just create the entry in the API.
If you can show me the entry created to check how decone reconize the device ?
I can explain how to use the API if you need ?

Yeah, i need more info about the API, compilation is ok

@Smanar
Copy link
Collaborator

Smanar commented Mar 12, 2021

for API
long story > https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/
short story > http://IP:PORT/api/KEY/sensors

IP and PORT are the same than for phoscon
KEY is an API key, if you haven't one

curl http://127.0.0.1:80/api/ -X POST -d '{"devicetype": "TestKey"}'

@a1ad
Copy link
Author

a1ad commented Mar 12, 2021

There is no info in /sensors other than:
{ "1": { "config": { "configured": true, "on": true, "sunriseoffset": 30, "sunsetoffset": -30 }, "etag": "f306ae97bf6113b349f25bbb8354d014", "manufacturername": "Philips", "modelid": "PHDL00", "name": "Daylight", "state": { "dark": true, "daylight": false, "lastupdated": "2021-03-12T22:26:43.353", "status": 230, "sunrise": "2021-03-12T06:02:55", "sunset": "2021-03-12T17:41:17" }, "swversion": "1.0", "type": "Daylight", "uniqueid": "00:21:2e:ff:ff:04:09:f0-01" } }

the device is showing in deconz like you can see in the screenshots, but no entry in the phoscon app.

The port was 8080 and not 80 here

edit: I am using the beta in production (due to sonof mini ZB) and the current stable on the test server.
edit2: did i do something wrong?

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

The port was 8080 and not 80 here

If you are right, will be the same than you are using for phoscon.

edit: I am using the beta in production (due to sonof mini ZB) and the current stable on the test server.

The code is based on the last code on official, so will be the beta too.
But you are using another machine for test ?

Can you share the logs during inclusion ? On deconz/help/log with "info" and "info_l2" ?

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

The port was 8080 and not 80 here

If you are right, will be the same than you are using for phoscon.

edit: I am using the beta in production (due to sonof mini ZB) and the current stable on the test server.

The code is based on the last code on official, so will be the beta too.
But you are using another machine for test ?

Can you share the logs during inclusion ? On deconz/help/log with "info" and "info_l2" ?

Yes i use another VM, just to be safe.., i didnt need to include the device, when i switched the conbee to the new VM the devices where all there.

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

i didnt need to include the device, when i switched the conbee to the new VM the devices where all there.

You need, your device are still in the zigbee network (because it will be the same network, same mac adress, same network key, ect ....) but the device are not in the API. Devices are stored on the host, not the USB key.

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

  "2": {
    "config": {
      "battery": null,
      "offset": 0,
      "on": true,
      "reachable": true
    },
    "ep": 1,
    "etag": "71a295870418824acd1faea34c51b15a",
    "lastseen": "2021-03-13T15:32Z",
    "manufacturername": "Universal Electronics Inc",
    "modelid": "URC4450BC0-X-R",
    "name": "Temperature 2",
    "state": {
      "lastupdated": "none",
      "temperature": null
    },
    "type": "ZHATemperature",
    "uniqueid": "00:0d:6f:00:13:4f:61:39-01-0402"
  }

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

Ok, nice, and no ZHAAlarm one ?
will continu the code.

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

Nope
afbeelding

Thanks!

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

Ok do have updated the code

cd deconz-rest-plugin
git pull
qmake && make
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins

Now you will have a new sensor a ZHAswitch with a field "armed"

But I have lot of question :

  • does this device need ias enrollement.
  • do we need to process handleIasAceClusterIndication()

Can you try the new code, use the device to arm/disarm for exemple and show logs during the command pls ?

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

@Smanar how to obtain logs?

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

on deconz / help / log with "info" and "info_l2"

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

Do i need to reinclude the device?

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

Yep, pls, if I m right the code will create a new device now, a zhaSwitch.

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

I don't think its working, i only see the temp sensor.

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

I have checked the code again, nothing special, can you share the log during the inclusion ?

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

I cant include the device anymore... tried a bunch of stuff already
Temp sensor is showing up, but the device does not confirm that its joined to a network
oh no, temp is blinking red, so i cant join

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

hmm the temp sensor is paired again, but no new sensor found. No logs, i was too late to enable the logs.
I can only pair the sensor when i select search lights? Does it matter?
edit: is there a real log file with history?

@Smanar
Copy link
Collaborator

Smanar commented Mar 13, 2021

I don't think there is a difference beetween sensor or light.
As the device is already included n phoscon you can trigger inclusion easily

  • set phoscon in permit join.
  • read again basic attribute on deconz (cluster 0x0000, button "read", need to fill the table)

This trick will trigger an inclusion.

Enable log before setting in permit join, on the dev machine you have few devices, will be not a problem.

@a1ad
Copy link
Author

a1ad commented Mar 13, 2021

i cant find a setting in phoscon to permit join?? In deconz there is one.
So i set permit join for 255 and read the basic attr successful, but no new sensor.

the logs are full with this stuff:
20:04:08:295 enqueue event config/localtime for /config/ 20:04:08:295 poll node 80:4b:50:ff:fe:b5:65:d8-01 20:04:08:295 Poll light node On/Off light 2 20:04:08:295 Idle timer triggered 20:04:08:296 binding for attribute reporting of ep: 0x01 cluster 0x0001 seems to be active 20:04:08:296 binding for attribute reporting of ep: 0x01 cluster 0x0402 seems to be active

i can give you access to the dev machine (ssh + x2go), if you give me your pubkey

@Smanar
Copy link
Collaborator

Smanar commented Mar 14, 2021

i cant find a setting in phoscon to permit join?? In deconz there is one.
So i set permit join for 255 and read the basic attr successful, but no new sensor.

In phoscon it s "add new sensor/light"
If you make the permit join using directly deconz, it will not use the API, the device can't be included.

But fortunately, I have this ind of problem on an other device too, will add some debug line to your branch.

@Kane610
Copy link

Kane610 commented Apr 7, 2021

If you have a linux environment on windows it should work or a linux machine or a Mac. You just need to run it all in a virtual python environment. We can jump on discord if you want coaching :)

@a1ad
Copy link
Author

a1ad commented Apr 7, 2021

@Kane610 yeah, some coaching would speed up things. You can add me on Discord: AES#2599

@Smanar
Copy link
Collaborator

Smanar commented Apr 9, 2021

The device receive CMD_ARM with possible values

//  Arm mode command
//-------------------
// 0x00 Disarm    
// 0x01 Arm Day/Home Zones Only
// 0x02 Arm Night/Sleep Zones Only
// 0x03 Arm All Zones

with the desired armed command + a pin code
Deconz answer CMD_ARM_RESPONSE always by the same command, so always validate, no check done, but can use

//  Arm mode response
//-------------------
// 0x00 All Zones Disarmed
// 0x01 Only Day/Home Zones Armed
// 0x02 Only Night/Sleep Zones Armed
// 0x03 All Zones Armed
// 0x04 Invalid Arm/Disarm Code
// 0x05 Not ready to arm
// 0x06 Already disarmed

And send the data by websocket

For the moment the Arm mode is not configurable so set in State/Armmode


Using the api, third app can check the code and send a command ATM using Config/Armed to change the panel state

  • deconz send a CMD_PANEL_STATUS_CHANGED with the new panel state
  • It update the device state

The device send CMD_GET_PANEL_STATUS

  • Deconz asnwer by CMD_GET_PANEL_STATUS_RESPONSE with the actual panel status memorised in state/Panel
//   Panel status possibles
// --------------        
// 0x00 Panel disarmed (all zones disarmed) and ready to arm
// 0x01 Armed stay
// 0x02 Armed night
// 0x03 Armed away
// 0x04 Exit delay
// 0x05 Entry delay
// 0x06 Not ready to arm
// 0x07 In alarm
// 0x08 Arming Stay
// 0x09 Arming Night
// 0x0a Arming Away

So there is 2 variable, the panel state and the armed mode, for the moment the code only use the panel state.

@a1ad
Copy link
Author

a1ad commented Apr 10, 2021

@ikke-zelf: we are working on the beep function of the device, but when i send a exit_delay the keypad starts to beep (only when active/not a sleep), leave the house (device is going to sleep really fast, a second after presence detection) the device keeps beeping. After the alarm exit delay time and the alarm is armed i send armed_away/arming_away to the device but because its a sleep when beeping the state is ignored. When i activate the presence sensor the new state is set and the beeping stop.

Do you recognize such behaviour?

@ikke-zelf
Copy link

ikke-zelf commented Apr 10, 2021 via email

@a1ad
Copy link
Author

a1ad commented Apr 10, 2021

No i cant recall that. With 'a sleep' you mean all Light turned Off? I Will retest in an hour or so, but cant recall not working in the way as it should. Regards.

Yes indeed, its the same when i switch states through node red, the keypad only change state when there is presence (awake aka lights on). entry_delay never works because there is no presence at the device at the time someone entering the building and not updating to entry_delay, only when i touch the keypad for the code the entry_delay is set.

So i guess we still have major problems if you dont have this behaviour.

@ikke-zelf
Copy link

ikke-zelf commented Apr 10, 2021 via email

@a1ad
Copy link
Author

a1ad commented Apr 10, 2021

@ikke-zelf Do you want to join us on discord? (AES#2599)

@github-actions
Copy link
Contributor

github-actions bot commented May 2, 2021

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label May 2, 2021
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2021

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

@github-actions github-actions bot closed this as completed May 9, 2021
@manup manup linked a pull request Aug 10, 2021 that will close this issue
@lubbertkramer
Copy link

Is this device successfully added to deconz because it’s not (yet) on the supported devices page

@MichaelRV82
Copy link

Do understand this thread correctly: full support for the xhk1-ue is work in progress? I am only getting the temperature senor and I am not able to use it as an alarm panel in home assistant or link it to an existing alarm panel in HA.

@Smanar
Copy link
Collaborator

Smanar commented Jan 23, 2022

Hello, On my side I can see it in the code.
There is probably issue with the HA integraton, here you have someone that making the same thing than you recently (but with DDF as his keypad is not supported) #5352 (comment)

Tell me what you have tried and if it have worked (we are on it ATM)

@RealKanashii
Copy link

@a1ad how do you put the keyboard in pairing mode? I cannot see the device in deconz.
Tried to use the pair button, reset changing batteries, etc.

@RealKanashii
Copy link

Maybe is restricted to some channels?

@Smanar
Copy link
Collaborator

Smanar commented Apr 19, 2022

To reset Xfinity keypads do the following:

Remove the cover and batteries.
While keeping the tamper/pairing button pressed, insert batteries and then release the tamper/pairing button.
It should make the pairing LED start flashing.
Press the tamper/pairing button 5 times to reset keypad.

To pair it after resetting it, you need to remove the batteries again and then just reinstall. The green light by the tamper/pairing button should start flashing indicating it is ready to pair.

When you say deconz, it s realy deconz the application on desktop ?

@RealKanashii
Copy link

I have the keypad in pairing mode but nothigs appears in Deconz app ( via VNC ).

@RealKanashii
Copy link

Finally I got the keypad sync. The problem was the zigbee channel. Changing from 16 to 11 the keypad was detected but now I only see the device as a Temp Sensor, even using the light pairing method.

@Mimiix
Copy link
Collaborator

Mimiix commented Apr 20, 2022

RealKanashii

So it seems this device only works on channel 11

@RealKanashii
Copy link

I will try other channel but I want to make it work first. I will report here when done.

@RealKanashii
Copy link

Ok, after the first Sync in channel 11 I changed again the network to channel 16, waited 5 minutes and then restarted de usb deconz II.
Then I recovered all my old devices and tried to pair again the keypad just getting off and on the batteries. It worked.
I guess the channel setting was notified to keypad and now is able to connect.

@Smanar
Copy link
Collaborator

Smanar commented Apr 20, 2022

But it seem @Mimiix was right, there is something specific to the channel 11 somewhere ? (at least for inclusion)

@RealKanashii
Copy link

At least the first start... yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants