[Edge drivers] Modifying a driver from another developer (having the source files)

excellent! With your prompt, I have successfully established a stand-alone device.

At present, there is a problem that I set a certain way to turn off the APP, and the device is turned off, but soon the APP will display the open status. The device works normally during DTH. I don’t know why

Zigbee light multifunction-v6, does this project support multiple dimming?

Hi @LG0000

Sorry, I don’t understand what’s wrong with your device

There will be such an error in the report of the second route. Can you see the problem?

@LG0000
Please could you copy and paste in text format?

2022-11-14T13:02:18.636267067+00:00 TRACE interfree Zigbee Multi Switch Received event with handler zigbee
2022-11-14T13:02:18.705714400+00:00 INFO interfree Zigbee Multi Switch <ZigbeeDevice: dbd88dd0-03d2-4bab-8903-da45d1491b27 [0xFB64] (Interfree 2 Outlet)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xFB64, src_endpoint: 0x0B, dest_addr: 0x0000, dest_endpoint: 0x0B, profile: 0x0104, cluster: OnOff >, lqi: 0x8E, rssi: -74, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x10, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Uint8, OnOff: true > > > >
2022-11-14T13:02:18.885747067+00:00 TRACE interfree Zigbee Multi Switch Found ZigbeeMessageDispatcher handler in Zigbee_Multi_Switch
2022-11-14T13:02:18.947523401+00:00 INFO interfree Zigbee Multi Switch Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff
2022-11-14T13:02:18.975754067+00:00 PRINT interfree Zigbee Multi Switch function: on_off_attr_handler
2022-11-14T13:02:19.096099401+00:00 INFO interfree Zigbee Multi Switch <ZigbeeDevice: dbd88dd0-03d2-4bab-8903-da45d1491b27 [0xFB64] (Interfree 2 Outlet)> emitting event: {“attribute_id”:“signalMetrics”,“capability_id”:“legendabsolute60149.signalMetrics”,“component_id”:“main”,“state”:{“value”:“dni: 0xFB64, lqi: 142, rssi: -74dBm”},“visibility”:{“displayed”:false}}
2022-11-14T13:02:19.167730067+00:00 ERROR interfree Zigbee Multi Switch Interfree 2 Outlet thread encountered error: [string “st/dispatcher.lua”]:233: Error encountered while processing event for <ZigbeeDevice: dbd88dd0-03d2-4bab-8903-da45d1491b27 [0xFB64] (Interfree 2 Outlet)>:
arg1: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0xFB64, src_endpoint: 0x0B, dest_addr: 0x0000, dest_endpoint: 0x0B, profile: 0x0104, cluster: OnOff >, lqi: 0x8E, rssi: -74, body_length: 0x0007, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x10, ZCLCommandId: 0x0A >, < ReportAttribute || < AttributeRecord || AttributeId: 0x0000, DataType: Uint8, OnOff: true > > > >
[string “st/device.lua”]:121: attempt to index a nil value (local ‘component’)

@LG0000
Please could you install Zigbee Thing Mc and change device to this driver to see all endpoints device?

After testing, I found a phenomenon.
I will actively upload the first route status for 5 seconds; In the second 5 seconds, the second route status is uploaded actively.
When I close the second upload, the status is correct and no error is reported in the log.
As long as the second route of active upload is enabled, this error will occur. Including when I close the second route from the APP, the second route will be closed, but the APP will display the open status soon.

Ok, I will test according to your suggestion

But I am not very clear about the phenomenon you want to observe. If you have a clear phenomenon that I need to observe, please let me know and I will pay special attention to it

Do you want to view TXT logs like the one above through Zigbee Thing Mc

Is this what you want

I changed the configuration as shown in the figure below. Now there is no problem with both routes of work, and no error is reported in the log
But I don’t know what the difference is? Do you know?

@LG0000
The problem is that you told me that it was a 4 gang switch and in reality it is a 2 gang switch, it only has 2 endpoints (0A and 0B)

I see what you mean. I modified this with your routine. It supports the 1234 gang switch on my hand. But it is the same phenomenon. After closing, the APP will show that it is open.
Can you see the difference between the configurations in the two pictures? Why is there a problem with the configuration in the first picture?

After setting, it is possible to establish an independent device in the APP.
But when I use the 2 gang socket, the icon of the first socket is the socket, and the icon of the second socket is the switch. Is there any way to agree? Instead of manually modifying the icon of the second circuit
image

The 2 images are devices with 2 endpoints (0A and 0B) and cannot be used with a 4 component profile (4 endpoints)

I don’t know what you mean when you talk about the open and closed application, what does that have to do with the operation of the device?

You don’t seem to understand what I mean.
I have downloaded and modified your routine, and then installed it to my HUB. Therefore, it not only supports the 4gang switch that you were asked to add before. 123gang is also supported. This problem has been solved.
I just don’t know the difference between the configurations of the endpoint in the figure. Why does the configuration in the first figure cause an exception and the log reports an error

Sorry, I have no idea what you want to do!!!
You are modifying the driver on your own and you want me to answer you as if I know what you are doing or what you want to do.
You will understand that I am not a fortune teller!

If you want to use my driver use it and if you want to modify it I modify it, but knowing what you want to do

1 Like

Sorry, I forgot to say
I just added fingerprints, and the others haven’t been modified
So other codes are consistent. You can completely follow your code, which is just a fingerprint difference from mine

Then, this device is 4 gang or the pictures were for others different devices?

  • id: “Interfree/XSSW4O”
    deviceLabel: Interfree 4 Switch
    manufacturer: Interfree
    model: XSSW4O
    deviceProfileName: four-switch

4 gang is this phenomenon
This phenomenon is also found in the 2gang screenshot
Since I added 2gang here, your fingerprint does not contain my 2gang fingerprint. So I can add 2gang here. But other codes are the same as yours, and I haven’t modified them.
I don’t know if I have expressed myself clearly

If this device model: XSSW4O is one of the screenshots you sent, it is not a 4-gang device, it is a 2-gang device (2 endpoints) and if you leave it with the 4-gang profile that you asked me for, it will not work well and will give errors with the you showed me (Component = nil)

I downloaded your driver, only added some fingerprints, others were not modified, and installed it to my HUB through the tutorial.
The following figure shows some fingerprints added by my driver, and then I installed the driver to my local HUB

I added 2 2gang fingerprints to the driver here, so I can add them.
I have tried to use the 4Gang you added to your driver. The phenomenon is the same