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)

11517192021

Comments

  • vaderagvaderag Member
    I'm convinced there is something going on with the zigbee on homey... I just don't trust it. Most of my devices stop working for a period randomly
  • Eternity said:
    @Aaron

    Today I tried to include a Aqara wireless switch. The first attempt failed: it stoppend the inclusion process with "no device found'. Same as you describe.

    I pulled the plug on Homey, waited 10 minutes and plugged Homey in again. Waited about 10 minutes and tried including again. This time (and very slowly in going thru the clusters) it included.

    So, it is added. Problem is that it now is not controllable:



    I will leave the switch next to Homey and press it now and then, to see if it comes online.


    UPDATE:
    It is controlleble now (great @TedTolboom !)
    And I also see routing happening (albeit a curious route; Homey is closer to the Cube than the curtain controller):


    Nice: I need to try this too once I have my cube back. Currently my colleague is trying to pair it.
    Nope: unfortunately this also doesn't help to get my cube paired. Tried it a couple of times, even moved the Homey to a different location in house to see if it is not some kind of 2.4GHz interference.
    The interesting thing is that my colleague was able to pair my cube yesterday to his Homey with exactly the same Homey firmware and Xiaomi app release without any trouble??
    Maybe it's in some way related to the (large number of) other Zigbee devices that I have (although no other device has had problems at initial registration) or this particular cube is in some way at the edge of specification.
    Maybe I'll retry with a different cube later.
    BTW: several times after 'no Zigbee device found' I couldn't start a new pair attempt because I got a message that Zigbee was still busy. Could this mean that a larger 'timeout' is needed to get my cube paired (if that is possible, I don't know the details of the registration protocol).
    I waited quite some time after such ' Zigbee busy' messages but in the end had to reboot Homey for a next try.
  • thjdeckers said:

    BTW: several times after 'no Zigbee device found' I couldn't start a new pair attempt because I got a message that Zigbee was still busy. Could this mean that a larger 'timeout' is needed to get my cube paired (if that is possible, I don't know the details of the registration protocol).
    I waited quite some time after such ' Zigbee busy' messages but in the end had to reboot Homey for a next try.
    Experienced the same while trying to add my temp/hum sensors. Sometimes there was no reaction from the zigbee network anymore. This also happened a few times when i tried to reset the zigbee network to factory settings. 
  • TedTolboomTedTolboom Member
    edited June 2018
    I just uploaded the next update of the Xiaomi Zigbee app to the app store awaiting approval from Athom. Approved

    In this version, I added support for the curtain controller.
    Thanks @RuudvB and @Eternity for supporting this development and @Homey_lampje@EDV, Jahn, @mehta@Martin_vd_Aart@phil_s@eternity@Aaron@brtw@2Be for your donation enabling this development.

    In addition, I fixed the issues with the Aqara Smart Light Wall Switch (L- and LN-version).
    Thanks @lubbertkramer and @Phuturist for providing the additional switches to debug these issues.

    Fixing these issues correctly, does mean that flows have to be rebuild and some devices need to be re-included.
    See below changelog for details:

    Changelog:
    v 0.4.0
    * Add support for the 'Aqara Curtain controller' (product type no: ZNCLDJ11LM)
    * Fix issue where Aqara Smart Light Wall Switch (L) right button is not activated by FlowCard, issue #64.
       Note: Existing flows for this device will need to be rebuild
    * Fix issue / add support for Aqara Smart Light Wall Switch (LN), issue #60.
       Note: Re-inclusion of devices with Zigbee Product ID lumi.ctrl_ln1.aq1 and lumi.ctrl_ln2.aq1 is needed
    Note: The old (marked DEPRECATED) flow cards of the wireless switches will be removed in a next release; please rebuild your flows based on the new
  • The v0.4.0 update is available in the app store.
  • RuudvBRuudvB Member
    Great work Ted, thanks!

    When adding the device to homey all works fine. All open, close and the slider with different positions work fine.

    One thing I have noticed which is not a real issue. I also had this device working on the Xiaomi controller. Once added to homey, this controller has lost the device. I did a re-pair on both without success. It seems that 1 Zigbee device can only be paired/connected to 1 Zigbee controller? I'm not sure since I have not much experience with Zigbee yet.

    I think Z-wave does allow me to use a device via homey AND via a third party app. Eh... thinking about this now I might be wrong here. I confuse my Yeelights with z-wave, but they are controlled over WiFi.

    Can anyone be conclusive here, is it possible to connect/pair a Zigbee/Z-wave device to more than a single controller?
  • RuudvB said:
    Great work Ted, thanks!

    When adding the device to homey all works fine. All open, close and the slider with different positions work fine.

    One thing I have noticed which is not a real issue. I also had this device working on the Xiaomi controller. Once added to homey, this controller has lost the device. I did a re-pair on both without success. It seems that 1 Zigbee device can only be paired/connected to 1 Zigbee controller? I'm not sure since I have not much experience with Zigbee yet.

    I think Z-wave does allow me to use a device via homey AND via a third party app. Eh... thinking about this now I might be wrong here. I confuse my Yeelights with z-wave, but they are controlled over WiFi.

    Can anyone be conclusive here, is it possible to connect/pair a Zigbee/Z-wave device to more than a single controller?
    @RuudvB thanks for the feedback and support.

    On your question, no both Zigbee as well as Z-wave only allow only 1 primary controller.
    For Z-wave I'm aware that there is an option to include controllers as secondary controller (sharing the same network ID and key).. not sure if this also works for Zigbee.

    But let me know if I missed some features on the curtain implementation, which the Xiaomi controller does support..
  • RuudvBRuudvB Member
    @RuudvB thanks for the feedback and support.

    On your question, no both Zigbee as well as Z-wave only allow only 1 primary controller.
    For Z-wave I'm aware that there is an option to include controllers as secondary controller (sharing the same network ID and key).. not sure if this also works for Zigbee.

    But let me know if I missed some features on the curtain implementation, which the Xiaomi controller does support..
    Thank for clearing that Ted. At this time for me nothing seems to be missing, all works fine. I even get the feeling that the open/close speed is somewhat faster then with the Xiaomi controller... 

  • Great work Ted!

    My 3 curtain controllers work fine. Just one small issue, one controller is 'reversed'.... Open is close and visa versa. Solved it via a flow, but the command 'all open' closes 1 and opens two. 
  • Great work Ted,
    I will order the Aqara Curtain controller now it's supported.
    Does anybody know if you can buy the curtain rails that will fit the Aqara Curtain controller in a (web)shop here in the Netherlands or do you have to use the rails from the same brand as the Aqara controller.
  • JooleeJoolee Member
    edited June 2018
    Awesome! Thanks for adding the curtain controller. Now I can ditch the Chinese talking Xiaomi wallplug again :D
    [..]
    But let me know if I missed some features on the curtain implementation, which the Xiaomi controller does support..
    This is the stuff I can think of:
     - If you click through the help section of the Xiaomi app a bit, you are able to 'reset' the calibration. Then you can re-calibrate the 100% open and 100% closed positions of the curtain. I don't know if the motor control itself or the controller stores these values though. I needed this because on first use, the hooks got stuck a bit and the calibrated 100% open was more like 50%.

     - Also, the app allows you to swap the 'open' and 'close' directions for when you assabled the rails in the wrong way :P

     - I think you can also en/disable the feature to pull on the curtain by hand to activate motor function.

    Luckily, all these functions seem to have been remembered correctly after pairing with Homey so users with a Xiaomi gateway can just connect it once.
  • JooleeJoolee Member
    edited June 2018
    Great work Ted,
    I will order the Aqara Curtain controller now it's supported.
    Does anybody know if you can buy the curtain rails that will fit the Aqara Curtain controller in a (web)shop here in the Netherlands or do you have to use the rails from the same brand as the Aqara controller.
    I used this shop:

    305cm Arrived a few days later in a sturdy cardboard tube, preassambled but bend in two parts. Only had to align the two parts and slide/screw the connector in place. Works like a charm.

    Do note that ordering curtains is a bit difficult as the roller amount is fixed and one of the sides has to be 15cm longer with an extra hook. If you make/order the curtains first, you can probably request the correct roller amount for the rails from the Ali shop. Curtain makers aren't always that flexible to my experience.

    If you want to control left/right independently, you need two tracks and two motors.
  •  - Also, the app allows you to swap the 'open' and 'close' directions for when you assabled the rails in the wrong way :P

    That's what I need :-)
  • kwankwan Member
    Hi installed the aqara curtains to homey, but how do you calibrate it, mine doesnt open or close fully.
  • kwankwan Member
    kwan said:
    Hi installed the aqara curtains to homey, but how do you calibrate it, mine doesnt open or close fully.
    Sorted it out :)
  • Thanks for the feedback guys!
    @kwan good that you solved in; I guess by resetting the controller manually, right?

    Joolee said:
    Awesome! Thanks for adding the curtain controller. Now I can ditch the Chinese talking Xiaomi wallplug again :D
    [..]
    But let me know if I missed some features on the curtain implementation, which the Xiaomi controller does support..
    This is the stuff I can think of:
     - If you click through the help section of the Xiaomi app a bit, you are able to 'reset' the calibration. Then you can re-calibrate the 100% open and 100% closed positions of the curtain. I don't know if the motor control itself or the controller stores these values though. I needed this because on first use, the hooks got stuck a bit and the calibrated 100% open was more like 50%.

     - Also, the app allows you to swap the 'open' and 'close' directions for when you assabled the rails in the wrong way :P

     - I think you can also en/disable the feature to pull on the curtain by hand to activate motor function.

    Luckily, all these functions seem to have been remembered correctly after pairing with Homey so users with a Xiaomi gateway can just connect it once.
    That's good feedback.

    So, the curtain controller should have the following settings:
    - reset calibration
    - reverse directions
    - enable / disable hand activation

    Now I need to understand how this is implemented... 
    The latter two are likely actual settings (which I expect that Xiaomi combined in a single value), the first one could be a command only...

    Anybody willing to help solve this puzzle?
    Will require some moving back and forth the curtain controller between the Xiaomi gateway and Homey... and recording the settings as shown in the debug log..
  • JooleeJoolee Member
    I'm happy to help if you tell me how to make the logs you need.
  • @TedTolboom
    Perhaps @RuudvB can lend you his now obsolete Xiaomi gateway? ;-)
  • Eternity said:
    @TedTolboom
    Perhaps @RuudvB can lend you his now obsolete Xiaomi gateway? ;-)
    Well time is more critical than having a Xiaomi gateway available... I've two of those..

    Joolee said:
    I'm happy to help if you tell me how to make the logs you need.
    @Joolee great...
    If I recall correctly, you are familiar with installing an app through the CLI, right?

    What I'm interested in is the printNode information (similar to the capture in the device driver) https://github.com/TedTolboom/com.xiaomi-mi-zigbee/blob/master/drivers/curtain/device.js#L129 up to L212) that will be shown when starting up the app / adding a new device in debug modus.

    So can you do the following steps:
    - Remove the curtain controller from Homey
    - Reset the curtain controller manually (reset to defaults)
    - Add the curtain controller to Homey and capture the PrintNode (default)

    - Remove the curtain controller from Homey and add it to the Xiaomi gateway (without reset)
    - Change the parameter of the opening direction
    - Remove the curtain controller from Xiaomi Gateway
    - Add the curtain controller to Homey and capture the PrintNode (default + reverse opening)

    - Remove the curtain controller from Homey and add it to the Xiaomi gateway (without reset)
    - Change the parameter of the opening direction back to default and change the parameter on manually open
    - Remove the curtain controller from Xiaomi Gateway
    - Add the curtain controller to Homey and capture the PrintNode (default + manual opening)

    - Remove the curtain controller from Homey and add it to the Xiaomi gateway (without reset)
    - Change the parameter of the opening direction and change the parameter on manually open
    - Remove the curtain controller from Xiaomi Gateway
    - Add the curtain controller to Homey and capture the PrintNode (default + manual opening + reverse opening)

    And send those printNodes to me... my guess is that either the `configStatus` or / and the `windowCoveringMode` will change... and thus will control these parameters.
  • Ted, thanks for the update, all appears good so far.
    Did notice switches appear to be responding much faster.
    Andrew
  • Ted, thanks for the update, all appears good so far.
    Did notice switches appear to be responding much faster.
    Andrew
    Good to hear! 
  • How did you guys order the curtains and Aqara motor at Ali with shipping costs/taxes? A motor + tracks are easily 150-200 euro’s. Asking to put on 20 euro’s isn’t gonna cut it here I guess.
  • Skorpion said:
    How did you guys order the curtains and Aqara motor at Ali with shipping costs/taxes? A motor + tracks are easily 150-200 euro’s. Asking to put on 20 euro’s isn’t gonna cut it here I guess.
    Order the tracks and curtain motor separately and ask the question...  ;)
  • RuudvBRuudvB Member
    Eternity said:
    @TedTolboom
    Perhaps @RuudvB can lend you his now obsolete Xiaomi gateway? ;-)
    No problem here, Ted knows how to find me :)
  • RuudvBRuudvB Member
    Skorpion said:
    How did you guys order the curtains and Aqara motor at Ali with shipping costs/taxes? A motor + tracks are easily 150-200 euro’s. Asking to put on 20 euro’s isn’t gonna cut it here I guess.
    Order the tracks and curtain motor separately and ask the question...  ;)
    As Ted suggests. AND instruct your seller NOT to use DHL as carrier. Use Ali standard shipping; not any express service. Even then, nothing is guaranteed.

    Last time the seller used standard Ali shipping but it still arrived via DHL. There was no extra charge at the door when receiving so I was hopeful... A few weeks later an invoice > 50 euro... :(

    Still, even with extra handling cost it is a steal. At least compared to pricing for the shuttle curtain systems. The Xiaomi (aqara) motor is VERY quiet and works perfect with the compatible rail.
  • EternityEternity Member
    edited June 2018
    Ehhhh

    Het is verklaarbaar en zelf correct dat 1 van mijn gordijnrails 'omgekeerd' werkt. De motor hangt daar links, bij de andere twee rechts....

    Logisch dat er een native reverse optie in de xiaomi controller zit.

    Sorry, should have been in English. 
    1 of my 3 curtain controllers has the controller on the left side of the rail. The others on the right. As a consequence, the first controller works 'reversed'. Open = closed and visa versa. This is normal behavior, and in the original xiaomi controller a setting is available to 'invert' the operation, depending on controller placement on the rail. 
  • Eternity said:
    Ehhhh

    Het is verklaarbaar en zelf correct dat 1 van mijn gordijnrails 'omgekeerd' werkt. De motor hangt daar links, bij de andere twee rechts....

    Logisch dat er een native reverse optie in de xiaomi controller zit. 
    @Eternity good observation (although in Dutch)...
    I’m looking to get the reverse option included...
  • For people having issues with the Curtain controller not fully closing / opening, a device reset (once installed on the rails) is required.

    Follow the following steps:
    1) Remove the Curtain controller from Homey
    2) Remove the ZigBee module (white bottom section) of the curtain controller (do not disconnect the cable)
    3) Press and hold the reset button (with a pin) until the green led flashes 5 times consecutively, the controller is reset and will recalibrate
    4) after recalibration, include the curtain controller to Homey. The device will remember it’s calibration.
    A video demonstration of the reset (step 2 and 3), can be seen at https://youtu.be/3lqIXm73qbk

     I will check if I can discover which command triggers the recalibration...
  • @TedTolboom
    Edited my post and added some English. 
  • EternityEternity Member
    edited June 2018
    @Skorpion ;

    I have 3 blinds, and two came from COJA BLINDS SHAOXING KEJIA BLINDS CO. Store
    https://nl.aliexpress.com/store/1908671?spm=a2g0s.9042311.0.0.SeUdPa

    I ordered from them, because my first rail was shipped in 50 centimeter chunks. This shop ships rails up to 250 cm sections. So, in my case I had them ship a 440 rail in two 220 cm pieces. It arrived in a "koker"  (cardboard tube) and was extremely well packaged. I have had no issues with  customs and received both via UPS.





This discussion has been closed.