-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Ubisys S1-R (Series 2) #8627
base: master
Are you sure you want to change the base?
Ubisys S1-R (Series 2) #8627
Conversation
The |
Weird, I was testing with a normal S1 (meter is on ep3 for that one) with a similar switch to modernExtend as the S1-R in this PR. It is always trying to read from ep1 which times out. As you key see seMetering is only on ep3 for this device. Once I’m back at my desk I’ll also add the modified definition I have for the regular S1, essentially if I fix it for the S1 it should work for S1-R/S1-R Series 2 also. |
The logic to determine the endpoint can be found here: https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/lib/modernExtend.ts#L51 |
I pushed the update s1 definition too ... this is what I get
As you can see the read goes to ep1 not ep3. I'll add some debug code to the function you linked earlier and see what turns up. |
Could you paste the data/database.db entry of this device? |
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b001e17ef39","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,8,10,11,12,13,47,110,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"8":{"profId":260,"epId":8,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"10":{"profId":260,"epId":10,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[1281,10],"outClusterList":[1280,1282],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"12":{"profId":49246,"epId":12,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"13":{"profId":260,"epId":13,"devId":5,"inClusterList":[25],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"47":{"profId":260,"epId":47,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"110":{"profId":260,"epId":110,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"interviewCompleted":true,"meta":{}}
{"id":3,"type":"Router","ieeeAddr":"0x001fee0000006e19","nwkAddr":7227,"manufId":4338,"manufName":"ubisys","powerSource":"Mains (single phase)","modelId":"S1 (5501)","epList":[1,2,3,232,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":266,"inClusterList":[0,3,4,5,6],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"S1 (5501)","manufacturerName":"ubisys","powerSource":1,"zclVersion":8,"appVersion":1,"stackVersion":1,"hwVersion":6,"dateCode":"20200527-DE-FB1","swBuildId":"2.4.0"}},"genOnOff":{"attributes":{"onOff":0,"startUpOnOff":255}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":260,"inClusterList":[0,3],"outClusterList":[3,5,6,8,768,64514],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":1281,"inClusterList":[0,1794,2820],"outClusterList":[],"clusters":{"seMetering":{"attributes":{"multiplier":1,"divisor":1000,"instantaneousDemand":0,"currentSummDelivered":0}}},"binds":[],"configuredReportings":[],"meta":{}},"232":{"profId":260,"epId":232,"devId":1287,"inClusterList":[0,64512],"outClusterList":[3,25],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":102,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":1,"hwVersion":6,"dateCode":"20200527-DE-FB1","swBuildId":"2.4.0","zclVersion":8,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1737145803334} The entire database, this is my dev network so only 1 device at the moment. Edit: I also tried with the endpoint function commented as it doesn't seem needed/useful for modernExtend and the result is the same. I though maybe it was causing some issues somewhere but guess not. Edit: I'm not sure the function on L51 is called? diff --git a/src/lib/modernExtend.ts b/src/lib/modernExtend.ts
index 17dc0dc5..979e103d 100644
--- a/src/lib/modernExtend.ts
+++ b/src/lib/modernExtend.ts
@@ -49,6 +49,7 @@ import {
} from './utils';
function getEndpointsWithCluster(device: Zh.Device, cluster: string | number, type: 'input' | 'output') {
+ console.log(`XXX: entered getEndpointsWithCluster (cluster=${cluster} type=${type})`);
if (!device.endpoints) {
throw new Error(device.ieeeAddr + ' ' + device.endpoints);
}
@@ -59,6 +60,7 @@ function getEndpointsWithCluster(device: Zh.Device, cluster: string | number, ty
if (endpoints.length === 0) {
throw new Error(`Device ${device.ieeeAddr} has no ${type} cluster ${cluster}`);
}
+ console.log(`XXX: returning getEndpointsWithCluster (endpoints=${JSON.stringify(endpoints)})`);
return endpoints;
} Nothing is printed. Edit2: |
Ubisys support contacted me that some of their customers had issues using this device with z2m, and passed along some info on what changed. It seems an attempt was already made to get the series 2 supported but ubisys support verified that on the latest z2m version on HA this was still broken. Based on the info available we can use hwVersion to differenciate between both models. Let's start by cleaning up the non working fingerprint copy.
Switch to ubisysPollCurrentSummDelivered for all Ubisys devices and pick correct endpoint for S1-R Series 2.
Ubisys support contacted me since customers seem to have problems with this device on the latest z2m.
Based on information from them the only big change is that the metering is now done on endpoint 1 not 4. We can differentiate between the
S1-R
andS1-R Series 2
by checking genBasic.hwVersion.I don't have a S1-R and S1-R Series 2 myself and there is also no easy way to install both to make this easier, however ubisys support has a test setup using z2m on HA and they can test this before it gets merged.
So far this PR does the following:
ubisysOnEventReadCurrentSummDelivered
over toubisysPollCurrentSummDelivered
But I got stuck on the following:
S1-R seems to support powerOnBehavior based on the existing code, but it was disabled on the series 2 one.Technical manual says this is supported.
@Koenkk can you help me with the electricityMeter metering one? Also I though there was a guide somewhere on how to test changes like this on z2m when using HA, but I can't find it anymore. What would be the easiest way for Ubisys support to pull in these changes to test?
Meanwhile I will reach out to support and point them to this draft PR, they should be able to answer my other open issue.