Zigbee2mqtt: Attempt to pair Livolo Zigbee switch

Created on 14 Nov 2018  Â·  705Comments  Â·  Source: Koenkk/zigbee2mqtt

I have bought a Livolo zigbee switch like this one: https://www.aliexpress.com/item/Livolo-Touch-ZIGBEE/32918552579.html?spm=a2g0v.10010108.1000016%2FB.1.12754ab2JVEKJU

It seems to be a good option for its price.

The original Livolo instruction is to buy their own gateway and pair using their application. The pairing should be done by keeping a switch button pressed for 5 seconds. It should beep and pair after that.

The problem is it does not want to pair to zigbee2mqtt. I tried the following:

  • press a button for 5 seconds, hear the beep, release the button and just wait;
  • press a button for 5 seconds, hear the beep, keep it pressed for some more time (up to 90 seconds)
  • switch on and off several times after the beep.

All the time I kept the device close to the zigbee stick.

I just could not observe any activity in zigbee2mqtt log in any of these cases. I have double checked that 'permit_join' is set to true and log_level set to 'debug'. I even tried to run zigbee2mqtt together with DEBUG=zigbee-shepherd* - no result.

Does anyone have any suggestions/advices/ideas? It would be very nice to add support to this device since this model seems to be much more attractive than the corresponding RF model.

stale

Most helpful comment

Awesome!
Finally I'm able to control it!

    {
        zigbeeModel: ['TI0001          '],
        model: 'TI0001          ',
        description: 'Zigbee switch',
        vendor: 'Livolo',
        supports: 'brightness',
        fromZigbee: [],
        toZigbee: [tz.light_brightness],
    },

ON

{
  "brightness": 108,
  "transition": 0.1
} 

OFF

{
  "brightness": 1,
  "transition": 0.1
}

Next step is to read the switch state

All 705 comments

Hi Ton1965
I order one too, hop it's work with zigbee2mqtt
did not get it yet, i will post my finding too
cheers

Hi @khzd,

I am glad I am not the only one! I still could not succeed in pairing the switch to zigbee2mqtt 😞. It just does not produce any output in the logs. Probably it is just broken but I hope for the best. I do not want to buy their gateway since it means installing it instead of some outlet and I do not have any spare ones.

Best wishes.

Asap i got it I will give a try :) I will maybe confirme that yours is not broken :)
Still in the flight

My friend also bought this switch. And also could not pair it with the coordinator :(
Nothing in log

Hi
What about using winshark to hack it? Asap I got it il will give a try
Anyone to help for this hack ?

@khzd ,
I am ready to help although I am not very experienced in this kind of things. But I will try to do my best although I will probably need some direction.
Can wireshark really be used to sniff on zigbee? I thought it is used for http traffic going through the router, but as I said I do not know much about this.

Hi guys.
When I was buying this switch, a seller warned me it works only with their gateway.
I've tried wireshark with zigbee sniffer. I wasn't able to catch any zigbee packets. So, I see two options, it's encrypted or it uses their own proprietary protocol.
I'm waiting for another CC2531 dongle because I have only one and it's difficult to flash it each time.
When I get the new device, I'll continue the experiments to understand if it's encrypted or not.

I also bought one of the switches and have the same problem. Would be nice to pair it, because the RF version doesn't give a feedback. There's only a receiver inside.

If you open the switch you can see, that they use a CC2630.

Hi guys,

I did not get yet mine, i planned to by 12 unit to equipe my house :(
I choose this one for a mechanical constraint : the far side of the device is circular so fit exactly in my France installation. the xiaomi alternative one has a square fare side so need to change all holes ( irreversible operation)

Remarque : they sold it as conform to Zigbee alliance, is is a new release ? Zigbee 3?

cheers

@khzd,
I am in almost the same situation: I want it to fit into the European hole. I have bought just one for now since I suspected there might be some difficulties. If you have already ordered all 12 then you probably would be better off to get their coordinator althoug I do not like this idea😞. I still hope that probably someone does have a coordinator and will be able to hack the protocol.
PS. I have Livolo RF switch and it is running fine but it does not return its state so it is not always convenient.

A bit offtopic: but for european holes I would highly recommend the Shelly 1 with tasmota (wifi esp8266 device). It fits easily and allows you to keep your normal switch. Ive installed 20 of them in my home and they work perfect!

Hi ton1966 I planned to bay 12 but I did not , I see that it s not planned to be supported by zigbee2mqtt :(
I m happy to order only one, the loose is limited :)
For European holes, zigbee will wait ...

Does their gateway support TCP/IP stack? I guess its a zigbee to wifi device? Does it have a local or cloud API?

According to their advertisment, their gateway is able to work with Amazon Alexa but I haven't seen any APIs yet.

@Lumbricus Is it possible to flash this chip? Could you please make a hi-res photo of the board with this chip?

A bit offtopic: but for european holes I would highly recommend the Shelly 1 with tasmota (wifi esp8266 device). It fits easily and allows you to keep your normal switch. Ive installed 20 of them in my home and they work perfect!

Shelly would have been nice but I do not have any neutral line in my apartment. Just two wires in each hole. That is why Livolo suits me well, their switches do not require neutral.

Hi guys, I have a news.
I still don't know if it's good or not, but using zboss sniffer and Wireshark I see "Beacon Requsts" packets from the switcher. They are on the channel 0x1A (26) whereas zigbee2mqtt packets on the channel 0x0B (11).
I know almost nothing about ZigBee protocol, so I need to read something to figure out how it works.
If anybody knows what my next step should be, give me a tip please.

@lych run zigbee2mqtt on channel 26 and try to pair livolo switch

@kirovilya Thanks! It looks encouraging!

zigbee2mqtt:info 2018-11-25 18:58:54 New device with address 0x00124b000befc0b9 connected!

zigbee2mqtt:info 2018-11-25 18:58:54 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"device_connected","message":"0x00124b000befc0b9"}'

zigbee2mqtt:warn 2018-11-25 18:58:54 Device with modelID 'TI0001 ' is not supported.

@lych now try press switch button and record debug log. We need messages ;)

@lych
Great to hear! I have always believed someone would be able to pair this device!

I would like to do my own experiments now but I have the only stick and it is so to say in production mode now.

This switch seems to work on channel 26 only. I do not really know the channel my stick is running on but it should be some other one since the pairing failed in my case. If I change my zigbee2mqtt coordinator to channel 26 now would it mean re-pairing all the devices? Or probably they will all shift to a different channel :crossed_fingers: ?

@Ton1965 You shouldn't change your coordinator channel, at least now, I haven't been able to make it to work yet. I am not sure about re-pairing, after changing the channel I still see data from my temperature sensor without repairing, but another my device (Xiaomi button) doesn't work. I think it depends on endpoint device.
@kirovilya There is nothing interesting in zigbee2mqtt log, see my previous post, there is the most interesting part of the log.

I've attached pcap file for wireshark [livolo_pairing.zip] (https://github.com/Koenkk/zigbee2mqtt/files/2613373/livolo_pairing.zip). There is the pairing process and some touches of sensor.
It looks like the pairing process can't be finished on the switcher side. The switcher wants some kind of response from coordianator, but sends something when I touch the sensor. It's the worst part, the message is encrypted.

@ptvoinfo There is a photo of the board
dsc02111
I think it's possible to flash it, but to do it one have to figure out how to connect the programmer and hack the protocol between CC2630 and main PIC controller.
I still hope that it's possible to use the switch without such difficulties.

@lych I wanted to look at a debug log from zigbee2mqtt, but not wireshark :) https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-debug

@kirovilya As I've already said there is nothing in zigbee2mqtt log.

zigbee2mqtt:info 2018-11-25 18:58:54 New device with address 0x00124b000befc0b9 connected!

zigbee2mqtt:info 2018-11-25 18:58:54 MQTT publish, topic: 'zigbee2mqtt/bridge/log', payload: '{"type":"device_connected","message":"0x00124b000befc0b9"}'

zigbee2mqtt:warn 2018-11-25 18:58:54 Device with modelID 'TI0001 ' is not supported.

It's all, nothing else.

@lych Even when you press the switch button after that?
Did you run zigbee2mqtt with debug parameter? https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-debug#zigbee-shepherd-debug-logging
Must be more data.

@kirovilya Which level is more informative info or debug? I'll try it with zigbee-shepherd debug info tonight.

@lych debug

It could be that reporting/binding needs to be setup, can you try with:

    {
        zigbeeModel: ['TI0001 '],
        model: 'TI0001 ',
        description: 'Zigbee switch',
        supports: 'on/off',
        vendor: 'Livolo',
        fromZigbee: [],
        toZigbee: [tz.on_off],
        configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const actions = [
                (cb) => device.bind('genOnOff', coordinator, cb),
                (cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
            ];

            execute(device, actions, callback);
        },
    },

@Koenkk Thanks a lot. I'll try it tonight.

There is a log with Koenkk's changes.
log.txt
Nothing in the log when I touch the sensor, but there is a packet in wireshark:

ZigBee Network Layer Data, Dst: 0x0000, Src: 0x4195
    Frame Control Field: 0x0248, Frame Type: Data, Discover Route: Enable, Security Data
        .... .... .... ..00 = Frame Type: Data (0x0)
        .... .... ..00 10.. = Protocol Version: 2
        .... .... 01.. .... = Discover Route: Enable (0x1)
        .... ...0 .... .... = Multicast: False
        .... ..1. .... .... = Security: True
        .... .0.. .... .... = Source Route: False
        .... 0... .... .... = Destination: False
        ...0 .... .... .... = Extended Source: False
        ..0. .... .... .... = End Device Initiator: False
    Destination: 0x0000
    Source: 0x4195
    Radius: 30
    Sequence Number: 70
    [Extended Source: TexasIns_00:0b:ef:c0:b9 (00:12:4b:00:0b:ef:c0:b9)]
    [Origin: 31]
    ZigBee Security Header
        Security Control Field: 0x28, Key Id: Network Key, Extended Nonce
            ...0 1... = Key Id: Network Key (0x1)
            ..1. .... = Extended Nonce: True
        Frame Counter: 33
        Extended Source: TexasIns_00:0b:ef:c0:b9 (00:12:4b:00:0b:ef:c0:b9)
        Key Sequence Number: 0
        Message Integrity Code: 3c12cfd8
        [Expert Info (Warning/Undecoded): Encrypted Payload]
            [Encrypted Payload]
            [Severity level: Warning]
            [Group: Undecoded]
    Data (24 bytes)
        Data: 0b18a65039a5299431e37b635bb920f26f862eac4304d5d5
        [Length: 24]

I think that model is not 'TI0001 '... somthing more :)
need database.db after pairing

database.zip
It's "TI0001 " :)

"TI0001 " - 10th spaces after TI0001 :)

When I press a button on a xiaomi button I see the message in log:

zigbee2mqtt:debug 27/11/2018, 01:40:59 Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":1}}' of device 'lumi.remote.b1acn01' (0x00158d0001ef628b)
and a command in wireshark: Command: Report Attributes, Seq: 12

When I touch the sensor on Livilo swich, nothing in log, but I see a comand in wireshark:
ZigBee Cluster Library Frame, Mfr: Unknown (0x15d2), Command: Read Attributes, Seq: 216

Is it possible that the switch is waiting for some kind of response from the coordinator before sending its state?

Good progress @lych, I got mine today,I will join tests also.
Can you recap all steps ?
Cheers

@khzd Unfortunately, I haven't had any progress yet. I figured out that Livolo works on channel 26. According to logs, the joining process looks ok. After it, if I touch the sensor there is a packet in Wireshark, but it marked as malformed. I wasn't able to find any trails of these packets in cc-znp (the dongle doesn't send anything like this packet to /dev/ttyACM0), so I suspect that dongle just discards such packets. Moreover, if I turn Livolo's power off then on, it starts the joining process again as if it doesn't remember that it had already been joined. I suspect that something wrong with the joining process. My switch starts the joining process immediately as I turn the power on, doesn't matter if I touch sensor for 5 seconds or not.

Hi @lych,
same causes same effects
same results as you, I followed all previous steps given by @kirovilya and @Koenkk.
the join process seems ok : i got a record in the DB
{"id":60,"type":"EndDevice","ieeeAddr":"0x00124b000bf0725e","nwkAddr":19896,"manufId":0,"manufName":"LIVOLO\u0000\u0010TI0001 ","powerSource":"Mains (single phase)","modelId":"TI0001 ","epList":[6],"status":"offline","joinTime":null,"endpoints":{"6":{"profId":260,"epId":6,"devId":0,"inClusterList":[0,3],"outClusterList":[6],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{}},"genIdentify":{"dir":{"value":1},"attrs":{}},"genOnOff":{"dir":{"value":2},"attrs":{}}}}},"_id":"Kz5WoE1MBGXoZwWc"}

BUT after restart i have in the log:
2018-11-28 13:59:24 - info: my_office_light_up (0x00124b000bf0725e): TI0001 - Livolo Zigbee switch (EndDevice)
2018-11-28 13:59:24 - error: Failed to configure my_office_light_up 0x00124b000bf0725e

I got
2018-11-28 13:59:24 - info: MQTT publish, topic: 'zigbee2mqtt/my_office_light_up', payload: '{"state":"ON"}'

and after that all the network crach : no device is connected :(

@kirovilya and @Koenkk any help ?

I also helped a friend to pair the switch with the coordinator. But then he tried to send genOnOff commands to switch endpoint 6. No success. :(
6 failed with error Error: AF data request fails, status code: 240. MAC transaction expired.

Hi @khzd,

I have found some difference between your database and the one pasted here by @lych in this message. Your database shows the switch status as offline but his has several records with online status so the device can at least be brought to online state. I am not sure if this fact is helpful though.
Another strange thing is the modelId that has 9 extra spaced in @lych's database but not in yours.

About extra spaces. It's just because of github parser. It eats extra spaces, that's why I attached the file.

I confirm, I have the @kirovilya 10 spaces :)

"For European holes, zigbee is progressing ..."
Hi,
the device is recognized correctly what about the specific fromZigbee code to handel it :
{
zigbeeModel: ['TI0001 '],
model: 'TI0001 ',
description: 'Zigbee switch',
supports: 'on/off',
vendor: 'Livolo',
fromZigbee: [MISSING THIS SECTION],
toZigbee: [tz.on_off],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
const actions = [
(cb) => device.bind('genOnOff', coordinator, cb),
(cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
];
execute(device, actions, callback);
},
},

and ONOFF from HA i m getting:
Nov 28 16:51:25 ubuntu59 npm[22564]: zigbee2mqtt:info 2018-11-28 16:51:25 Zigbee publish to '0x00124b000bf0725e', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - null
Nov 28 16:51:43 ubuntu59 npm[22564]: zigbee2mqtt:error 2018-11-28 16:51:43 Zigbee publish to '0x00124b000bf0725e', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 183. APS no ack.

Any idea @kirovilya ?

There is a mistake in config. I think it must be
toZigbee: [tz.onoff],
instead of
toZigbee: [tz.on_off],
(I probably have an old version)

Hi did you got good results ?
Onoff in converters is not there , only on_off is!

Question how to debug a specific function , with more than 30 devices I have a huge log :(

Now, if I try to change a state, zigbee2mqtt sends the command "ZCL OnOff" and Livolo answers "Success" but nothing really happens (reley doesn't change its state).
Then zigbee2mqtt sends "Discover Attributes", Livolo answers "Unsupported General Command"
then, zigbee2mqtt sends "Read Attributes" and Livolo answers its current state (on or off), it is the real state (it's only one thing which looks working in right way)

If a switch has more than one button, how should the command look like? It cannot just be on / off. There must be something else, like pointing to a specific button.

hi, was able to debug : I reduce all devices from DB (router and LIVOLO) and got this after sendig ON via mqtt : results same as you :(

zigbee2mqtt:debug 2018-11-29 21:36:15 Received MQTT message on 'zigbee2mqtt/my_office_light_up/set' with data 'ON'
zigbee2mqtt:info 2018-11-29 21:36:15 Zigbee publish to '0x00124b000bf0725e', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - null
zigbee-shepherd:request REQ --> AF:dataRequest, transId: 3 +8s
cc-znp:SREQ --> AF:dataRequest, { dstaddr: 63208, destendpoint: 6, srcendpoint: 1, clusterid: 6, transid: 3, options: 48, radius: 30, len: 3, data: } +1ms
serialport:main _write 18 bytes of data +8s
serialport:bindings write 18 bytes +8s
serialport:unixWrite Starting write 18 bytes offset 0 bytesToWrite 18 +3m
serialport:unixWrite write returned null 18 +1ms
serialport:unixWrite wrote 18 bytes +0ms
serialport:unixWrite Finished writing 18 bytes +0ms
serialport:main binding.write write finished +1ms
serialport:poller received "readable" +8s
serialport:bindings read +10ms
serialport:unixRead Starting read +8s
serialport:unixRead Finished read 6 bytes +0ms
serialport:main binding.read finished +9ms
cc-znp { sof: 254,
cc-znp len: 1,
cc-znp type: 'SRSP',
cc-znp subsys: 'AF',
cc-znp cmd: 'dataRequest',
cc-znp payload: { status: 0 },
cc-znp fcs: 100,
cc-znp csum: 100 } +12ms
serialport:main _read reading +2ms
serialport:bindings read +2ms
serialport:unixRead Starting read +2ms
cc-znp:SRSP <-- AF:dataRequest, { status: 0 } +1ms
zigbee-shepherd:request RSP <-- AF:dataRequest, status: 0 +0ms
serialport:unixRead waiting for readable because of code: EAGAIN +1ms
serialport:poller Polling for "readable" +3ms
serialport:poller received "readable" +7s
serialport:bindings read +7s
serialport:unixRead Starting read +7s
serialport:unixRead Finished read 30 bytes +0ms
serialport:main binding.read finished +7s
cc-znp { sof: 254,
cc-znp len: 25,
cc-znp type: 'AREQ',
cc-znp subsys: 'AF',
cc-znp cmd: 'incomingMsg',
cc-znp payload:
cc-znp { groupid: 0,
cc-znp clusterid: 10,
cc-znp srcaddr: 38930,
cc-znp srcendpoint: 1,
cc-znp dstendpoint: 1,
cc-znp wasbroadcast: 0,
cc-znp linkquality: 57,
cc-znp securityuse: 0,
cc-znp timestamp: 16055769,
cc-znp transseqnumber: 0,
cc-znp len: 5,
cc-znp data: },
cc-znp fcs: 173,
cc-znp csum: 173 } +7s
serialport:main _read reading +3ms
serialport:bindings read +4ms
serialport:unixRead Starting read +4ms
cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 10, srcaddr: 38930, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 57, securityuse: 0, timestamp: 16055769, transseqnumber: 0, len: 5, data: } +1ms
zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: [object Object] +1ms
zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +0ms
serialport:unixRead waiting for readable because of code: EAGAIN +1ms
serialport:poller Polling for "readable" +6ms
serialport:poller received "readable" +11s
serialport:bindings read +11s
serialport:unixRead Starting read +11s
serialport:unixRead Finished read 8 bytes +1ms
serialport:main binding.read finished +11s
cc-znp { sof: 254,
cc-znp len: 3,
cc-znp type: 'AREQ',
cc-znp subsys: 'AF',
cc-znp cmd: 'dataConfirm',
cc-znp payload: { status: 183, endpoint: 1, transid: 3 },
cc-znp fcs: 114,
cc-znp csum: 114 } +11s
serialport:main _read reading +3ms
serialport:bindings read +4ms
serialport:unixRead Starting read +4ms
cc-znp:AREQ <-- AF:dataConfirm, { status: 183, endpoint: 1, transid: 3 } +2ms
zigbee-shepherd:af dispatchIncomingMsg(): type: dataConfirm, msg: [object Object] +0ms
zigbee-shepherd:msgHdlr IND <-- AF:dataConfirm, transId: 3 +1ms
zigbee2mqtt:error 2018-11-29 21:36:33 Zigbee publish to '0x00124b000bf0725e', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 183. APS no ack.
serialport:unixRead waiting for readable because of code: EAGAIN +3ms
serialport:poller Polling for "readable" +8ms
serialport:poller received "readable" +10s
serialport:bindings read +10s
serialport:unixRead Starting read +10s
serialport:unixRead Finished read 30 bytes +1ms
serialport:main binding.read finished +10s
cc-znp { sof: 254,
cc-znp len: 25,
cc-znp type: 'AREQ',
cc-znp subsys: 'AF',
cc-znp cmd: 'incomingMsg',
cc-znp payload:
cc-znp { groupid: 0,
cc-znp clusterid: 10,
cc-znp srcaddr: 36978,
cc-znp srcendpoint: 1,
cc-znp dstendpoint: 1,
cc-znp wasbroadcast: 0,
cc-znp linkquality: 76,
cc-znp securityuse: 0,
cc-znp timestamp: 16119899,
cc-znp transseqnumber: 0,
cc-znp len: 5,
cc-znp data: },
cc-znp fcs: 154,
cc-znp csum: 154 } +10s
serialport:main _read reading +5ms
serialport:bindings read +6ms
serialport:unixRead Starting read +5ms
cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 10, srcaddr: 36978, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 76, securityuse: 0, timestamp: 16119899, transseqnumber: 0, len: 5, data: } +2ms
zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: [object Object] +1ms
zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +0ms
serialport:unixRead waiting for readable because of code: EAGAIN +2ms
serialport:poller Polling for "readable" +8ms

my mini DB
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0012022f78","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6],"status":"online","joinTime":1543522885,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}}},"_id":"9qLpaadwaFy8kHOl"}
{"id":64,"type":"EndDevice","ieeeAddr":"0x00124b000bf0725e","nwkAddr":63208,"manufId":0,"manufName":"LIVOLO\u0000\u0010TI0001 ","powerSource":"Mains (single phase)","modelId":"TI0001 ","epList":[6],"status":"offline","joinTime":null,"endpoints":{"6":{"profId":260,"epId":6,"devId":0,"inClusterList":[0,3],"outClusterList":[6],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{}},"genIdentify":{"dir":{"value":1},"attrs":{}},"genOnOff":{"dir":{"value":2},"attrs":{}}}}},"_id":"vzW78bhgIYIkCu6z"}
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b0012022f78","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6],"status":"online","joinTime":1543523552,"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{}}},"_id":"9qLpaadwaFy8kHOl"}
{"id":64,"type":"EndDevice","ieeeAddr":"0x00124b000bf0725e","nwkAddr":63208,"manufId":0,"manufName":"LIVOLO\u0000\u0010TI0001 ","powerSource":"Mains (single phase)","modelId":"TI0001 ","epList":[6],"status":"offline","joinTime":null,"endpoints":{"6":{"profId":260,"epId":6,"devId":0,"inClusterList":[0,3],"outClusterList":[6],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{}},"genIdentify":{"dir":{"value":1},"attrs":{}},"genOnOff":{"dir":{"value":2},"attrs":{}}}}},"_id":"vzW78bhgIYIkCu6z"}

Now, if I try to change a state, zigbee2mqtt sends the command "ZCL OnOff" and Livolo answers "Success" but nothing really happens (reley doesn't change its state).
Then zigbee2mqtt sends "Discover Attributes", Livolo answers "Unsupported General Command"
then, zigbee2mqtt sends "Read Attributes" and Livolo answers its current state (on or off), it is the real state (it's only one thing which looks working in right way)

If a switch has more than one button, how should the command look like? It cannot just be on / off. There must be something else, like pointing to a specific button.

for 2 switchs you may have two diffrents commands, see the difference in devices.js for the dual switch xiaomi:
{
zigbeeModel: ['lumi.ctrl_ln2.aq1'],
model: 'QBKG12LM',
vendor: 'Xiaomi',
description: 'Aqara double key wired wall switch',
supports: 'on/off, power measurement',
fromZigbee: [
fz.QBKG03LM_QBKG12LM_state, fz.QBKG12LM_power, fz.ignore_analog_change, fz.ignore_basic_change,
fz.ignore_multistate_report, fz.ignore_multistate_change, fz.ignore_onoff_change, fz.ignore_analog_report,
],
toZigbee: [tz.on_off],
ep: {'left': 1, 'right': 2},
},

My swith has only one button, but I suspect that they all have the same firmware

@khzd How should the mqtt payload look like in this case?

give me 5 mn, need to put HA in Debug mqtt to have the exact syntax

mosquitto_pub -h 127.0.0.1 -t zigbee2mqtt/"your friendly name"/set -m "ON"

how to set left/right button?

hi do you use HA?

No, I don't

if yes this the example in zigbee2mqtt for a double switch
in HA config
switch:

  • platform: "mqtt"
    state_topic: "zigbee2mqtt/"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_off: "OFF"
    payload_on: "ON"
    value_template: "{{ value_json.state_left }}"
    command_topic: "zigbee2mqtt//left/set"
    json_attributes:

    • "linkquality"

    • "button_left"

switch:

  • platform: "mqtt"
    state_topic: "zigbee2mqtt/"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_off: "OFF"
    payload_on: "ON"
    value_template: "{{ value_json.state_right }}"
    command_topic: "zigbee2mqtt//right/set"
    json_attributes:

    • "linkquality"

    • "button_right"

so from previous example we can build the good syntax :+1: right : your broker
zigbee2mqtt//right/set -m 'ON'
which mqtt broker do you use?

I use mosquitto.
Thanks, I've alredy found how to do it, but something wrong
Zigbee cannot publish message to device because '0x00124b000befc0b9' not known by zigbee-shepherd
Maybe I should update my zigbee2mqqt, but tomorrow, it's time to go to bed :) thanks

I also have the same issue, it's a zigbee2mqtt responsability

never give up with zigbee :)

hi @kirovilya @Koenkk
do you have enough debug log or do i need to give more?
Merci

Hi @khzd ,

I see you are ready to submit a PR to shepherd-converters to support these switches. It's great news! You guys are awesome!
I have a couple of questions though (more than a couple actually 😄). It was reported here that the coordinator needs to be on channel 26 to pair with these switches. Is it still true? I currently have a bunch of devices paired to my stick, will I need to repair them if I change the channel? Is it possible to make channel selection automatic again after the pairing is done?

hello,
i changed also to channel 26 and unhappily I had to re-pair all router devices the end-devices do not need
see in the startup or in the database the nature of the devices, it will gives you the total effort :(

Hi,
Fortunately I do not currently have any routers, just the end devices 😄. Does it mean that we can easily encounter devices from different manufacturers that would be impossible to use together in the same network? Like after adding these Livolo switches we get stuck with channel 26 only and will be unable to move to any other channel.

not sure, i'm not expert on zigbee protocol.
NB in wifi the channel is recommended to be changed to not interfere with others sources .
I have manly xiaomi devices, but also a pair of GLEDOPTO and a pair of CC2530 routers.
all are ok with 26 channel

Hi, @khzd . Have you managed to make it work?

unhappily not :(
the device is connected to the network, i can send request without timeout
BUT no response for on/off, what is amazing is that ( because we are on channel 26, thanks) the pairing is reproducible without issue ( i did it 4 or 5 times) and have long log about it

i learn a lot how to debug on javascript, but no competency on coding zigbee2mqtt :(
we need help from devs team, probably busy with a long list of requests, this is the price of the success

cheers

@khzd ,
I am not an expert as well. I have looked through some papers like Zigbee standard and some papers. It looks like channel hopping was introduced to Zigbee around 2007 but it was never widely adopted. There were some statements that in general a device should scan all the channels while pairing but some devices might have a special application profile and they can be programmed at the firmware level to use some subset of channels or a single channel.
Still just as a final test: could you please try to change the coordinator channel and wait for some time to see if it would still work. I just hope that this channel hopping is already there and a specific channel is necessary at pairing stage only.

give me 10 mn

Livolo answers on on/off commands, I can see it in wireshark but relay doesn't click.
There is also a 2 channels variant of this switch, I think it's possible that both switches have the same firmware, so I added
ep: {'left': 1, 'right': 2, 'both': 3},
in my devices.js, but then I try to change the state (zigbee2mqtt/livolo/left/set) I get an error
Zigbee cannot publish message to device because '0x00124b000befc0b9' not known by zigbee-shepherd
I do not know what the problem is in zigbee2mqtt or in my config or livolo had to provide some information to make this feature work.

@Ton1965 when i switch to channel 11 i get systematically zigbee2mqtt:error 2018-11-30 19:24:12 Zigbee publish to '0x00124b000bf0725e', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 205. No network route. Please confirm that the device has (re)joined the network.

do Channel 26 is relay more stable ;)

i would test this ep: {'left': 1, 'right': 2, 'both': 3}, but I have a single switch
can you show me what do you have in eplist from DB?
I have epList":[6]

the same as yours: "epList":[6] . I don't have 2 channels switch, I just assumed that they can have the same firmware

ok, but in zifbee2mqtt , there is differentiation between single, double switch. they probaly have a common code but some thing to differentiate this feature

Hi @lych,

in my devices.js, but then I try to change the state (zigbee2mqtt/livolo/left/set) I get an error
Zigbee cannot publish message to device because '0x00124b000befc0b9' not known by zigbee-shepherd

This error is in file lib/zigbee.js. It looks like the only reason is zigbee2mqtt cannot find this address in the database. Could it be that your device lost pairing?

Also could it be that you need to specify endpoint 6 explicitly even if it is the only one? All devices I have (mostly a bunch of sensors) all have endpoint 1 and it easily can be the default not requiring an explicit specification. But probably 6 needs to be set explicitly in 'devices.js'.

probably, I have to GLEDOPTO and @Koenkk modify the code to manage the different version of those devices, they have different eplist. see the code for GLEDOPTO in devices (in github)
{
zigbeeModel: ['GLEDOPTO'],
model: 'GL-C-008',
vendor: 'Gledopto',
description: 'Zigbee LED controller RGB + CCT / RGBW / WWCW / Dimmer',
supports: generic.light_onoff_brightness_colortemp_colorxy().supports,
fromZigbee: generic.light_onoff_brightness_colortemp_colorxy().fromZigbee,
toZigbee: generic.light_onoff_brightness_colortemp_colorxy().toZigbee,
ep: (device) => {
if (device.epList.toString() === '11,12,13') {
return {'': 12};
} else if (device.epList.toString() === '10,11,13') {
return {'': 11};
} else {
return {};
}
},
},
but if the same eplist, i do not see why he needs to manage this.
i think the issue is obviuos for devs team, they just need time to manage this.

I tried to have a look in the code, but it's really huge :)

after back to chanel 26 all my devices are coming back slowly , but the LIVOLO come back first, it probably preferes the channel 26.

When the device has only one ep, it is not necessary to have the ep: (device) => {..., zigbee2mqtt will select the first ep automatically.

Yes, I believe I have also found this piece of code.
@khzd, how much time does it take for the devices to reconnect after you change the channel? I tried to switch to channel 26 and all my Xiaomi devices stopped reporting. I did not have enough patience to wait for long so I switched the channel back after about 5 minutes.

Hello guys.
I give up. I've ordered the gateway, It will take about two weeks to get it, then, I hope, we will be able to find out how it works.

hi all,
I did massive tests
i discover that my cc2531 was not up-to-date, so I did it
I had to re-pair all my xiaomo devices and discover that when the CC2530 is on, impossible to pair : when i switch it off it pair!!!
now my livolo is back in the network but not dialog with the zigbee2mqtt : i have his damned log :
Zigbee publish to '0x00124b000bf0725e', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 183. APS no ack.

seems the protocol used by livolo has some

I tried also to replace all the code with the xiaomi switch no chance :(
@Koenkk any further tests that I can perform, i m able now to code in js but beginner ;)

NB, I tried to change the ep no effect.

Hello guys.
I give up. I've ordered the gateway, It will take about two weeks to get it, then, I hope, we will be able to find out how it works.

so we will test the coordinator :) with wich home-automation system do you plan to use it?
Cheers

hi guys, i managed a good price with alibaba shop for 12 devices, just need the GO from @Koenkk to buy , mix of all devices type is possible:)

Yes, I believe I have also found this piece of code.
@khzd, how much time does it take for the devices to reconnect after you change the channel? I tried to switch to channel 26 and all my Xiaomi devices stopped reporting. I did not have enough patience to wait for long so I switched the channel back after about 5 minutes.

you have to re-pair all devices if you want them immediately, i was not patient to wait too, in fact all my router had to be re-paired, AND enddevices, i loosed all of them now after last update of cc2531 !!!

@khzd I'm not going to use it, I just hope it will help us to figure out how to make Livolo work

hi @lych on witch home-auto do you plan to use?

Livolo use default TI example for cc2630 chip, the model has some space and they may modified it to non standard, they have done with RF version too, if anyone have their gateway, try to capture it with Ubiqua and post the logs.

yes, @lych order one, he will update us asap
so without this gateway no way to find the protocol ?
my last staus :

  • i can pair it simply

  • no onoff set possible , got error : failed with error Error: AF data request fails, status code: 183. APS no ack.

  • no response to zigbee2mqtt when switch on on the device physically

cheers

@khzd yes, it is the only way. I have do with other xiaomi devices

Thanks @dzungpv for your feed back

hi guys, any update?

img_20181216_2205031
livolo gateway

Hi there,

there is a rurussian page with information about the parts of the gateway:

https://mysku.ru/blog/aliexpress/68804.html

The german translation with google is not the best, the english one may be better.
They use the following for the wifi connection: EMW3165-P
http://en.mxchip.com/product/wifi_product/38

Maybe, this might help.

@Lumbricus as a Russian, I will say that there is no additional information for us :)
SZ05-L-PRO-2 http://www.shuncom.com/page42.html?product_id=1&_l=zh_CN
If to believe the specifications of the module, inside it uses the famous chip cc2530

Hi @domnio2332 did you try it with zigbee2mqtt
Can you send log?

Hi @/dzungpv
May you give the action plan to hack this gateway?
With log do we need and how to get it ?
Thanks

@khzd my geteway is already on its way to my post office. I hope to get it next week, then we will see what it sends to a switch to make it work.

Excellent @lych
But do you need an action plan to hack it or you « know » ?

hi guys, about the channels used for this device, I got this screenshot from livolo dev team confirming that they use channels 11 to 26 !
can any body explain this ? @@ptvoinfo any comment?

image

This screenshot means...nothing, at least without rest of code, just because 'defines' can be used in any way. If you can, ask them, please, why the switch responses 'ok' in return to 'ZCL on/off command' without actually changing relay state and what command has to be send to change the real state of a switch's relay.

ok will do, replay is not fast.
any news from @demonio2332 on the gatway ?

i ve asked the full code

No response! negative one :(
@demonio2332 any update from your gateway ?

hi @lych
did you get your gateway? if yes any news about hacking it?
cheers

Hi, @khzd. I haven't got it yet. :( I really hope to receive it next week.

thanks lych,
I asked the livolo dev team to send at least the datasheet, but not response yet, hop will get it with your gateway ;)

Hi
Here is there response :
“Sorry, we won't share the protocol at the stage. ”

Up to us to found the workaround.

Cheers

Hi lync
Did you have any update ?

Hi @khzd. I've got it!!! I wasted a day trying to pair the gataway with their app. I figured out that their app doesnt work on most of my android devices. Fortunately, I found a tablet on which the application works fine. I'll start experiments soon.

The gateway sends to the switch a command: ZCL Level Control: Move to Level
Level: 108, Transition Time: 0.1 sec - to on
Level: 1, Transition Time: 0.1 sec - to off

Awesome!
Finally I'm able to control it!

    {
        zigbeeModel: ['TI0001          '],
        model: 'TI0001          ',
        description: 'Zigbee switch',
        vendor: 'Livolo',
        supports: 'brightness',
        fromZigbee: [],
        toZigbee: [tz.light_brightness],
    },

ON

{
  "brightness": 108,
  "transition": 0.1
} 

OFF

{
  "brightness": 1,
  "transition": 0.1
}

Next step is to read the switch state

@lych Looks like Livolo is coming up with own zigbee-management standard :))))

Looks like this :)
But there are still some problems.
1) After the switch power off it doesn't remember that it had already been paired, so it doesn't work if 'permit_join: false' in config.
2) I don't know how to get the switch state. If I tounch the sensor it sends strange command:
1
Also it can answer in right way on ReadAttribute command and return the right state.
Is there a way to catch this strange command then send ReadAtribute command and get the switch real state?

If the gateway wants to know the switch state, it sends the command 'ZCL: OnOff togle' to the switch then gets the response ZCL: Default Response Status: Succes and a strange command which I posted above. I think it contains the switch state.

hi @lych
thanks for the feed-back, is it promising ?

cheers

Hi @lych

Nice to hear about the latest developments! Thanks a lot for your effort!

  • After the switch power off it doesn't remember that it had already been paired, so it doesn't work if 'permit_join: false' in config.

This might be a problem if pairing process requires the switch being close to zigbee2mqtt coordinator since taking the switch out of the wall after a power outage and bringing it to the coordinator is not something I am looking forward for 😄 Hopefully the switch has a good range even for pairing since it is not battery-powered.

Does anybody know how to make zigbee2mqtt send ReadAttribute command?

@Koenkk Could you please help me? Some time ago when I was experimenting, I saw ReadAttribute requests (I don't remember exactly, but probably it was ReadAttrubute OnOff ) from the zigbee2mqqt to the switch and it answered. Now I can't get the same behavior. Only DiscoverAttrubute commands that the swintch answers 'Unsupported command'. Is there a way to send ReadAttribute command?

It is possible an example for genBasic will help:
endpoint - it is necessary to find an enpoint that has the genOnOff cluster.
genBasic -> genOnOff
Attribute IDs can be found in the "zigbee-shepherd" sources.
handleCommandResp - response callback.

endpoint.foundation('genBasic', 'read', [
  {
  attrId: 4
  },
  {
  attrId: 5
  },
  {
  attrId: 7  
  } 
], handleCommandResp);

I'm waiting for my Livolo too and can help more later. My plans are to create a new custom firmware for this chip. I hope, it is unlocked.

@ptvoinfo Thanks

tz.light_brightness

hi do you use the standard one or did you customise it to adapt it to

ON

{
  "brightness": 108,
  "transition": 0.1
} 

OFF

{
  "brightness": 1,
  "transition": 0.1
}

i did some unsuccessful test with what you post : I loose systematicaly the link to the device :( how do you keep the link alive ?
Cheers
NB Good news @ptvoinfo have order one too

tz.light_brightness - I use the standard one.
My switch works while 'permit_join: true'

Workaround for getting current switch's state:

    {
        zigbeeModel: ['TI0001          '],
        model: 'TI0001          ',
        description: 'Zigbee switch',
        vendor: 'Livolo',
        supports: 'brightness',
        fromZigbee: [fz.light_state],
        toZigbee: [tz.on_off, tz.light_brightness],
    },

Topic:

zigbee2mqtt/<livolo_id>/get

Payload:

{
   "state" : ""
}

To keep the current state of the switch, this topic has to be published periodically. I think, about once a second is enought.

It is not the best solution, of course, but at least something.

So, there is the last problem, how to keep a connection.
@khzd Sometimes my switch loses connection too.

@Ton1965 It looks like not a whole pairing process, just some parts of it. Although I'm not sure :)

Hi
I've also got myself a 2-gang version of the switch.

I've followed comments in this thread and managed to semi-successfully pair the device with zigbee2mqtt. I've found out that to toggle the second (right) switch you would have to change transition to 0.2 in published message, like this:

{ "brightness": 108, "transition": 0.2 }

Also, with repeated state querying, returned genOnOff message looks like this:

Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":3}}'

where onOff is 3 if both switches are on, 2 if only right is on, 1 if only left and 0 if both are off.

I am only able to get this kind of reply the very first time after the switch state has changed, subsequent queries yield no reply from the device.

Another problem is that after pairing the device it only reacts to my commands for about 2-3 minutes. then connection is lost and I get error code 240 and have to re-pair again.

@MrRoch3 I can not believe that Livolo use transition to indicate the switch number :)))

@lych Looks like Livolo is coming up with own zigbee-management standard :))))

You said it yourself =)

@MrRoch3 According to the sniffer log, Livolo always answers about its state, at least my 1-gang does it. Probably, you don't see the answer because of zigbee2mqtt. Because { "brightness": 1 } has state 'ON' whereas we need "OFF". Luckily, it's easy to fix.

I'm afraid that to repair the problem with pairing we need some changes in zigbee-shepherd or even in coordinator firmware.

good progress :)
what about to post a debug file so @Koenkk may help to give a hand on this?

hi,sorry my english, add this {
zigbeeModel: ['TI0001 '],
model: 'TI0001 ',
description: 'Zigbee switch',
vendor: 'Livolo',
supports: 'brightness',
fromZigbee: [fz.light_state],
toZigbee: [tz.on_off, tz.light_brightness],
},
in devices.js, this is correct, restart zigbeemqtt, livolo pairing mode but zigbee mqtt cant read my livolo, some help, thanks

Hi
Is your pairing correct?
Please poste your dB line for livolo

cant pairing, dont read livolo in zigbeemqtt

Can you change state? Did you change the channel? My works on channel 26.

ashampoo_snap_2019 01 12_18h56m01s_001_pi-raspberrypi- -
i dont have idea how change the channel, newbie,jeje

@lindeluci Just add 'channel: 26' string in your configuration.yaml in section 'advanced'.
like this:

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: '<your mqtt server address>'
serial:
  port: <your coordinator port>
advanced:
  channel: 26
  log_level: debug

Unfortunately, we still have proplem with pairing and keeping the connection

after change the configuration, get this messge
ashampoo_snap_2019 01 12_19h24m40s_002_

Something wrong with modelID, probably because of spaces, copy it form your database.db to devices.js and pay attention on spaces.

{"id":6,"type":"EndDevice","ieeeAddr":"0x00124b001838ddb0","nwkAddr":33413,"manufId":0,"manufName":"LIVOLO\u0000\u0010TI0001 ","powerSource":"Mains (single phase)","modelId":"TI0001 ","epList":[6],"status":"online","joinTime":1547316453,"endpoints":{"6":{"profId":260,"epId":6,"devId":0,"inClusterList":[0,3],"outClusterList":[6],"clusters":{}}},"_id":"JEXuMnDSQFl3oJkv"}
{"id":6,"type":"EndDevice","ieeeAddr":"0x00124b001838ddb0","nwkAddr":33413,"manufId":0,"manufName":"LIVOLO\u0000\u0010TI0001 ","powerSource":"Mains (single phase)","modelId":"TI0001 ","epList":[6],"status":"online","joinTime":1547316453,"endpoints":{"6":{"profId":260,"epId":6,"devId":0,"inClusterList":[0,3],"outClusterList":[6],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{}},"genIdentify":{"dir":{"value":1},"attrs":{}},"genOnOff":{"dir":{"value":2},"attrs":{}}}}},"_id":"JEXuMnDSQFl3oJkv"}

copy all this?

NO! copy your modelId string (the part that is in quotes) from your database.db to your device.js to zigbeeMidel field. Pay attention on spaces, github parser eats spaces, there is a problem when you copy it form these posts.

ene 12 19:45:08 raspberrypi npm[1755]: zigbee2mqtt:debug 2019-1-12 19:45:08 Received zigbee message of type 'devIncoming' with data '"0x00124b001838ddb0"' of device 'TI0001 ' (0x00124b001838ddb0)
ene 12 19:45:08 raspberrypi npm[1755]: zigbee2mqtt:info 2019-1-12 19:45:08 Device incoming...
ene 12 19:45:08 raspberrypi npm[1755]: zigbee2mqtt:info 2019-1-12 19:45:08 MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
ene 12 19:45:08 raspberrypi npm[1755]: zigbee2mqtt:debug 2019-1-12 19:45:08 Received zigbee message of type 'devStatus' with data '"online"' of device 'TI0001 ' (0x00124b001838ddb0)

i have the gateway but is impossible pairing with livolo app, i have home assistant, but cant found livolo with zigbeemqtt

176

Is it possible that this issue is that of the same as these similar switches? (Perhaps the same Chinese manufacturer? I'm not sure if Zigbee is similar to Bluetooth with partial mac address linked to manufacturers etc, but the first 9 or 10 characters of the identifier is the same '0x00124b00')

Hi @lych
Can you confirm that you do not use this section in devices.js, recommended early ?

configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
const actions = [
(cb) => device.bind('genOnOff', coordinator, cb),
(cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
];

        execute(device, actions, callback);
    },
},

Hi, @khzd
I do not use it.

Thanks @lych
About loosing connection I saw somewhere in the z2m code that Xiaomi and routers are trigerred regularly because they go in sleep mode, what about to test that?
Ps I’m fare from my devices for two weeks

hi, decompile the livolo app, i can see that works with eclipse paho, i dont know if this info can help.
ashampoo_snap_2019 01 17_20h48m10s_001_

Hi @lindeluci, it can't help. Their app works with their cloud and their gateway works with this cloud. They both can't work without it (at least now) so we have to get rid of them.

Hi @lindeluci
Well done, now it will be a white box ;)
can you give more info about the micro-code
We are interested to flach it with a custom code to become more standard ;)
@ptvinfo will probably be interrested, he order one a week ago :)
We need to know
-why it work only on channel 26
-how to get it permanently connected
-confirm on off protocol, use brightness!!!
-...

Thanks for your contribution

Hi, sorry for off topic, I've managed to create plugin for homebridge which controls these switchers through Livolo's bridge and Livolo's server. The code is far from good, because it was "one night hackathon" for me and I didn't plan to show it to anyone, but I can share code if anyone interested. Basically I mimic their Android app, they use MQTT to notify app that switcher's state changed and I think this could be helpful for reverse engineering their protocol between switch and bridge.

Hi, @almsh. It will be interesting when somebody figure out how to set up a local server. Very likely it's just mqtt server with some their extensions and I think there is a function in gateway which allows to change server address. I don't believe that they reflash a gateway each time when they want to debug it, although after their zigbee realization everything is possible :).

Hi, sorry for off topic, I've managed to create plugin for homebridge which controls these switchers through Livolo's bridge and Livolo's server. The code is far from good, because it was "one night hackathon" for me and I didn't plan to show it to anyone, but I can share code if anyone interested. Basically I mimic their Android app, they use MQTT to notify app that switcher's state changed and I think this could be helpful for reverse engineering their protocol between switch and bridge.

Can you share your code? I'm quite curious.

@lych They send server url from app during bridge initialization (i just put their .apk to online unpack tool, they didn't obfuscate code so it' pretty easy to read 😄 ), but looks like they hardcoded key fingerprint of self-signed certificate to bridge firmware. It connecting to https://cn.appnew.livolo.com/ or 47.98.102.223 and I didn't manage to make it connect to any other address with other certificate.

Sad to hear it. I hoped it's possible to use it without reflashing.

I've mistaken, i didn't try to change address, just intercept communication with this tool https://debookee.com/ so it's still possible that it's not checking certificate for any other ip/host.

I've done little research described here maybe it will be helpful.

Flash the firmware is the best way. But require to buy XDS100v3(30-40$), change the sample code for CC2630 like i do with CC2530 here https://github.com/dzungpv/dnckatsw00x.
And then wire directly CC2630 output pin to the relay control pin

Does anybody know how to change coordinator's extPanId?

@lych It is necessary to update zigbee2mqtt and add another advanced option. Does it matter?

My two cents:
The custom firmware for the Livolo Switch is almost impossible. The switch uses two interacting programmable chips. I think CC2630 is a slave here (this is just a wireless bridge). Another chip controls all sensors and relays.

I'm waiting for a debugger (XDS100v3) and try to dig deeper.

There is a difference in the switch behaviour that depends on coordinator. The switch always sends 'Data request' commands 3-4 times per second (!!!). If there is no answer even for less than a second the switch sends 'Orphan Notification' then 'Beacon Requests'. If it is paired with original livolo gateway, it's ok, it sends these requests as long as it's necessary, but if it is custom coordinator the switch stops working after a second, and there is only one way to make it work again, it's touch the sensor for 5 secs or power it off then on. So, my switch works fine as long as the connection is perfect, in other way it stops working after some time. So, I want to find the difference between coordinators, first I want to hardcode my livolo extPanId but I haven't found how to do it yet.

Guys, you won't believe me!
The switch really doesn't like the fact that the coordinator has extPanId == '0xdddddddddddddddd'.
I've changed mine and it doesn't stop working anymore!

Congrat :)

Guys, you won't believe me!
The switch really doesn't like the fact that the coordinator has extPanId == '0xdddddddddddddddd'.
I've changed mine and it doesn't stop working anymore!

where i need to change?

@lych What extPanId does Livolo expect?

@ptvoinfo It seems that livolo expects everything except 0xddddd.... :)
First, I wanted to try my gataway extPanId, but I confused bytes order
[ 0x00, 0x12, 0x4b, 0x00, 0x19, 0x8d, 0x75, 0x21 ]
nevertheless it worked fine.
[ 0x21, 0x75, 0x8d, 0x19, 0x00, 0x4b, 0x12, 0x00 ] - This is my original livolo gateway extPanId

@lindeluci I don't know how to set it properly. so I just changed
[ 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD ]
to
[ 0x21, 0x75, 0x8d, 0x19, 0x00, 0x4b, 0x12, 0x00 ]
in .../zigbee2mqtt/node_modules/zigbee-shepherd/lib/config/nv_start_options.js
Pay attention, you need also change 'pan_id' in configuration.yaml to force the coordinator change extPanId.
The coordinator blinks a red led while changing panid.
Also pay attention, permit_join has to be true, this problem hasn't been resolved yet.

So, there is the last problem (at least for me). If I unplug then plug the coordinotor my switch sends 'Rejoin request', it's ok, but if I power off the switch itself, it sends 'Association request'. It's the reason why 'permit_join' has to be always 'true'.

Unfortunately, there is the same behaviour when the switch paired with livolo's original gateway. So, to deal with it we need a special pairing mode, when pairing is always allowed but only for those devices that had been already paired. I do not know how to do it in zigbee2mqtt, so I'll write a small server based on zigbee-shepherd specifically for livolo switchers. If anyone can do it in zigbee2mqtt it would be great.

@lych it is default behavior of cc2630 chip. I have developed custom hardware with that chip and get the same problem with zigbee2mqtt, sometime it disconnect rondomly, maybe wr can find the way to solve the problem.

@dzungpv Maybe I didn't explain it very well. It's not a random process. I deliberately unplug the switch from power source then plug it in. After it the switch sends Association request (starts the joining process) as if it hadn't been paired. Are you sure it is default behaviour? As for me, it looks like they did it either deliberately for some reason or just skipped a step of reading the documentation :)

@lych I've tested with your extPanId and my Livolo. Livolo stops responding to genOnOff -> read after about three minutes after (re)pairing.

@ptvoinfo Are you sure that your extPanId was changed? It's not enough just change it, you also have to change panId to force the coordinator to use new extPanId

@lych Yes, I'm sure. I've followed your recommendation about panId. zigbee2mqtt show the new extPanId on start.

Same here, my switch still stops reacting after 2-3 minutes after pairing, even though pan_id and ext_pan_id have been changed.
Am I missing some step? I've done the following:

  1. updated zigbee2mqtt to the latest version;
  2. changed channel to 26;
  3. added livolo switch to devices.js;
  4. changed pan_id in config;
  5. changed ext_pan_id in nv_start_options.js;
  6. service restart and switch re-pair

Also, seems I've lost pairing with other connected devices after changing pan_id's.
So, be careful with changing those if re-pairing other devices is not an option for you.

@MrRoch3 All steps, I see nothing missed.
My switch has been working without any problems since yesterday. But my coordinator and my switch are quite close to each other and there are not other joined devices.
@ptvoinfo Do you have a sniffer to see what is happening?
I'll try more devices and greater distance between them and the coordinator.

@lych I'm using a debug environment: a dedicated coordinator and the only one switch. Both are on my table. I don't have the Livolo gateway, but I can sniff the traffic of my test setup.

I've noted that my board of the Livolo switch is different than yours. My switch (2 buttons) has ver. E5 (VL-702X-2).

@ptvoinfo Could you do a little test? While the switch works, unplug the coordinator then plug it in and restart zigbee2mqtt. Do it for extPanId = 0xdddd.... and for mine extPanId. When I do it, I see different behavior. If extPanId = 0xdddd.... my switch dies after a few seconds. if it is another extPanId it continue working and sends rejoin request if coordinator appears.
If you sniff traffic, we will be able to compare our results.

@lych. Yes, I can confirm that extPanId matters in this case.
But the switch works only about 3 minutes with any extPanId if the coordinator is powered on.
What requests does the Livolo gateway send to the switch few times per second? I'll try it in zigbee2mqtt.

I haven't noticed any special requests from the livolo gateway. I'll sniff the traffic between switch and gateway and post it tonight.
There are a lot of requests from the switch to the coordinator ("Data request") but it looks like the coordinator itself answers for them (something like ping), it doesn't translate them to zigbee-shepherd. (but i'm not sure)

@ptvoinfo Here About 12 mins of working with livolo gateway.

  • Pairing
  • Some state changes (app)
  • Some state changes (sensor)
  • ~10 mins inactivity
  • Some state changes (app)
  • Some state changes (sensor)

I see only one suspicious thing, 'ZCL OnOff: Toggle' command after pairing. Maybe it must be sent to make a switch work properly.

@lych 'ZCL OnOff: Toggle' is the magic command. After this, the device works without any freezes. Conclusion:

  1. We need to use the specific channelId and extPanId.
  2. We need to send ZCL OnOff: Toggle after the device is connected to the coordinator (only once).
  3. Poll the device ZCL OnOff: Read to get the current state of buttons.

@ptvoinfo Great!
Does your switch now works without ZCL OnOff: Toggle? I mean, does this command has to be sent only once at all, like an activation code? Or you need to send it each time after pairing?

@lych I send it every time when the device joining the network (after restart or pairing).

@ptvoinfo Ok, probably it's a difference between firmware of our switches.

So, we have the last problem to deal with. What to do with pairing after off/on a switch.
What do you think, if something can be done in zigbee2mqtt or it's easier to write special server for livolo?

@lych In any case, we must start another instance of zigbee2mqtt with the different settings. So this instance will run with permit_join: true.

Imagine, your neighbor and you use this solution (unlikely of course, but still possible) and after a blackout in your building all your livolos would be paired with his coordinator or vise versa :)
In all over cases, I think it will work fine.

Of course, we can add a filter to our instance of zigbee2mqtt, but what if your switch will select a neighbor's gateway?

Of course, we can add a filter to our instance of zigbee2mqtt, but what if your switch will select a neighbor's gateway?

Keep a list of previously paired switches and make sure that only those will be paired after a blackout? That still leaves room for a said neighbor to pair your switches to his gateway after a blackout but there is a lot less chance.

Keep a list with paired devices and pairing new ones under a foil cap :)

Hi Guys,

I am pretty much impressed with your progress!
About the neighbor device pairing problem. How does Livolo solve this problem? It looks like if two neighbors have Livolo gateways and a bunch of switches they will get all their devices mixed up after a blackout and need to spend a day trying to re-pair them to correct coordinators 😄

@Ton1965 easily, their gateway has the list, and it adds new devices only when you select pairing mode in their app, we need something like this in zigbee2mqqt

@Ton1965 easily, their gateway has the list, and it adds new devices only when you select pairing mode in their app, we need something like this in zigbee2mqqt

Anyway, as I see, we have had quite good solution but as @ptvoinfo mentioned, it's better to use dedicated coordinator for it.
Also, to make it looks beautiful we need to write converter for livolo, I'll do it sooner or later, or maybe somebody else will do it earlier.

@Ton1965 easily, their gateway has the list, and it adds new devices only when you select pairing mode in their app, we need something like this in zigbee2mqqt

Does that mean anyone can take control over someone's light switches just by toggling input power?

It depends on what do you mean, but for livolo switchers case it's true, who answers on pairing request first, one will be a master.

Hello @lych
what is your maximum distance to pair it ? I m able to paire it within 2m but I didn't try more!

Hello,

I am quite new on Zigbee2mqtt, I built my controller last week and I received my livolo switch on Monday. I followed this thread and steps you gave and it finally works (I loose many times cause my controller was too far from the switch and it probably looses lot of messages).
I am able to send ON and OFF command and get state with the tips given by @khzd.

I didn't try to remove the permit join to see if the connection will keep paired or not. I am not sur to understand how to send "ZCL OnOff: Toggle" after pairing ?

@khzd I don't know, I've tried only my demo stand, it's not longer than 1 metre.
@graouxx zigbee2mqtt as well as javasript is not my cup of tea, maybe @ptvoinfo will post a beautiful solution, anyway we will have a more or less complete solution littel bit later

hi @graouxx
do you have a stable config ? can you post a photo of the internal device to check if you have a new release ?
how far is your controller
cheers

hi @khzd
My config seems to be stable. I set permit_join to false 1hr ago and it still working.
I'll try to take a photo tomorow.
(I also have to figure it out how to extend my zigbee range cause I only have end devices and the reception of the CC2531 seems to be not very good)

Hey excellent progress
can you resume exactly all steps ? we tried so much options :(
to extend your network a CC2530 is really a good option

It looks like the pairing distance should be large enough given re-pairing is necessary from time to time and both switches and a coordinator are designed for permanent installation and cannot be easily moved. BTW since they are mains powered can they be used as zigbee routers?

Probably if flashed. The current release is an end device :(

Hey excellent progress
can you resume exactly all steps ? we tried so much options :(
to extend your network a CC2530 is really a good option

@khzd , what I did

  1. Stop service
  2. update zigbee2mqtt to the latest version
  3. change channel to 26 and panid, as below
homeassistant: false
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://192.168.2.229'
serial:
  port: /dev/ttyACM0
advanced:
  pan_id: 6755
  #ext_pan_id: [ 0x21, 0x75, 0x8d, 0x19, 0x00, 0x4b, 0x12, 0x00 ]
  channel: 26
  log_level: debug
devices:
  '0x00158d000186ea61':
    friendly_name: 'xiaomi'
    retain: false
  '0x00124b001838ddcf':
    friendly_name: 'livolo'
    retain: false

  1. add livolo switch to devices.js as below
{
        zigbeeModel: ['TI0001          '],
        model: 'TI0001          ',
        description: 'Zigbee switch',
        vendor: 'Livolo',
        supports: 'brightness',
        fromZigbee: [fz.light_state],
        toZigbee: [tz.on_off, tz.light_brightness],
    },
  1. change ext_pan_id in nv_start_options.js with this value :
 extPanId: {
        configid: NVID8.EXTENDED_PAN_ID,    // 0x2D
        len: 0x08,
        value: [ 0x21, 0x75, 0x8d, 0x19, 0x00, 0x4b, 0x12, 0x00 ]
    },
  1. service restart
  2. switch re-pair (keep press 5sec)
  3. send ON OFF to "zigbee2mqtt/livolo/set" with following payload
{"transition":0.1,"brightness":108}
{"transition":0.1,"brightness":1}

where are the files from step 4, 5 and 8. thanks

where are the files from step 4, 5 and 8. thanks

node_modules/zigbee-shepherd/lib/config/nv_start_options.js
node_modules/zigbee-shepherd-converters/devices.js

For step 8, no file to edit, just a message to send in your MQTT broker

I've tried to prepare a ready to use solution, but we need to change three different modules on Github.
zigbee-shepherd
zigbee-shepherd-converters
zigbee2mqtt
I don't know how to do it, especially for zigbee-shepherd.

  • platform: mqtt
    name: "oficina_zig"
    state_topic: "zigbee2mqtt/0x00124b001838ddb0"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_on: "ON"
    payload_off: "OFF"
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/livolo/set"
    this configuration in home assistant is correct?
  • platform: mqtt
    name: "oficina_zig"
    state_topic: "zigbee2mqtt/0x00124b001838ddb0"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_on: "ON"
    payload_off: "OFF"
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/livolo/set"
    this configuration in home assistant is correct?

hello, you need to send :
{"transition":0.1,"brightness":108} for on
{"transition":0.1,"brightness":1} for off
otherwise it wont work :(

Does anyone have 3,4,5 way switches?

@ptvoinfo Does livolo provide more than 2 ways switches ? I only see 1 or 2 on aliexpress for zigbee.

Oops. My mistake.

@ptvoinfo Does livolo provide more than 2 ways switches ? I only see 1 or 2 on aliexpress for zigbee.

Also i do not know if there is any subtle difference with the 2-way switches since you need to pair/sync those with each other.

@cablekevin I didn't try to pair my 2-way switch with another end device. Only with a coordinator.

@ptvoinfo livolo have 1 and 2 ways switchs and one or two button + the gateway. you can see detail on alibaba
livolo
attention : old prices, order for more than 12 pieces, mix is possible

I placed an order of a combinaison off all of them waiting the conclusion of this work

I've order everything for my entire house a couple of months ago. I see that Livolo is now also "selling" the wifi/zigbee version. I guess it's just rebranding right?

Hi all
to implement this very specific livolo zigbee implementaion, any idea how to transform the standard onof to a livolo_onoff , ie:
on_off: {
key: ['state'],
convert: (key, value, message, type) => {
const cid = 'genOnOff';
const attrId = 'onOff';
if (type === 'set') {
return {
cid: cid,
cmd: value.toLowerCase(),
cmdType: 'functional',
zclData: {},
cfg: cfg.default,
};
} else if (type === 'get') {
return {
cid: cid,
cmd: 'read',
cmdType: 'foundation',
zclData: [{attrId: zclId.attr(cid, attrId).value}],
cfg: cfg.default,
};
}
},
},
TO
LIVOLO_on_off: {
key: ['state'],
convert: (key, value, message, type) => {
const cid = 'genOnOff';
const attrId = 'onOff';
if (type === 'set') {
return {
cid: cid,
cmd: replace value.toLowerCase(), by {"transition":0.1,"brightness":108} for on
{"transition":0.1,"brightness":1} for off
cmdType: 'functional',
zclData: {},
cfg: cfg.default,
};
} else if (type === 'get') {
return {
cid: cid,
cmd: 'read',
cmdType: 'foundation',
zclData: [{attrId: zclId.attr(cid, attrId).value}],
cfg: cfg.default,
};
}
},
},

it will implement the magical sequence within zigbee2mqtt and not in various home-auto separatly ?
Cheers

I've order everything for my entire house a couple of months ago. I see that Livolo is now also "selling" the wifi/zigbee version. I guess it's just rebranding right?

witch brand did you get?

@khzd sadly no :(

As far as I understand you bought Livolo but RF 433mhz ones?

From: Khaled notifications@github.com
Sent: Wednesday, January 30, 2019 2:00 PM
To: Koenkk/zigbee2mqtt zigbee2mqtt@noreply.github.com
Cc: mpisek matej.pisek@crossnet.si; Comment comment@noreply.github.com
Subject: Re: [Koenkk/zigbee2mqtt] Attempt to pair Livolo Zigbee switch (#592)

I've order everything for my entire house a couple of months ago. I see that Livolo is now also "selling" the wifi/zigbee version. I guess it's just rebranding right?

witch brand did you get?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/Koenkk/zigbee2mqtt/issues/592#issuecomment-458934843 , or mute the thread https://github.com/notifications/unsubscribe-auth/ARn1pB-XEH14QlJUQmGqeyD_trSs9Xrvks5vIZdGgaJpZM4Ydh6N . https://github.com/notifications/beacon/ARn1pIMMjhYSI8u8kj3xvul03QhmD-hLks5vIZdGgaJpZM4Ydh6N.gif

@khzd

    livolo_switch_on_off: {
        key: ['state1', 'state2'],
        convert: (key, value, message, type) => {

            if (typeof value !== 'string') {
                return;
            }

            if (type === 'set') {
                const cid = 'genLevelCtrl';
                const attrId = 'currentLevel';
                const state = (value.toLowerCase() === 'on')? 108: 1;
                const channel = 0;

                switch (key) {
                case 'state1':
                    channel = 1;
                    break;
                case 'state2':
                    channel = 2;
                    break;
                default:
                    return;
                }
                return {
                    cid: cid,
                    cmd: 'moveToLevelWithOnOff',
                    cmdType: 'functional',
                    zclData: {
                        level: state,
                        transtime: channel,
                    },
                    cfg: cfg.default,
                    readAfterWriteTime: 250,
                };
            } else if (type === 'get') {
                const cid = 'genOnOff';
                const attrId = 'onOff';
                return {
                    cid: cid,
                    cmd: 'read',
                    cmdType: 'foundation',
                    zclData: [{attrId: zclId.attr(cid, attrId).value}],
                    cfg: cfg.default,
                };
            }
        },
    },

I've order everything for my entire house a couple of months ago. I see that Livolo is now also "selling" the wifi/zigbee version. I guess it's just rebranding right?

witch brand did you get?

Livolo, I got quite a few VL-C701Z and VL-C701SZ's. But for example on the Dutch Livolo site the "Zigbee only versions" have been replaced with Zigbee/wifi versions. ( e.g. https://www.livolo.nl/a-54363042/welkom/livolo-wit-enkelpolige-schakelaar-zigbee-wifi-app ) To be clear i think this is only marketing from their side, but i just wanted to see if someone can verify this.

Finally did you get a better method than polling zigbee2mqtt/{id}/get with {"state":""} to get the status of the switch ?

I got a lot of message of this kind today
janv. 30 14:54:23 mini-pc npm[32111]: zigbee2mqtt:error 2019-1-30 14:54:23 Zigbee publish to '0x00124b001838ddcf', genLevelCtrl - moveToLevelWithOnOff - {"level":108,"transtime":1} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 240. MAC transaction expired.

I also try to poll every 5 seconds to get the status, and now my switch is freezing. Nothing happen anymore when I touch it (only changing color).
I have to switch the power on/off to make it works again.

@graouxx you need to send the "ZCL OnOff: Toggle" command once when the device joined to the network.

@ptvoinfo, thanks, how to send a specific command ?

It's strange cause yesterday I never sent this command and it was working

Finally did you get a better method than polling zigbee2mqtt/{id}/get with {"state":""} to get the status of the switch ?

The switch sends a command when you touch a sensor, but as we can see in wireshark this command is malformed. I am not sure but I think the coordinator just drops it. So if we want to receive it, some changes have to be done in coordinator's firmware.
I think we have to ask @dzungpv if it's possible or not.

I've order everything for my entire house a couple of months ago. I see that Livolo is now also "selling" the wifi/zigbee version. I guess it's just rebranding right?

witch brand did you get?

Livolo, I got quite a few VL-C701Z and VL-C701SZ's. But for example on the Dutch Livolo site the "Zigbee only versions" have been replaced with Zigbee/wifi versions. ( e.g. https://www.livolo.nl/a-54363042/welkom/livolo-wit-enkelpolige-schakelaar-zigbee-wifi-app ) To be clear i think this is only marketing from their side, but i just wanted to see if someone can verify this.

@cablekevin

yes it correspond to the list they provided ( see photo) the end-devices are zigbee and the gateway is wifi/zigbee.
are you able to operate them with or witout the livolo gateway ? do you use any home-automation or only there application?
cheers

@ptvoinfo
what about to implement this famous sequence ZCL OnOff: Toggle in the configure section of the device :+1: {
zigbeeModel: ['TI0001 '],
model: 'TI0001 ',
description: 'Zigbee switch',
supports: 'on/off',
vendor: 'Livolo',
fromZigbee: [],
toZigbee: [tz.on_off],
configure: (ieeeAddr, shepherd, coordinator, callback) => {
const device = shepherd.find(ieeeAddr, 1);
const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
const actions = [
(cb) => device.bind('genOnOff', coordinator, cb),
(cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
];
execute(device, actions, callback);

},
},

  • platform: mqtt
    name: "oficina_zig"
    state_topic: "zigbee2mqtt/0x00124b001838ddb0"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_on: "ON"
    payload_off: "OFF"
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/livolo/set"
    this configuration in home assistant is correct?

hello, you need to send :
{"transition":0.1,"brightness":108} for on
{"transition":0.1,"brightness":1} for off
otherwise it wont work :(

i dont have any idea where i need to add this

@lindeluci it's more complexe to do it in HA, need an automation and a toggle to implement :(
@ptvoinfo gave the code to implement in tozigbee.js see previous message livolo_switch_on_off js code.
Cheers

@ptvoinfo

const channel = 0;

hi this line generates an error const channel = 0; may be var channel =0 is better , I test it and got the good magic sequence :)

@ptvoinfo

const channel = 0;

hi this line generates an error const channel = 0; may be var channel =0 is better , I test it and got the good magic sequence :)

@khzd
I didn't see where you have const channel = 0 ?
Is that in device.js ? cause in your previous post I don't see this. Could you share the code you implement to make it works ? thx

@graouxx avec plaisir :)
in tozigbee.js add

`
livolo_switch_on_off: {
key: ['state1', 'state2','state'],
convert: (key, value, message, type) => {
if (typeof value !== 'string') {
return;
}
if (type === 'set') {
const cid = 'genLevelCtrl';
const attrId = 'currentLevel';
const state = (value.toLowerCase() === 'on')? 108: 1;
var channel = 0

            switch (key) {
            case 'state1':
            case 'state':
                var channel = 1;
                break;
            case 'state2':
                var channel = 2;
                break;
            default:
                return;
            }
            return {
                cid: cid,
                cmd: 'moveToLevelWithOnOff',
                cmdType: 'functional',
                zclData: {
                    level: state,
                    transtime: channel,
                },
                cfg: cfg.default,
                readAfterWriteTime: 250,
            };
        } else if (type === 'get') {
            const cid = 'genOnOff';
            const attrId = 'onOff';
            return {
                cid: cid,
                cmd: 'read',
                cmdType: 'foundation',
                zclData: [{attrId: zclId.attr(cid, attrId).value}],
                cfg: cfg.default,
            };
        }
    },
},

`

Attention: as i didnt implement the ext_pan_id in run, i'm still not able to pilot the livol yet, just a step forward :)

@khzd merci beaucoup !

It works, I could send for ON and OFF

{"state1":"on"}
{"state1":"off"}

In device.js, I put this

{
        zigbeeModel: ['TI0001          '],
        model: 'TI0001          ',
        description: 'Zigbee switch',
        vendor: 'Livolo',
        supports: 'on/off',
        fromZigbee: [fz.light_state],
        //toZigbee: [tz.on_off],
        toZigbee: [tz.livolo_switch_on_off],
        configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const actions = [
               (cb) => device.bind('genOnOff', coordinator, cb),
               (cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
            ];
            execute(device, actions, callback);
         },
    },

@Koenkk Could you please help us?
We need to send 'ZCL OnOff: Toggle' after a livolo switch has been joined.

Also, we would be grateful if you would consider adding a special joining mode in which joining is always allowed but only for those devices that had already been joined.

@khzd merci beaucoup !

It works, I could send for ON and OFF

{"state1":"on"}
{"state1":"off"}

In device.js, I put this

{
        zigbeeModel: ['TI0001          '],
        model: 'TI0001          ',
        description: 'Zigbee switch',
        vendor: 'Livolo',
        supports: 'on/off',
        fromZigbee: [fz.light_state],
        //toZigbee: [tz.on_off],
        toZigbee: [tz.livolo_switch_on_off],
        configure: (ieeeAddr, shepherd, coordinator, callback) => {
            const device = shepherd.find(ieeeAddr, 1);
            const cfg = {direction: 0, attrId: 0, dataType: 16, minRepIntval: 0, maxRepIntval: 1000, repChange: 0};
            const actions = [
               (cb) => device.bind('genOnOff', coordinator, cb),
               (cb) => device.foundation('genOnOff', 'configReport', [cfg], foundationCfg, cb),
            ];
            execute(device, actions, callback);
         },
    },

HI do can you switch it manual ? do you have the status in your home-auto?

yes @Koenkk we had a very good progress event if it imply some deep change in the code, can you now help us for this last task : how to keep the link permanent ? send magic sequence ZCL OnOff: Toggle after pairing?
with thx

HI do can you switch it manual ? do you have the status in your home-auto?

@khzd I am not sure to understand. I am able to switch from my home-auto, then I received back the status. But when I press manualy the buton with my finger, I don't get the status.

you may test this section:
} else if (type === 'get') {
const cid = 'genOnOff';
const attrId = 'onOff';
return {
cid: cid,
cmd: 'read',
cmdType: 'foundation',
zclData: [{attrId: zclId.attr(cid, attrId).value}],
cfg: cfg.default,
};
by adding console.log({type} ); to see if this section is called? i cannot do this this, i will resetup my network this WE :( 55 devices to re-paire with 1.1.0 + ext_pan_id change :(

you may test this section:
} else if (type === 'get') {
const cid = 'genOnOff';
const attrId = 'onOff';
return {
cid: cid,
cmd: 'read',
cmdType: 'foundation',
zclData: [{attrId: zclId.attr(cid, attrId).value}],
cfg: cfg.default,
};
by adding console.log({type} ); to see if this section is called? i cannot do this this, i will resetup my network this WE :( 55 devices to re-paire with 1.1.0 + ext_pan_id change :(

for me it's working, I can see in the log the Read request send to the device

janv. 30 21:29:18 mini-pc npm[29426]:   zigbee2mqtt:debug 2019-1-30 21:29:18 Received MQTT message on 'zigbee2mqtt/livolo-switch1-1/get' with data '{"state1":""}'
janv. 30 21:29:18 mini-pc npm[29426]:   zigbee2mqtt:info 2019-1-30 21:29:18 Zigbee publish to '0x00124b001838ddcf', genOnOff - read - [{"attrId":0}] - {"manufSpec":0,"disDefaultRsp":0} - null

State1 is empty!!’ Must be on or off ? No

May you post a photo of the inside device ? To see if every one are on the same release ?

State1 is empty!!’ Must be on or off ? No

May you post a photo of the inside device ? To see if every one are on the same release ?

State1 is empty cause it's a get. And inside the if section I don't see any usage of 'value' object. So for me it's normal?

About photo, I tried this morning to open the box, but was afraid to break it. Am I supposed to remove the Grey cover? It won't break anything?

I'm working on an update for zigbee2mqtt and all necessary modules. I hope to complete this work today and submit a pull request.

Thx @ptvoinfo

/Lumbricus, Open it for a photo without break it, I will give a try this night.

The update is ready (I've submitted a pull request).

You may write to <PATH>/<DEVICE_ID>/set
1-way switches: ON, OFF, {"state1": "ON"} or {"state1": "OFF"}
2-way switches:
left button: ON, OFF, {"state1": "ON"} or {"state1": "OFF"}
right button: {"state2": "ON"} or {"state2": "OFF"}

<PATH>/<DEVICE_ID>/get returns a state for two buttons even if you have the 1-way switch.

My extension polls all switches every second and checks the state of buttons.

@ptvoinfo Great job! Thanks a lot.
Have you added magic 'OnOff: Toggle' after pairing?

@lych Yes, of course (zigbee2mqtt\lib\extension\pollLivoloSwitch.js)

@ptvoinfo

I tried your PR, and I faced some problems.
See my log, it's not working continously. At the begining it works well, then Mac transaction log appears and not all command are treated by the switch. Do I miss something ?

janv. 31 15:06:45 mini-pc npm[24730]:         {"message":"AF data request fails, status code: 240. MAC transaction expired.","stack":"Error: AF data request fails, status code: 240. MAC transaction expired.\n    at Controller.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:101:37)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:116:13)\n    at Controller.emit (events.js:211:7)\n    at dispatchIncomingMsg (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:708:23)\n    at Controller.dataConfirmHandler (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:733:12)\n    at emitOne (events.js:116:13)\n    at Controller.emit (events.js:211:7)\n    at Object.bridge._areqEventBridge (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/event_bridge.js:15:16)\n    at CcZnp.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:105:16)"}
janv. 31 15:06:45 mini-pc npm[24730]:   zigbee2mqtt:debug 2019-1-31 15:06:45 Received MQTT message on 'zigbee2mqtt/livolo-switch1-1/set' with data '{"state1":"on"}'
janv. 31 15:06:45 mini-pc npm[24730]:   zigbee2mqtt:info 2019-1-31 15:06:45 Zigbee publish to device '0x00124b001838ddcf', genLevelCtrl - moveToLevelWithOnOff - {"level":108,"transtime":1} - {"manufSpec":0,"disDefaultRsp":0} - null
janv. 31 15:06:46 mini-pc npm[24730]:   zigbee2mqtt:info 2019-1-31 15:06:46 Zigbee publish to device '0x00124b001838ddcf', genOnOff - read - [{"attrId":0}] - {"manufSpec":0,"disDefaultRsp":0} - null
janv. 31 15:06:46 mini-pc npm[24730]:   zigbee2mqtt:debug 2019-1-31 15:06:46 Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'TI0001          ' (0x00124b001838ddcf)
janv. 31 15:06:46 mini-pc npm[24730]:   zigbee2mqtt:error 2019-1-31 15:06:46 Zigbee publish to device '0x00124b001838ddcf', genOnOff - read - [{"attrId":0}] - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 240. MAC transaction expired.
janv. 31 15:06:50 mini-pc npm[24730]:   zigbee2mqtt:info 2019-1-31 15:06:50 genOnOff.read response error:
janv. 31 15:06:50 mini-pc npm[24730]:         {"message":"AF data request fails, status code: 240. MAC transaction expired.","stack":"Error: AF data request fails, status code: 240. MAC transaction expired.\n    at Controller.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:101:37)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:116:13)\n    at Controller.emit (events.js:211:7)\n    at dispatchIncomingMsg (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:708:23)\n    at Controller.dataConfirmHandler (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:733:12)\n    at emitOne (events.js:116:13)\n    at Controller.emit (events.js:211:7)\n    at Object.bridge._areqEventBridge (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/event_bridge.js:15:16)\n    at CcZnp.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:105:16)"}
janv. 31 15:06:51 mini-pc npm[24730]:   zigbee2mqtt:info 2019-1-31 15:06:51 genOnOff.read response error:
janv. 31 15:06:51 mini-pc npm[24730]:         {"message":"AF data request fails, status code: 240. MAC transaction expired.","stack":"Error: AF data request fails, status code: 240. MAC transaction expired.\n    at Controller.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:101:37)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:116:13)\n    at Controller.emit (events.js:211:7)\n    at dispatchIncomingMsg (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:708:23)\n    at Controller.dataConfirmHandler (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:733:12)\n    at emitOne (events.js:116:13)\n    at Controller.emit (events.js:211:7)\n    at Object.bridge._areqEventBridge (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/event_bridge.js:15:16)\n    at CcZnp.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:105:16)"}

Hi, great job ptvoinfo.
Is it in dev branch ?
Thanks again for your support

@khzd It's in PR. Only zigbee-sheperd changes have been approved by @Koenkk
@graouxx The same result
@ptvoinfo
Changing extPanId - works
Converters - work
Polling - works
Sending magic 'OnOff: Toggle' - doesn't work
Looks like something went wrong, I don't see this command in wireshark and my switch behaves strange.
It's trying to pair every some seconds. If I delete database.db and state.json it starts to work ok.
After power off/on, again, there is cyclic pairing.

UPD: Looks like the magic command sends after restarting zigbee2mqtt, but not after pairing

This is the inner of my one:

fr_612_size1024
fr_613_size1024
Version: E7
VL-C701X-2

@graouxx @lych Did you use the necessary extPanId?

@ptvoinfo Of course. I use the same extPanId as my livolo gateway uses.
Something wrong with sending magic command. As I see on my demo stand, it sends each time after restarting zigbee2mqtt, doesn't depends if the switch online or not (not sure). The command is not sent after paring (I don't see it in the sniffer). And something cause strange switch's behavior, it tries to pair each some seconds.
I didn't have time to figure out what was going on exactly, I'll try to do it tonight.

@graouxx @lych Did you use the necessary extPanId?

Hello @ptvoinfo
Same as @lych

In my conf file

  ext_pan_id:
    - 33
    - 117
    - 141
    - 25
    - 0
    - 75
    - 18
    - 0

And in the log file

2019-1-31 18:38:22 - debug: Using zigbee-shepherd with settings: '{"net":{"panId":6755,"extPanId":[33,117,141,25,0,75,18,0],"channelList":[$
2019-1-31 18:38:22 - debug: Loaded state from file /opt/zigbee2mqtt/data/state.json
2019-1-31 18:38:22 - info: Starting zigbee2mqtt version 1.1.0 (commit #9d61184)
2019-1-31 18:38:22 - info: Starting zigbee-shepherd
2019-1-31 18:38:22 - info: zigbee-shepherd started
2019-1-31 18:38:22 - info: Coordinator firmware version: '20181024'
$d":"0x00124b00198d7521","ieeeAddr":"0x00124b0018df3342","nwkAddr":0},"firmware":{"transportrev":2,"product":0,"version":"2.6.3","revision"$

@ptvoinfo
I've applied your last changes.
There is still the problem after re-powering the switch.
I figured out that polling spoils the joining proccess. The switch tries to join over and over again without any success.
I think everything will be fine if the polling is stopped after losing the connection or after having an error (some errors).
By the way, I noticed that my switch's zigbee module continue to work for about 3-6 secs after power off! Be careful when you test something, if you re-power it too fast, it will work as if nothing had happened.

@lych Ok. I'll implement your suggestion (pause polling after 3 sequential failed attempts).

Merged the pr's from @ptvoinfo, should be supported in the dev branch now.

Hi
I set up a new platform for testing with a separated network
here is my checklist


    • updated zigbee2mqtt to the dev version;


    • changed channel to 26 and extPanId" to [33,117,141,25,0,75,18,0] with the appropiate syntax;


    • added livolo switch to devices.js;


    • service restart and switch re-pair

févr. 03 02:04:34 minipc19 npm[20964]: zigbee2mqtt:info 2019-2-3 02:04:34 Logging to directory: '/opt/zigbee2mqtt/data/log/2019-02-03.02-04-33'
févr. 03 02:04:34 minipc19 npm[20964]: zigbee2mqtt:debug 2019-2-3 02:04:34 Removing old log directory '/opt/zigbee2mqtt/data/log/2019-02-02.23-48-10'
févr. 03 02:04:34 minipc19 npm[20964]: zigbee2mqtt:debug 2019-2-3 02:04:34 Using zigbee-shepherd with settings: '{"net":{"panId":6755,"extPanId":[33,117,141,25,0,75,18,0],"channelList":[26],"precfgkey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]},"dbPath":"/opt/zigbee2mqtt/data/database.db","sp":{"baudRate":115200,"rtscts":true}}'

I m getting
févr. 03 02:04:42 minipc19 npm[20964]: zigbee2mqtt:error 2019-2-3 02:04:42 genOnOff.toggle response error:
févr. 03 02:04:42 minipc19 npm[20964]: {"message":"AF data request fails, status code: 240. MAC transaction expired.","stack":"Error: AF data request fails, status code: 240. MAC transaction expired.\n at Controller. (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:101:37)\n at Object.onceWrapper (events.js:277:13)\n at Controller.emit (events.js:189:13)\n at dispatchIncomingMsg (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:708:23)\n at Controller.dataConfirmHandler (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/af.js:733:12)\n at Controller.emit (events.js:189:13)\n at Object.bridge._areqEventBridge (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/event_bridge.js:15:16)\n at CcZnp. (/opt/zigbee2mqtt/node_modules/zigbee-shepherd/lib/components/controller.js:105:16)\n at CcZnp.emit (events.js:189:13)\n at CcZnp._mtIncomingDataHdlr (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:370:14)"}

@ptvoinfo Any idea?

@khzd does the new update works a short time before you get this error message? Or do you get it immediately after start?

@khzd In my case, the polling spoils the joining process. Try to disable it.
In /opt/zigbee2mqtt/lib/extension/pollLivoloSwitch.js change
} else if (this.configured[d.ieeeAddr] === 2) {
to
} else if (0/*this.configured[d.ieeeAddr] === 2*/) {
and check what happens.

@khzd does the new update works a short time before you get this error message? Or do you get it immediately after start?

hi @ptvoinfo , it gives this error message at the startup

every second I have a new error message :+1: 2019-2-3 02:51:12 - debug: Received MQTT message on 'z2m/my_office_light_up/state1/set' with data 'ON'
2019-2-3 02:51:12 - error: Failed to find device with ieeAddr: 'my_office_light_up/state1'
2019-2-3 02:51:15 - debug: Received MQTT message on 'z2m/my_office_light_up/state1/set' with data 'ON'
2019-2-3 02:51:15 - error: Failed to find device with ieeAddr: 'my_office_light_up/state1'
2019-2-3 02:51:18 - debug: Received MQTT message on 'z2m/my_office_light_up/state1/set' with data 'ON'
2019-2-3 02:51:18 - error: Failed to find device with ieeAddr: 'my_office_light_up/state1'

no pb to join !!!

I will give a try to @lych's assumption to check :)
EDIT
Good assumption @lynch, I can Control it since 2 min :)
proof:
févr. 03 12:48:30 minipc19 npm[1242]: zigbee2mqtt:info 2019-2-3 12:48:30 MQTT publish: topic 'z2m/my_office_light_up', payload '{"state":"ON","linkquality":141}'
févr. 03 12:48:30 minipc19 npm[1242]: zigbee2mqtt:debug 2019-2-3 12:48:30 Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'TI0001 ' (0x00124b000bf0725e)
févr. 03 12:48:30 minipc19 npm[1242]: zigbee2mqtt:info 2019-2-3 12:48:30 MQTT publish: topic 'z2m/my_office_light_up', payload '{"state":"ON","linkquality":141}'

and after 3 min gloops
févr. 03 12:52:51 minipc19 npm[1242]: zigbee2mqtt:error 2019-2-3 12:52:51 Zigbee publish to device '0x00124b000bf0725e', genLevelCtrl - moveToLevelWithOnOff - {"level":1,"transtime":1} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 183. APS no ack.
févr. 03 12:52:51 minipc19 npm[1242]: zigbee2mqtt:error 2019-2-3 12:52:51 Zigbee publish to device '0x00124b000bf0725e', genOnOff - read - [{"attrId":0}] - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: AF data request fails, status code: 183. APS no ack.

Remarque : i never have so goooood linkquality, i use i cc2530 with external antenna
cheers

@khzd I've been testing it for about 10 hours with link quality about 0. It works fine.
For you, it looks like your switch doesn't have the magic command on time.
Try to delete database.db, state.json and devices from configuration.yaml and pair the switch.
When I do it, I can see in wireshark, the magic command sent on time as if it were original livolo gateway.
My switch somehow works without the magic command so I can not test it in other cases.

hi how "My switch somehow works without the magic command so I can not test it in other cases." i thought it's mandatoty?

I repair again and able to use it since some minutes and loose the link :(
after
this commande
févr. 03 15:23:21 minipc19 npm[2858]: zigbee2mqtt:info 2019-2-3 15:23:21 Zigbee publish to device '0x00124b000bf0725e', genOnOff - read - [{"attrId":0}] - {"manufSpec":0,"disDefaultRsp":0} - null

can you resume step by step what to do, i'm confused
for info I added also a xiaomi plug (0x00158d0002482670) and i got now :
févr. 03 15:24:00 minipc19 npm[2858]: zigbee2mqtt:debug 2019-2-3 15:24:00 Ping 0x00158d0002482670
févr. 03 15:24:10 minipc19 npm[2858]: zigbee2mqtt:error 2019-2-3 15:24:10 Failed to ping 0x00158d0002482670

@khzd Unfortunately I can't help you. Probably my switch has different firmaware. According to livolo gateway behaviour the magic command has to be sent after the pairing process had been finished. But mine one works fine without any magic commands.

do you have a simple switch or a double ?

I have one gang(single sensor) switch. I ordered it in the first days after the start of sales so I suspect it can have little bit different firware. I'll order a couple more, one and two gang, and get them in about a month.

I have also a simple gang, so we have a different soft release ?
do we have the same record in DB ? mine is:
{"id":5,"type":"EndDevice","ieeeAddr":"0x00124b000bf0725e","nwkAddr":54243,"manufId":0,"manufName":"LIVOLO\u0000\u0010TI0001 ","powerSource":"Mains (single phase)","modelId":"TI0001 ","epList":[6],"status":"offline","joinTime":null,"endpoints":{"6":{"profId":260,"epId":6,"devId":0,"inClusterList":[0,3],"outClusterList":[6],"clusters":{"genBasic":{"dir":{"value":1},"attrs":{}},"genIdentify":{"dir":{"value":1},"attrs":{}},"genOnOff":{"dir":{"value":2},"attrs":{}}}}},"_id":"u2XmqOAMM11YywFI"}

I plan to order 15 for my big house and install a CC2530 with external antenna : i have linquality close to 200 for xiaomi devices and close to 150 for LIVOLO ( 2m distance)

@khzd Check your extPanId one more time. Pay attentinon, you need the second string with extPanId in the log, not the first. This one:
zigbee2mqtt:debug 2/3/2019, 7:10:19 PM zigbee-shepherd info: {"enabled":true,"net":{"state":"Coordinator","channel":26,"panId":"0x1234","extPanId":"0x00124b00198d7521","ieeeAddr":"0x00124b0018eceb2e","nwkAddr":0},"firmware":{"transportrev":2,"product":0,"version":"2.6.3","revision":20180815},"startTime":1549206619,"joinTimeLeft":0}
Try other panId (I use 0x1234), maybe it matters.

I used
ext_pan_id:
- 33
- 117
- 141
- 25
- 0
- 75
- 18
- 0
it is correct syntax and content?
and
pan_id: 0x1234
i got
févr. 03 16:31:29 minipc19 npm[11760]: zigbee2mqtt:debug 2019-2-3 16:31:29 Using zigbee-shepherd with settings: '{"net":{"panId":4660,"extPanId":[33,117,141,25,0,75,18,0],"channelList":[26],"precfgkey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13]},"dbPath":"/opt/zigbee2mqtt/data/database.db","sp":{"baudRate":115200,"rtscts":true}}'

and second line

zigbee2mqtt:debug 2019-2-3 16:31:30 zigbee-shepherd info: {"enabled":true,"net":{"state":"Coordinator","channel":26,"panId":"0x1234","extPanId":"0x00124b00198d7521","ieeeAddr":"0x00124b001834b1c0","nwkAddr":0},"firmware":{"transportrev":2,"product":0,"version":"2.6.3","revision":20190109},"startTime":1549207890,"joinTimeLeft":0}

same extPanId : yours 0x00124b00198d7521 mine 0x00124b00198d7521

It's correct, my config looks the same, and string in the log looks like mine

@khzd Just in case, livolo gateway panId: 0x000f
Oops, never mind, looks like it's random, each time after restarting the gateway it's different

i've dived up, I have issue with the dev release !!!
waiting info from @ptvoinfo :(

Hello,

I checkout the dev branch to try it.
I got now this message (I don't know if it's a problem or not, just a new msg)
févr. 03 21:57:37 mini-pc npm[15514]: zigbee2mqtt:debug 2019-2-3 21:57:37 Received zigbee message of type 'endDeviceAnnce' with data '"0x00124b001838ddcf"' of device 'TI0001 ' (0x00124b001838ddcf)

The polling mechanism is not working anymore, is that working for you ?

@graouxx It's temporary disabled in dev branch, causes problems for some people.
Just uncomment
new ExtensionPollLivoloSwitch(this.zigbee, this.mqtt, this.state, this.publishDeviceState),
in lib/controller.js to make it work

thx @lych

I'll try it right now :)

It seems to work, but as soon as I enable the polling mechanism, I got a lot of errors (MAC transaction expired)
And I still receive msg like this every 30sec, I don't know what it mean.

févr. 03 22:39:36 mini-pc npm[14276]:   zigbee2mqtt:debug 2019-2-3 22:39:36 Received zigbee message of type 'endDeviceAnnce' with data '"0x00124b001838ddcf"' of device 'TI0001          ' (0x00124b001838ddcf)
févr. 03 22:39:54 mini-pc npm[14276]:   zigbee2mqtt:debug 2019-2-3 22:39:54 Received zigbee message of type 'endDeviceAnnce' with data '"0x00124b001838ddcf"' of device 'TI0001          ' (0x00124b001838ddcf)
févr. 03 22:40:15 mini-pc npm[14276]:   zigbee2mqtt:debug 2019-2-3 22:40:15 Received zigbee message of type 'endDeviceAnnce' with data '"0x00124b001838ddcf"' of device 'TI0001          ' (0x00124b001838ddcf)
févr. 03 22:40:42 mini-pc npm[14276]:   zigbee2mqtt:debug 2019-2-3 22:40:42 Received zigbee message of type 'endDeviceAnnce' with data '"0x00124b001838ddcf"' of device 'TI0001          ' (0x00124b001838ddcf)

same for me, I think @ptvoinfo is preparing an update, I saw @Koenkk rollback some change in dev branch :(

what is strange it's work for @lych

@graouxx Does your switch work? Can you change its state?
If it works, it's ok. Those msgs means, the switch is rejoining the network (maybe has rejoined, not sure).
Livolo switches are very hectic. A switch polls a coordinator about 5 times per second. If there are no answers even less than 1 sec the switch starts the rejoining process and you can see this message in the log as well as a lot of 'MAC transaction expired' msgs.
How far is your switch from the coordinator? What is your link quality level?
I can see such behaviour when I test it with quality level about 0.
In this case, a coordinator with an external antenna can help.

I've submitted a new pull request (#1016) with some new changes.

@graouxx Does your switch work? Can you change its state?
If it works, it's ok. Those msgs means, the switch is rejoining the network (maybe has rejoined, not sure).
Livolo switches are very hectic. A switch polls a coordinator about 5 times per second. If there are no answers even less than 1 sec the switch starts the rejoining process and you can see this message in the log as well as a lot of 'MAC transaction expired' msgs.
How far is your switch from the coordinator? What is your link quality level?
I can see such behaviour when I test it with quality level about 0.
In this case, a coordinator with an external antenna can help.

It was working yesterday, I didn't try this morning, I'll check this evening if it's still working.
My switch is 8 meters far from the coordinator, I received state information with 0 link quality level as you.
I hope I can try @ptvoinfo new PR tonight.

@ptvoinfo Great! Thanks a lot!
Now it works very well. (at least for me)

@lych Great! But I'm preparing a new update. It is very important for large networks with many devices. All zigbee requests will be queued.

Note, the MQTT control topic was slightly modified:

<PATH>/<DEVICE_ID>/right/set
<PATH>/<DEVICE_ID>/left/set

you need to send ON or OFF.

1-gang switches has <PATH>/<DEVICE_ID>/left/set only.

By the way, if my switch polls the coordinator for about 5 times per second, can 10 or 20 switches flood the channel or the coordinator?

@lych Good question! Only a real application will help us to find this limit. I think 10 switches is the limit.

@ptvoinfo crash while joining a new device (not Livolo, xiaomi button)

/opt/zigbee2mqtt/lib/extension/pollLivoloSwitch.js:139
            .filter((d) => d.manufName.startsWith('LIVOLO')) // LIVOLO
                                       ^

TypeError: Cannot read property 'startsWith' of undefined
    at zigbee.getAllClients.filter (/opt/zigbee2mqtt/lib/extension/pollLivoloSwitch.js:139                                                                                                :40)
    at Array.filter (<anonymous>)
    at PollLivoloSwitch.handleInterval (/opt/zigbee2mqtt/lib/extension/pollLivoloSwitch.js                                                                                                :139:14)
    at Timeout.timer.setInterval [as _onTimeout] (/opt/zigbee2mqtt/lib/extension/pollLivol                                                                                                oSwitch.js:48:45)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)

@lych Added the bugfix to the latest PR.

Bravo for this progress
I will give a try this night

Question : Dev branch ?

@khzd dev branch with

experimental:
  livolo: true

in configuration.yaml.

Thx

Not better for me with the new dev branch. I still get Mac transaction expired after few minutes (It seems I get this error sooner with polling)
Tell me if I can do something to help.

@graouxx Can you move your coordinator closer to the switch, to have link quality litter bit better then 0 and see what will happen?

@lych I ll try to put my pi3 close to the switch this week end.
You are probably right. The first time I tried the switch it was working and the coordinator was very close to the switch...

HI, guys.
I don't want to claim victory too soon, but it works well for me:

  • CC2530 with external antenna
  • fresh installation (npm, z2m branch dev)
  • DB empty
  • LIVOLO configuration now classic

    1. end-to-end testing:

    2. device <--> z2m : OK

    3. Device <--> z2m <--> HA OK

    4. also a monkey test : more than one click per second on HA --> OK

NB. for 2 m distance, I have a linkquality between 40 and 155 not stable, will post a graph for a full day.
I changed this line in homeassistant.js 'TI0001': [switchWithPostfix('left'), switchWithPostfix('right'), configurations.sensor_linkquality],

Bravo for all contributors :)

What about you @graouxx ?

Hi @khzd, for now it is not working, I''ll try next week end to put my controller closer as suugest @lych.
Someone knows if the xiaomi gateway act as a router?

@graouxx The xiaomi gateway acts as a coordinator.

@khzd Link quality: I think the CC2630 chip cannot guarantee good quality and strength signal because it located inside a box, near power and high voltage components. If we add a glass panel and place inside a wall, it will decrease quality more.

Hi
I had some loose of the connection this night, I had to re-paire this morning

@ptvoinfo thank you, I didn't remember if a component can act as a coordinator and a router.

So I have to try to move my coordinator to see if it is better.

Yesterday I installed my livolo into the wall and contrary to the advice to use the dedicated coordinator I added it to my main network. In a magical way, the livolo stopped rejoining the network after unpluging the coordinator. And that's what I found out. There is a router in my network (xiaomi socket). If livolo can't 'ping' the coordinator it starts to 'ping' the router and apparently it feels great. :) So livolo pings the router and don't want to work with the coordinator.
Be careful, do not use routers with livolo, it doesn't work.

@lych Could you test with my router firmware?

@ptvoinfo Yes, I can. Where can I find it? Koenkk/Z-Stack-firmware?

I bought 1 gang switch but it is on the way. I will test it and report back.
I have designed custom hardware switch with cc2630 and face the same problems with zigbee2mqtt, it only stable for a short of times. Example i paired it and it may work for a week, and then suddently lose connection and show "Mac expire", and the switch send "Beacon request". It occures more frequently if lost AC power(tested by cut it down for 5 minutes).
In the firmware i poll the coordinator 1 per second.

This is not the easy to fix problems. I have ask support from TI but still not solve it.
If anyone have the Livolo gateway and more than 10 switches could make the stability test with their original hardwares and software, switches on the wall with glass installed.

If original setup work fine and then continue to work on zigbee2mqtt side.
If it is the hardware/firmware issue we could not make it better.

@ptvoinfo same router problem with your firmware. It is not with livolo one but it is same chip and zstack version, i place the coordinator 5 meter away, router is 1 meter away the cc2630 switch(without the router, switch could not reach the coordinator), i paired the switch, it works with on/off. After that i unplug the router(cc2530) and power it after 1 minute, the switch could not be control anymore(disable join on zigbee2mqtt)

@dzungpv When your switch starts sending "Beacon request", if permin_join is true, will the switch rejoin to the network?

@lych yes it will rejoin the network, but it is not secure at all. With my setup, permit_join true only when switch pair the first time

@dzungpv Probably livolo developers faced with the same problem and what's why their switches start rejoining if there is even little problem with connection.
What about having a 'white list' (permit_join always true but only for those devices which had been already paired)?

@lych as i have mentioned ealier, start rejoining(sending beacon request) is the default behavior of cc2630 running zstack 1.2 when it lost connection with coordinator.

We can add a white list device id and alway allow them to join. But, joining take some second, when it occure, it take some seconds to reconnect, and you will see the "delay" when control them.

I suppose that permit_join is always true in our case. I can try to make another extension for a black/white list.

I think it is better to lose control for a few seconds than lose control at all if permit_join = false.

@dzungpv Livolo starts rejoining after troubles with connection, as you mentioned it's default behaviour, and as I can see 'rejoining' doesn't need join permission, it works without it. Am I right?
But after power off/on their switch starts joining process (not rejoining). Is this also the default behavior?

@lych No, it leave the network before send beacon request, because it could not connect to two coordinator at the same time. This problem cause by the coordinator side, when the are many switches in the network or it poll too fast, coor could not handle all the poll, then it will see as orphan coor and then leave the network.
This is the biggest limitation of cc2630 chip, the small memory make it only fit the end device firmware. And you know end device purpose not send much poll like our switch, like temp sensor only send report each 1 minute.
That why they make cc2652 chip, but it take many years to release, still not available as production by now.

@ptvoinfo the same result with your router

I'm also using the @ptvoinfo CC2530 software rooter

@khzd Link quality: I think the CC2630 chip cannot guarantee good quality and strength signal because it located inside a box, near power and high voltage components. If we add a glass panel and place inside a wall, it will decrease quality more.

Hi but I have a quality link more than 50 and go up to 150, it's realy better than @lynch conditions.
may the issue not with the qualitylink, we still have an issue in synchronisation ?

somebody working with home assistant and make livolo works?
thanks

I work with HA, partially working : stability issue, we loose the connection randomly :(

work with HA, partially working : stability issue, we loose the connection randomly :(

  • platform: mqtt
    name: "oficina_zig"
    state_topic: "zigbee2mqtt/0x00124b001838ddb0"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_on: "ON"
    payload_off: "OFF"
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/livolo/set"
    cant work to me, and i dont know how configure to work

Hi
Did you activate the auto discovery ?
In this case you just need to use the friendly name in a Group or an automation...

You need to review zigbee2mqtt/livolo/set"

Normaly it’s
//right/set
//left/set

hi guys any update?

from my side I got good stability with some error message but no disconnection.
got more one 100 message
2019-2-5 15:09:25 - info: LIVOLO 0x00124b000bf0725e. genOnOff.read response error: AF data request fails, status code: 205. No network route. Please confirm that the device has (re)joined the network.
but continue working.
I discovred that my xiami plug is disconnected and when I repaire it I loosed the connection to the LIVOLO

both can not co-existe in the same config!

hi @khzd

I can't test anything until saturday on my side to confirm if it's better with good quality link.

My one has been working for about 24 hours, without any problems, everything is ok

@khzd My device works too, but I don't have routers in this network.

hi thanks for your feed-back
mine is working for about 6 hours with a xiaomi router in the same network, no issue right now

Mine is workin for about 10 hours but polling seems not to work. Extension is enabled but i can only send data to the switch. I didn't get any feedback if I press the button manually.

@Lumbricus and nothing in log the debug mode output?

@Lumbricus Please, attach a debug log.

I can't post any log - nothing happens if I press abutton. I'm using ioBroker and so, the debug output is not that much as if i start zigbee2mqtt from the console.

Is there something special I have to take care about if i try to start zigbee2mqtt from console to get a better debug output? If I'll do that, the path is correct but it seems to me, that the nv_start_options.js from zigbee-shepherd will be ignored. Whether the channel nor the extPanId will be the one configured in that file.

Please log at least :+1:

  1. your livolo Db record
  2. The startup log of z2m

We can check first those elements
For debug see the debug section in the doc : https://koenkk.github.io/zigbee2mqtt/how_tos/how_to_debug.html

Cheers

This is all I have. The log.txt is the one I get if I do it like described in the how_to_debug.

iobroker.2019-02-07.log
log.txt
shepherd.db.txt

You have duplicate record of livolo, may you delete de first one, lest complet: the one with missing genOnOff :(

@Lumbricus 1. You use the old version. Instead, you should use the "dev" branch.

  1. You should change extPanId.
  2. You should enable the Livolo extension in the settings in configuration.yaml.
    Note: after these changes you'll lose pairing of all devices.
advanced:
  pan_id: 6756
  ext_pan_id: [33,117,141,25,0,75,18,0]
  channel: 26
experimental:
   livolo: true

My livolo switch working without changing pan_id, it was enough for me to specify in configuration.yaml:

advanced:
  channel: 26
experimental:
   livolo: true

ext_pan_id is required for stable work. pan_id is optional (it should not interfere with other zigbee networks).

Interesting without changing ext_pan_id ?
Can you share your startup log until start of livolo ?
Cheers

my?

without changing ext_pan_id
log.txt

@directman66 Without changing extPanId your switch will work fine as long as it has good connection with a coordinator. After losing the connection it has to stop working after couple of seconds (at least it works in this way for my switch). Could you do a little test? Unplug your coordinator for about 30 seconds, then plug it in, restart zigbee2mqtt and tell us if your livolo still works or not.

@lych I can only do it on Sunday

Yesterday was an experiment - I changed the light bulb in the switch, i.e. A circuit breaker was connected in the network break. The LEDs on the switch were extinguished. After screwing the bulb, the connection was resumed.

Hi @ptvoinfo
for LIVOLO testing purpose i set up a second network on channel 26 and stopped the platform on channel 11 (production)
now i would like to restart the 11 network, do i need to have a different pan_id, for ext_pan_id i plan to use the Z2M proposed one.
Any recommendation/confirmation ?

NB both are based on last CC2530 software
Cheers

@khzd Do you want to add Livolo to the production network? If yes, I don't recommend to do that. I would offer to create a separate network for Livolo with different pan_id, ext_pan_id and channel.

So, you need 2 coordinators and 2 instances of zigbee2mqtt.

yes @ptvoinfo this is my config : 2 coordinators / 2 zigbee instances / 2 mini PC , but to avoid any interference is it sufficient to change the channel id or do i need to change more parameters ?
QUESTION to have 2 instance in the same pc, i only need 2 separate rep ? did you test it ?
Cheers

@khzd 1. I would recommend changing the panId too.

  1. I use 2 instances on the same SBC. zigbee2mqtt in 2 folders.

Hi @ptvoinfo

  1. I use 2 instances on the same SMC. zigbee2mqtt in 2 folders.

Do I understand correctly that you are using the same stick (CC2530) for both nets? I.e. the chip can work on two channels at the same time?

@Ton1965 No, 2 sticks, 2 folders, but one SBC (BananaPI in my case).

Thanks!

Don't you observe any interference since the two sticks are probably close to each other?

Another possible problem for me is the high load from Livolo since it polls the coordinator every 0.5s. I just wonder how Livolo supposes to overcome this. One might have quite a few switches and all of them are installed in the walls as well as their gateway so it is not very easy to provide some good link quality since you cannot move them around freely.

@Ton1965 No problems at all.

Great! Thanks a lot!

@khzd 1. I would recommend changing the panId too.

  1. I use 2 instances on the same SBC. zigbee2mqtt in 2 folders.

OK thanks @ptvoinfo i will transfer all in the same PC this night and give feed back

@ptvoinfo Thank you very much! On the console it's working now. There is a big difference between console and ioBroker module.

Hi guys
A quick feed back, the set up of 2 instances on the same PC and 2 cc2530.
Every thing is working fine since 24 hours now.
@ptvinfo, any news on the next release ?

@khzd what do you expect from the next release :)?

On day 3 of use, the switch stopped responding to control commands. Let me remind you, I did not change the EXPANId. Apparently have to ask. I also use one network and one stick for all devices.

@ptvinfo The question was about when can we consider the livolo is supported as now we are still in experimental mode.
ie How many days do we need to test to integrate this in the prod branch
Cheers

@khzd I think more people need to check it and confirm. Then @Koenkk will add this code to the master branch.

need a good begginer tutorial for othes people undertand what need to do and test it .
some confuse what need to do.
its my case.
spanish forum cant make work, me too.

Hello guys,

I finally could put the coordinator next to the switch. I still get 0 for linkquality but it seems to work better.
10 minutes and I didn't get any MAC address issues.

I'll keep you in touch in hours/days.

Sadly it is still not stable. Probably cause I am using CC2531 which is too far from the switch (5meters + 1 door).
It's better since I put closer the rooter but after some hours I loose connection.
I'll wait my CC2530 to perform new tests.

@graouxx It's strange because I tasted it with CC2530 and link quality 0, connection was unstable but it always recovered after some time. I had problem in this case only if my coordinator's extPanId hadn't been cahanged (if it was 0xddddddd... ).

@graouxx It's strange because I tasted it with CC2530 and link quality 0, connection was unstable but it always recovered after some time. I had problem in this case only if my coordinator's extPanId hadn't been cahanged (if it was 0xddddddd... ).

Hi @lych, it's a misunderstanding. It did the same for me. My coordinator is able to re-pair with the switch but for me it is not convenient cause sometimes the switch doesn't do what I ask, so that's why I said it's not stable.

@graouxx ok, understood :). I also use cc2530 and connection is much better. Hope it will help you too.

CC2530 + CC2591 much better too :)

I've received a debugger for CC2630. It is sad, but the chip is locked for debugging and downloading firmware.

This was to be expected. Looks like they did everything to make us use their gateway and cloud.
There is a way to write custom firmware for both chips. There is a project on githab where guy wrote custom firmware for pic controller for no zigbee livolo.

@ptvoinfo production always lock debug and flash, you can only force erase the chip with Flash programmer 2 and rewrite the firmware. But if they use a Pic for comunication, you must decode the packet from it or rewrite it too.

@lych Could you please post a link to the project for PIC?

@lych What problem?

I will share my experience while work on this chip: cc2630.
I have design my own wall switch controller board with CC2630, then remove the Livolo touch part, plug mine to.
But it is not stable for now with zigbee2mqtt. I could not use any router, include ptvoinfo one.
If use router every time power down the ZC, all device could not control/connect again.
CC2630 only could run ZED firmware, it use very little power, so it has limited range and power too.

May be Livolo use Z-stack 3.0 with their hub. Now i will try to make a router could work fine with CC2630 chip (livolo use it too), and will share to you, router can run Z-stack 3.0, run on CC2530/CC2538 or CC2652 chip

@dzungpv good news
@ptvoinfo I think livolo uses the pic controller to manage the power and I'm not sure if this feature is implemented in https://github.com/jamarju/livolo-firmware

Hi guys,

Tests with CC2530 in progress. No configuration problem for now, link quality is around 30 (instead of 0 with CC2531), i hope it's enough.

hi my last update is not very positive:
my config : separate network on CC2530 without any device except LIVOLO

after 3 or 4 days i got this issue and happen after the chang of a log file ( > 10 mb)
the attReport Stop and the process reboot!!

here is my log
Any idea to debug?

2/17/2019, 8:04:06 AM - debug: Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":2}}' of device 'TI0001 ' (0x00124b000bf0725e)
2/17/2019, 8:04:20 AM - debug: Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":2}}' of device 'TI0001 ' (0x00124b000bf0725e)
2/17/2019, 8:12:28 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 8:16:39 AM - info: LIVOLO 0x00124b000bf0725e. genOnOff.read response error: request timeout
2/17/2019, 8:19:29 AM - error: Not connected to MQTT server!
2/17/2019, 8:52:34 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 8:56:26 AM - error: Not connected to MQTT server!
2/17/2019, 9:09:43 AM - info: LIVOLO 0x00124b000bf0725e. genOnOff.read response error: Timed out after 30000 ms
2/17/2019, 9:16:43 AM - error: Not connected to MQTT server!
2/17/2019, 9:19:52 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 9:37:46 AM - error: Not connected to MQTT server!
2/17/2019, 9:40:47 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 10:04:25 AM - info: LIVOLO 0x00124b000bf0725e. genOnOff.read response error: Timed out after 30000 ms
2/17/2019, 10:08:09 AM - info: LIVOLO 0x00124b000bf0725e. Stopped polling after 3 unsuccessful attempts
2/17/2019, 10:17:54 AM - error: Not connected to MQTT server!
2/17/2019, 10:23:47 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 11:14:20 AM - error: Not connected to MQTT server!
2/17/2019, 11:26:25 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 11:28:57 AM - error: Not connected to MQTT server!
2/17/2019, 11:28:59 AM - info: Connected to MQTT server
2/17/2019, 11:28:59 AM - info: MQTT publish: topic 'z2m/bridge/state', payload 'online'
2/17/2019, 11:28:59 AM - info: MQTT publish: topic 'z2m/my_office_light_up', payload '{"state_left":"OFF","state_right":"ON","linkquality":52,"state":"OFF","last_seen":"2019-02-16T21:10:08.381Z"}'
2/17/2019, 11:28:59 AM - info: MQTT publish: topic 'homeassistant/switch/0x00124b000bf0725e/switch_left/config', payload '{"payload_off":"OFF","payload_on":"ON","value_template":"{{ value_json.state_left }}","command_topic":"z2m/my_office_light_up/left/set","state_topic":"z2m/my_office_light_up","name":"my_office_light_up_switch_left","unique_id":"0x00124b000bf0725e_switch_left_z2m","device":{"identifiers":"zigbee2mqtt_0x00124b000bf0725e","name":"my_office_light_up","sw_version":"Zigbee2mqtt 1.1.1","model":"Zigbee switch (1 and 2 gang) work in progress (TI0001)","manufacturer":"Livolo"},"availability_topic":"z2m/bridge/state"}'
2/17/2019, 11:28:59 AM - info: MQTT publish: topic 'homeassistant/switch/0x00124b000bf0725e/switch_right/config', payload '{"payload_off":"OFF","payload_on":"ON","value_template":"{{ value_json.state_right }}","command_topic":"z2m/my_office_light_up/right/set","state_topic":"z2m/my_office_light_up","name":"my_office_light_up_switch_right","unique_id":"0x00124b000bf0725e_switch_right_z2m","device":{"identifiers":"zigbee2mqtt_0x00124b000bf0725e","name":"my_office_light_up","sw_version":"Zigbee2mqtt 1.1.1","model":"Zigbee switch (1 and 2 gang) work in progress (TI0001)","manufacturer":"Livolo"},"availability_topic":"z2m/bridge/state"}'
2/17/2019, 11:28:59 AM - info: MQTT publish: topic 'homeassistant/sensor/0x00124b000bf0725e/linkquality/config', payload '{"unit_of_measurement":"Lq","value_template":"{{ value_json.linkquality }}","state_topic":"z2m/my_office_light_up","json_attributes_topic":"z2m/my_office_light_up","name":"my_office_light_up_linkquality","unique_id":"0x00124b000bf0725e_linkquality_z2m","device":{"identifiers":"zigbee2mqtt_0x00124b000bf0725e","name":"my_office_light_up","sw_version":"Zigbee2mqtt 1.1.1","model":"Zigbee switch (1 and 2 gang) work in progress (TI0001)","manufacturer":"Livolo"},"availability_topic":"z2m/bridge/state"}'
2/17/2019, 11:29:14 AM - debug: Received MQTT message on 'hass/status' with data 'online'
2/17/2019, 11:29:34 AM - info: MQTT publish: topic 'z2m/my_office_light_up', payload '{"state_left":"OFF","state_right":"ON","linkquality":52,"state":"OFF","last_seen":"2019-02-16T21:10:08.381Z"}'
2/17/2019, 11:31:22 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 11:36:22 AM - debug: Saving state to file /opt/z2m/data/state.json

@khzd how many Livilo switch in your network?

I still have only one, I'm waiting stability conclusion to order 14 more :)

@khzd Are you sure that your permit_join was true? Hass could disable it.
My switch has been working since 10.02. Everything is fine. I've ordered another two.

yes my permit_join was true and do not use hass to control Z2M
visibly I llosed this morning the livolo at 8:04:20, i was sleeping, no more activity in the house...
and :

2/17/2019, 8:12:28 AM - debug: Saving state to file /opt/z2m/data/state.json
2/17/2019, 8:16:39 AM - info: LIVOLO 0x00124b000bf0725e. genOnOff.read response error: request timeout
and loose MQTT!!!

2/17/2019, 8:19:29 AM - error: Not connected to MQTT server!
2

@khzd Do you use another one instance of zigbee2mqtt for your livolo? If yes, did you change mqtt path for it? if you didn't, probably hass run both of your zigbee2mqtt instances and evein if permit_join was true in config, hass coud disable it through mqtt. You can check it in the log.

On my side, sadly this morning it doesn't work anymore. I'll probably try to put a CC2530 with an esp8266 closer.

Following @khzd issue, I saw that you ask him if permit join was set to true ? Do we have to keep this setting always on true ? Cause I set it to false.

@graouxx yes, for livolo permit_join has to be always true. This issue hasn't been resolved yet, it is one of reasons why it's better to use dedicated coordinator for livolo.

@graouxx yes, for livolo permit_join has to be always true. This issue hasn't been resolved yet, it is one of reasons why it's better to use dedicated coordinator for livolo.

Thank you @lych.
That mean each time you need to pair a new device with another coordinator you have first to stop this one ?

@graouxx In general it's true. But I think in most cases devices will pair with a right coordinator because livolo uses the last channel from the list. (I'm not sure, needs test)

Hi
I confirm : I have 2 z2m instances and 2 cc2530 with a very good link quality rarely less 50
The livolo network is not declared in Hass only the prod one can change the permit join
I see on another issue that when z2m change the name of the log , it can happen that you loose the usb link, MQTT and so on, probably not linked to the name change but long term stability?
I do believe that is a side effect not linked to livolo but may be influenced by?
We need to check further debug function to localise this issue, @ptvinfo ca you recommande a function to track with debug for a long time like a week ?
Thanks

Nb permit join issue is still open, do we have a white list option to autorise only some device to join ?

I had to repair some Xiaomi and did not need to stop the livolo coordinatore, just need to be very close to the prod coordinator
And when I had to repair the livolo the prod coordinator did not see it at all lol

Hi guys
I planned to order a double gang double way, any of you test one ?
Interested in Simple gang 2 way

Even with permit_join set to true I loose connection after hours ...

@khzd I have a simple gang 2 ways

Interesting , which function can we debug ?

For a one gang 2 ways what is your dB record ?
Thanks for the feedback

@graouxx Are there any routers in your network?

I haven't any routers @lych. I didn't understand @khzd what you mean when you said "which function can we debug?" I ll send you my dB record as soon as I can

Hi @graouxx ,
I mean witch module can we focus to debug : https://www.zigbee2mqtt.io/how_tos/how_to_debug.html
if i start the process with DEBUG=* npm start; I will have too much module debugged so it will be challengy to localize the BUG :(

Hi as I planed to order a

  • double switch 2 ways VL-C701SZ

  • and a simple switch 1 way : VL-C702SZ

I 'm wondering if this implementation manage them also ?

@ptvoinfo any idea ?

image

Today i receive 2 gang one. Those guy from Lvl so smart with their strict, after power cycle it will lose all network info (they do in the firmware so not save to NVram), make it harder for use it with other hub and they manage device in their hub every time it lost power.

Hello guys,

I try a new test with CC2530 with an ESP8266. I have now 78 as link quality. I hope it will be stable.
Keep you in touch.

It's working since 2 days!
So for me link quality has a big impact on stability.

Stable for one week with a cc2530 and a linkquality with a min of 50 with high value like 130
Still very stable without any other device in the channel 26 !!!
Thanks for your feed back

@khzd do you have a cc2530 + cc2591 cause you have a very good link quality?

https://ae01.alicdn.com/kf/HTB1BgV5KXuWBuNjSszbq6AS7FXa0.jpg
I have this one , I do not know if cc2591 is included
Cheers

It still very stable without any outages

It seems to be the same than me. But I didn't have same link quality as you.
I order a new switch so I could explore stability with multiple devices.
For now I got yesterday a crash, but I think it's not due to livolo, I lost connection to the socat maped directory, so it's probably a problem with the esp8266.

Hello
My knowledge about these domonite topics is very limited. After reading the forum I do not understand very well how I have to do pair the Livolo with Z2M. When I launch intent, I never know it.
It is a simple livolo and I have a CC22531 less than 2 meters from the switch.
I also have the Livolo Gateway.
Thank you !

hi TinMurillo
this device is still experimental and need extensive documentation to deploy : it is only on the dev branch.
for now you need to read ALL item to set up yours :(
if you are still motivated to join testing team let me know
cheers

Does anyone have a tutorial how the dev branch of zigbee2mqtt can be installed on a hassio system?

@trancefreak77 Everything is here: http://www.zigbee2mqtt.io/integration/home_assistant.html
What is the problem?

Yes, sorry, posted too fast, have the dev branch installed.
Next problem: I flashed this firmware to my CC2530 stick: https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/CC2530/bin

But it looks like my Raspberry does not recognize the stick, because no USB Device is visible.
dmesg shows the following output:
[ 7624.555731] brcmfmac: power management disabled
[ 7679.394604] usb 1-1.1.3: USB disconnect, device number 8
[ 7832.521446] usb 1-1.1.3: new full-speed USB device number 9 using dwc_otg
[ 7832.669970] usb 1-1.1.3: New USB device found, idVendor=11a0, idProduct=eb20
[ 7832.679299] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7832.688385] usb 1-1.1.3: Product: SmartRF04EB
[ 7832.697252] usb 1-1.1.3: Manufacturer: Chipcon AS

But no /dev/ttyACM0 device is shown. Normally the dmesg message shows the device if it is initialized correctly.

I have this stick:
https://www.amazon.de/gp/product/B06XWDHPQ3/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

I programmed it via SmartRF Flash Programmer. This USB stick does already have the C8051F320 which allows to program it without any extra CC Debugger device. Flash Programmer says that the flash and verify process has been successfull.

Why does hassio on Raspberry does not assign a tty Device?

del

@trancefreak77

/dev/ttyACM0

look for USB0 by ls /dev/ttyUSB* --> ttyACM0 is for CC2531
Cheers

Hi,
Thanks for your response. I also do not have a ttyUSB device available. Tried it with hass.io and Raspbian. Don't know how to solve it. Maybe it is better to use a CC2530 without the C8051F320 chip in front of the CC2530. It seems that this chip hides the CC2530.

Cheers

Hello guys,

It still working on my side, I switch my esp8266+CC2530 (some wifi pb) with CC2530+CC2591.

I'm wondering if one of you uses the switch to control something else than the light behind it. I'd like to control 2 lights which are connected on a different power line. Those lights are wifi connected and I can already control it through my smart home software.
So my idea is to use the livolo switch status to send an http signal to these light so when I turn on/off the switch I could also do the same for the lights.
Sounds a good idea, but there is an issue. When I press the switch, it takes a long time to get the state back on the system.
I know we are polling the switch to get it states and I don't remember why we can't trap the signal send by the switch ? (if there is one ...)
Does anyone use the switch with the same use case ?

EDIT : it's better when I used the correct json field !! state_left instead of state ...

@graouxx We have to poll it because something wrong with original state message, probably a coordinator just skip it. To use it, one need some changes in the coordinator firmware.

I've got 1 and 2 gang switches. Now I have 3 and it seems to work fine. So I'm going to order another two.

Hi I put in standby my order waiting a final conclusion of this implementation.
Still have only one switch, it work fine but with some issues:
-after electricity outage, it's not startup : need to repair again ( for one it's OK but for 15...)
-it's not support to have another rooter in the same network : get troubles with routers, may be not linked but since alone, more stable.
-we cannot ban automatically others devices to connect to this second network by reusing the data of the first one ( I will open a pr for this)
Cheers

Hello guys,

It still working on my side, I switch my esp8266+CC2530 (some wifi pb) with CC2530+CC2591.

I'm wondering if one of you uses the switch to control something else than the light behind it. I'd like to control 2 lights which are connected on a different power line. Those lights are wifi connected and I can already control it through my smart home software.
So my idea is to use the livolo switch status to send an http signal to these light so when I turn on/off the switch I could also do the same for the lights.
Sounds a good idea, but there is an issue. When I press the switch, it takes a long time to get the state back on the system.
I know we are polling the switch to get it states and I don't remember why we can't trap the signal send by the switch ? (if there is one ...)
Does anyone use the switch with the same use case ?

EDIT : it's better when I used the correct json field !! state_left instead of state ...

Hi @graouxx
my livolo send the status to my HA within a second, I can use all automation within my Home automation.
can you send your log with the timing of the action?

Witch Home-automation do you use and what is the hardware supporting your home-auto?

cheers

Hi,
Thanks for your response. I also do not have a ttyUSB device available. Tried it with hass.io and Raspbian. Don't know how to solve it. Maybe it is better to use a CC2530 without the C8051F320 chip in front of the CC2530. It seems that this chip hides the CC2530.

Cheers

Hi
I recently try to install an ESP32 and discovered that in unix (ubuntu 18 for me) does not contain ALL usb drivers. for esp32 it's a cp210x!!! so I spend some hours to install it.
you need to verfify witch driver is used by the CC2530 with the C8051F320, it's probably not the ch341 as I have for my CC2530 ( the driver was installed and recognized immediately)

hi i add a pr to ban the production network in a experimental one

1231

please vote and/or give your options.
Cheers

@graouxx We have to poll it because something wrong with original state message, probably a coordinator just skip it. To use it, one need some changes in the coordinator firmware.

Thx @lych. Do you think someone will have a look to the coordinator firmware?

Hi @graouxx
my livolo send the status to my HA within a second, I can use all automation within my Home automation.
can you send your log with the timing of the action?

Witch Home-automation do you use and what is the hardware supporting your home-auto?

cheers

HI @khzd, I think I get same results as you. Less than 1sec. But compare to a physical switch there is a small latency :) .
I think I can deal with it.
My home automation is build with Jeedom.

Hi I put in standby my order waiting a final conclusion of this implementation.
Still have only one switch, it work fine but with some issues:
-after electricity outage, it's not startup : need to repair again ( for one it's OK but for 15...)

@khzd, I don't have any problem after restarting my zigbee2mqtt coordinator.
Do you have this issue after shuting down the coordinator or the switch ?

hi @graouxx
I have randomly issue with the startup , i retest many time, after a power outage i loose the link : have to re-pair again. do we loose some logic in this case ?
as I have two networks , and cannot ban easily a network the other one, at the startup of both it loose the link...
waiting a simple ban solution to check this case.
cheers

hi guys
I setup a python script to ban prod devices to connect to experimental network #1231
if somebody have the same need, I can share

Hi All,

Do i have to be on channel 26 to join the livolo switch?
i'm currently on channel: 25

Hi All,

Do i have to be on channel 26 to join the livolo switch?
i'm currently on channel: 25

Yes you have to be on channel 26 for livolo switch

It works for me now on channel 25

  1. I have changed the config to channel 26
  2. Added levolo switch
  3. changed channel back to 25

The only thing for now is that it wont report back if switched manual
@Koenkk is there a way to let the levolo report back?

It also looks like it only connect to the coordinator. Is this becouse i have added on channel 26 and the other on 25?

image

image

I tried to read all the message, only this forum platform is not really user friendly for large posts.
So is the final conclusion that it can't run stable without firmware modification in the Livolo device?
Thanks

@eeevs my 3 devices have been working fine for about a month.

@eeevs My one device too.

@eeevs my 3 devices have been working fine for about a month.
Nice.

Can you please summarize what you have done to get it working?
And did you end up making a dedicated Zigbee network for de Livolo devices?

Thanks!

@eeevs This is my configuration.yaml

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt4Livolo
  server: 'mqtt://localhost'
serial:
  port: /dev/ttyUSB1
advanced:
  channel: 26
  pan_id: 4660
  ext_pan_id:
    - 33
    - 117
    - 141
    - 25
    - 0
    - 75
    - 18
    - 0
  log_level: debug

I haven't updated my zigbee2mqtt for about a month and I use dev brunch, so I'm not sure but may be you also need this line to make the polling work:

experimental:
  livolo: true

Also pay attention on your coordinator ext_pan_id, you can see it in the log, if log_level is debug, in the string:

 zigbee-shepherd info: "enabled":true,"net":"state":"Coordinator","channel":26,"panId":"0x1234","extPanId":"0x00124b00198d7521"...

extPanId must be 0x00124b00198d7521 if it's not, change your pan_id to force the coordinator to change ext_pan_id.
Also pay attention that permit_join always must be true so it's better to use the dedicated coordinator for livolo.

@lych thanks, I will give it a try.

Hi,
I just tested latest-dev docker tag of zigbee2mqtt
with

experimental:
  livolo: true

state of the switch is correctly determined, but a lot of trafic is generated.
Are there any other options to tweak polling? preferably per device ;)

thanks

@stlhrt I don't know if there is a way to do it in the config, but you can change it in the source code.
Here: zigbee2mqtt/lib/extension/livolo.js
const interval = utils.secondsToMilliseconds(1);
Instead of 1, set as many seconds as you need.
I use 3.
It's for all livolo devices.

By the way, guys, I have installed two more, now I have 5, it still works fine.

Hi Guys,

I have finally got some time and returned to this switch.
I am currently using a separate installation of zigbee2mqtt with a separate stick. I have done everything per instructions by @lych (https://github.com/Koenkk/zigbee2mqtt/issues/592#issuecomment-477530453). I have not yet installed my switch and am just using a kind of a testing harness with the switch attached to a plug and a lamp so it can be moved around and plugged into different outlets.
Everything seems to work though I did not try yet to make it run for any significant period of time.
The only thing that bothers me is too low link quality value. I am currently using a separate stick (CC2530 + RFX2401), it is of the same type but of a slightly different appearance from the one I have been using for several months already in my production setup. The switch link quality seems to go down too fast as I move the switch away from the stick. It is rather low (~70) even when the distance is just about a couple of meters and if I move it to another room behind two walls the link quality becomes ~6-10 and the connection keeps breaking. My Xiaomi sensors in almost exactly the same conditions seem to work perfectly but they are paired to the second stick.
Could anyone report the link quality values for their setup? I want to make sure if such a low quality is due to the switch itself or to this new stick. I hope for the second since from my point of view the switch should not have such a low range since it cannot be moved freely around after installation.

Hi
@Ton1965 Although my result with cc2530 better then with cc2531 it doesn't look very good either. But, for example, I can see that the connection between my switches and xiaomi socket (which can work as a router) much better. So, I think, cc2530 antenna is the problem. Maybe with a different type of antenna the connection could be better.

@lych, thanks a lot for your reply. Probably you are right about the antenna. Though several Xiaomi sensors feel good being paired to a similar device. I will try to do more investigation before installing the switch into wall.

I managed to pair the livolo light switch with my stick using channel 26, but the connection is lost if the power is dropped(power outage etc.) is that normal for now?

This switch has some very specific Zigbee implementation. It always tries to re-join the network after the power loss. Looks like it does not remember its pairing state. So you need to set 'permit_join' to true if you want it to automatically re-join.

Hello guys,

I bought many switches and I'm facing new issues.
It seems having too many switches make the coordinator crash. Today I never could restart my CC2530 and I had to reload the firmware. After that each time I start Zigbee2mqtt, it crashes few minutes later.
Nothing in the log, but nothing works. When I restart zigbee2mqtt I got some error like that : (I need to unplug/replug the CC2530)

avril 30 19:31:41 mini-pc npm[6449]:   zigbee2mqtt:info 2019-4-30 19:31:41 Starting zigbee2mqtt version 1.1.0 (commit #7642b29)
avril 30 19:31:41 mini-pc npm[6449]:   zigbee2mqtt:info 2019-4-30 19:31:41 Starting zigbee-shepherd
avril 30 19:31:44 mini-pc npm[6449]:   zigbee2mqtt:info 2019-4-30 19:31:44 Error while starting zigbee-shepherd, attemping to fix... (takes 60 seconds)
avril 30 19:32:44 mini-pc npm[6449]:   zigbee2mqtt:info 2019-4-30 19:32:44 Starting zigbee-shepherd
avril 30 19:32:47 mini-pc npm[6449]:   zigbee2mqtt:error 2019-4-30 19:32:47 Error while starting zigbee-shepherd!
avril 30 19:32:47 mini-pc npm[6449]:   zigbee2mqtt:error 2019-4-30 19:32:47 Press the reset button on the stick (the one closest to the USB) and start again
avril 30 19:32:47 mini-pc npm[6449]:   zigbee2mqtt:error 2019-4-30 19:32:47 Failed to start
avril 30 19:32:47 mini-pc npm[6449]:         {"message":"request timeout","stack":"Error: request timeout\n    at CcZnp.<anonymous> (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:255:22)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:116:13)\n    at CcZnp.emit (events.js:211:7)\n    at Timeout.<anonymous> (/opt/zigbee2mqtt/node_modules/cc-znp/lib/ccznp.js:234:18)\n    at ontimeout (timers.js:482:11)\n    at tryOnTimeout (timers.js:317:5)\n    at Timer.listOnTimeout (timers.js:277:5)"}

I try to reduce the poll intervall, maybe it can help ...
If someone has an idea.

Setting the poll mecanism to 5sec seems better. It's working longer but still crashing after couple of minutes.
And always same things, if I try to restart zigbee2mqtt, it doesn't work, I have to unplug and replug first.
Maybe a buffer pb ?

Hi, @graouxx.
We anticipated this problem. They generate a lot of service traffic even without polling.
How many do you have?
I have 5 and it works fine.

Hi @lych,
I have 10 devices linked and 5 more to deploy.
I try to ban 2 devices to see how it works.
Maybe I will deploy 2 coordinators and use ban mechanism. (my house is big and cause router are no compatible with livolo, having multiple coordinator could be a solution)

I think it is the solution. cc2530/2531 just doesn't have enouth resources to run so many livolos.
The question is how many will work fine with one coordinator.

Hi @lych,
I have 10 devices linked and 5 more to deploy.
I try to ban 2 devices to see how it works.
Maybe I will deploy 2 coordinators and use ban mechanism. (my house is big and cause router are no compatible with livolo, having multiple coordinator could be a solution)

hello, I have 10 devices livolo and it gives me the same problem, you can pass capture of your configuration.yaml to see how it is with ban devices. thank

Hello @djdanip

Just add this kind of directive in configuration file :

ban:
  - '0x00124b0018027fa1'
  - '0x00124b0018028534'

See documentation for details

Hello @graouxx

Just add this kind of directive in configuration file :

ban:
  - '0x00124b0018027fa1'
  - '0x00124b0018028534'

See documentation for details

thanks for the answer, I've already changed it and say that with 6 devices it works perfect, with 10 fails, I'm going to try these 6 until tomorrow and I'll be connecting one by one to see how many devices it supports as a maximum. Thank you

It's seems to work with 7 switches for one coordinator.
It works also with 2 coordinators.

It's seems to work with 7 switches for one coordinator.
It works also with 2 coordinators.

with 2 coordinators works well with the 10 devices ????.
if this is how two coordinators are installed, some manual.

I was disconnected from yesterday after 2 hours running, I am doing tests and I have reinstalled zero homeassistant and zigbee2mqtt, but the same thing happens to me, I have asked for 2 new cc2531 to see if it can be mine,

It's seems to work with 7 switches for one coordinator.
It works also with 2 coordinators.

with 2 coordinators works well with the 10 devices ????.
if this is how two coordinators are installed, some manual.

I was disconnected from yesterday after 2 hours running, I am doing tests and I have reinstalled zero homeassistant and zigbee2mqtt, but the same thing happens to me, I have asked for 2 new cc2531 to see if it can be mine,

Yes it works with 2 coordinators.
On the first one I ban switches link with the second. And on the second one I do the opposite.

Hello guys,

I have a strange behaviour here. Sometimes I loss connection with a switch, and even if I restart zigbee2mqtt, turn off power on the switches, pressing the button during 10 sec ... I can't get it work again. I saw in the log the "rejion" request but as soon as I send message to mqtt I get a "no network route" message.
And finally I found a solution : remove the "state.json file".
It works with both coordinator, after doing that, restartintzigbee2mqtt, all non functionnal switch works again.
Do you know why ? How to avoid this issue ?
Thx for helping :)

Hi,
I might be speaking total nonsense here, but I read in this thread that currently each coordinator can support up to 7 devices.
Maybe there is an option to connect their Livolo Zigbee Gateway instead of connecting each switch? The Gateway will handle the switches as it supposed to, but we will be able to control from HA instead of the their native app.
Similar to what we have with Broadlink for example.
Is that possible?

Hi @dmatik
It's possible. @almsh made a plugin for HomeBridge. But it works only with their cloud, we weren't able to find a way to use their gateway without it.

Hi @lych ,
Sorry if I'm missing here something, but HomeBridge is to connect it to HomeKit. I was hoping to connect it to Home Assistant. Let's put aside the cloud issue at this point...

@dmatik this plugin can be used to write a plugin for HA (as an example), but as for me, it doesn't have a lot of sense because it still would be depend on livolo cloud.

Hey,

  1. I have a problem with seeing livolo switch in domoticz and I have the following errors in the logs:

2019-05-17 00:46:45.607 (zigbee) MqttClient::ping
2019-05-17 00:46:48.613 (zigbee) MQTT message: zigbee2mqtt/0x00124b0018014f0c {'state_left': 'OFF', 'linkquality': 42, 'state_right': 'OFF'}
2019-05-17 00:46:48.613 (zigbee) Unsupported zigbee device type with model "TI0001"
2019-05-17 00:46:48.613 (zigbee) MQTT message: zigbee2mqtt/0x00124b0018014f0c {'state_left': 'OFF', 'linkquality': 42, 'state_right': 'OFF'}
2019-05-17 00:46:48.613 (zigbee) Unsupported zigbee device type with model "TI0001

my configuration is:

homeassistant: false
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://localhost'
serial:
port: /dev/ttyACM0
advanced:
channel: 26
pan_id: 4660
ext_pan_id:
- 33
- 117
- 141
- 25
- 0
- 75
- 18
- 0
log_level: debug
experimental:
livolo: true

  1. Should I add sth more to the config in order to make it working? I would expect to see livolo switch in the devices tab?

  2. I also spotted that the configuration is being appended with the following lines:

devices:
'0x00124b0018014f0c':
friendly_name: '0x00124b0018014f0c'
retain: false

How does this bit work?

@tomaszciejka Your config is ok, but it looks like there isn't livolo support in your zigbee2mqtt version. Update it to the latest version.

Update #2
So, I've made it working with domoticz plugin. I've made two changes:

  1. updated zigbee2mqtt configuration with friendly name e.g. T10001
  2. updated __init__.py script in domoticz-zigbee2mqtt-plugin with T10001 device and standard switcher 'OnOffSwitchAdapter'

Wondering whether there is any easy way to make it working.


Update #1:

I've investigated the code a lillte bit and i, seems that the problem is coming from domoticz-zigbee2mqtt-plugin as it doesn't have proper adapter in place.
Did you guys make it working with domoticz?

--
@lych
I have:
zigbeeToMqtt 1.4.0
Domoticz plugin: 0.0.18
Domoticz: 4.10717

Where should I be looking?

Thanks!

Hi @lych
I remember you mentioned using a Xiaomi socket as a router for your Livolo switches. Is it necessary to have separate routers for Livolo given they have specific zigbee channel and other stuff? Or (hopefully) a router can be connected to several coordinators from different networks and route the traffic for all of them?
Thanks!

@Ton1965 Separate channel -> Separate network -> New coordinator and routers.

Thanks @ptvoinfo,
That is exactly what I suspected 😞 I just saw someone here mentioning a router paired to two coordinators and gained some hope. Thanks once more.

Hi, @Ton1965
I said that one shouldn't use routers. Routers doesn't work with livolo, there are some problems if you have router(s) and livolo switches in the same network.

Hi
@Ton1965 Although my result with cc2530 better then with cc2531 it doesn't look very good either. But, for example, I can see that the connection between my switches and xiaomi socket (which can work as a router) much better. So, I think, cc2530 antenna is the problem. Maybe with a different type of antenna the connection could be better.

Hi @lych
Then I believe I misunderstood your message quoted above. My problem is a very poor range of Livolo switch that I have. I currently use it in a test harness that allows moving it around and it cannot connect if I move it behind a wall from the coordinator. I thought your solution was using routers. Now I just do not see any solution...

@Ton1965 Oh, probably I misled you. I mentioned this problem earlier. This topic is too big) When I was testing it I added a router (xiaomi socket) to my network. I found that despite the fact the router was farther from the switch than a coordinator, the connection was much better. It worked well but unfortunately if the coordinator lost the connection with the router (if I powered it off than on, for example) it wasn't been able to find the route to the switch. I had the same result with @ptvoinfo's router(CC2531). But the connection was great only with xiaomi.

HI.

I paired mi livolo with z2m and I can control it from Home Assisant. But, when I turn on / off the light from the device, z2m not update the status.

Is this normal?

There are any resume of actual status of livolo?

experimental:
livolo: true

add these lines in configuration.yaml

I use hassio addon por zigbee2mqtt. When I add

"experimental": {
  "livolo":true
}

to configuration, the lines are remove when I press save

hassio, NPI, haber si alguien te ayuda.
can't help you with hassio.
https://domoticaencasa.es/tutorial-instalar-zigbee2mqtt-hassio/
in spanish

I also wanted the buy it , as it's look like promising :

  • it's not need a neutral cable on the switch
  • they have 2 way switch

I have contact the seller before buying livolo zigbee switch :
They say they switch only work with their gateway as it's a zigbee modified protocol...

@roumano there are 4 versions:

  • Line, L1 and Neutral
  • L1 and Neutral
  • Line, L1, L2 and Neutral
  • L1, L2 and Neutral

The swith works fine with Z2M

What is current status of compatibility of Livolo Zigbee wall switch?
Im looking to replace my old normal wall switches with smart swithces but because in wall I have EU box and only 2 wires(Live L and L which go to bulb - So no Neutral wire) I have very limited selection... Another limiting factor is that I would like to have same design but must have options to connect:

  • 2x 1-Gang 2-Way switch(VL-C701SZ) to control one LED lamp
    -1x 2-Gang 1-Way switch(VL-C702Z) to control two LED lamps

For now Livolo have everything but because zigbee integration is in developement/expirimental state it is probably not stable? I need integration in OpenHAB software does maybe someone know if is option to integrate them with using Livolo Gateway(Without Livolo Cloud) ?

@DejanBukovec It works quite well. But there are some conditions. It's better to use a dedicated coordinator and zigbee2mqtt instance with specific configuration that is shown above. Use CC2530 to have a better connection but even in this case connection can be not very good. Also, one coordinator is able to run no more than 7 Livolo switches.
I have been using 5 switches (1 and 2 gang) for about 3 months without any problems. I use it in OpenHab via MQTT binding.

@lych Thanks for your reply... Im new to home automation(I only own Netatmo Thermostate for 2 years) and new to Zigbee... Im order CCC2531 USB device, programator and adaptor and xiaomi button and xiaomi temp&humidity&pressure sensor to test them in OpenHab(I already have binded netatmo)...
I have in one floor where I want to start with installing smart things need for 10 switchec so as I understand I will need 2 concetrators and probably limit which device connect to which concetrator to get better coverage(I must learn and read about zigbee and mqtt documentation to understand how things work...).
What do you mean that even with CC2530 connection is not good? That coverage is not ok? How is coverage compared to some average wifi coverage? Stronger or weaker? I know that zigbee routers can't be used as extender with livolo products. How can be extended range by multiple concetrators on different locations? Do you maybe know if there is some problems with CC2530/CC2531 devices runing on USB hub(powered) or on USB to LAN devices?
Thanks for all your help and time...
Now I need to buy CC2530 and few Livolo Zigbee switches to test :) :)

hello
i have the livolo zigbee 1 gang no 0 switch and a CC2530 with zigbee2mqtt on channel 26 on HAssio with zigbee2mqtt Addon and it works .
The only problem is that i am not geting update back form the switch when i manualy turn it off or on.
Ideas??

Thank you !!

Hello @moti2408
You need to add the following to the advanced section of your configuration file:

experimental:
  livolo: true

You can find the details earlier in this thread.

@Ton1965 I have the same problem that @moti2408 , but witch z2m addon for Hassio, I don't know how set the experimental livolo option.

https://github.com/Koenkk/zigbee2mqtt/issues/592#issuecomment-505126692

experimental:
livolo: true

thanks for the quick response , but still no update from switch when turn off or on manually

@Ton1965 I have the same problem that @moti2408 , but witch z2m addon for Hassio, I don't know how set the experimental livolo option.

#592 (comment)

open your configuration.yaml in \sharezigbee2mqtt and add the lines there under advanced:

Capture

@moti2408,
I am pretty sure that you did restart zigbee2mqtt after changing the file but still...
You can try to see if zigbee2mqtt sends status requests to the switch every few seconds. You can just see it in logs with debug turned on.

@DejanBukovec livolo uses their own zigbee realization, but we managed to adapt zigbee2mqtt to work with it. Now one can use livolo switches with zigbee2mqtt without their gateway and cloud.
CC2530 has an external antenna so the link quality is better than with CC2531 but with livolo it's not as good as with other devices (xiaomi for example).

Any progress anyone??

zigbee2mqtt

but how to add those to hass.io addon?

Yes, livolos do not use the zigbee frequency standard.
Waiting for it to be solved and be able to use them.
Thank you

Yes, livolos do not use the zigbee frequency standard.
Waiting for it to be solved and be able to use them.
Thank you

change the channel to 26 and you will be able to use them.

the problem is that if you want to use them all the time, you need to enable autojoin

the problem is that if you want to use them all the time, you need to enable autojoin

What is the reason for needing autojoin?
I've been using some of these switches for about a month now, with autojoin off, and it seemed to work just fine so far (cc2530 w/ ext antenna). I had to rejoin 'em once when I switched power off for like 30 minutes while installing some more switches, but I'd say that was to be expected, that they wont connect back on their own after being powered off for so long. Other than that, joining was disabled and I had no problems (or so it would seem to me ...).

I suspect that you know more about these things than me, so I'd appreciate any shared information :)

@nixx77 Livolo cannot connect (re-pair) after power off without this option. But maybe, you are using the new version of this switch, where this problem was fixed.

You must enable join/autojoint because it not save the network and use whitelist to prevent other device join

@ptvoinfo I'm not sure which version I'm using, marking on the box is VL-C701Z (4 893193 792199).
What is the expected time that is considered a power off? This month I had 2 times when the power was off for about 10-20 seconds, according to my UPS logs, and that didnt seem to cause any problems (joining was off).

And when I shut down power for 30 minutes, I had not only to enable joining, but also manually pair all switches back after that (holding switch button till beep). So I'd expect that only leaving autojoin on would not solve the issue completely, if power going off regularly is an expected concern....

@nixx77 My switch, only a few seconds, and the switch is trying to reconnect to the coordinator.

In your case (30 min power off), you should check ext_pan_id (look at references in this topic).

@ptvoinfo few seconds - and what do you need to do to reconnect? just leaving permit_join is enough, or do you need to repair the devices?

disconnecting for 30 min causing unpairing looks logical to me, after all, this a device powered from AC, not from a battery, so I'm not exactly worried about that.

I've not found references to ext_pan_id here in this topic, but I think I kinda got the idea what it is for from googling now. just not sure if there is any power-independent memory onboard the switch. if there would be any - then some of these problems might be resolved by implementing ext_pan_id, but I'd expect that there is no memory whatsoever (otherwise they'd NEED a 'reset' button of a kind, and not just say 'disconnect it from power for 10 minutes to reset').
Maybe I got your idea all wrong though :)

@ptvoinfo you are right, just tried it, removed light bulb for a minute (leaving switch without power) - it got disconnected and required restarting with permit_join=true to reconnect. odd thing that earlier permit_join was not enough and I had to re-pair it, now it was not required.
seems I just got lucky with my 10-20 secs power outages that they didnt diconnect the switches...

@nixx77 Normal zigbee device, which had been already joined, starts rejoining process after power off. Livolo doesn't do it, it starts new joining process instead. That's why 'permit_join' has to be 'true'. But as I see it's not a problem now, a white list functionality has been added to zigbee2mqtt (thanks @dzungpv )

Also it's better to change 'ext_pan_id', livolo doesn't like 0xdddd... which is set by default.
So, config should be like this:

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt4Livolo
  server: 'mqtt://localhost'
serial:
  port: /dev/ttyUSB1
advanced:
  channel: 26
  pan_id: 4660
  ext_pan_id:
    - 33
    - 117
    - 141
    - 25
    - 0
    - 75
    - 18
    - 0
  log_level: debug
experimental:
  livolo: true

'experimental: livolo: true' - for polling, without it you won't have actual switch(es) state

hello whenever i put in z2m config.yml the "experimental": { "livolo": true} and when restart it disapeares.
Why is that?

also i think i am in right direction and i could say that the link is stable for me for 1 switch, i plan to buy more.

zigbee2mqtt:debug 8/1/2019, 6:54:51 PM Received zigbee message of type 'endDeviceAnnce' with data '"0x00124b0018027de9"' of device 'TI0001 ' (0x00) of endpoint 6
zigbee2mqtt:debug 8/1/2019, 6:55:43 PM Received zigbee message of type 'endDeviceAnnce' with data '"0x00124b0018027de9"' of device 'TI0001 ' (0x00) of endpoint 6
zigbee2mqtt:debug 8/1/2019, 6:56:43 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 8/1/2019, 6:57:25 PM Successfully reenabled joining
zigbee2mqtt:info 8/1/2019, 7:00:05 PM Successfully reenabled joining
zigbee2mqtt:debug 8/1/2019, 7:01:43 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 8/1/2019, 7:02:45 PM Successfully reenabled joining
zigbee2mqtt:info 8/1/2019, 7:05:25 PM Successfully reenabled joining
zigbee2mqtt:debug 8/1/2019, 7:06:43 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 8/1/2019, 7:08:05 PM Successfully reenabled joining
zigbee2mqtt:info 8/1/2019, 7:10:45 PM Successfully reenabled joining
zigbee2mqtt:debug 8/1/2019, 7:11:43 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 8/1/2019, 7:13:25 PM Successfully reenabled joining

how can I turn on the switch ?
I found it 
.ok works just fine!!!
but doesn't return state

Please Guys I am searching for over two weeks how to get the state of the livolo..or return state...
anyone help?

homeassistant: true
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://'
user:
password:
serial:
port: /dev/ttyUSB0
advanced:
channel: 26
log_level: debug
rtscts: false
experimental:
livolo: true

for me works perfect with this configuration

the configuration removes the "experimental": { "livolo": true, } line...that is my problem

Please Guys I am searching for over two weeks how to get the state of the livolo..or return state...
anyone help?

  1. go to your file nano opt/zigbee2mqtt/data/configuration.yaml (in my case)
    i have above devices:
    advanced:
    channel: 26
    experimental:
    livolo: true

and save

if i turn on the switch manually:
i get this message:

topic 'zigbee2mqtt/LV01', payload '{"state_left":"ON","state_right":"OFF","linkquality":15}' (ON)
topic 'zigbee2mqtt/LV01', payload '{"state_left":"OFF","state_right":"OFF","linkquality":23}' (OFF)

I have a one way switch so i have only to look for the left state:

on openHAB I have this transformation:
JSONPATH:$.state_left

now my openhab see the state:
LV01_Power changed from ON to OFF
LV01_Power changed from OFF to ON

I hope I helped,

Please Guys I am searching for over two weeks how to get the state of the livolo..or return state...
anyone help?

go to your file nano opt/zigbee2mqtt/data/configuration.yaml (in my case)
i have above devices:
advanced:
channel: 26
experimental:
livolo: true

and save
if i turn on the switch manually:
i get this message:
topic 'zigbee2mqtt/LV01', payload '{"state_left":"ON","state_right":"OFF","linkquality":15}' (ON)
topic 'zigbee2mqtt/LV01', payload '{"state_left":"OFF","state_right":"OFF","linkquality":23}' (OFF)
I have a one way switch so i have only to look for the left state:
on openHAB I have this transformation:
JSONPATH:$.state_left
now my openhab see the state:
LV01_Power changed from ON to OFF
LV01_Power changed from OFF to ON
I hope I helped,

what hassio version have u got?

i have openhab

i have openhab

ohhhhh!!! I got hassio!

try to delete the dir. reinstall on the right user. i had kind of problems before when i was on root

try to delete the dir. reinstall on the right user. i had kind of problems before when i was on root

which dir? share/zigbee2mqtt?

The on with the config file and make sure that your new config file is good

my configuration file (ZigBee2mqtt) is in the share/zigbee2mqtt and contains other files like devices state....

I removed it ...put in the configuration the lines "experimental": { "livolo": true }
and then it removed them again...

Without the {}

Just copy from my and put it in yours

Just copy from my and put it in yours

i got Hassio running

True I am sorry then I don't know :(

True I am sorry then I don't know :(
np thank u for your help ..i appreciate it..thank u

still the hassio removes the lines
.this is so annoying

try to delete the dir. reinstall on the right user. i had kind of problems before when i was on root

i am on admin .connected...what is the right user?>

The main user. In my case it was openhabian

try to delete the dir. reinstall on the right user. i had kind of problems before when i was on root

I am on admin..what is the right user? I delete the share/zigbee2mqtt and still removes the lines
Please help

log_level: debug

what hassio version have you got? could u please make a copy paste with your conf.yaml
there is no syntax like { }, or something?

Hello guys,

I come back to you cause since months I can't get something stable.
I tried 4 different coordinator (CC2531, CC2530, CC2592 ...) with always same results. It works great at the begining then I start to loose switch, generaly starting with the farest ones.
I run z2mqtt on 2 devices with 2 coordinators. One with a pi3 and another one with a NUC. Both has same issues. I use ban table to dedicate coordinators on selected switch.
I can't figure out what is happening, probably I mess something ...
Here is on of my conf files, maybe you can see something wrong

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://192.168.x.x'
serial:
  port: /dev/ttyUSB0
ban:
  - '0x00124b0018027fa1'
  - '0x00124b0018027fd9'
  - '0x00124b001838ddcf'
  - '0x00124b001838e8b0'
  - '0x00124b0018029840'
advanced:
  pan_id: 6755
  ext_pan_id:
    - 33
    - 117
    - 141
    - 25
    - 0
    - 75
    - 18
    - 0
  channel: 26
  rtscts: false
experimental:
  livolo: true
devices:
  '0x00124b001801575b':
    friendly_name: livolo-switch1-2
    retain: false

and here area sample of my log file

août 15 13:53:57 raspberrypi npm[379]:   zigbee2mqtt:error 2019-8-15 13:53:57 Failed to reenable joining
août 15 13:54:06 raspberrypi npm[379]:   zigbee2mqtt:info 2019-8-15 13:54:06 Zigbee publish to device 'livolo-switch1-3', genLevelCtrl - moveToLevelWithOnOff - {"level":1,"transtime":1} - {"manufSpec":0,"disDefaultRsp":0} - null
août 15 13:54:09 raspberrypi npm[379]:   zigbee2mqtt:error 2019-8-15 13:54:09 Zigbee publish to device 'livolo-switch1-3', genLevelCtrl - moveToLevelWithOnOff - {"level":1,"transtime":1} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: request timeout
août 15 13:54:09 raspberrypi npm[379]:   zigbee2mqtt:info 2019-8-15 13:54:09 MQTT publish: topic 'zigbee2mqttesp/bridge/log', payload '{"type":"zigbee_publish_error","message":"Error: request timeout","meta":{"entity":{"ID":"0x00124b0018034ca7","type":"device","friendlyName":"livolo-switch1-3"},"message":"{\"state\":\"off\"}"}}'
août 15 13:54:10 raspberrypi npm[379]:   zigbee2mqtt:info 2019-8-15 13:54:10 Zigbee publish to device 'livolo-switch1-3', genLevelCtrl - moveToLevelWithOnOff - {"level":1,"transtime":1} - {"manufSpec":0,"disDefaultRsp":0} - null
août 15 13:54:13 raspberrypi npm[379]:   zigbee2mqtt:error 2019-8-15 13:54:13 Zigbee publish to device 'livolo-switch1-3', genLevelCtrl - moveToLevelWithOnOff - {"level":1,"transtime":1} - {"manufSpec":0,"disDefaultRsp":0} - null failed with error Error: request timeout
août 15 13:54:13 raspberrypi npm[379]:   zigbee2mqtt:info 2019-8-15 13:54:13 MQTT publish: topic 'zigbee2mqttesp/bridge/log', payload '{"type":"zigbee_publish_error","message":"Error: request timeout","meta":{"entity":{"ID":"0x00124b0018034ca7","type":"device","friendlyName":"livolo-switch1-3"},"message":"{\"state\":\"off\"}"}}'
août 15 13:56:37 raspberrypi npm[379]:   zigbee2mqtt:error 2019-8-15 13:56:37 Failed to reenable joining

Thanks for helping me :)

Hi @graouxx
Now I have 5 switches (2 two-gang and 3 one-gang) connected to cc2530. I had 6 but one was burned accidentally :) Everything works fine. What is your linkquality? My is about 30 for the farthest switch.

I still can’t get the state of the switch
Experimental Livolo true keep removing after start. Any help? I am on Hassio

@Nosstrom You should probably ask about it in a hassio thread or just install z2m directly without the hassio plugin and use 'homeassistant: true'.

Hi @graouxx
Now I have 5 switches (2 two-gang and 3 one-gang) connected to cc2530. I had 6 but one was burned accidentally :) Everything works fine. What is your linkquality? My is about 30 for the farthest switch.

Hello @lych
Linkquality is from 2 to more than 100 depending on how far is the switch. But even with close switch with good linkquality I loose connection times to times :(
look at these logs, some switch rejoins many times in few seconds

août 15 21:56:19 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:19 LIVOLO 0x00124b001801575b. (Re)joins in the network (after power off?)
août 15 21:56:19 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:19 LIVOLO 0x00124b001838e8b0. (Re)joins in the network (after power off?)
août 15 21:56:19 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:19 LIVOLO 0x00124b0018029840. (Re)joins in the network (after power off?)
août 15 21:56:21 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:21 LIVOLO 0x00124b001838ddcf. (Re)joins in the network (after power off?)
août 15 21:56:21 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:21 LIVOLO 0x00124b0018034ca7. (Re)joins in the network (after power off?)
août 15 21:56:21 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:21 LIVOLO 0x00124b0018029840. (Re)joins in the network (after power off?)
août 15 21:56:23 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:23 LIVOLO 0x00124b001838ddcf. (Re)joins in the network (after power off?)
août 15 21:56:23 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:23 LIVOLO 0x00124b0018034ca7. (Re)joins in the network (after power off?)
août 15 21:56:23 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:23 LIVOLO 0x00124b0018028534. (Re)joins in the network (after power off?)
août 15 21:56:24 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:24 LIVOLO 0x00124b0018027fa1. (Re)joins in the network (after power off?)
août 15 21:56:24 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:24 LIVOLO 0x00124b0018027fa1. (Re)joins in the network (after power off?)
août 15 21:56:25 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:25 LIVOLO 0x00124b001838e8b0. genOnOff.read response error: AF data request fails, status code: 240. MAC transaction expired.
août 15 21:56:26 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:26 LIVOLO 0x00124b001838e8b0. (Re)joins in the network (after power off?)
août 15 21:56:27 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:27 LIVOLO 0x00124b001801575b. genOnOff.read response error: AF data request fails, status code: 240. MAC transaction expired.
août 15 21:56:28 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:28 LIVOLO 0x00124b001801575b. (Re)joins in the network (after power off?)
août 15 21:56:28 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:28 LIVOLO 0x00124b001801575b. (Re)joins in the network (after power off?)
août 15 21:56:28 mini-pc npm[8676]:   zigbee2mqtt:info 2019-8-15 21:56:28 LIVOLO 0x00124b0018028534. (Re)joins in the network (after power off?)

Hello guys, I have some good news.
I tried to pair my switches with my Zigate and it works nice (except for getting state) it seems they found a way to keep connection without keeping "joining" to true.
See
https://github.com/KiwiHC16/Abeille/issues/570
https://github.com/fairecasoimeme/ZiGate/issues/148

  1. I had a switch linked in my configuration.yaml, it works ok
  2. Then for some reason the switch stopped responding to any mqtt commands (no idea what caused this, lets assume power outages)
  3. I hold the button on the switch, causing it to re-pair, it beeps, nothing changes, it doesn't respond and/or reports to mqtt.
    3a. I restart zigbee2mqtt, just in case - nothing changes, attempting switch re-pair does nothing, no registered messages for the switch and no response to commands
  4. I stop zigbee2mqtt, open configuration.yaml and remove lines for that switch completely
  5. Run zigbee2mqtt again, hold the button on the switch to get it re-paired. New lines get added to configuration.yaml
  6. Stop zigbee2mqtt, open configuration.yaml, adjust the name for the new item to the one that was before, start zigbee2mqtt. configuration.yaml SEEMS TO BE EXACTLY IN THE STATE IT WAS ON STEP 3 (not like I was binary comparing this time, next time this happens I will)
  7. Everything seems to work now

Is this the expected behavior, or am I missing something?
The device was configured, and it looks like it just declined any re-pair attempts until I removed it completely, and then it worked just fine when I added it from scratch.

Anyone here want to extend livolo switch range could use Z-stack 3.0 and CC2530 3.0 Router, you can see my firmware here: https://github.com/Koenkk/zigbee2mqtt/issues/1820#issuecomment-519432309

@nixx77 No, it is not the expected behavior, the expected behavior is to work without any troubles :)
Check that your extPanId is not 0xdddddddddddddddd (It's explained above).
Also, be sure that you use 'experimental: livolo: true' option, it's not only pulls a switch to get its state, it also sends the magic command. Without this magic command a switch's behavior can be unstable.

@lych my config is
homeassistant: false permit_join: true mqtt: base_topic: zigbee2mqtt server: 'mqtt://localhost' serial: port: /dev/ttyUSB0 devices: .... advanced: channel: 26 rtscts: false pan_id: 4600 ext_pan_id: - 33 - 117 - 141 - 25 - 0 - 75 - 18 - 0 experimental: livolo: true
, if you see anything wrong with it - I'd be happy to hear. But I think I've used everything mentioned in this thread so far.

the expected behavior is to work without any troubles :)

That would be extremely cool, and it worked for a while for me (few months) :) but now I've had this problem on 2 switches out of 4. While I have a workaround for this situation for now, it kinda defeats the purpose of any "smart" home, if the switches can just refuse to do what they are told at any time :)

@nixx77 I don't see anything wrong, the config looks ok. My 5 switches have been working without any problems with the same config for about some months. Unfortunately don't have any idea what can be wrong :(
Check your coordinator firmware, maybe there is a newer version

@lych Thing is that it seems to be 2 different behaviors with exactly same config, seemingly depending on if we "just paired with the device" or just "we know that the device with given id is here", and the difference is not resolved by forced re-pairing.

If the switch just changed it's ID for instance (I know it shouldnt, but if) - I'd notice a new entry in configuration after pairing - there were no new entries.

And the software behaved differently in cases where the device was already listed and where it was newly paired (in the second case it worked, in the first one - it silently didn't)

And this didn't resolve itself after both restarting zigbee2mqtt AND restarting the server altogether - so I doubt a firmware update could fix that (considering delete-and-readd fixes it)....

I'd try firmware thing, but I'm afraid to introduce even more bugs and getting completely stuck in testing, so I'd prefer changing firmware only if I see at least some reason why it might help.

@nixx77 Is there any routers in your network?

@lych no routers, just 1 coordinator and about 12 devices total so far. The switches that got disconnected were the farthest and the nearest from the coordinator, so I doubt it's related to the link quality (not sure though)

@nixx77 12 livolo switches? If yes then very likely it is the problem. cc2530/2531 can handle a limited number of livolos. I don't remember exactly but it's about up to 7. Adding the second coordinator can help in this case.

Hello )
Does Livolo work in a group?

Any progress?

hello guy, i am on hassio and still got problems to get the state and link quality of livolo i can trigger the switch just fine is super stable no problem at all but i am trying to put the experimental: { "livolo": true }, and when i click restart this 2 lines of code disappear what could be the cause of this?
thanx

Hello again the only problem for me is that I don’t get link quality and state, I am on Hassio . Does anybody want to help ? Linkquality shows as entity but does nothing.

Does anyone know where is the node_modules/zigbee-shepherd-converters/devices.js
or I have to put this in my zigbee2mqtt folder according to https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html

Hi, all,
@lych can you provide more examples of "Malformed Package: ZigBee ZCL" data?
Like what I found on that page on wireshark screenshot [0x00, 0x08, 0x01, 0x00, 0x04, 0x01, 0x06, 0xba, 0x7c, 0xd2, 0x15, 0xd8, 0x00, 0xb9, 0xc0, 0xef, 0x0b, 0x00, 0x4b, 0x12, 0x00, 0x11, 0x00, 0x00].

I try to recognize package format. Now I know what 0x4b (at pos 19) is unknown data type. May be more examples from different switches (with on/off message) can help. If we got package format then we can patch only zigbee-herdsman for support this message type
(I hope))

Hi @komelgman
I'll sniff these packets for 1 and 2 gang switches. I'll try to do it this weekend.

Thanks @lych,
would be good if you also attach several packages wich parsed successfully for comparsion with broken packages (response package on get status request).
UPD:
just attach file saved from wireshark if possible

Unfortunatly, my previous assumptions turned out to be wrong.

According to this screen

and ZCL spec, malformed package structure:

    // header
    0x00, // global
    0x08, // transaction id
    0x01, // command: Read Attributes Response

    // payload
    0x00, 0x04, 0x01, 0x06, 0xba, // attr values???

    // request attr package duplicate
    0x7c, // [0111 1100]
          // 01 - frame type = "Command is specific or local to a cluster"
          // 1 - manufacturer spec = manufacturer code present
          // 1 - direction = "from server to client"
          // 1 - disable default response = "Default Response command will only be returned if there is an error, also under the conditions specified in 2.5.12.2"
          // 100 - reserved

    0xd2, 0x15, // manufacturer
    0xd8, // sequence
    0x00, // command = Read Attributes

    0xb9, 0xc0, // attr 1 id
    0xef, 0x0b, // attr 2 id
    0x00, 0x4b, // attr 3 id
    0x12, 0x00, // attr 4 id
    0x11, 0x00, // attr 5 id

    0x00 // ???????

Can somebody help in refactoring the livolo extension to zigbee-herdsman? As it's not compatible it's currently disabled in the dev branch (https://github.com/Koenkk/zigbee2mqtt/blob/dev/lib/extension/livolo.js)

Hi @lych,
my second usb dongle bring to me from ali, so I can sniff zigbee network by himself, but I see only that
2019-09-12_15-41-02
Can you help me in wireshark configuration?
Thanks

upd:
I found solution

My second issue is, when livolo switch started it sends many IEEE 802.15.4 Data messages
2019-09-12_15-51-06
Is it normal?

@komelgman Yes, it's normal. Just filter them

@lych , can you help with that (filter)?
Thanks

Unfortunatly, my previous assumptions turned out to be wrong. (again).
It's malformed ZCL packages for different states of my 2 way 2 gang switch with address 00:12:4b:00:18:05:0f:12

0x7c, 0xd2, 0x15, 0xd8, 0x00, 0x12, 0x0f, 0x05, 0x18, 0x00, 0x4b, 0x12, 0x00, 0x22, 0x00, 0x00 // left: 0, right: 0
0x7c, 0xd2, 0x15, 0xd8, 0x00, 0x12, 0x0f, 0x05, 0x18, 0x00, 0x4b, 0x12, 0x00, 0x22, 0x00, 0x01 // left: 1, right: 0
0x7c, 0xd2, 0x15, 0xd8, 0x00, 0x12, 0x0f, 0x05, 0x18, 0x00, 0x4b, 0x12, 0x00, 0x22, 0x00, 0x02 // left: 0, right: 1
0x7c, 0xd2, 0x15, 0xd8, 0x00, 0x12, 0x0f, 0x05, 0x18, 0x00, 0x4b, 0x12, 0x00, 0x22, 0x00, 0x03 // left: 1, right: 1

so malformed livolo package structure:

 // header  
 0x7c, // [0111 1100]
          // 01 - frame type = "Command is specific or local to a cluster"
          // 1 - manufacturer spec = manufacturer code present
          // 1 - direction = "from server to client"
          // 1 - disable default response = "Default Response command will only be returned if there is an error, also under the conditions specified in 2.5.12.2"
          // 100 - reserved

 0xd2, 0x15, // manufacturer
 0xd8, // sequence
 0x00, // read attrs command

 // endpoint adress
0x12, 0x0f, 0x05, 0x18, 0x00, 0x4b, 0x12, 0x00, 

 0x22, 0x00, // ????? need more data from another switches

 0x03 // 0x00|0x01|0x02|0x03 - switch state

Hello again the only problem for me is that I don’t get link quality and state, I am on Hassio . Does anybody want to help ? Linkquality shows as entity but does nothing.Experimental Livolo true also disappears from zigbee2mqtt configuration file .

Anyone care to do a short sum-up in the first post about the status of this? What works and what don't and what must be done to work fine, for example, please?

Hi @lych , @ptvoinfo , @khzd , @dzungpv
There are
https://gist.github.com/komelgman/101b2415da2e6f1eb035b25da2085b6c
firmware fix for support livolo switch without poll (I just comment out the poll request in extension).
We still need toggle because without toggle (I disable extension) when switch come back from power off state his state is wrong (onOff attribute = 07).
Can someone test it?

Wee!! Party hard!

Some info about fix (It should be compiled with LIVOLO_SUPPORT defintion).

In AF.c file in functions afIncomingData and afBuildMSGIncoming added bloks marked by

#if defined ( LIVOLO_SUPPORT ) 
#endif

In afIncomingData I add:

#if defined ( LIVOLO_SUPPORT )  
  else if ( aff->DstEndPoint == 0x08 ) 
  {
    if ( (epDesc = afFindEndPointDesc( 1 )) )
    {
      pList = afFindEndPointDescList( epDesc->endPoint );
    }
  }  
#endif  

It's prewent filtering message sended to unknown destEndpoint

And in afBuildMSGIncoming function:

#if defined ( LIVOLO_SUPPORT )
  uint8 fixedPackage[] = { 
        0x18, 0xd8, 0x01, // header
        0x00, 0x00, // attrId
        0x00, // success
        0x10, // boolean
        0x00
      };

  if (aff->SrcEndPoint == 0x06 && aff->DstEndPoint == 0x01 
      && aff->ClusterID == 0x0001 && aff->ProfileID == 0x0104) {

    const uint8 mlfrmdHdr[] = { 0x7c, 0xd2, 0x15, 0xd8, 0x00 }; 
    if (osal_memcmp(asdu, mlfrmdHdr, 5) == TRUE) {      
      fixedPackage[7] = asdu[aff->asduLength - 1];
      MSGpkt->cmd.DataLength = 8; // sizeof(fixedPackage)
      MSGpkt->clusterId = 0x06; // genOnOff
      asdu = fixedPackage;
    }
  }
#endif

It change unsupported package to readAttrResp package.

@komelgman Great news!
But I think it's better not to disable this extension completely because it sends to a switch the magic command, without this command some switches start to work unstable after some time.
Changing the extension so that it sends the magic command and read attribute command would work great.
Unfortunately I've been very busy but I'll definitely try your changes later.

@lych Yes, I agree. But I think we can use some custom device configuration scrips (in devices.js) instead of custom extension.

PS:
If someone can vote on stackoverflow please up vote my answer about firmware fixing:
https://stackoverflow.com/questions/57925570/non-standard-zcl-package-support-for-cc253x-firmware/57990017#57990017
I start baunty but now win some strange answer.

Hi @Koenkk , I try to use livolo with dev branch.
It is my device config:

    // Livolo
    {
        zigbeeModel: ['TI0001          '],
        model: 'TI0001',
        description:
            'Zigbee switch (1 and 2 gang) ' +
            '[work in progress](https://github.com/Koenkk/zigbee2mqtt/issues/592)',
        vendor: 'Livolo',
        supports: 'on/off',
        fromZigbee: [fz.livolo_switch_state],
        toZigbee: [tz.livolo_switch_on_off],
        meta: {configureKey: 6},
        configure: async (device, coordinatorEndpoint) => {
          const endpoint = device.getEndpoint(6);
          await endpoint.command("genOnOff", "toggle");
        },
        endpoint: (device) => {
          return {'left': 6, 'right': 6};
        },
    },

configureKey - what is it? I try to guess this value.

And I can't read state now:

  zigbee2mqtt:debug 2019-9-18 2:55:16 PM Received MQTT message on 'zigbee2mqtt/0x00124b0018050f12/get' with data '{state: ""}'
  zigbee2mqtt:debug 2019-9-18 2:55:16 PM Publishing get 'get' 'state' to '0x00124b0018050f12'
  zigbee2mqtt:error 2019-9-18 2:55:26 PM Publish 'get' 'state' to '0x00124b0018050f12' failed: 'Error: Timeout - 2120 - 6 - 3 - 1 after 10000ms'
  zigbee2mqtt:info 2019-9-18 2:55:26 PM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'get' 'state' to '0x00124b0018050f12' failed: 'Error: Timeout - 2120 - 6 - 3 - 1 after 10000ms'","meta":{"friend
ly_name":"0x00124b0018050f12"}}'

What is the problem?
Thanks.

@Koenkk Could you please add code above to your firmware but with runtime options?

@komelgman you probably want to disable the default response for this device meta: {options: {disableDefaultResponse: true}},. The configure key is used to determine if the configure method should be called again. E.g. when zigbee2mqtt configures a device, it won't configure it again until the configureKey has been changed.

@ptvoinfo I feel livolo code should be put into a separate git repository with instructions on how to use it.

@Koenkk

I feel livolo code should be put into a separate git repository with instructions on how to use it.

Should we then maintain a separate repository and build a separate firmware for all chips with power amplifiers?

@Koenkk
May be add that in firmware as you already do for 10 and 11 ednpoints?

  else if ( aff->DstEndPoint == 10 || aff->DstEndPoint == 11 || aff->DstEndPoint == 08 ) 
  {
    if ( (epDesc = afFindEndPointDesc( 1 )) )
    {
      pList = afFindEndPointDescList( epDesc->endPoint );
    }
  }  

And may be possible do that from herdsman side?

#if defined ( LIVOLO_SUPPORT )
  uint8 fixedPackage[] = { 
        0x18, 0xd8, 0x01, // header
        0x00, 0x00, // attrId
        0x00, // success
        0x10, // boolean
        0x00
      };

  if (aff->SrcEndPoint == 0x06 && aff->DstEndPoint == 0x01 
      && aff->ClusterID == 0x0001 && aff->ProfileID == 0x0104) {

    const uint8 mlfrmdHdr[] = { 0x7c, 0xd2, 0x15, 0xd8, 0x00 }; 
    if (osal_memcmp(asdu, mlfrmdHdr, 5) == TRUE) {      
      fixedPackage[7] = asdu[aff->asduLength - 1];
      MSGpkt->cmd.DataLength = 8; // sizeof(fixedPackage)
      MSGpkt->clusterId = 0x06; // genOnOff
      asdu = fixedPackage;
    }
  }
#endif

@ptvoinfo I don't feel that livolo code should be inside a generic repository for coordinator/router firmwares, it's just too specific and I don't feel like maintaining it. Fixing the broken firmware on this device seems like a separate project to me.

@komelgman that code shouldn't be needed anymore with zigbee-herdsman (but I haven't checked it yet).

@Koenkk It can be implemented with some custom extensions for ZclFrame.fromBuffer I think

that code shouldn't be needed anymore with zigbee-herdsman (but I haven't checked it yet).

@Koenkk It's mean herdsman can register custom destEndpoints? If we can register 08 destination endpoint from herdsman then we can support livolo without chnging firmware

@komelgman yes just add it here: https://github.com/Koenkk/zigbee-herdsman/blob/master/src/adapter/z-stack/adapter/startZnp.ts#L34

It exactly that what I try to find several days ago, before starting firmware fixing.
Unfortunatly I don't know how to say IntelliJ Idea use my own heardsman copy in zigbee2mqtt project instead of npm dependency version (when I tryy use file:// it's causes some issues).

From zigbee2mqtt directory

cd node_modules
rm -rf zigbee-herdsman
ln -s [CUSTOM_ZIGBEEHERDSMAN_DIR] zigbee-herdsman

In your custom zigbee-herdsman dir do

rm -rf node_modules && npm install
npm start # will automatically rebuild on code changes

)) I use windows, but now I got the right way,
Thanks

I've tested the patched firmware myself. Commands come in both directions.
@komelgman Thank you very much!
@Koenkk I need an event handler in devices.js to send the 'toggle' command after device announcement.

My code from devices.js

    // Livolo
    {
        zigbeeModel: ['TI0001          '],
        model: 'TI0001',
        description:
            'Zigbee switch (1 and 2 gang) ' +
            '[work in progress](https://github.com/Koenkk/zigbee2mqtt/issues/592)',
        vendor: 'Livolo',
        supports: 'on/off',
        endpoint: (device) => {
            return {'left': 6, 'right': 6};
        },
        fromZigbee: [fz.livolo_switch_state],
        toZigbee: [tz.livolo_switch_on_off],
        meta: {},
        configure: async (device, coordinatorEndpoint) => {
            const endpoint = device.getEndpoint(6);
            await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
            await endpoint.command('genOnOff', 'toggle', {}, {});
        },
    },

@ptvoinfo I got the same result without patching firmware now, but only in dev branch with new herdsman. Need some time to organise code but now I busy at work.

@Koenkk , @ptvoinfo
That proposed solution for intercepting incomingMessages .

Also for livolo we should add new destination endpoint.

So then in livolo.js extension we can preprocess or process that message. Preprocess just change one package data to another. Process break default processing and send mqtt messge.

@komelgman @ptvoinfo

  • I've modified zigbee-herdsman to emit raw data when it cannot be parsed to zcl data. This means that the raw data can further be processed inside a zigbee-shepherd-converters fromZigbee converter. Example when receiving raw data:
zigbee2mqtt:warn 9/19/2019, 8:16:54 PM No converter available for '324131092621' with cluster 'genOnOff' and type 'raw' and data '{"type":"Buffer","data":[1,4,1]}'

I need an event handler in devices.js to send the 'toggle' command after device announcement.

  • I've removed the Livolo extension as I think everything can now be done inside zigbee-shepherd-converters. In this way @kirovilya can also benefit from it.

@Koenkk
I commented raw data commit.
I think with livolo it can work unstable.

@komelgman I don't understand

I'm not surprised. My English very bad. I try to describe problem tomorrow, from PC.

@komelgman Can you make a pull request and combine all investigations? Or I can try to do it myself.

If you speak Russian, @kirovilya invites you to the Russian community https://t.me/zigbeer

@ptvoinfo
I should try use official solution. It should work for livolo. But in my opinion, it isn't good solution because rely to luck. This solution (with try catch) depends on wrong assumption what bad package cause exception every time. I can imagine hypothtic situation when bad response parsed without exception in zcl packet with unpredictable content.
For livolo this solution should work because even if we recieve packet where ieeeAddr doesn't cause exception this package still have incorrect length. But I should check it later.

In solution with event I see one issue. Event doesn't triggered when can't find mappedDevice. As I now it happens in situation when new device start connection conversation with coordinator. I don't know how will this affect on livolo initialisation because I don't know how magic with toggle work.

@komelgman I think it will work better for Livolo than polling :) Because we use a dedicated coordinator and network for Livolos this update will not affect other devices.

Ok, that work for me.
Devices.js:

    // Livolo
    {
        zigbeeModel: ['TI0001          '],
        model: 'TI0001',
        description:
            'Zigbee switch (1 and 2 gang) ' +
            '[work in progress](https://github.com/Koenkk/zigbee2mqtt/issues/592)',
        vendor: 'Livolo',
        supports: 'on/off',
        fromZigbee: [fz.livolo_switch_state, fz.livolo_switch_state_raw],
        toZigbee: [tz.livolo_switch_on_off],
        endpoint: (device) => {
            return {'left': 6, 'right': 6};
        },
        meta: {},
        configure: async (device, coordinatorEndpoint) => {
            const endpoint = device.getEndpoint(6);
            await endpoint.command('genOnOff', 'toggle', {}, {});
        },
        onEvent: async (type, data, device) => {
            if (["start", "deviceAnnounce"].includes(type)) {
                const endpoint = device.getEndpoint(6);
                await endpoint.command('genOnOff', 'toggle', {}, {});
            }
        },
    },

fromZigbee.js

    livolo_switch_state: {
        cluster: 'genOnOff',
        type: ['attributeReport', 'readResponse'],
        convert: (model, msg, publish, options) => {
            const status = msg.data.onOff;
            const payload = {};
            payload['state_left'] = status & 1 ? 'ON' : 'OFF';
            payload['state_right'] = status & 2 ? 'ON' : 'OFF';
            payload['linkquality'] = msg.linkquality;
            return payload;
        },
    },
    livolo_switch_state_raw: {
        cluster: 'genPowerCfg',
        type: ['raw'],
        convert: (model, msg, publish, options) => {
            const malformedHeader = Buffer.from([0x7c, 0xd2, 0x15, 0xd8, 0x00]);
            if (malformedHeader.compare(msg.data, 0, 4)) {
                const status = msg.data[15];
                const state = {};
                state['state_left'] = status & 1 ? 'ON' : 'OFF';
                state['state_right'] = status & 2 ? 'ON' : 'OFF';
                state['linkquality'] = msg.linkquality;

                return state;
            }

            return { state_left: 'OFF', state_right: 'OFF', linkquality: msg.linkquality };
        },
    },  

toZigbee.js

    livolo_switch_on_off: {
        key: ['state'],
        convertSet: async (entity, key, value, meta) => {
            if (typeof value !== 'string') {
                return;
            }

            const postfix = meta.endpoint_name || 'left';
            let state = value.toLowerCase();
            let channel = 1;

            if (state === 'on') {
                state = 108;
            } else if (state === 'off') {
                state = 1;
            } else {
                return;
            }

            if (postfix === 'left') {
                channel = 1.0;
            } else if (postfix === 'right') {
                channel = 2.0;
            } else {
                return;
            }

            await entity.command('genLevelCtrl', 'moveToLevelWithOnOff', {level: state, transtime: channel});
            return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
        },
        convertGet: async (entity, key, meta) => {
            // !!! send toggle instead of read onOff
            await entity.command('genOnOff', 'toggle', {}, {});
        },
    },

@ptvoinfo can you test this settings?

@komelgman Can we return null in livolo_switch_state_raw if the converter cannot decode a malformed data packet? It may help us to avoid false device state.

How work magic toggle?
Answer: Toggle command trigerred send answer with "incorrect" package.

@ptvoinfo
Yes, I don't know how to indicate wrong status. If null applicable for that it should be null.

@komelgman I suppose the toggle command from the coordinator side indicates (for the device) that the network is correct, and the device may start working.

i am in state which i am trying to find how to add the livolo device and where is the devices.js file
where is the node_modules/zigbee-shepherd-converters/devices.js" located and how to do it?

Ok, that work for me.
Devices.js:

    // Livolo
    {
        zigbeeModel: ['TI0001          '],
        model: 'TI0001',
        description:
            'Zigbee switch (1 and 2 gang) ' +
            '[work in progress](https://github.com/Koenkk/zigbee2mqtt/issues/592)',
        vendor: 'Livolo',
        supports: 'on/off',
        fromZigbee: [fz.livolo_switch_state, fz.livolo_switch_state_raw],
        toZigbee: [tz.livolo_switch_on_off],
        endpoint: (device) => {
            return {'left': 6, 'right': 6};
        },
        meta: {},
        configure: async (device, coordinatorEndpoint) => {
            const endpoint = device.getEndpoint(6);
            await endpoint.command('genOnOff', 'toggle', {}, {});
        },
        onEvent: async (type, data, device) => {
            if (["start", "deviceAnnounce"].includes(type)) {
                const endpoint = device.getEndpoint(6);
                await endpoint.command('genOnOff', 'toggle', {}, {});
            }
        },
    },

fromZigbee.js

    livolo_switch_state: {
        cluster: 'genOnOff',
        type: ['attributeReport', 'readResponse'],
        convert: (model, msg, publish, options) => {
            const status = msg.data.onOff;
            const payload = {};
            payload['state_left'] = status & 1 ? 'ON' : 'OFF';
            payload['state_right'] = status & 2 ? 'ON' : 'OFF';
            payload['linkquality'] = msg.linkquality;
            return payload;
        },
    },
    livolo_switch_state_raw: {
        cluster: 'genPowerCfg',
        type: ['raw'],
        convert: (model, msg, publish, options) => {
            const malformedHeader = Buffer.from([0x7c, 0xd2, 0x15, 0xd8, 0x00]);
            if (malformedHeader.compare(msg.data, 0, 4)) {
                const status = msg.data[15];
                const state = {};
                state['state_left'] = status & 1 ? 'ON' : 'OFF';
                state['state_right'] = status & 2 ? 'ON' : 'OFF';
                state['linkquality'] = msg.linkquality;

                return state;
            }

            return { state_left: 'OFF', state_right: 'OFF', linkquality: msg.linkquality };
        },
    },  

toZigbee.js

    livolo_switch_on_off: {
        key: ['state'],
        convertSet: async (entity, key, value, meta) => {
            if (typeof value !== 'string') {
                return;
            }

            const postfix = meta.endpoint_name || 'left';
            let state = value.toLowerCase();
            let channel = 1;

            if (state === 'on') {
                state = 108;
            } else if (state === 'off') {
                state = 1;
            } else {
                return;
            }

            if (postfix === 'left') {
                channel = 1.0;
            } else if (postfix === 'right') {
                channel = 2.0;
            } else {
                return;
            }

            await entity.command('genLevelCtrl', 'moveToLevelWithOnOff', {level: state, transtime: channel});
            return {state: {state: value.toUpperCase()}, readAfterWriteTime: 250};
        },
        convertGet: async (entity, key, meta) => {
            // !!! send toggle instead of read onOff
            await entity.command('genOnOff', 'toggle', {}, {});
        },
    },

could you please give me some iformation how to support new device, i got livolo and i cant get the state of the switch! not the linkquality but i get this warn and i cant turn on and off the switch from the HA just fine.

zigbee2mqtt:warn 9/22/2019, 10:51:36 AM No converter available for 'TI0001' with cid 'genBasic', type 'devChange' and data '{"cid":"genBasic","data":{"manufacturerName":"LIVOLO\u0000\u0010TI0001 ","modelId":"TI0001 ","powerSource":1}}'
zigbee2mqtt:warn 9/22/2019, 10:51:36 AM Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.
zigbee2mqtt:info 9/22/2019, 10:51:36 AM Device incoming...
zigbee2mqtt:info 9/22/2019, 10:51:36 AM MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'

@Nosstrom You should use the 'dev' branch of zigbee2mqtt. Please, read notes here:
https://www.zigbee2mqtt.io/devices/TI0001.html

@ptvoinfo
Are you testing get state with your variant?

        convertGet: async (entity, key, meta) => {
            await entity.read('genOnOff', ['toggle'], {}, {});
        },

Because my variant was:

        convertGet: async (entity, key, meta) => {
            // !!! send toggle instead of read onOff
            await entity.command('genOnOff', 'toggle', {}, {});
        },

I don’t undestand what do u mean by that ?
Should I install integration manually?
Where should I put the sensor and stuff

what do you mean i should use the dev branch?

@Nosstrom Zigbee2MQTT has two versions: release and development. You should use the second one:
https://github.com/Koenkk/zigbee2mqtt/tree/dev

@komelgman I do not use the "get" command :). Thanks! Fixed.

@Nosstrom Zigbee2MQTT has two versions: release and development. You should use the second one:
https://github.com/Koenkk/zigbee2mqtt/tree/dev

i got this in my hassio

https://github.com/danielwelch/hassio-zigbee2mqtt

also i am trying to see the container via ssh.. putty but i cant ,
says command not found! ??
core-ssh:~# docker ps
-bash: docker: command not found
core-ssh:~# docker exec -it 622baa375aa1 bash
-bash: docker: command not found

anyways

my Basic problem is that i cant get the state of the switch . When i push from switches side doesnt get anything to the hassio , only from hassio to switch works perfect. Anyone could help me??
i use this docker Start Docker add-on dwelch2101/zigbee2mqtt-armhf with version 1.6.0
and zstack firmware 3.0.x for c2531

@Nosstrom
Hass.io - Add-ons - zigbee2mqtt-edge (or zigbee2mqtt)
Uninsttall
Restart server
Hass.io - Add-ons - zigbee2mqtt-edge. Install.
My configuration file:

{
"devices": "devices.yaml",
"groups": "groups.yaml",
"homeassistant": true,
"permit_join": true,
"mqtt": {
"base_topic": "zigbee2mqtt",
"server": "mqtt://ip_address:1883",
"user": "username",
"password": "password"
},
"serial": {
"port": "/dev/ttyACM0"
},
"advanced": {
"channel": 26,
"pan_id": 6756,
"network_key": [
1,
3,
5,
7,
9,
11,
13,
15,
0,
2,
4,
6,
8,
10,
12,
13
],
"availability_blacklist": []
},
"ban": [],
"whitelist": [],
"queue": {}
}

Livolo switch: Press the button to beep. 5 sec and press the button to beep.
In log to zigbee2mqtt-edge type:
Currently 1 devices are joined:
(0x00124b0018035190): TI0001 - Livolo Zigbee switch (1 and 2 gang) work in progress (EndDevice)

@Nosstrom
Hass.io - Add-ons - zigbee2mqtt-edge (or zigbee2mqtt)
Uninsttall
Restart server
Hass.io - Add-ons - zigbee2mqtt-edge. Install.
My configuration file:

{
"devices": "devices.yaml",
"groups": "groups.yaml",
"homeassistant": true,
"permit_join": true,
"mqtt": {
"base_topic": "zigbee2mqtt",
"server": "mqtt://ip_address:1883",
"user": "username",
"password": "password"
},
"serial": {
"port": "/dev/ttyACM0"
},
"advanced": {
"channel": 26,
"pan_id": 6756,
"network_key": [
1,
3,
5,
7,
9,
11,
13,
15,
0,
2,
4,
6,
8,
10,
12,
13
],
"availability_blacklist": []
},
"ban": [],
"whitelist": [],
"queue": {}
}

Livolo switch: Press the button to beep. 5 sec and press the button to beep.
In log to zigbee2mqtt-edge type:
Currently 1 devices are joined:
(0x00124b0018035190): TI0001 - Livolo Zigbee switch (1 and 2 gang) work in progress (EndDevice)

SO i have to use tzigbee2mqtt-edge instead, to get the state??

@Nosstrom
Yes

@Nosstrom
Yes

zigbee2mqtt:info 2019-09-25T18:39:25: MQTT publish: topic 'zigbee2mqtt/0x00124b0018027d9', payload '{"state_left":"OFF","state_right":"OFF","linkquality":28}'
zigbee2mqtt:info 2019-09-25T18:39:25: MQTT publish: topic 'zigbee2mqtt/0x00124b0018027d9', payload '{"state_left":"OFF","state_right":"OFF","linkquality":28}'
zigbee2mqtt:info 2019-09-25T18:39:26: MQTT publish: topic 'zigbee2mqtt/0x00124b0018027d9', payload '{"state_left":"ON","state_right":"OFF","linkquality":28}'
zigbee2mqtt:info 2019-09-25T18:39:26: MQTT publish: topic 'zigbee2mqtt/0x00124b0018027d9', payload '{"state_left":"ON","state_right":"OFF","linkquality":15}'
zigbee2mqtt:info 2019-09-25T18:39:26: MQTT publish: topic 'zigbee2mqtt/0x00124b0018027d9', payload '{"state_left":"ON","state_right":"ON","linkquality":15}'
zigbee2mqtt:info 2019-09-25T18:39:27: MQTT publish: topic 'zigbee2mqtt/0x00124b0018027d9', payload '{"state_left":"ON","state_right":"ON","linkquality":18}'

Thank you SSSOOOOO much ,i installed edge... worked immediately no 5 sec pairing needed, just , took out and insert the stick again and worked. i get state , linkquality and i am ready to order some more switches.ok linkquality is low but works like a charm.
how many can it handle?? 10 maybe??
although works perfect for me now!!! i ll leave like this to check stability !

Above it was indicated that up to 7 devices of Livolo.
I have 13 Livolo devices (3 pcs 2 gang) in terms of (now 6). 1 coordinator ĐĄĐĄ2531 and 2 routers ĐĄĐĄ2530 (https://www.thingiverse.com/thing:3172662) I think will solve this problem ;)
Many thanks to everyone! Great work!!!

Do we know anything about Livolo zigbee dimmer functionality with coordinator and Hassio?

@Nosstrom We know that Livolo zigbee dimmers do not exist. At least, I don't see anything like this in the official Livolo store on aliexpress.

Hmm I found one in the official store on Alliexpress.its new I suppose. Check it. It’s strange. I have already sent question about

Livolo ZigBee smart dimmer,2 way switch

Hello
breakers came Livolo , I have domotics and zigbee2mqtt (dev) all latest versions even plugin domoticz .
livolo is not working properly , in domotiks is not registered , Xiaomi is good.

2019-09-28 10:32:56.537 (Zegbee Stick) MQTT message: zigbee2mqtt/bridge/state online
2019-09-28 10:32:56.537 (Zegbee Stick) Zigbee2mqtt bridge is online
2019-09-28 10:32:56.537 (Zegbee Stick) MqttClient::publish zigbee2mqtt/bridge/config/devices ()
2019-09-28 10:32:56.538 (Zegbee Stick) MqttClient::publish zigbee2mqtt/bridge/config/permit_join (true)
2019-09-28 10:32:56.538 (Zegbee Stick) MQTT message: zigbee2mqtt/bridge/config {'version': '1.6.0', 'commit': 'caf92c5', 'coordinator': {'type': 'zStack12', 'meta': {'transportrev': 2, 'product': 0, 'majorrel': 2, 'minorrel': 6, 'maintrel': 3, 'revision': 20190608}}, 'log_level': 'info', 'permit_join': True}
2019-09-28 10:32:56.538 (Zegbee Stick) Zigbee2mqtt log level is info
2019-09-28 10:32:56.538 (Zegbee Stick) Joining new devices is enabled on the zigbee bridge
2019-09-28 10:32:56.589 (Zegbee Stick) MQTT message: zigbee2mqtt/bridge/config/devices
2019-09-28 10:32:56.590 (Zegbee Stick) MQTT message: zigbee2mqtt/bridge/config/permit_join True
2019-09-28 10:32:56.590 (Zegbee Stick) MQTT message: zigbee2mqtt/bridge/log {'type': 'devices', 'message': [{'ieeeAddr': '0x00124b00194a0560', 'type': 'Coordinator', 'networkAddress': 0, 'friendly_name': 'Coordinator', 'softwareBuildID': 'zStack12', 'dateCode': '20190608', 'lastSeen': 1569655976555}, {'ieeeAddr': '0x00124b00182c7918', 'type': 'EndDevice', 'networkAddress': 8891, 'model': 'TI0001', 'friendly_name': '0x00124b00182c7918', 'manufacturerID': 0, 'manufacturerName': 'LIVOLOx00x10TI0001 ', 'powerSource': 'Mains (single phase)', 'modelID': 'TI0001 ', 'hardwareVersion': 0, 'dateCode': '20060831 ', 'lastSeen': 1569655973498}, {'ieeeAddr': '0x00158d0003230e4a', 'type': 'EndDevice', 'networkAddress': 56990, 'model': 'WSDCGQ11LM', 'friendly_name': '0x00158d0003230e4a', 'manufacturerID': 4151, 'manufacturerName': 'LUMI', 'powerSource': 'Battery', 'modelID': 'lumi.weather', 'hardwareVersion': 30, 'softwareBuildID': '3000-0001', 'dateCode': '20161129', 'lastSeen': None}]}
2019-09-28 10:32:56.590 (Zegbee Stick) Received available devices list from bridge
2019-09-28 10:32:56.590 (Zegbee Stick) Coordinator address is 0x00124b00194a0560
2019-09-28 10:32:56.590 (Zegbee Stick) Device TI0001 0x00124b00182c7918 (0x00124b00182c7918)
2019-09-28 10:32:56.591 (Zegbee Stick) Device WSDCGQ11LM 0x00158d0003230e4a (0x00158d0003230e4a)
2019-09-28 10:32:56.591 (Zegbee Stick) MqttClient::subscribe
2019-09-28 10:32:56.642 (Zegbee Stick) onMQTTSubscribed
2019-09-28 10:32:56.693 (Zegbee Stick) MQTT message: zigbee2mqtt/bridge/config {'version': '1.6.0', 'commit': 'caf92c5', 'coordinator': {'type': 'zStack12', 'meta': {'transportrev': 2, 'product': 0, 'majorrel': 2, 'minorrel': 6, 'maintrel': 3, 'revision': 20190608}}, 'log_level': 'info', 'permit_join': True}
2019-09-28 10:32:56.693 (Zegbee Stick) Zigbee2mqtt log level is info
2019-09-28 10:32:56.693 (Zegbee Stick) Joining new devices is enabled on the zigbee bridge
2019-09-28 10:33:06.409 (Zegbee Stick) MqttClient::ping
2019-09-28 10:33:41.166 (Zegbee Stick) MqttClient::ping

there is feedback with the switch Livolo !!!!!!!!

2019-09-28 10:40:51.214 (Zegbee Stick) MqttClient::ping
2019-09-28 10:41:00.129 (Zegbee Stick) MQTT message: zigbee2mqtt/0x00158d0003230e4a {'temperature': 26.22, 'linkquality': 123, 'humidity': 56.24, 'pressure': 998, 'battery': 91, 'voltage': 2985}
2019-09-28 10:41:00.194 (Zegbee Stick) MQTT message: zigbee2mqtt/0x00158d0003230e4a {'temperature': 26.22, 'linkquality': 126, 'humidity': 50.23, 'pressure': 998, 'battery': 91, 'voltage': 2985}
2019-09-28 10:41:00.209 (Zegbee Stick) MQTT message: zigbee2mqtt/0x00158d0003230e4a {'temperature': 26.22, 'linkquality': 126, 'humidity': 50.23, 'pressure': 998, 'battery': 91, 'voltage': 2985}
2019-09-28 10:41:01.219 (Zegbee Stick) MqttClient::ping
2019-09-28 10:41:11.238 (Zegbee Stick) MqttClient::ping
2019-09-28 10:44:07.492 (Zegbee Stick) MQTT message: zigbee2mqtt/0x00124b00182c7918 {'state_left': 'ON', 'state_right': 'OFF', 'linkquality': 0}
2019-09-28 10:44:07.493 (Zegbee Stick) Unsupported zigbee device type with model "TI0001"
2019-09-28 10:44:11.249 (Zegbee Stick) MqttClient::ping

Unsupported zigbee device type with model "TI0001"
I think this problem does not allow the switch Livolo to register domotics in device

My configuration.yaml

homeassistant: false
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://localhost'
advanced:
pan_id: 6756
ext_pan_id:
- 33
- 117
- 141
- 25
- 0
- 75
- 18
- 0
channel: 26
experimental:
livolo: true
serial:
port: /dev/ttyACM0
devices:
'0x00158d0003230e4a':
friendly_name: '0x00158d0003230e4a'
retain: false
'0x00158d00034ce047':
friendly_name: '0x00158d00034ce047'
retain: false
'0x00124b00182c7918':
friendly_name: '0x00124b00182c7918'
retain: false

model "TI0001" not added in domoticz-zigbee2mqtt-plugin

Hello,
I have home assistant + conbee II + zigbee2mgtt. I installed zigbee2mgtt-edge through hassio.
My config
{ "data_path": "/share/zigbee2mqtt", "devices": "devices.yaml", "groups": "groups.yaml", "homeassistant": true, "permit_join": true, "mqtt": { "base_topic": "zigbee2mqtt", "server": "mqtt://10.0.0.60:1883", "user": "user", "password": "password" }, "serial": { "port": "/dev/ttyACM1" }, "advanced": { "pan_id": 6756, "channel": 26, "network_key": [ 1, 3, 5, 7, 9, 11, 13, 15, 0, 2, 4, 6, 8, 10, 12, 13 ], "availability_blacklist": [] }, "ban": [], "whitelist": [], "queue": {} }

When I start service I am getting error.

[email protected] start /app
node index.js
zigbee2mqtt:info 2019-10-03T11:01:26: Logging to directory: '/share/zigbee2mqtt/log/2019-10-03.13-01-24'
zigbee2mqtt:info 2019-10-03T11:01:26: Starting zigbee2mqtt version 1.6.0 (commit #3e75108741a0d7328b278a8c26daaf8a5adf0934)
zigbee2mqtt:info 2019-10-03T11:01:26: Starting zigbee-herdsman...
zigbee2mqtt:error 2019-10-03T11:01:33: Error while starting zigbee-herdsman
zigbee2mqtt:error 2019-10-03T11:01:33: Error: SRSP - SYS - version after 6000ms
at Timeout.object.timer.setTimeout [as _onTimeout] (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:44:24)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
zigbee2mqtt:error 2019-10-03T11:01:33: Failed to start zigbee
zigbee2mqtt:error 2019-10-03T11:01:33: Exiting...
zigbee2mqtt:error 2019-10-03T11:01:33: Error: SRSP - SYS - version after 6000ms
at Timeout.object.timer.setTimeout [as _onTimeout] (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:44:24)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)

Any idea?
Rudolf

Classic... you should take off the stick and put it again or else push the reset button on the usb stick or wait for a few minutes to work . Load Zstack firmware on stick

@Nosstrom not really, he is using a conbee 2 which is not supported by zigbee2mqtt.

nono, I have conbee 2 + CC2531 and after I try another CC2531 it worked well. But my Livolo switch has poor response. Is it possible to fix that somehow? I have another (no zigbee) version and this worked better.

I use cc2531 and I am planning to purchase with antenna mod .

Livolo currently working on new Zigbee switches, it will be called smth like "Zigbee Home" more smart switches and more things... next month maybe... stay tuned! :)

I am watching this for a while now... is there somewhere a complete guide (software and hardware) to make it work with HA?

@crus1313 with the dev version (in hassio you can intall zigbee2mqtt-edge addon) it just works on the box.

Install z2m, set permit join, press 5 seconds the livolo switch and ready!

Must mention many times that must be used the zigbee2mqtt - edge to be able to get state and link quality. Cause many people use the other one. I spent week to figure it out.

@MiguelAngelLV,
Does it still have the limitation no channel and pan id? Since earlier it was required to set channel to 26 and special panId=6756.
You wrote it just works out of the box. Does that mean these limitations have been removed?

Oh, my fault.

Yes, it require channel 26 and panId.

El vie., 18 oct. 2019 a las 16:36, Ton1965 (notifications@github.com)
escribiĂł:

@MiguelAngelLV https://github.com/MiguelAngelLV,
Does it still have the limitation no channel and pan id? Since earlier it
was required to set channel to 26 and special panId=6756.
You wrote it just works out of the box. Does that mean these limitations
have been removed?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Koenkk/zigbee2mqtt/issues/592?email_source=notifications&email_token=AAE3ZHSWIWXGNKQNY2LNAX3QPHCWZA5CNFSM4GDWD2G2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBUV3VI#issuecomment-543776213,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAE3ZHWIJ3GAPTRFR63TDRLQPHCWZANCNFSM4GDWD2GQ
.

--
Miguel Ángel López

use only this configuration, and works fine for me.
homeassistant: true
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://'
user:
password: ''
serial:
port: /dev/ttyUSB0
advanced:
channel: 26
log_level: debug
rtscts: false
experimental:
livolo: true
devices:
'0x00124b00193b1504':
friendly_name: zigbeeroutertv
retain: false
'0x00124b0018ed2934':
friendly_name: zigbeeroutercontador
retain: false
'0x00158d00030aa1d4':
friendly_name: pirdespacho
retain: false
'0x00158d00034d1ab0':
friendly_name: temp_despacho
retain: false
'0x00158d0002bfe776':
friendly_name: contacto_despacho
retain: false
'0x00158d0002c9c7ea':
friendly_name: contacto_puerta
retain: false
'0x00158d000312fa79':
friendly_name: contacto_ventana_comedor
retain: false
'0x00158d00032303eb':
friendly_name: temp_comedor
retain: false
'0x00158d0002ebc98d':
friendly_name: pirpasillo
retain: false
'0x00158d000322b977':
friendly_name: temp_cocina
retain: false
'0x00158d000322a3d2':
friendly_name: temp_habitacion
retain: false
'0x00158d0002c388d3':
friendly_name: contacto_matrimonio
retain: false
'0x00158d000257a7ce':
friendly_name: pir_espejo
retain: false
'0x00158d00034d0e59':
friendly_name: pir_cocina
retain: false
'0x00124b001838ddb0':
friendly_name: despachozigbee
retain: false
'0x00124b001838f3f5':
friendly_name: visitazigbee
retain: false
'0x00124b000bf06cfd':
friendly_name: comedorzigbee
retain: false
'0x00124b000bf0723a':
friendly_name: pasillozigbee
retain: false
'0x00124b000bf11c25':
friendly_name: lavabozigbee
retain: false
'0x00124b000bf080e0':
friendly_name: espejozigbee
retain: false
'0x00124b001838e982':
friendly_name: habitacionzigbee
retain: false
'0x00158d0002834fb7':
friendly_name: fuga_agua_cocina
retain: false
'0x00158d000283531e':
friendly_name: fuga_agua_baño
retain: false
'0x00124b000bf083d4':
friendly_name: cocinazigbee
retain: false
'0x00158d0002caf304':
friendly_name: contacto_visita
retain: false

That is only the software part... how about hardware, what type of ziggbee usb device works, what "custom" software need to be flashed on it... using what type of flasher combo, how it is done in mac,win, etc.
From your response I would just install z2m, hold livolo 5 sec and guess what... nothing would happen... because there is a lot of stuff left out .
So is there such a thing as a "complete" guide?

Sent from my iPhone

On 18 Oct 2019, at 14:18, Miguel Ángel López Vicente notifications@github.com wrote:

ï»ż
@crus1313 with the dev version (in hassio you can intall zigbee2mqtt-edge addon) it just works on the box.

Install z2m, set permit join, press 5 seconds the livolo switch and ready!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

https://www.zigbee2mqtt.io

  1. Getting started

I also tried the above config and the switch pairs with CC2531, but I receive the following error:

No converter available for 'TI0001' with cid 'genOnOff', type 'attReport' and data '{"cid":"genOnOff","data":{"onOff":2}}'

The device appears also in HomeAssistant, but it becomes unavailable immediately after I try to use it, to turn it on.

Does it work with like 30 switches? Is there a limitation ?

Hello , Stas Demydiuk creator domoticz-zigbee2mqtt-plugin , at my request added a Livolo switch to the plugin. I tested everything works. https://github.com/stas-demydiuk/domoticz-zigbee2mqtt-plugin/commit/9ba8d193bcab6863b95b07e0b9227f8b8df3b9a2

2019-10-29 00:40:52.597 (Zegbee Stick) MQTT message: zigbee2mqtt/0x00124b00182c7918 {'state_left': 'ON', 'state_right': 'OFF', 'linkquality': 18}
2019-10-29 00:40:52.100 Status: User: Admin initiated a switch command (14/Switch WC/On)
2019-10-29 00:40:52.494 Status: EventSystem: Script event triggered: WC
2019-10-29 00:40:59.311 (Zegbee Stick) MqttClient::ping
2019-10-29 00:41:09.329 (Zegbee Stick) MqttClient::ping
2019-10-29 00:41:19.346 (Zegbee Stick) MqttClient::ping
2019-10-29 00:41:22.552 (Zegbee Stick) onCommand: Off, level (0) Color:
2019-10-29 00:41:22.552 (Zegbee Stick) MqttClient::publish zigbee2mqtt/0x00124b00182c7918/left/set ({"state": "OFF"})
2019-10-29 00:41:22.653 (Zegbee Stick) MQTT message: zigbee2mqtt/0x00124b00182c7918 {'state_left': 'OFF', 'state_right': 'OFF', 'linkquality': 18}
2019-10-29 00:41:22.816 (Zegbee Stick) MQTT message: zigbee2mqtt/0x00124b00182c7918 {'state_left': 'OFF', 'state_right': 'OFF', 'linkquality': 10}
2019-10-29 00:41:22.665 Status: EventSystem: Script event triggered: WC

got this today on 1.7.1 and 1.7.1_dev
zigbee2mqtt:info 2019-12-03 14:14:35: MQTT publish: topic 'homeassistant/sensor/0x00124b0018034efd/linkquality/config', payload '{"unit_of_measurement":"-","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/0x00124b0018034efd","json_attributes_topic":"zigbee2mqtt/0x00124b0018034efd","name":"0x00124b0018034efd_linkquality","unique_id":"0x00124b0018034efd_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00124b0018034efd"],"name":"0x00124b0018034efd","sw_version":"Zigbee2mqtt 1.7.1+dev","model":"Zigbee switch (1 and 2 gang) [work in progress](https://github.com/Koenkk/zigbee2mqtt/issues/592) (TI0001)","manufacturer":"Livolo"},"availability_topic":"zigbee2mqtt/bridge/state"}' (node:58) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Cluster' of undefined at Controller.<anonymous> (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:355:80) at Generator.next (<anonymous>) at /app/node_modules/zigbee-herdsman/dist/controller/controller.js:8:71 at new Promise (<anonymous>) at __awaiter (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:4:12) at Controller.onZclOrRawData (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:353:16) at ZStackAdapter.adapter.on (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:98:77) at ZStackAdapter.emit (events.js:198:13) at ZStackAdapter.onZnpRecieved (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:462:30) at Znp.emit (events.js:198:13) (node:58) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:58) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:58) UnhandledPromiseRejectionWarning: Error: Data request failed with error: 'MAC transaction expired' (240) at ZStackAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:578:27) at Generator.next (<anonymous>) at fulfilled (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:5:58) (node:58) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

And one more error later
(node:58) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8) (node:58) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'Cluster' of undefined at Controller.<anonymous> (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:355:80) at Generator.next (<anonymous>) at /app/node_modules/zigbee-herdsman/dist/controller/controller.js:8:71 at new Promise (<anonymous>) at __awaiter (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:4:12) at Controller.onZclOrRawData (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:353:16) at ZStackAdapter.adapter.on (/app/node_modules/zigbee-herdsman/dist/controller/controller.js:98:77) at ZStackAdapter.emit (events.js:198:13) at ZStackAdapter.onZnpRecieved (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:462:30) at Znp.emit (events.js:198:13) (node:58) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)

image
I got new Livolo EU socket from here https://ru.aliexpress.com/item/4000343575116.html
It have the same model - TI0001 :)))

@kirovilya so... Does It work with z2m?

@MiguelAngelLV Alas, not yet...
It also works only on channel 26...
A slightly different message about the current state (different from the switches) ...
I did not find which command to send to toggle socket (switch commands do not work) ...

Hi Everyone, I am new to home automation . . . and am just about to purchase 20!! Livolo Zigbee switches. from reading through the comments above I understand there is still an issue . . .
I was planning to use them along with HA. Should I buy them? is it hard to "fix" the connectivity issues? what USB stick should I buy?
I would really appreciate the help . . . I was going to spend all this money and just realised that it might not work . . .

hello integration with zigbee2mqtt is under development, we can already test it quite easily, it seems that the integration of xiaomi module works at the same time as livolo but the switch is to be improved:
negative point
slightly too small button
light intensity should be a tone above
the touch interface should be improved with contact gel or copper foil

Hi @mmachline. You'd better use a coordinator with an external antenna. One coordinator is able to run up to 7 Livolo switches, so you need at least 3 coordinators. If I were you, I'd buy two or three switches first and see how it works.

For the switches it is to see but I do not have the impression that the switches act as a router because the quality of reception is not very good for these products to see also if they are equipped with an antenna internal?

Hi, everyone involved. Now I have about 15 devices in my home with Zigbee connection. The most of them are Livolo switches and they makes me crazy.

Originally I had connectivity issues (many devices reported 0 link quality). And the first solution was to buy cc1352p-2 as one of the most powerful coordinators. Now I have the following setup:
IMG_0369
(Coordinator is in the center of my apartment and it is 2 meters away from my WiFi router that is placed near ceil. I have z2m 1.8 with transmitting power set to 19. And my PI is about 50cm far from the coordinator in order to reduce interference.)

But having this did not help me a lot as some Livolo switches that have 0 link quality did not get any improvement. Then I patched that switches the following way:
IMG_0343
(As you may see I moved antenna under glass plate. As well as increased touch sensor area. And yes, I got 30-60 link quality for that switches and they started to work well.)

But again it has limitations. Once a day I am rebooting z2m (without rebooting rPI) to fix connectivity issues, as I found that after 2-3 days of usage, I am starting to have problems with an ability to control switches (but reporting is still working well).

Also, if I perform reboot or power off of rPI, I will need to reconfigure some switches (I don't see logic here but last time I reconnected 5-7 switches, because some of them were completely disconnected from coordinator and some of them just didn't react on actions however they respond well).

And the last interesting thing is that reconnection don't makes everything to work. After reconnection, I need to perform z2m restart in order to get devices working.

So, I want to understand, maybe I am doing something wrong (and some of us have reliable configuration of Livolo switches)?

I am using z2m 1.8.0 with the following config

@kvet, have you tried adding

experimental:
  livolo: true

@igvk I thought that it was removed from 1.8. Will try to add it again (but I can't see anything related to that flag in the code)

@kvet I guess you are right, it should have been removed.
Livolo switches are problematic after power failures and disconnecting from coordinator. But I never noticed that the situation improves after restarting z2m.

@igvk Restarting z2m don't fix all issues. However it helps with reconnection because in my case I need to restart z2m after re-pairing because some switches don't react on changes from z2m.

I am wondering, maybe someone tried https://www.aliexpress.com/item/4000385782177.html?spm=2114.12010612.8148356.13.e23c3c6cdflrsW ? Maybe it Livolo fixed connectivity problems as they require the new gateway?..

I believe it is the same gateway , only new enclosure.

Sent from my iPhone

On 8 Jan 2020, at 10:45, Yury Orlov notifications@github.com wrote:

ï»ż
I am wondering, maybe someone tried https://www.aliexpress.com/item/4000385782177.html?spm=2114.12010612.8148356.13.e23c3c6cdflrsW ? Maybe it Livolo fixed connectivity problems as they require the new gateway?..

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

drop livolo it's beautiful but that's it, the touch function is approximate, the range is 20m max without wall and with the livolo gateway, with my cc2531 key at 6m I had a very poor linkquality of 10

@nicoxygen alternatives? I have only 2 wires and all my electronics from Livolo originally. As I see the only way to use Aqara relay. But than I’ll need to add line wire.

The thing is that Livolo is the only ine to have the option to group several switches as one long glass panel (ex.3 double switches) . I have this configuration and I like it a lot, it is elegant... one long slab of glass. It is the only feature that still keeps me a fan of Livolo. I hate that is RF only (no feedback) , the verry dim switch light , terrible app ( ugly and not user friendly), proprietary zigbee protocol, NO integration with major smart home systems ( home kit, HA etc).
So a lot to hate but unfortunately I cannot demolish my walls to reconfigure for other switches (I like a lot the new "Sonoff wifi no neutral" .

Sent from my iPhone

On 11 Jan 2020, at 22:44, rkotulan notifications@github.com wrote:

ï»ż
I just ordered this one
https://www.aliexpress.com/item/4000191335997.html?aff_platform=link-c-tool&cpt=1578775365323&sk=4vS6k6SG&aff_trace_key=5791ff28ce3f47a2b350d1374e71b32d-1578775365323-07656-4vS6k6SG&terminal_id=b359491f26ad4d9f98709d7d80e6271a

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

I also used the Livolo switches in the past because of the nice feature of providing different glass panels (socket / switch combination, multi - switch combination) but got rid of them because it didn't work reliably even with the original Livolo gateway. Turning on/off the lights via Alexa often worked only for some lights, all other connected lights still stayed on and so on.

I removed them and replaced all of the Livolo switches with switches from BSEED. Just do a search on AliExpress. They also offer different panel combinations (switches - sockets and so on) just like Livolo but they use WiFi and not ZigBee. I have no longer any issues, everything works as expected.

Hope that helps.

@trancefreak77 is it possible to flash tasoma firmware?

Hi @kvet
First off all, a coordinator is able to run up to 7 livolos (roughly, nobody knows exactly how many there can be). Try to test your configuration with 5.
And the second, if there is a router in your network you will have the symptoms which you had described.
I see small_room_window_shade in your config, if it is something like a xiaomi shade motor, it works as a router and it is the cause of your problems.

As far as I know the sockets are based on the 8266 so it should be possible. The switches are not based on the esp, so it is not possible.

The sockets and switches are controlled via the SmartLife App which may be compatible with most of the home automation software.

Bseed needs neutral wire, just like Sonoff. Recently Sonoff actualy made a wifi switch that does not need neutral.

Sent from my iPhone

On 13 Jan 2020, at 13:21, trancefreak77 notifications@github.com wrote:

ï»ż
I also used the Livolo switches in the past because of the nice feature of providing different glass panels (socket / switch combination, multi - switch combination) but got rid of them because it didn't worked reliably even with the original Livolo gateway. Turning on/off the lights via Alexa often worked only for some lights, all other connected lights still stayed on and so on.

I removed them and replaced all of the Livolo switches with switches from BSEED. Just do a search on AliExpress. They also offer different panel combinations (switches - sockets and so on) just like Livolo but they use WiFi and not ZigBee. I have no longer any issues, everything works as expected.

Hope that helps.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi folks, sorry I didn't read all 636 comments here but scanned most at the top and bottom. I have the same switch and besides the channel 26 issue it seems to work fine - at least I can switch on/off over MQTT. Is it correct that we haven't found a solution for that, yet?

First off all, a coordinator is able to run up to 7 livolos (roughly, nobody knows exactly how many there can be). Try to test your configuration with 5.
And the second, if there is a router in your network you will have the symptoms which you had described.

Can someone elaborate on those issues? Why only 7? Which symptoms do routers cause?

Is there something I can do to help make this work?

That woud be nice, and make it sticky at the top. Ehat works, what not, limitations.

Sent from my iPhone

On 17 Jan 2020, at 18:59, Mathias Ewald notifications@github.com wrote:

ï»ż
Hi folks, sorry I didn't read all 636 comments here but scanned most at the top and bottom. I have the same switch and besides the channel 26 issue it seems to work fine - at least I can switch on/off over MQTT. Is it correct that we haven't found a solution for that, yet?

First off all, a coordinator is able to run up to 7 livolos (roughly, nobody knows exactly how many there can be). Try to test your configuration with 5.
And the second, if there is a router in your network you will have the symptoms which you had described.

Can someone elaborate on those issues? Why only 7? Which symptoms do routers cause?

Is there something I can do to help make this work?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

I noticed it too that sometimes z2m stops working with a switch (probably after it resets) even when permit_join is enabled and the switch reannounces itself (in the example below the switch sensor button is pressed for several seconds to force this).
After restart of z2m everything works correctly.
Here is info from the log:

debug 2020-01-19 00:34:02: Device 'switch-hall' announced itself
debug 2020-01-19 00:34:18: Received MQTT message on 'zigbeeLivolo/switch-hall/set/state_left' with data 'OFF'
debug 2020-01-19 00:34:18: Publishing 'set' 'state' to 'switch-hall'
error 2020-01-19 00:34:19: Publish 'set' 'state' to 'switch-hall' failed: 'Error: Data request failed with error: 'No network route' (205)'
debug 2020-01-19 00:34:19: Error: Data request failed with error: 'No network route' (205)
    at ZStackAdapter.<anonymous> (C:\opt\zigbee2mqtt26\node_modules\zigbee-herdsman\dist\adapter\z-stack\adapter\zStackAdapter.js:578:27)
    at Generator.next (<anonymous>)
    at fulfilled (C:\opt\zigbee2mqtt26\node_modules\zigbee-herdsman\dist\adapter\z-stack\adapter\zStackAdapter.js:5:58)

same problem , maybe one day to work, maybe an hour. reboot required.
ver z2m 1.9.0 when there was a ver 1.6.0 everything was good for weeks .

zigbee2mqtt:error 2020-01-18 22:22:07: Publish 'set' 'state' to '0x00124b00182c7918' failed: 'Error: Data request failed with error: 'MAC transaction expired' (240)'
zigbee2mqtt:info 2020-01-18 22:22:07: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'set' 'state' to '0x00124b00182c7918' failed: 'Error: Data request failed with error: 'MAC transaction expired' (240)'","meta":{"friendly_name":"0x00124b00182c7918"}}'

the state of the switch always works !!!!

@AleksVM, I see that your case is a little different from mine (error: "MAC transaction expired", not "No network route").
If you hold your finger for several seconds at the switch touch sensor to force it announce itself - what happens then?

Nothing will happen if you hold it down for a long time. z2m reboot helps. Sometimes you need to physically turn off the power livolo switch.

Now again there is no management, yesterday I worked all day.

zigbee2mqtt:error 2020-01-19 08:08:59: Publish 'set' 'state' to '0x00124b0018324f90' failed: 'Error: Data request failed with error: 'No network route' (205)'
zigbee2mqtt:info 2020-01-19 08:08:59: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'set' 'state' to '0x00124b0018324f90' failed: 'Error: Data request failed with error: 'No network route' (205)'","meta":{"friendly_name":"0x00124b0018324f90"}}'
zigbee2mqtt:info 2020-01-19 08:09:03: MQTT publish: topic 'zigbee2mqtt/0x00158d000353b3cf', payload '{"state":"OFF","power":0,"voltage":null,"consumption":0.99,"temperature":39,"linkquality":99}'

I actually see the message 'Device announced itself' when holding the sensor switch - as can be seen in the logs.
But that doesn't help z2m to recover, only restart fixes the problem.

I am wondering. Is it possible to flash it with custom firmware? Maybe someone has any experience in this?

Hello everyone, I tell you I get married and my doubts.
I have 12 single and double Livolo switches. In turn 3 Hub of the same brand to control them.
If I have them paired only to their hubs, they work almost perfectly. But if I include them to the z2m network, the Livolo app stops working and in z2m they don't work well, only sometimes.
If I remove the Livolo Hubs will they work for me?

Hi all... I took the time and during the weekend I read ALL the posts (it was brutal :)).
Shorts story, all my Livolo work nice so far.
I use a Pi 3B on an SD card, HASSIO + add-ons ( zigbee2mqtt-edge, Mosquito broker).
A tutorial at some point would be nice (maybe a video one), for noobs like me with all the steps included in one post (I mean ALL the steps) and also the various hardware needed and how to config and install all the shenanigans to make this work. I may do that myself :).
All credits will go to the community, because it was a massive effort.
I will monitor the switches to see if all goes well in the next days (outages, signal strength, re-pair, etc)

What I did:
-flash the coordinator with the software (as per tutorial here)
-stick it in the Pi
-fill my credentials on the z2m config page regarding my mqtt server (ip, u/p , the USB port (ex. /dev/ttyACM0))
-add the coordinator in the HA ui (this is the end to the part "1." of this setup)
Next is the pairing:
-just unplugged my original Livolo gateway (my switches were already paired with it)
-press a switch button for 5 sec... and surprise it paired and detected as a 2 button switch (as per logs in the z2m add-on)
-also I found it as an entity in HA to be added in lovelace (tho as a switch with a name like 0x00124b0018050e64), and a sensor for the link quality (belong to the same number as above)
-I have 65 on one and 86 on the other as link quality so far.

Swithces and signal
https://share.getcloudapp.com/geurNLmQ

Coordinator status
https://share.getcloudapp.com/Jru7J2oO

The setup is a bit daunting, because is a combination of specific hardware to buy and flash, then some configs in the HA on Pi that apparently have nothing in common :)) but it was easier than I feared, thanks to the progress made by the great people here.

ps.
A Discord channel would have been nice to speed up things :)

UPDATE 1:
3 days and going strong but...
I powered off my HA Pi to install a fan (took 10 min) and when I start the Pi, the controller on /dev/ttyACM0 did not start and gave an error. I have also a Zwave stick on /dev/ttyACM1.
A manual restart of z2m add-on restored everything. Pairing was not lost. That was one time. (see below the permanent solution).

zigbee2mqtt:info 2020-02-03 12:24:10: MQTT publish: topic 'zigbee2mqtt/0x00124b001801fd41', payload '{"state_left":"OFF","state_right":"OFF","linkquality":47}' (node:61) UnhandledPromiseRejectionWarning: Error: Data request failed with error: 'MAC transaction expired' (240) at ZStackAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:590:27) at Generator.next (<anonymous>) at fulfilled (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:5:58) (node:61) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:61) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. zigbee2mqtt:info 2020-02-03 12:24:10: MQTT publish: topic 'zigbee2mqtt/0x00124b0018050e64', payload '{"state_left":"OFF","state_right":"OFF","linkquality":92}' (node:61) UnhandledPromiseRejectionWarning: Error: Data request failed with error: 'MAC transaction expired' (240) at ZStackAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:590:27) at Generator.next (<anonymous>) at fulfilled (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:5:58) (node:61) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Hello everyone, I tell you I get married and my doubts.
I have 12 single and double Livolo switches. In turn 3 Hub of the same brand to control them.
If I have them paired only to their hubs, they work almost perfectly. But if I include them to the z2m network, the Livolo app stops working and in z2m they don't work well, only sometimes.
If I remove the Livolo Hubs will they work for me?

I think you don't need the original Livolo hub, if you use the custom made coordinator.

All my thermostats are zigbee, along with my central heating devices (boiler, pumps etc) (Salus IT600).
Will it mess my thermostats in case of an outage, if i set "permit_join": true", for Livolo (to allow it to re-join back) ?
I mean all devices will want to reconnect back to a coordinator....
There is a parameter "whitelist": [] in the add-on config, but if I try to put something in there gives syntax errors, no mater what I try. Will this prevent anything else to pair with it?

I am wondering. Is it possible to flash it with custom firmware? Maybe someone has any experience in this?

Cannot be flashed by user.

I managed to fix the problems when I reboot HA, also due to outages.
An automation to delay the start of z2m in the form of restart, NOT START, because you don't know in what state is at the moment of delay.

This is from my automations.yaml file.

- alias: 'Restart Zigbee delay'
  trigger:
    platform: homeassistant
    event: start
  action:
    - delay: '00:01:00'
    - service: hassio.addon_restart
      data:
        addon: 7ad98f9c_zigbee2mqtt_edge  #this id from web browser, open addon page in HA
  initial_state: true

So far (after I apply the delay fix) all works as expected.
Tip, get a coordinator with an external antenna or an antenna plug where to fit external one. Way better signal.

Hello all,
On beginnign ill say, this stupid switches makes me crazy for over 2 weeks (only look is good ...).
Atm i got a t my home 1 zigbee, which i bought for testing and around 15 RF ones.
I have bought C2351 and installed server on my PI

zigbee2mqtt version 1.11.0-dev (commit #4d3bbce)
Conf:

homeassistant: false
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://xxxxxxx'
user: xxxxxxxxx
password: 'xxxxx'
serial:
port: /dev/ttyACM0
advanced:
channel: 26
pan_id: 4660
ext_pan_id:
- 33
- 117
- 141
- 25
- 0
- 75
- 18
- 0
log_level: debug
experimental:
livolo: true
rtscts: false
devices:
'0x00124b001838ccb6':
friendly_name: 'led_gosc'
retain: false

starting_log server:

Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:53: zigbee-herdsman started
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:53: Coordinator firmware version: '{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}}'
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:debug 2020-03-15 12:01:53: Zigbee network parameters: {"panID":4660,"extendedPanID":"0x00124b00198d7521","channel":26}
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:53: Currently 1 devices are joined:
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:53: led_gosc (0x00124b001838ccb6): TI0001 - Livolo Zigbee switch (1 and 2 gang) work in progress (EndDevice)
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:warn 2020-03-15 12:01:53: permit_join set to true in configuration.yaml.
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:warn 2020-03-15 12:01:53: Allowing new devices to join.
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:warn 2020-03-15 12:01:53: Set permit_join to false once you joined all devices.
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:53: Zigbee: allowing new devices to join.
Mar 15 12:01:53 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:53: Connecting to MQTT server at mqtt://192.168.1.5
Mar 15 12:01:54 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:54: Connected to MQTT server
Mar 15 12:01:54 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:54: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
Mar 15 12:01:54 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:54: MQTT publish: topic 'zigbee2mqtt/led_gosc', payload '{"state_left":"ON","state_right":"OFF","linkquality":15}'
Mar 15 12:01:54 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:01:54: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.11.0-dev","commit":"4d3bbce","coordinator":{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}},"log_level":"debug","permit_join":true}'

then i get this starting_endpoint_error:

Mar 15 12:01:58 Hassio npm[28708]: (node:28721) UnhandledPromiseRejectionWarning: Error: Command 0x00124b001838ccb6/6 genOnOff.toggle({}, {"timeout":6000,"manufacturerCode":null,"disableDefaultResponse":false}) failed (Error: AREQ - AF - dataConfirm after 5000ms)
Mar 15 12:01:58 Hassio npm[28708]: at Endpoint. (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:339:23)
Mar 15 12:01:58 Hassio npm[28708]: at Generator.throw ()
Mar 15 12:01:58 Hassio npm[28708]: at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:6:65)
Mar 15 12:01:58 Hassio npm[28708]: (node:28721) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Mar 15 12:01:58 Hassio npm[28708]: (node:28721) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I did some testing, everything was working(except connectivity problems, response etc.) until i didn't press button on livolo switch manualy, after that i noticed this errors all the time almost.

error after manual MQTT publish
zigbee2mqtt/led_gosc/left/set OFF

Mar 15 11:57:37 Hassio npm[28237]: zigbee2mqtt:debug 2020-03-15 11:57:37: Received MQTT message on 'zigbee2mqtt/led_gosc/left/set' with data 'OFF'
Mar 15 11:57:37 Hassio npm[28237]: zigbee2mqtt:debug 2020-03-15 11:57:37: Publishing 'set' 'state' to 'led_gosc'
Mar 15 11:57:42 Hassio npm[28237]: zigbee2mqtt:error 2020-03-15 11:57:42: Publish 'set' 'state' to 'led_gosc' failed: 'Error: Command 0x00124b001838ccb6/6 genLevelCtrl.moveToLevelWithOnOff({"level":1,"transtime":1}, {"timeout":6000,"manufacturerCode":null,"disableDefaultResponse":false}) failed (Error: AREQ - AF - dataConfirm after 5000ms)'
Mar 15 11:57:42 Hassio npm[28237]: zigbee2mqtt:debug 2020-03-15 11:57:42: Error: Command 0x00124b001838ccb6/6 genLevelCtrl.moveToLevelWithOnOff({"level":1,"transtime":1}, {"timeout":6000,"manufacturerCode":null,"disableDefaultResponse":false}) failed (Error: AREQ - AF - dataConfirm after 5000ms)
Mar 15 11:57:42 Hassio npm[28237]: at Endpoint. (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:339:23)
Mar 15 11:57:42 Hassio npm[28237]: at Generator.throw ()
Mar 15 11:57:42 Hassio npm[28237]: at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:6:65)
Mar 15 11:57:42 Hassio npm[28237]: zigbee2mqtt:info 2020-03-15 11:57:42: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'set' 'state' to 'led_gosc' failed: 'Error: Command 0x00124b001838ccb6/6 genLevelCtrl.moveToLevelWithOnOff({\"level\":1,\"transtime\":1}, {\"timeout\":6000,\"manufacturerCode\":null,\"disableDefaultResponse\":false}) failed (Error: AREQ - AF - dataConfirm after 5000ms)'","meta":{"friendly_name":"led_gosc"}}'
Mar 15 11:57:46 Hassio npm[28237]: zigbee2mqtt:debug 2020-03-15 11:57:46: Saving state to file /opt/zigbee2mqtt/data/state.json


Mar 15 12:02:12 Hassio npm[28708]: zigbee2mqtt:debug 2020-03-15 12:02:12: Device 'led_gosc' announced itself
Mar 15 12:02:12 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:02:12: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_announced","message":"announce","meta":{"friendly_name":"led_gosc"}}'
Mar 15 12:02:27 Hassio npm[28708]: (node:28721) UnhandledPromiseRejectionWarning: Error: Command 0x00124b001838ccb6/6 genOnOff.toggle({}, {"timeout":6000,"manufacturerCode":null,"disableDefaultResponse":false}) failed (Error: Timeout - 24172 - 6 - 3 - 6 - 11 after 6000ms)
Mar 15 12:02:27 Hassio npm[28708]: at Endpoint. (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:339:23)
Mar 15 12:02:27 Hassio npm[28708]: at Generator.throw ()
Mar 15 12:02:27 Hassio npm[28708]: at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:6:65)

Mar 15 12:02:27 Hassio npm[28708]: (node:28721) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

Mar 15 12:06:54 Hassio npm[28708]: zigbee2mqtt:error 2020-03-15 12:06:54: Publish 'set' 'state' to 'led_gosc' failed: 'Error: Command 0x00124b001838ccb6/6 genLevelCtrl.moveToLevelWithOnOff({"level":1,"transtime":1}, {"timeout":6000,"manufacturerCode":null,"disableDefaultResponse":false}) failed (Error: AREQ - AF - dataConfirm after 5000ms)'

Mar 15 12:06:54 Hassio npm[28708]: zigbee2mqtt:debug 2020-03-15 12:06:54: Error: Command 0x00124b001838ccb6/6 genLevelCtrl.moveToLevelWithOnOff({"level":1,"transtime":1}, {"timeout":6000,"manufacturerCode":null,"disableDefaultResponse":false}) failed (Error: AREQ - AF - dataConfirm after 5000ms)

Mar 15 12:06:54 Hassio npm[28708]: at Endpoint. (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:339:23)
Mar 15 12:06:54 Hassio npm[28708]: at Generator.throw ()
Mar 15 12:06:54 Hassio npm[28708]: at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:6:65)

Mar 15 12:06:54 Hassio npm[28708]: zigbee2mqtt:info 2020-03-15 12:06:54: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'set' 'state' to 'led_gosc' failed: 'Error: Command 0x00124b001838ccb6/6 genLevelCtrl.moveToLevelWithOnOff({\"level\":1,\"transtime\":1}, {\"timeout\":6000,\"manufacturerCode\":null,\"disableDefaultResponse\":false}) failed (Error: AREQ - AF - dataConfirm after 5000ms)'","meta":{"friendly_name":"led_gosc"}}'

I know this switches are not finished with implementation, but if i must buy and change RF > Zigbee which wont work, ill rather change whole system in my home.
I just need them to work stable with my HomeAssistant just to turn ON/OFF with some automation like motion detectors etc.

Please look at my logs, maybe someone will have idea how to fix this errors.
Thanks

mqttt_log.txt

Nvm, ill change whole system to other one will be faster and simplier to implement what i want :)

Hi, I could connect 12 switches to z2m. Sometimes it stucks, but not so often(once per 2 week maybe) but reboot helps.

And now I'm trying to connect the livolo socket. Got it today. Looks like it doesn't work with z2m as switch however model is the same.
Messages below are very like on messages from switches, but the difference is in "data". For switches the status is in 15, for sockets it's 14 field.

updated "fromZigbee,js" by the following code in "livolo_switch_state_raw":
state['state_socket'] = msg.data[14] & 1 ? 'ON' : 'OFF';

but have no idea how to update now "toZigbee.js" to get ability to control my socket, can anybody help?

zigbee2mqtt:info 2020-03-18 00:22:06: MQTT publish: topic 'livolo/0x00124b001803245a', payload '{"state_left":"ON","state_right":"ON","linkquality":113,"linkquality2":{"type":"raw","device":{"ID":18,"_type":"EndDevice","_ieeeAddr":"0x00124b001803245a","_networkAddress":40387,"_manufacturerID":0,"_endpoints":[{"ID":6,"profileID":260,"deviceID":0,"inputClusters":[0,3],"outputClusters":[6],"deviceNetworkAddress":40387,"deviceIeeeAddress":"0x00124b001803245a","clusters":{"genBasic":{"attributes":{"modelId":"TI0001 ","manufacturerName":"LIVOLO\u0000\u0010TI0001 ","powerSource":1,"zclVersion":0,"hwVersion":0,"dateCode":"20060831 "}}},"_binds":[]}],"_manufacturerName":"LIVOLO\u0000\u0010TI0001 ","_powerSource":"Mains (single phase)","_modelID":"TI0001 ","_zclVersion":0,"_hardwareVersion":0,"_dateCode":"20060831 ","_interviewCompleted":true,"_interviewing":false,"meta":{"configured":1},"_lastSeen":1584476526371},"endpoint":{"ID":6,"profileID":260,"deviceID":0,"inputClusters":[0,3],"outputClusters":[6],"deviceNetworkAddress":40387,"deviceIeeeAddress":"0x00124b001803245a","clusters":{"genBasic":{"attributes":{"modelId":"TI0001 ","manufacturerName":"LIVOLO\u0000\u0010TI0001 ","powerSource":1,"zclVersion":0,"hwVersion":0,"dateCode":"20060831 "}}},"_binds":[]},"data":{"0":122,"1":209,"2":90,"3":36,"4":3,"5":24,"6":0,"7":75,"8":18,"9":0,"10":7,"11":1,"12":6,"13":1,"14":0,"15":11},"linkquality":113,"groupID":0,"cluster":"genPowerCfg","meta":{}}}'
zigbee2mqtt:info 2020-03-18 00:22:07: MQTT publish: topic 'livolo/0x00124b001803245a', payload '{"state_left":"ON","state_right":"ON","linkquality":115,"linkquality2":{"type":"raw","device":{"ID":18,"_type":"EndDevice","_ieeeAddr":"0x00124b001803245a","_networkAddress":40387,"_manufacturerID":0,"_endpoints":[{"ID":6,"profileID":260,"deviceID":0,"inputClusters":[0,3],"outputClusters":[6],"deviceNetworkAddress":40387,"deviceIeeeAddress":"0x00124b001803245a","clusters":{"genBasic":{"attributes":{"modelId":"TI0001 ","manufacturerName":"LIVOLO\u0000\u0010TI0001 ","powerSource":1,"zclVersion":0,"hwVersion":0,"dateCode":"20060831 "}}},"_binds":[]}],"_manufacturerName":"LIVOLO\u0000\u0010TI0001 ","_powerSource":"Mains (single phase)","_modelID":"TI0001 ","_zclVersion":0,"_hardwareVersion":0,"_dateCode":"20060831 ","_interviewCompleted":true,"_interviewing":false,"meta":{"configured":1},"_lastSeen":1584476527077},"endpoint":{"ID":6,"profileID":260,"deviceID":0,"inputClusters":[0,3],"outputClusters":[6],"deviceNetworkAddress":40387,"deviceIeeeAddress":"0x00124b001803245a","clusters":{"genBasic":{"attributes":{"modelId":"TI0001 ","manufacturerName":"LIVOLO\u0000\u0010TI0001 ","powerSource":1,"zclVersion":0,"hwVersion":0,"dateCode":"20060831 "}}},"_binds":[]},"data":{"0":122,"1":209,"2":90,"3":36,"4":3,"5":24,"6":0,"7":75,"8":18,"9":0,"10":7,"11":1,"12":6,"13":1,"14":1,"15":11},"linkquality":115,"groupID":0,"cluster":"genPowerCfg","meta":{}}}'

Update: Seller said that socket can be used as repeater....does it requires some additional configuration?

@ptvoinfo There is a photo of the board
dsc02111
I think it's possible to flash it, but to do it one have to figure out how to connect the programmer and hack the protocol between CC2630 and main PIC controller.
I still hope that it's possible to use the switch without such difficulties.

Hi All, got connected to the PIC with a Pickit 3, could read the chip , but the fimware is protected. (just use the first 5 pins of te programmer, starting at the errow)

image

@Gizmo75 We suspected it from the beginning. Livolo is notorious for such things.
Anyway, it would be really strange for a commercial organization not to protect their code.

About the linkquality:
1 of the 4 livolo devices was connected for max 30 min with a link quality of 1 after that, I get the error ''no netwerk route (205)''

I buy the CC2530 + CC2591 router en now the livolo is working for 6 days with a linkquality of 89.

I use the coördinator CC2531

@Gizmo75 @lych I want to try somehow to read the data from 2 data pins. As I found there are only 4 pins connected to the zigbee module and two of them are power connection. And I will somehow connect rPI GPIOs to them and try to catch messages between them. But will it be enough to prepare the new firmware?

@kvet It is Rx/Tx pins. Caution: If you'll connect to these pins and connect 220/110V, then use a board with opto-isolation.

Hello
could get control on livolo socket with the following ZCL:
turnOff
0000 00 06 01 00 04 01 08 de 7c d2 1a e9 02 01 00 01
0010 00 00 00 00 00 00 00 00

turnOn
0000 00 06 01 00 04 01 08 de 7c d2 1a e9 02 01 00 01
0010 01 00 00 00 00 00 00 00

Unfortunatelly I don't know JavaScript and node.js, so I just hardcoded the sequence in different places, like
ĐžĐ·ĐŸĐ±Ń€Đ°Đ¶Đ”ĐœĐžĐ”

Who can help to format it in normal code and avoid some issues?

Hi, while developing with zStack 3.0 around and using the SampleLight application, I recognized, this item will reuse the model identification. I think the maker of this device shall switch its name to clearly distinguish it from the TI sample Code. Please change the your Model_ID to something different.

There is an issue with two-gang Livolo switches when two commands are sent to turn ON or OFF both lines, e.g. via scene activation in Homebridge.
The workaround is to introduce a delay between commands, so the second command arrives when the first line already changed state.

The quick and dirty way (works only if "left" is switched first):

            if (postfix === 'left') {
                channel = 1.0;
            } else if (postfix === 'right') {
                await wait(500);
                channel = 2.0;
            } else {
                return;
            }

The correct approach would be to detect consequent commands and apply a delay.

Did somebody check https://www.npmjs.com/package/homebridge-livolo-switches ?
btw there is new gateway for livolo and for new switches... did anybody tried new one?

Did somebody check https://www.npmjs.com/package/homebridge-livolo-switches ?
btw there is new gateway for livolo and for new switches... did anybody tried new one?

it doesn't work with livolo zigbee gateway v2 :(
records from homebridge start log:

(node:305) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'gatewayId' of undefined
at LivoloApi._reloadSwitchesData (/usr/lib/node_modules/homebridge-livolo-switches/lib/livolo-api.js:154:51)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:305) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:305) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Looks like from gateway v2 zigbee2mqtt is unable to get gatewayId... sorry that I didn't help with the investigation but I waiting to solve this first then I will buy it :D

@Gizmo75 have you made any progress? I'm in contact with a company that can retrieve code from the code protected PIC16F690. It will cost $250. I'm willing to sacrifice my Livolo hub for it. Perhaps it's worth a shot?

I have latest livolo switch https://www.aliexpress.com/item/4000385782177.html and I have issues with it.
It pairs ok but switch state is not correct after device toggle and I cannot toggle it from mqtt.
Here is debug log after toggle the device two times:

mai 16 18:19:36 clearfog-gt-8k npm[87548]: zigbee2mqtt:debug 2020-05-16 18:19:36: Received Zigbee message from '0x00124b0018014bf2', type 'raw', cluster 'genPowerCfg', data '{"type":"Buffer","data":[122,209,242,75,1,24,0,75,18,0,7,1,0,1,0,11]}' from endpoint 6 with groupID 0
mai 16 18:19:36 clearfog-gt-8k npm[87548]: zigbee2mqtt:info  2020-05-16 18:19:36: MQTT publish: topic 'zigbee2mqtt/0x00124b0018014bf2', payload '{"state_left":"ON","state_right":"ON","linkquality":45,"state":"OFF"}'
mai 16 18:19:40 clearfog-gt-8k npm[87548]: zigbee2mqtt:debug 2020-05-16 18:19:40: Received Zigbee message from '0x00124b0018014bf2', type 'raw', cluster 'genPowerCfg', data '{"type":"Buffer","data":[122,209,242,75,1,24,0,75,18,0,7,1,0,1,1,11]}' from endpoint 6 with groupID 0
mai 16 18:19:40 clearfog-gt-8k npm[87548]: zigbee2mqtt:info  2020-05-16 18:19:40: MQTT publish: topic 'zigbee2mqtt/0x00124b0018014bf2', payload '{"state_left":"ON","state_right":"ON","linkquality":63,"state":"OFF"}'

I'm running z2m 1.13, with zStack 3.0 on CC26X2R1.

This new switch works with their v2 gateway and I have same issue as @AlexLucky1983, reading the state is taken from the wrong index in data and this can easily be fixed but I haven't figure out how to set the toggle state.

Can somebody comment in the information given here:

Livolo device has to be paired on Channel 26! Then you can eventually switch the channel to 11 and Livolo devices will be switching automatically.

This actually contradicts with information from here where it is said that changing the channel on coordinator requires repairing of devices. If devices generally support switching to a new channel following the coordinator (is it a standard device behaviour specified by Zigbee?) then the wiki page should somehow reflect that.

Hi im trying to use https://www.mouser.co.uk/new/texas-instruments/ti-sensor-tag-kits/ and is getting recognised as this. Is there away to stop that?

{ "ieeeAddr":"0x00124b0007c92f00", "type":"EndDevice", "networkAddress":33812, "model":"TI0001", "vendor":"Livolo", "description":"Zigbee switch (1 and 2 gang) [work in progress](https://github.com/Koenkk/zigbee2mqtt/issues/592)", "friendly_name":"0x00124b0007c92f00", "manufacturerID":0, "manufacturerName":"TexasInstruments", "powerSource":"Battery", "modelID":"TI0001 ", "hardwareVersion":0, "dateCode":"20060831 ", "lastSeen":1592549792309 }

Hi @thomaspleasance
Two ways.
Delete or change "model":"TI0001" in z4m for livolo.
Or change TI0001 to something else in your device firmware.
It's a default value in TI example sources.

I am playing with Livolo socket. Observations:

  • Z2M detects it as "Zigbee switch (1 and 2 gang)" and creates state_left and state_right which is not correct.
  • When I send ON message to MQTT topic zigbee2mqtt/front_door_socket/set internally Z2M changes the state, but socket is actually not switched on:
debug 2020-06-30 14:46:36: Received MQTT message on 'zigbee2mqtt/front_door_socket/set' with data 'ON'
debug 2020-06-30 14:46:36: Publishing 'set' 'state' to 'front_door_socket'
info  2020-06-30 14:46:36: MQTT publish: topic 'zigbee2mqtt/front_door_socket', payload '{"state":"ON","linkquality":39,"state_left":"ON","state_right":"ON"}'
  • Socket sends messages when manually switched on/off, but these messages are not decoded by Z2M and it does not update the state:
debug 2020-06-30 14:59:51: Received Zigbee message from 'front_door_socket', type 'raw', cluster 'genPowerCfg', data '{"type":"Buffer","data":[122,209,146,250,49,24,0,75,18,0,7,1,6,1,1,11]}' from endpoint 6 with groupID 0
debug 2020-06-30 15:00:18: Received Zigbee message from 'front_door_socket', type 'raw', cluster 'genPowerCfg', data '{"type":"Buffer","data":[122,209,146,250,49,24,0,75,18,0,7,1,6,1,0,11]}' from endpoint 6 with groupID 0
  • Z2M detects it as "Zigbee switch (1 and 2 gang)" and creates state_left and state_right which is not correct.
  • When I send ON message to MQTT topic zigbee2mqtt/front_door_socket/set internally Z2M changes the state, but socket is actually not switched on:

I've stumbled upon the same issue with the new Livolo socket. The workaround is to add manual definition to configuration.yaml like this:

switch:
  - platform: "mqtt"
    availability_topic: "zigbee2mqtt/bridge/state"
    command_topic: "zigbee2mqtt/<FRIENDLY_NAME>/set"
    json_attributes_topic: zigbee2mqtt/<FRIENDLY_NAME>
    name: Wardrobe Outlet 1
    payload_off: "OFF"
    payload_on: "ON"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    unique_id: <FRIENDLY_NAME>_switch_zigbee2mqtt
    value_template: "{{ value_json.state }}"
    device:
      identifiers:
        - zigbee2mqtt_<FRIENDLY_NAME>
      name: "<FRIENDLY_NAME>"
      sw_version: Zigbee2mqtt 1.14.2-dev
      model: >-
        New Zigbee Socket [work in
        progress](https://github.com/Koenkk/zigbee2mqtt/issues/3560) (TI0001-socket)
      manufacturer: Livolo

sensor:
  - platform: mqtt
    availability_topic: zigbee2mqtt/bridge/state
    icon: "mdi:signal"
    json_attributes_topic: zigbee2mqtt/<FRIENDLY_NAME>
    name: Wardrobe Outlet 1
    state_topic: zigbee2mqtt/<FRIENDLY_NAME>
    unique_id: <FRIENDLY_NAME>_linkquality_zigbee2mqtt
    unit_of_measurement: lqi
    value_template: "{{ value_json.linkquality }}"
    device:
      identifiers:
        - zigbee2mqtt_<FRIENDLY_NAME>
      name: "<FRIENDLY_NAME>"
      sw_version: Zigbee2mqtt 1.14.2-dev
      model: >-
        New Zigbee Socket [work in
        progress](https://github.com/Koenkk/zigbee2mqtt/issues/3560) (TI0001-socket)
      manufacturer: Livolo

I think the most important part here is the correct 'device' section.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

I have some Livolo Zigbee Switch.

The most works fine, but one, I could get set paring mode...

If a two gang commutator. I press five seconds... BEEP... Nothing.

I press five seconds, BEEP, I keep pressing... second BEEP... Nothing.

Any idea?

conmutada solo empareja uno, los demĂĄs son esclavos.

@demonio2332 digo emparejar como zigbee, no como conmutada. Consigo hacer el emparejado conmutado, pero no el emparejado de zigbee.

ENG: I ask by zigbee pair, not commutator pairing.

Two gang switch must enable pair mode after first beep on any button.
Algorithm is:

  1. enable pair mode on coordinator
  2. press button on switch to beep

@hamper I try a lot of times... Nothing happened. I don't see any in logs.

El mar., 6 oct. 2020 a las 18:57, hamper (notifications@github.com)
escribiĂł:

Two gang switch must enable pair mode after first beep on any button.
Algorithm is:

  1. enable pair mode on coordinator
  2. press button on switch to beep

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Koenkk/zigbee2mqtt/issues/592#issuecomment-704413716,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAE3ZHRPZPZAJJVFOITKSBTSJND7ZANCNFSM4GDWD2GQ
.

--
Miguel Ángel López

I have some Livolo Zigbee Switch.

The most works fine, but one, I could get set paring mode...

If a two gang commutator. I press five seconds... BEEP... Nothing.

I press five seconds, BEEP, I keep pressing... second BEEP... Nothing.

Any idea?

I have one Livolo Zigbee Switch, and I cannot make it work with HA.
I have two switches (switch_left, switch_right), but nothing happens when one of them clicked.
Even when I switched the light on from the switch, nothing shows in the logs, not MQTT call.

Can you explain a bit of how you make it worked for you?

Could this help in finding a solution?

https://github.com/jamarju/livolo-firmware

The project is about an alternative firmware for Livolo Light switches, addressing the PIC16F690 chip.

I have 3 zigbee2mqtt routers, 19 livolo devices all Wieling fine without Any problems for 3 months

Ok, that is very nice result. A small question you maybe know. Are these switches extending the mesh network? I have some spots in my house where my zigbee stick signal is weak and thought using some Livolo switches to improve the signal strength.

Ok, that is very nice result. A small question you maybe know. Are these switches extending the mesh network? I have some spots in my house where my zigbee stick signal is weak and thought using some Livolo switches to improve the signal strength.

No it does not. With the USB only the range is so bad. Check the website of zigbee2mqtt. There is a tuturial how to make routers. I have 3! You can buy it verry cheap on AliExpress. When you have placed the routers make sure you deleted all livolos from your network. I have 1 on every floor. After you have connected the routers to your network add the livolo devices. I have on every livolo a link quality of 60 or higher. My first router is 1M from the USB with a link quality of 150.

The one thing you have to keep in mind is: if a router loses power you have to delete the livolo devices from your network that where connected to that specific router, and add again.

In this topic people dat you can connect max 7. I user the routers and all my 19 livolo devices works for 3 months without Any problems. They always respond!

I see your name, i think it is dutch i am dutch to if you need help you can send me a private message then i can explain in our mother language :p

@Whininie, which device you are using as a router?
I'm using Raspberry Pi with Raspbee and having trouble getting the Livolo to respond to messages or even publish to MQTT.

@rsneh sorry for late respond.
I use the : CC2530 + CC2591
https://nl.aliexpress.com/item/33008238410.html?spm=a2g0s.9042311.0.0.27424c4dpJ1kYH
here is the tutorial that i followed https://www.zigbee2mqtt.io/how_tos/how_to_create_a_cc2530_router.html

CC2531
CC2530 + CC2591
mqtt explorer

in the last picture you see the linkquality of the last used livolo devices

@Whininie @jeroenvdwaal I have some specific questions regarding the livolo setup since you both got it to work. I am new to home automation and I am planning my home assistant system for my next house. I have been searching the web all week but cannot find all information I need, could you help a fellow dutchie out? Assuming I want touch switches I now have two options, and please correct me if there is anything that doesn't hold true:

Method 1: Use livolo smart switches

Pros:

  • Easy installation (only wall switch)
  • You can add one additional gang to a switch and use that for custom automations (right?)

Cons:

  • The zigbee channel is proprietary (need a separate network for sensors & switches?)
  • They are not acting as routers themselves (will need additional routers)
  • Need to flash the firmware right? (not noob friendly)
  • If the router loses power you need to delete and re-add all switches (According to Whininie in the post above)

General question: there is no way to integrate them into HA with stock firmware and their hub?

Method 2: Use livolo 'dumb' switches + Sonoff ZBmini's (the new zigbee mini)

Pros:

  • Sonoff mini's act as routers for my other sensors (no need for additional routers)
  • One big mesh rather than two separate zigbee networks
  • Larger community for troubleshooting
  • Works with stock firmware I believe

Cons:

  • Harder installation (Sonoff mini goes into the ceiling due to needing a neutral in The Netherlands)
  • Cannot set automations on additional gangs.

I think the second option is more plug-and-play on the software side, however you lose some functionality with the additional gangs. Could you help me shed some light on how much work it is to get the livolo switches to work? Alvast bedankt!

Similar situation here, in addition to Jangarz a few more questions:

  1. Do the Zigbee compatible Livolo devices still function without gateway (obviously without the "smart" part), or does it _need_ to be connected to a (livolo or other custom/flashed) gateway/router to work _at all_?

  2. The livolo site doesn't actually mention the benefit of using the Zigbee compatible devices. It's clear they can be used to remote-switch in e.g. domoticz... Anything else, for example does it report the energy consumption in kWh or sth?

  3. Any experience anyone with ordering via Aliexpress from the Livolo "Spain warehouse"? Will import-taxes be added (Netherlands) or will they pass customs without problems (order > 22 euro)? Don't mind the tax that much, but the 15 euro on top which PostNL charges for 'handling' tax is annoying.

@Jangarz: You can "pull" the blue wire from the ceiling into the wall-box (no experience myself, but a friend told me it's not that difficult) - or let it be done by an electrician (probably expensive). That Sonoff Mini is 2cm... if that has to fit behind the Livolo inside the wall-box that might be (too?) tight however. I'll be installing a dumb-livolo dimmer later today, so I'll measure it.

Thanks!

  1. Do the Zigbee compatible Livolo devices still function without gateway (obviously without the "smart" part), or does it _need_ to be connected to a (livolo or other custom/flashed) gateway/router to work _at all_?

Yes, it works without gateway like a normal switch. But to my experience (wonder how others), every single Zigbee Livolo i've tried so far had lower touch sensitivity - you have to give it a firm push (in contrast to regular one which sometimes doesn't require even to touch the glass). I even tested supposedly " the second gen" which should address this issue (slight improvement but still far behind "dumb" ones).

  1. Any experience anyone with ordering via Aliexpress from the Livolo "Spain warehouse"? Will import-taxes be added (Netherlands) or will they pass customs without problems (order > 22 euro)? Don't mind the tax that much, but the 15 euro on top which PostNL charges for 'handling' tax is annoying.

No fees paid from Spain warehouse.

  1. Do the Zigbee compatible Livolo devices still function without gateway (obviously without the "smart" part), or does it _need_ to be connected to a (livolo or other custom/flashed) gateway/router to work _at all_?

Yes, it works without gateway like a normal switch. But to my experience (wonder how others), every single Zigbee Livolo i've tried so far had lower touch sensitivity - you have to give it a firm push (in contrast to regular ones which sometimes doesn't require even to touch the glass). I even tested supposedly " the second gen" which should address this issue (slight improvement but still far behind "dumb" ones).

  1. Any experience anyone with ordering via Aliexpress from the Livolo "Spain warehouse"? Will import-taxes be added (Netherlands) or will they pass customs without problems (order > 22 euro)? Don't mind the tax that much, but the 15 euro on top which PostNL charges for 'handling' tax is annoying.

No fees paid from Spain warehouse.

For me doesn’t work like a normal switch if it ain’t connected to the gateway the lamp blinking... and it’s really annoying ... in my opinion if your wiring at the wall of your house is with neutral purchase the welaik switch which is tuya an use the local tuya for the home assistant works like a charm and also the livolo glass which I like better fits perfect...

Also at the livolo if the signal is not strong from gateway the sensitivity of the touch I don’t know why is poor

For me doesn’t work like a normal switch if it ain’t connected to the gateway the lamp blinking...

The lamp is blinking because the current that powers the switch is enought for your lamp to blink.
There is a solution, for example
https://aliexpress.com/item/1630968581.html

@Jangarz: You can "pull" the blue wire from the ceiling into the wall-box (no experience myself, but a friend told me it's not that difficult) - or let it be done by an electrician (probably expensive). That Sonoff Mini is 2cm... if that has to fit behind the Livolo inside the wall-box that might be (too?) tight however. I'll be installing a dumb-livolo dimmer later today, so I'll measure it.

Thanks for thinking with me. Installation in the ceiling is fine with me, pulling a new blue wire is no problem either. The main question for me right now is whether to go with the proprietary linovo zigbee switches or go with a sonoff ecosystem. Earlier posts indicate that going the sonoff way will save me a lot of hassle. Do you have any experience with the Livolo (zigbee) products?

For me doesn’t work like a normal switch if it ain’t connected to the gateway the lamp blinking...

The lamp is blinking because the current that powers the switch is enought for your lamp to blink.
There is a solution, for example
https://aliexpress.com/item/1630968581.html

It depends if he means this kind of issue. My first Livolo Zigbee unit actually was able to turn on/off by itself without gateway or any user input (despite normal unit works in the same spot without any issues) and it wasn't caused by the load - looked more like an interference.

Do you have any experience with the Livolo (zigbee) products?

No, just like you trying to figure out where to go. I only have 1 dimmer, not yet installed. I might purchase a Zigbee switch (as the dimmer is accounced, but not yet released) today, it should still arrive this week, to can give it a try before the 11/11 sale starts.

Hence my question if the Zigbee compatible devices work without a gateway, the though being that "just pay the few euro's extra for Zigbee support" and it it doesn't work, not much lost ( but that's assuming it "does it's thing" without a gateway connection).

Thanks for the feedback everyone on the 'sensitivity' and 'blinking' issue - sounds like I'll just have to get one to compare the zigbee vs non-zigbee ones.

I have 2 Livolo switches. one RF, and the other is ZigBee.
Unfortunately, I couldn't make either to work remotely (works fine when touching it manually).
I'm ordered @Whininie's set up a few weeks ago and still waiting for it to arrive.

@rsneh Thank you for the info, that helps a lot. Since you have both and can directly compare, on touch-sensitivity, is a light touch sufficient (or does it need a firm push) - and is there any difference how they react to touch between the zigbee vs non-zigbee versions?

@kalmiya I have 18 normal switches (one/two-way, single/dual), two dimmers (i can't recommend them either) and had 4 Zigbee ones (to be honest, always dual two-way version)

Here you have video to get an idea. This was the "1st revision".

i have 1st version and works perfect.

@kalmiya Will you do that test this week for sure? I am very interested on how well they work. I read that it is important to put power on the switch when the glass panel is installed because it will calibrate in the correct configuration. I feel that is what gives some people troubles.

@kalmiya Will you do that test this week for sure? I am very interested on how well they work. I read that it is important to put power on the switch when the glass panel is installed because it will calibrate in the correct configuration. I feel that is what gives some people troubles.

if the wall i snot perfect and the panel not fit well, the touch does not work fine

@Jangarz Yes, true but that isn't the case just for the Zigbee ones, that needs to be done on every Livolo switch. Actually you shouldn't do anything with those switches without glass plate while powered because some of pads leak AC out (lower voltage but still).

@kalmiya Actually I don't have really sensitivity issues with the switches like I saw people have posted here.
Both my switches are US Standard (I'm not from US. I wanted it to fit my existing wall box), one is 3-Gang 2-Way, and the other is 1 gang.
The 3-gang feels better when touching to toggle the switch. But as people already mentioned, I think the issue is with the installation. For example, the 3-gang is installed on a brick wall, and the plastic isn't straight, so I put a tiny slice of rubber pad between buttons and the glass, that did the trick for me.

The 3-gang feels better when touching to toggle the switch. But as people already mentioned, I think the issue is with the installation. For example, the 3-gang is installed on a brick wall, and the plastic isn't straight, so I put a tiny slice of rubber pad between buttons and the glass, that did the trick for me.

That's interesting information. EU version has actually a metal plate so you need to be quite brute to copy angle/pattern/shape of the wall. It's not impossible but it's pretty obvious when one overtightens it... (well, even the glass is then almost impossible to install)

To those who don't see sensitivity issues. Do you have EU or US version? Because i'm still confused about this issue, especially when i've tested four units and all of them, more or less, had this. Not to mention Livolo's Aliexpress page ratings which needs to be wiped basically every 1/2 a year (didn't ever wonder why there are only "few" reviews...?)

Btw: The sensitivity is easy to test even without a glass plate. Just put the switches side by side, without glass (to exclude wrong mounting process or bad calibration...) and see how far from the pads switches recognise your finger.

Short update: Tried installing the livolo dimmer (eu-model), leaving power off entirely until everything - including the glass plate - was mounted.

Sensitivity was okay ( it didn't miss any touch), you did have to actually touch (so no switching when just 'near-but-not-touching), dimm-duration with a gu10-led a bit slower compared the the kopp-denver dimmer (with gu10 halogen) - might have been that the led itself seems to dim slower (compared to halogen). The sensitive area of the livolo is a lot smaller (only the circle in the center), compared the kopp-denver (entire area is touch-sensitive).

I only had 1 gu10-led, so testing the livolo dimmer with 1 led + 3 halogen, the led only dimmed to 1/2 strength. Removing the 3 halogen and only having 1 led it dimmed correctly (and surprisingly worked without flicker). With 1 led and the kopp-denver (min 40watts) it did dim but not over the entire range, but even when turned off the led still emitted a little bit of light. With 1 led + 1 halogen it did turn off entirely (also here, surprising it worked at all with just 1 led).

When touching the livolo dims, and when it reaches 'the end' the color of the center-circle changes.
Also when turning it back on it seems to return to the last setting when turned off (brief experimentation, so not 100% sure).

Mounting: there is a smaller area "touching the wall" (not much beyond the socket in the wall) and the glass plate having a larger area. This means you need really nice 'n straight walls, and they need to run 'tight' around the wall-socket because you can look behind the glass plate and see and the wall and any defects in it. There is no 'safety margin' like the frame for the kopp-denver allows.

However being used to the kopp-denver, my wife doesn't like that only the center circle on the livolo reacts to touch. For now I'll stick with the kopp-denver and think it through a bit more.

Thanks everyone for the constructive discussion and great information!

Was this page helpful?
0 / 5 - 0 ratings