This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed Official Zigbee SDK2

[App] Xiaomi-mi ZigBee - Main discussion topic (v0.4.1)

11516171921

Comments

  • PetervdK said:
    In the mean time i ordered a Xiaomi Wireless Switch in the hope that that would add correctly.
    Alas, same as the temp/hum sensors. It takes a while to walk through the interview and in the end it is added as an unknown Zigbee device.
    I made a ticket with Athom, who points me to the developer of the program...

    Just to be sure: is installing the Xiaomi Zigbee app enough to (should) get it working? Or should i do something with the mentioned Homey Config Composer? I'm beginning to doubt myself....:(
    @PetervdK yes, installing the Xiaomi Zigbee app from the App Store should be sufficient... and should result in the correct recognition of the device..

    the remarks about Homey config composer is only for co-developers making changes to the app...

    Can you send me the original issue number and indicate which ID’s are shown when the device is included as unknown device?
  • If you mean the issue number from Athom support: 7484

    1 - 0x00158d0001b93d44 - Temp 04 - LUMI - EndDevice - lumi.sens - 260
    2 - 0x00158d000155e346 - Unknown - Unknown - EndDevice

    I assume the second device (which should be the switch) gets the product ID and profile ID after i reset the Homey. The same happens with the temp/hum sensors.

    I won't do that now for continuity reasons, i plan to do it in the weekend.

  • I got a aqara water sensor, this one is not supported yet. (is there only one AQARA water sensor ? (there is a mention of the MiJia Aqara Water sensor waiting on zigbee support from athom before it can be implemented in this app.

    Or is it already possible to make the aqara watersensor work with the app now?
  • Hi guys, I’ve just installed the wired version of the Xiaomi Aqara Double wall switch and paired with Homey. Through Devices I can control both lights connected to it...but at Flows I can just Switch the “Right Switch”...the left is not in the list?
    any thoughts?
  • Dutchprop said:
    Hi guys, I’ve just installed the wired version of the Xiaomi Aqara Double wall switch and paired with Homey. Through Devices I can control both lights connected to it...but at Flows I can just Switch the “Right Switch”...the left is not in the list?
    any thoughts?
    Solved, sorry...
  • PetervdKPetervdK Member
    edited July 2018
    After the reboot:
    10x00158d0001b93d44Temp 04LUMIEndDevicelumi.sens2600—1
    20x00158d000155e346Unknown ZigBee deviceLUMIEndDevicelumi.sensor_switch2600—2
  • I got a aqara water sensor, this one is not supported yet. (is there only one AQARA water sensor ? (there is a mention of the MiJia Aqara Water sensor waiting on zigbee support from athom before it can be implemented in this app.

    Or is it already possible to make the aqara watersensor work with the app now?
    @Jwoudenberg Yes, there is only one Aqara water sensor. 
    In order to make this sensor work with Homey, Athom will need to implement the IAS cluster to Homey's Zigbee implementation (part of the Zigbee rewrite to be done after the 2.0 SW release): for details see: https://github.com/TedTolboom/com.xiaomi-mi-zigbee/issues/26
    PetervdK said:
    After the reboot:
    10x00158d0001b93d44Temp 04LUMIEndDevicelumi.sens2600—1
    20x00158d000155e346Unknown ZigBee deviceLUMIEndDevicelumi.sensor_switch2600—2
    @PetervdK thanks for following up... can you share the full node ID's information of the Unknown ZigBee device?
    Devices tab > wrench symbol > Node information

    The productID is shown correctly after the reboot...  and is defined (correctly) in the app.
    If also the deviceID and profileID are correct, something goes wrong during inclusion... If I have the remaining ID's I'll check with Athom development to check for a solution...

    Can you do one additional check?
    1. Remove the Unknown ZigBee device from Homey
    2. Reset the Xiaomi Wireless switch by press and keep pressed the button (not pinhole) for more than 10 seconds
    3. Include the Xiaomi Wireless switch by chosing add device > Xiaomi Zigbee app > Wireless switch and following below steps, and in particular the Note:
    Hold the wireless switch during inclusion in close proximity of Homey\nLong press the reset button for more than 3 seconds until the blue light flashes three times
    Note: keep pressing the reset button every 2 second to keep the sensor awake during the inclusion
  • PetervdKPetervdK Member
    edited July 2018
    Just did the additional check with the switch.
    After the reset by pressing the switch for more then 10 seconds, the adding went much faster then before so i had hope. But  alas it still ended up as unknown device.

    However, just after the procedure i saw a window popping up and disappear in a split second and could just read something with "incompatible app" or something like that...

    <edit>
    Tried it again and saw the phrase "searching for compatible app"
  • teowzhteowzh Member
    Hey peeps, I have installed Aqara wall switches (LN). The 2-gang switches work perfectly. However I am having problems with the single gang switches. I am able to pair the switch to Homey, but am unable to activate the switch. It works fine on the 2-gang switches. I looked at the connection, Homey is able to identify the switch. When I tried to use flow on the switch as a "THEN" statement, I got a "Cannot read property of 'do' of undefined" error. Please advice. 

    I am willing to provide logs, I just do not know how to get them to show. Running on Homey v1.5.11, and 0.4.0 of this app. 


  • teowzh said:
    Hey peeps, I have installed Aqara wall switches (LN). The 2-gang switches work perfectly. However I am having problems with the single gang switches. I am able to pair the switch to Homey, but am unable to activate the switch. It works fine on the 2-gang switches. I looked at the connection, Homey is able to identify the switch. When I tried to use flow on the switch as a "THEN" statement, I got a "Cannot read property of 'do' of undefined" error. Please advice. 

    I am willing to provide logs, I just do not know how to get them to show. Running on Homey v1.5.11, and 0.4.0 of this app. 


    @teowzh that is the only switch I don't have yet myself....
    I guess the endpoint for the ctrl_ln1.aq1 is different than I anticipated...

    Do you have experience with installing and running an app through the Command Line Interface (CLI)?
    As explained in this guide (step 1-3, with Node.js 8.9.4): https://developer.athom.com/docs/apps/tutorial-Getting Started.html

    If so, you could create the needed logging by:
    1. download the Xiaomi Zigbee app from https://github.com/TedTolboom/com.xiaomi-mi-zigbee
    2. Modify (with an text editor) in `/drivers/ctrl_ln1.aq1/device.js`: on line 10 `// this.enableDebug();` into `this.enableDebug();` and on line 13 `// this.printNode();` into `// this.printNode();` (aka uncommenting the log statements).
    3. Run the app from the command line (and within the apps directory) with `athom app run`

    I'm in particular looking for the Node overview of the ctrl_ln1.aq1, similar to the one of the ctrl_ln2.aq1 (https://github.com/TedTolboom/com.xiaomi-mi-zigbee/blob/master/drivers/ctrl_ln2.aq1/device.js#L96).
    Can you copy that for the logging and send it to me?

    After this, simply stop (CTRL-C) the running app and install the Xiaomi Zigbee app from the app store. 

    If you need support to execute these steps, please contact me on Slack.
  • PetervdK said:
    Just did the additional check with the switch.
    After the reset by pressing the switch for more then 10 seconds, the adding went much faster then before so i had hope. But  alas it still ended up as unknown device.

    However, just after the procedure i saw a window popping up and disappear in a split second and could just read something with "incompatible app" or something like that...

    <edit>
    Tried it again and saw the phrase "searching for compatible app"
    @PetervdK So during the inclusion process the ID's are not matched correctly, therefore not finding the compatible app, but after a reboot the correct ID's are shown in the node overview...
    That sounds to me like an issues in the inclusion process, handled completely outside the app scope (outside to setting the correct ID's)... I'll check with Athom development how to proceed..
  • @PetervdK So during the inclusion process the ID's are not matched correctly, therefore not finding the compatible app, but after a reboot the correct ID's are shown in the node overview...
    That sounds to me like an issues in the inclusion process, handled completely outside the app scope (outside to setting the correct ID's)... I'll check with Athom development how to proceed..
    Ok, clear. Thanks for your time and effort in advance! I will wait curiously what the cause can be...
  • TedTolboomTedTolboom Member
    edited July 2018
    I just uploaded the next update of the Xiaomi Zigbee app to the app store awaiting approval from Athom. Approved.

    In this intermediate update, I fixed the issue with the Aqara Smart Light Wall Switch single (LN-version) as reported by @teowzh.

    Changelog:
    v 0.4.1
    * Fix issue where the Aqara Smart Light Wall Switch (LN) Single (product type no: QBKG11LM) can not be controlled
  • vaderagvaderag Member
    edited July 2018
    Just installed an Aqara double switch (L) - seems to work great :)
    Just wondering if there is a way to say, if i'm holding the switch dim a device?
    E.g. I actually only have the Left switch hard wired, the right switch I have a flow to toggle a yeelight. But it would be nice if i could toggle, but if I hold it down it dims?

    Any way to do this?

    EDIT: Also noticed that when I go to the "and" column (also just noticed same in the then column) I only get Right Switch or On options - no Left Switch
    EDIT2: Think I've just worked it out that On with nothing in brackets IS the left switch

  • vaderag said:
    Just installed an Aqara double switch (L) - seems to work great :)
    Just wondering if there is a way to say, if i'm holding the switch dim a device?
    E.g. I actually only have the Left switch hard wired, the right switch I have a flow to toggle a yeelight. But it would be nice if i could toggle, but if I hold it down it dims?

    Any way to do this?

    EDIT: Also noticed that when I go to the "and" column (also just noticed same in the then column) I only get Right Switch or On options - no Left Switch
    EDIT2: Think I've just worked it out that On with nothing in brackets IS the left switch

    @vaderag No this (using holding of a button to dim another device) is not possible. In fact, holding any of the two buttons for more than 5 seconds, will result in the device going into inclusion mode... 
    So there is no option to add this to the device / driver...

    And yes, you're right, due to limitations of the current Zigbee implementation, it is not possible to create a sub-device (multichannel node) similar to Z-wave.. so I had add the second (right) switch on the same primary device, resulting in a custom made action card to turn on or off / and also speech is not working for the second (right) switch...

    When the Zigbee rewrite is completed, I'll update the drivers / app accordingly.
  • vaderag said:
    Just installed an Aqara double switch (L) - seems to work great :)
    Just wondering if there is a way to say, if i'm holding the switch dim a device?
    E.g. I actually only have the Left switch hard wired, the right switch I have a flow to toggle a yeelight. But it would be nice if i could toggle, but if I hold it down it dims?

    Any way to do this?

    EDIT: Also noticed that when I go to the "and" column (also just noticed same in the then column) I only get Right Switch or On options - no Left Switch
    EDIT2: Think I've just worked it out that On with nothing in brackets IS the left switch

    @vaderag No this (using holding of a button to dim another device) is not possible. In fact, holding any of the two buttons for more than 5 seconds, will result in the device going into inclusion mode... 
    So there is no option to add this to the device / driver...

    And yes, you're right, due to limitations of the current Zigbee implementation, it is not possible to create a sub-device (multichannel node) similar to Z-wave.. so I had add the second (right) switch on the same primary device, resulting in a custom made action card to turn on or off / and also speech is not working for the second (right) switch...

    When the Zigbee rewrite is completed, I'll update the drivers / app accordingly.

    Thanks for the clarification! And yes, didn't think about the inclusion mode kicking in!!
  • So after installing this I was hoping it might resolve the issues which I had with one of my HBS just disappearing frequently (as in not reporting changes)

    I assumed it was distance but it would seem that is not the case given the new switch is more than close enough...

    Is there anything I can do to resolve this, it's driving me nuts. Was working fine immediately after installing switch but this morning just not reporting
  • vaderag said:
    So after installing this I was hoping it might resolve the issues which I had with one of my HBS just disappearing frequently (as in not reporting changes)

    I assumed it was distance but it would seem that is not the case given the new switch is more than close enough...

    Is there anything I can do to resolve this, it's driving me nuts. Was working fine immediately after installing switch but this morning just not reporting
    Ehm... I need an additional step to complete the problem statement... slow start this morning...

    “after installing this” refers to after installing the Aqara switch and “HBS” is the Aqara Human Body Sensor (incl. lumminance sensor) or is it the Xiaomi sensor?
    And you expected the Aqara switch to create an routing mesh point for the HBS? Correct?

    Did you confirm the range issue by moving the HBS closer to Homey; does it respond better in that case?

    Typically the Zigbee mesh is a self controlling mechanism, but it will require some time (and patience).

    You could try to wakeup the sensor by pressing it’s button from the intended location or removing the sensor and reincluding it (now the switch is part of the network)..
  • PetervdK said:
    @PetervdK So during the inclusion process the ID's are not matched correctly, therefore not finding the compatible app, but after a reboot the correct ID's are shown in the node overview...
    That sounds to me like an issues in the inclusion process, handled completely outside the app scope (outside to setting the correct ID's)... I'll check with Athom development how to proceed..
    Ok, clear. Thanks for your time and effort in advance! I will wait curiously what the cause can be...
    @PetervdK checked with Emile.
    This issue needs to be looked into by Athom.

    Can you create an GitHub issue at https://github.com/athombv/homey/issues and describe the steps taken above.

    It would be awesome if you could remove one of the troublesome devices, reboot Homey and after all apps have been loaded (safe 30 min after reboot), try to include the device again.
    If it fails, send a log to Athom and copy the code into the GH issue.

    If you send me the issue number, I’ll contribute to this issue, ok?
  • vaderag said:
    So after installing this I was hoping it might resolve the issues which I had with one of my HBS just disappearing frequently (as in not reporting changes)

    I assumed it was distance but it would seem that is not the case given the new switch is more than close enough...

    Is there anything I can do to resolve this, it's driving me nuts. Was working fine immediately after installing switch but this morning just not reporting
    Ehm... I need an additional step to complete the problem statement... slow start this morning...

    “after installing this” refers to after installing the Aqara switch and “HBS” is the Aqara Human Body Sensor (incl. lumminance sensor) or is it the Xiaomi sensor?
    And you expected the Aqara switch to create an routing mesh point for the HBS? Correct?

    Did you confirm the range issue by moving the HBS closer to Homey; does it respond better in that case?

    Typically the Zigbee mesh is a self controlling mechanism, but it will require some time (and patience).

    You could try to wakeup the sensor by pressing it’s button from the intended location or removing the sensor and reincluding it (now the switch is part of the network)..
    No probs :)

    - I have a HBS (with luminance) which has been playing up for some time. I figured distance was the (main) issue
    - After installing the Aqara switch, I hoped that it would create a routing mesh point - correct
    - The HBS did seem to perform better close to Homey, tho I can't be sure...

    I might try your last suggestion - it has always been problematic so wonder if just de- and re-including it might help...
  • vaderag said:
    vaderag said:
    Just installed an Aqara double switch (L) - seems to work great :)
    Just wondering if there is a way to say, if i'm holding the switch dim a device?
    E.g. I actually only have the Left switch hard wired, the right switch I have a flow to toggle a yeelight. But it would be nice if i could toggle, but if I hold it down it dims?

    Any way to do this?

    EDIT: Also noticed that when I go to the "and" column (also just noticed same in the then column) I only get Right Switch or On options - no Left Switch
    EDIT2: Think I've just worked it out that On with nothing in brackets IS the left switch

    @vaderag No this (using holding of a button to dim another device) is not possible. In fact, holding any of the two buttons for more than 5 seconds, will result in the device going into inclusion mode... 
    So there is no option to add this to the device / driver...

    And yes, you're right, due to limitations of the current Zigbee implementation, it is not possible to create a sub-device (multichannel node) similar to Z-wave.. so I had add the second (right) switch on the same primary device, resulting in a custom made action card to turn on or off / and also speech is not working for the second (right) switch...

    When the Zigbee rewrite is completed, I'll update the drivers / app accordingly.

    Thanks for the clarification! And yes, didn't think about the inclusion mode kicking in!!
    @vaderag Well, I'll need to partially correct myself... based on insights gained today.

    Thanks to the soldering skills of @robertklep, I'm again able to listen in on the communication between the Xiaomi hub and the devices... which yielded quite a lot of additional settings for several (mainly mains powered) devices, among other the Curtain controller (ie. reverse direction) and above mentioned switches.

    The Aqara Wall Switch Single / Double (L, without Neutral) appears to have an option to disable the relay of either one of the buttons... and create an option to send a scene like command...
    if I interpret the data / options correctly, this should (read no guarantees yet) the following options: 1x click, 2x click, hold and release...

    So far the 'good' news.
    There are (again) some limitations within the Zigbee implementation that currently prevent me from implementing these settings into the app.. I'll check with Athom if we can find a solution, bypassing the issue... 
  • vaderag said:
    vaderag said:
    Just installed an Aqara double switch (L) - seems to work great :)
    Just wondering if there is a way to say, if i'm holding the switch dim a device?
    E.g. I actually only have the Left switch hard wired, the right switch I have a flow to toggle a yeelight. But it would be nice if i could toggle, but if I hold it down it dims?

    Any way to do this?

    EDIT: Also noticed that when I go to the "and" column (also just noticed same in the then column) I only get Right Switch or On options - no Left Switch
    EDIT2: Think I've just worked it out that On with nothing in brackets IS the left switch

    @vaderag No this (using holding of a button to dim another device) is not possible. In fact, holding any of the two buttons for more than 5 seconds, will result in the device going into inclusion mode... 
    So there is no option to add this to the device / driver...

    And yes, you're right, due to limitations of the current Zigbee implementation, it is not possible to create a sub-device (multichannel node) similar to Z-wave.. so I had add the second (right) switch on the same primary device, resulting in a custom made action card to turn on or off / and also speech is not working for the second (right) switch...

    When the Zigbee rewrite is completed, I'll update the drivers / app accordingly.

    Thanks for the clarification! And yes, didn't think about the inclusion mode kicking in!!
    @vaderag Well, I'll need to partially correct myself... based on insights gained today.

    Thanks to the soldering skills of @robertklep, I'm again able to listen in on the communication between the Xiaomi hub and the devices... which yielded quite a lot of additional settings for several (mainly mains powered) devices, among other the Curtain controller (ie. reverse direction) and above mentioned switches.

    The Aqara Wall Switch Single / Double (L, without Neutral) appears to have an option to disable the relay of either one of the buttons... and create an option to send a scene like command...
    if I interpret the data / options correctly, this should (read no guarantees yet) the following options: 1x click, 2x click, hold and release...

    So far the 'good' news.
    There are (again) some limitations within the Zigbee implementation that currently prevent me from implementing these settings into the app.. I'll check with Athom if we can find a solution, bypassing the issue... 
    Wow, that's amazing!
    Looking forward to hearing more from your investigation and conversation with Athom!
  • SytzeSytze Member
    Great news! If only these switches would fit in the round wall boxes that are mainly used here...
  • Hi Ted,
    I have an Aqara Wall Switch Single (L, without neutral).
    After pairing, that goes ok, the switch works fine with Homey and some flows.
    But after a few hours the connection with Homey seems to be lost and the switch doesn't respond anymore.
    Removing it from Homey and pairing again (after reboot or PTP of homey) all is well again, but the same happens, connection gets lost.
    All my other zigbee devices (Aqara, Osram, Hue and Innr) keep working fine all the time.
    The Aqara Wall switch is only 2 meter away from Homey.
    What could be wrong?
  • PetervdK said:
    @PetervdK So during the inclusion process the ID's are not matched correctly, therefore not finding the compatible app, but after a reboot the correct ID's are shown in the node overview...
    That sounds to me like an issues in the inclusion process, handled completely outside the app scope (outside to setting the correct ID's)... I'll check with Athom development how to proceed..
    Ok, clear. Thanks for your time and effort in advance! I will wait curiously what the cause can be...
    @PetervdK checked with Emile.
    This issue needs to be looked into by Athom.

    Can you create an GitHub issue at https://github.com/athombv/homey/issues and describe the steps taken above.

    It would be awesome if you could remove one of the troublesome devices, reboot Homey and after all apps have been loaded (safe 30 min after reboot), try to include the device again.
    If it fails, send a log to Athom and copy the code into the GH issue.

    If you send me the issue number, I’ll contribute to this issue, ok?
    Will dive into this this weekend, thanks!
  • Hi Ted,
    I have an Aqara Wall Switch Single (L, without neutral).
    After pairing, that goes ok, the switch works fine with Homey and some flows.
    But after a few hours the connection with Homey seems to be lost and the switch doesn't respond anymore.
    Removing it from Homey and pairing again (after reboot or PTP of homey) all is well again, but the same happens, connection gets lost.
    All my other zigbee devices (Aqara, Osram, Hue and Innr) keep working fine all the time.
    The Aqara Wall switch is only 2 meter away from Homey.
    What could be wrong?
    @Martin_vd_Aart I'm not sure why this happens... you didn't press and hold one of the buttons of the L-switch?
    Can you check based on what steps the issue becomes reproduceable?
    So I can try to reproduce it here at home and what the Zigbee network traffic via my Zigbee sniffer...
    PetervdK said:
    Will dive into this this weekend, thanks!
    @PetervdK great! Much appreciated.
  • PetervdKPetervdK Member
    edited July 2018
    PetervdK said:
    PetervdK said:
    Will dive into this this weekend, thanks!
    Done the removal and inclusion of both a temp/hum sensor and the wireless switch. Alas, both still unknown.
    The Xiaomi app was updated in the mean time, so no solution there too.

    Github issue created: #2706
    Athom log number: 2FB0CBA11D
  • jaykayjaykay Member
    edited July 2018
    Just spotted a new sensor from Aqara on AliExpress, a stock/vibration sensor. 
    http://s.aliexpress.com/jUnUveMZ
    will it be possible to add support for it in your app, @TedTolboom?
  • Hi Ted,
    I have an Aqara Wall Switch Single (L, without neutral).
    After pairing, that goes ok, the switch works fine with Homey and some flows.
    But after a few hours the connection with Homey seems to be lost and the switch doesn't respond anymore.
    Removing it from Homey and pairing again (after reboot or PTP of homey) all is well again, but the same happens, connection gets lost.
    All my other zigbee devices (Aqara, Osram, Hue and Innr) keep working fine all the time.
    The Aqara Wall switch is only 2 meter away from Homey.
    What could be wrong?
    @Martin_vd_Aart I'm not sure why this happens... you didn't press and hold one of the buttons of the L-switch?
    Can you check based on what steps the issue becomes reproduceable?
    So I can try to reproduce it here at home and what the Zigbee network traffic via my Zigbee sniffer...
    PetervdK said:
    Will dive into this this weekend, thanks!
    @PetervdK great! Much appreciated.
    HI Ted,
    After the pairing of the switch (single button L, without neutral) , that goes ok, i don't do any other steps.
    I also don't hold the button to long, (i know that might cause it to go into pairing mode again) but just a quick push and it works ok like it should.
    But after a few times switching on/of with a flow triggered by an Aqara doorsensor or with Homeykit it suddenly loses connection.
    It mostly happens within 2 hours after after the pairing, but one day it worked for almost 12 hours and then lost connection again.
    If i test the flow, the red triangle comes with the message "AF data request fails, status code 205, No network route. Please confirm that the device has (re)joined the network".
    All other zigbee devices keep working ok.


This discussion has been closed.