Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Attempt to pair Livolo Zigbee switch #592

Closed
Ton1965 opened this issue Nov 14, 2018 · 749 comments
Closed

Attempt to pair Livolo Zigbee switch #592

Ton1965 opened this issue Nov 14, 2018 · 749 comments
Labels
stale Stale issues

Comments

@Ton1965
Copy link

Ton1965 commented Nov 14, 2018

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.

@khzd
Copy link

khzd commented Nov 14, 2018

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

@Ton1965
Copy link
Author

Ton1965 commented Nov 15, 2018

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.

@khzd
Copy link

khzd commented Nov 15, 2018

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

@kirovilya
Copy link
Contributor

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

@khzd
Copy link

khzd commented Nov 17, 2018

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

@Ton1965
Copy link
Author

Ton1965 commented Nov 17, 2018

@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.

@lych
Copy link

lych commented Nov 20, 2018

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.

@Lumbricus
Copy link

Lumbricus commented Nov 23, 2018

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.

@khzd
Copy link

khzd commented Nov 24, 2018

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

@Ton1965
Copy link
Author

Ton1965 commented Nov 24, 2018

@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.

@Koenkk
Copy link
Owner

Koenkk commented Nov 24, 2018

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!

@khzd
Copy link

khzd commented Nov 24, 2018

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 ...

@mpisek
Copy link

mpisek commented Nov 24, 2018

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

@lych
Copy link

lych commented Nov 25, 2018

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

@ptvoinfo
Copy link
Contributor

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

@Ton1965
Copy link
Author

Ton1965 commented Nov 25, 2018

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.

@lych
Copy link

lych commented Nov 25, 2018

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.

@kirovilya
Copy link
Contributor

kirovilya commented Nov 25, 2018

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

@lych
Copy link

lych commented Nov 25, 2018

@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.

@kirovilya
Copy link
Contributor

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

@Ton1965
Copy link
Author

Ton1965 commented Nov 25, 2018

@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 🤞 ?

@lych
Copy link

lych commented Nov 25, 2018

@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.

@lych
Copy link

lych commented Nov 25, 2018

@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.

@kirovilya
Copy link
Contributor

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

@lych
Copy link

lych commented Nov 26, 2018

@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.

@kirovilya
Copy link
Contributor

@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.

@lych
Copy link

lych commented Nov 26, 2018

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

@kirovilya
Copy link
Contributor

@lych debug

@Koenkk
Copy link
Owner

Koenkk commented Nov 26, 2018

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);
        },
    },

@lych
Copy link

lych commented Nov 26, 2018

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

@kind3r
Copy link

kind3r commented Jan 17, 2021

You can change the settings from DeConz, if you have the DeConz HA addon that is installed anyway, along with the Phoscon UI, but I did not try to change it since I switched to Z2M before Livolo because of a Tuya switch that auto turns off with both DeConz and ZHA. Not sure if you need to re-pair after or not (but my guess is that you do).

BTW, why are you using ZHA and not DeConz addon with the ConBee ?

The CC2652 has good specs but a wierd form factor (at least for the dev boards) and it's expensive so given the choice I would rather go for a ConBee II instead.

CC2531 is cheap, it does require a programmer so if it's your first then the cost is close to a ConBee (if you also factor in the time you'll spend trying to flash it, unless you get the pre-flashed sonoff), and also it's not so powerful both in terms of connected devices and range. But, you can use more than one in your network to act as routers (if no other devices are available with routing capabilities). It's the best choice for DIY but it all depends on how much spare time you have to tinker with it.

@Robbie-65
Copy link

Robbie-65 commented Jan 18, 2021

@kind3r I am quite new to HA, bought the Conbee2 because of good reviews. Tested with Deconz and ZHA, and found that ZHA worked fine with my Zigbee devices. (exept for Livolo)
What exactly did not work with you setup with the Conbee? you could control the switch, but could not verify the state in HA?
If I am going to buy the CC2531 I can get it with firmware.

But what is the right firmware?
This one?
or
This one has the latest from Koen
I probably will not buy the controler then...

@kind3r
Copy link

kind3r commented Jan 19, 2021

I have moved from DeConz (to ZHA and then) to Z2M before the Livolo switch (because of another Tuya switch that kept turning off automatically after 2min when paired with DeConz and ZHA).

Not sure about the firmware needed on CC2531 devices, I ordered some from BangGood but I am still waiting for them to be delivered. Anyway, 15 EUR is waaaay too overpriced IMHO (even if it's preflashed and with that generic antenna). For the same price you can get one + programmer and then you could play around with the firmware. But, if you don't want to wait ...

@Robbie-65
Copy link

I have ordered a complet set from Ali, with programmer.
Should take about 10 days... :-)

@Robbie-65
Copy link

Robbie-65 commented Feb 5, 2021

Hi,
I have got my CC2531, flashed it, installed Mosquitto, etc.
Now I can control my Livolo, and have also paired One Lidl GU10 bulb.
Seems to work, but after a while it stopped working.
I had to unplug the CC2531, and plug it back in.
Do I need to change my config?

I am not sure what the pan_id is for...

pan_id: 6754
channel: 26
network_key:
bla bla

@dmak
Copy link

dmak commented Feb 5, 2021

Seems to work, but after a while it stopped working.
I had to unplug the CC2531, and plug it back in.

Next time Livolo stops working try the following:

  • Set permit_join=true (you can do it via MQTT)
  • Power off and power on Livolo device
  • Set permit_join=false after making sure you can control your Livolo switch

@Robbie-65
Copy link

Robbie-65 commented Feb 6, 2021

Hi @dmak
You mean cut the power to the livolo? I am going to build the Livolo in the Wall, not easy to cut power, because my equipment is on the same power group.

But for now the livolo is just on my desk, so I can experiment with it.
Permit join- true is only to be able to automaticaly join a new device, am i right?
Must say,that also my light bulb did not react to HA at that time.
I am brand new to MQTT, so could very well be that I missed some importend congiguration.
I am happely surprised with the way MQTT works, very nice, even my test Lidl bulb is recognized as Lidl.

I think I will stick with MQTT, and maybe connect my Conbee to it.
For now my Conbee II is using ZHA, and the CC2531 is using MQTT.

I noticed that my Lidl Bulb was gone in the MQTT dashboard, after it was switched of for a while, but now is visible again.

@senufo
Copy link

senufo commented Feb 6, 2021

Hi
I have a LIVOLO TI0001 switch with a CONBEE2 and zigbee2mqtt. It is well recognized when I configure zigbee2mqtt with "permit_join = true" and it does appear in the interface however when I try to make a switch on it sends the following message:

MQTT publish: topic 'zigbee2mqtt / 0x00124b001e5e3ce0', payload '{"linkquality": 25, "state_left": "ON", "state_right": "ON"}'

but after I have the following error which appears:

{"message": "Publish 'set' 'state' to '0x00124b001e5e3ce0' failed: 'Error: Command 0x00124b001e5e3ce0 / 6 genLevelCtrl.moveToLevelWithOnOff ({" level ": 108, " transtime ": 1}, { "timeout ": 10000, "disableResponse ": false, "disableRecovery ": false, "disableDefaultResponse ": false, "direction ": 0, "srcEndpoint ": null, "reservedBits ": 0, " manufacturerCode ": null, " transactionSequenceNumber ": null}) failed (no response received) '", "meta": {"friendly_name": "0x00124b001e5e3ce0"}, "type": " zigbee_publish_error "}

Everything happens as if the communication only works in one direction Livolo towards zigbee2mqtt but not in the other direction.

@dmak
Copy link

dmak commented Feb 6, 2021

You mean cut the power to the livolo? I am going to build the Livolo in the Wall, not easy to cut power, because my equipment is on the same power group.

@Robbie-65 I also don't have much experience with Livolo. Repairing the device instead of powering it off should also help (permit_join should be enabled in configuration.yaml). If your network (e.g. LIDL bulb) is functioning OK if you power off Livolo, then you know whom to blame.

Everything happens as if the communication only works in one direction Livolo towards zigbee2mqtt but not in the other direction.

@senufo Try to bring your Livolo device closer to the Zigbee hub and check if the problem resolves. I also complain that Livolo devices have very limited range, but probably they miss the incoming Zigbee packet because they are constantly polluting the network. Probably someone else knows how to make these strange devices happy...

@Robbie-65
Copy link

I can confirm that the switch is working both ways.
I can control the switch from HA Dashboard, and if I control the switch direct, I see the response on my HA card in Lovelace.
However, It frequently does not respond, and I have to unplug the CC2531, and put it back in the USB extension cable.
That of course is very annoying.
I am new to MQTT, so any help would be appreciated.
Would another USB stick be a better choice?

@senufo
Copy link

senufo commented Feb 6, 2021

Thank you for this information
I am using a CONBEE 2 key
I brought it closer to 2m from the switch but the problem is the same.
I will try closer
I just realized that it is not exactly the same as in the picture (https://www.amazon.fr/gp/product/B08CB31XLH/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1) can it come from there?

Yet it is automatically identified

@senufo
Copy link

senufo commented Feb 6, 2021

I just got it.
My switch is not the zigbeeModel: ['TI0001'] but the zigbeeModel: ['TI0001-switch'] on the other hand it is recognized as the ['TI0001'] by z2m.
I succeeded by manually modifying the devices.js file commenting out the ['TI0001 '] and replacing zigbeeModel: ['TI0001-switch'] with zigbeeModel: ['TI0001']

How should I do so that it is recognized automatically?

@crus1313
Copy link

crus1313 commented Feb 6, 2021

I can confirm that the switch is working both ways.
I can control the switch from HA Dashboard, and if I control the switch direct, I see the response on my HA card in Lovelace.
However, It frequently does not respond, and I have to unplug the CC2531, and put it back in the USB extension cable.
That of course is very annoying.
I am new to MQTT, so any help would be appreciated.
Would another USB stick be a better choice?

Get one with an external antena, and ad the sensor in HA (google it) to see the signal strenght between coordonator and Livolo.

@edatech
Copy link

edatech commented Feb 25, 2023

I did everything possible mentioned in this post. I press the button for 5 seconds, hear the beep, release the button and just wait.

advanced:
pan_id: 4660
ext_pan_id:
- 33
- 117
- 141
- 25
- 0
- 75
- 18
- 0
channel: 26
network_key:
- 236
- 196
- 191
- 48
- 199
- 61
- 60
- 48
- 146
- 151
- 18
- 67
- 111
- 197
- 181
- 15
log_level: debug

This is my config. The device just wont show or be detected.

@MiguelAngelLV
Copy link

I think you need use the standar key and the standar pan_id

advanced:
  ext_pan_id:
    - 33
    - 117
    - 141
    - 25
    - 0
    - 75
    - 18
    - 0
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  channel: 26
  pan_id: 6755

@edatech
Copy link

edatech commented Feb 25, 2023

Tried that as well. no joy. Wonder how I can further troubleshoot. Do you need todo anything else in zigbee2mqtt before holding the button for 5 sec? Other then the obvious, allowing device to join :-)

@Wi3ard
Copy link

Wi3ard commented Feb 25, 2023

I'm sorry guys. I've had my apartment in Kharkiv on the North Saltivka with all these zeegbees installed in the sockets. It all was rocketed out by russians and I'm not sure if it's still alive.

@setfire2
Copy link

@Wi3ard: sad to hear this. I'm honestly sorry for you.

@edatech: Livolo released a new revision of the switches, which - at the time I tried it - don't work with zigbee2mqtt. I already mentioned that in this post:
#11330
I still have two of the new ones in my shelf and wanted to try them again one day.

@lych
Copy link

lych commented Feb 25, 2023

Tried that as well. no joy. Wonder how I can further troubleshoot. Do you need todo anything else in zigbee2mqtt before holding the button for 5 sec? Other then the obvious, allowing device to join :-)

Hi. There must be something in the z2m log

@edatech
Copy link

edatech commented Feb 25, 2023

debug 2023-02-25 13:07:50: Zigbee network parameters: {"channel":26,"extendedPanID":"0x21758d19004b1200","panID":6755}
info 2023-02-25 13:07:50: Currently 0 devices are joined:
warn 2023-02-25 13:07:50: permit_join set to true in configuration.yaml.
warn 2023-02-25 13:07:50: Allowing new devices to join.
warn 2023-02-25 13:07:50: Set permit_join to false once you joined all devices.
info 2023-02-25 13:07:50: Zigbee: allowing new devices to join.
info 2023-02-25 13:07:50: Connecting to MQTT server at mqtt://core-mosquitto:1883
debug 2023-02-25 13:07:50: Using MQTT login with username: addons
info 2023-02-25 13:07:50: Connected to MQTT server
info 2023-02-25 13:07:50: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
info 2023-02-25 13:07:50: Started frontend on port 0.0.0.0:8099
info 2023-02-25 13:07:50: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
info 2023-02-25 13:07:50: Zigbee2MQTT started!
debug 2023-02-25 13:07:50: Received MQTT message on 'zigbee2mqtt/bridge/config' with data '{"commit":"unknown","coordinator":{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20220219,"transportrev":2},"type":"zStack3x0"},"log_level":"debug","network":{"channel":11,"extendedPanID":"0x00124b0026b73739","panID":6754},"permit_join":false,"version":"1.30.1"}'

Is it possible that i revert to channel 11? SKU:VL-FC1S-2G This is my model by the way

@edatech
Copy link

edatech commented Feb 25, 2023

debug 2023-02-25 13:07:50: Zigbee network parameters: {"channel":26,"extendedPanID":"0x21758d19004b1200","panID":6755}

and then

{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20220219,"transportrev":2},"type":"zStack3x0"},"log_level":"debug","network":{"channel":11,"extendedPanID":"0x00124b0026b73739","panID":6754},"permit_join":false,"version":"1.30.1"}'

@lych
Copy link

lych commented Feb 25, 2023

There is nothing about pairing a new device.
Maybe Livolo changed something in firmware, channel or smth.
I gave up using Livolo. I switched to BSEED. It looks pretty the same but cheaper and works just out of the box, without all this tricks.

@edatech
Copy link

edatech commented Feb 25, 2023

I think my channel is not changing on my sonnof stick

@edatech
Copy link

edatech commented Feb 25, 2023

Maybe Livolo changed something in firmware, channel or smth.

I also have a device that different then the other. VL-FC1S-2G.

@lych
Copy link

lych commented Feb 25, 2023

I see. Coordinator must be on 26ch. Livolo locked on 26ch, at least the old ones (like mine) and can't work on any other. Try another coordinator if you can.

@setfire2
Copy link

Update on the new revision of the Livolo switch: I tried one again yesterday and they work now.

@edatech
Copy link

edatech commented Feb 26, 2023

Update on the new revision of the Livolo switch: I tried one again yesterday and they work now.

Do you need to update zigbeetomqtt?

@setfire2
Copy link

Do you need to update zigbeetomqtt?

I use ioBroker and since my last try I did several updates of the Zigbee Adapter for ioBroker, which I think uses zigbee2mqtt in the background.

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

No branches or pull requests