### Zigbee eWeLink-CMARS-Seedan Outlet **Why?** After I had tried a couple other brands I began using these low-cost Zigbee outlets because they were well, Zigbee, low-cost and seemed to work really well. I also selected them because they act as a repeater making my Zigbee mesh more solid. After my first purchase of 4, I liked them so much I went back to buy them again, but Amazon no longer sold them - they sold 'CMARS' which looked identical, so I took a shot. And later still, I needed more but all I could find this time was 'Seedan' named units which again looked identical. Oddly, when identified during installation using the generic Zigbee driver provided by Hubitat - all the units described themselves as 'Manufacturer - eWeLink'. Over a short period of time, I began to see errors show up in the watchdog. It seemed that if I didn't use them daily, they didn't seem to 'call home' and report they were still there. Discussing this in the Hubitat forums, @bravnel said they were lacking a refresh. I searched for more information and stumbled on a driver from Markus Liljergren (of 'OhLa Labs' fame (see https://oh-lalabs.com/) that had a really nice feature for 'Presence' detection and gave it a try. The devices responded really nicely. And I was pleased. Sometime later I was working on Presence for my HSM and Away modes and realized when I wanted to select a Presence device in a Rule, every one of my outlets showed up in the list. In and of itself, this isn't a big deal - but it was unwieldy and I didn't like devices that I knew were always present, (and not actually presence sensors) showing up. So I took it upon myself and edited the driver from Markus, removing the 'Presence' capability. I left all the rest of the driver alone so as not to tinker with any of the functionality of the refresh (presence is related to the device polling and refreshing). And I was pleased. During the editing, I saw the 'fingerprint' functionality that Markus had built in. This allowed a device to identify itself so the driver would auto-magically detect and be offered. It also defines the features and options of the device so the driver can control what is used and offered - it was after all a generic driver to support many manufacturers. Using a separate tool (ALSO provided by Markus on his website) I generated my own fingerprint for my outlets and added it to the driver. Now, any time I added another eWeLink, CMARS or Seedan unit, automation kicked in very nicely. And I was pleased. Much later - I had 4 outlets on a power strip doing various controls in the garage. The problem was I couldn't tell which device was which. I needed a 'Flash' feature (the ability to toggle back and forth the on off, so I could ID the device I wanted to work on). And speaking of toggle, that too was not available in the driver Markus had built. So carefully, and with a huge learning curve due to Markus skill being light-years ahead I toyed and struggled until I was able to get the addition commands to function. I tested as much as I could, and finally I felt the project was completed. And I was pleased. While reading some online posts on Amazon, it became clear that the driver I had made was needed by others. Because the eWeLink (and subsequent devices) were popular due to price and function - there was a current demand for them, but only the Generic Driver was being offered. I felt it was important to see that what modifications I had made were important to Markus. I reached out to him and asked. He described that he no longer was actively supporting the drivers for this but thanked me for asking. I posted on the Hubitat forums about my customized driver asking for clarity on how to make the driver available without taking credit or risking blow-back for building work on top of Markus'. I got a sort of tepid response, that wasn't ultra clear. The gist of what I learned was: * Send a PR (pull request for GitHub) * Be Nice * Ask permission * and follow common courtesy. I reached out again to Markus, this time explaining in no uncertain terms what I wanted to do. His response was: > (Markus - Developer) > Hi Jim! > > When it comes to keeping credits and original code referenced it’s not easy to “do it right”. You could do as gadget suggests and base it off a fork of my repo, but if you’re only going to change this one driver that is probably not ideal considering my repo has a lot of other drivers as well. > > With that said, it’s perfectly fine to just take the one driver file and add to the list of contributors in the header with a clear note about what you added/changed. Adding a link to the original repo in the header could also be a good thing to do. > > I’m happy my drivers can still help people even though I’ve had to discontinue support for them. Always glad to hear my work comes to good use! **Description** Zigbee eWeLink-CMARS-Seedan Outlet is a driver that is modified from the great code of Markus Liljergren of 'OhLa Labs' fame (see https://oh-lalabs.com/) This driver, when installed correctly on a Hubitat platform, provides a selectable device driver that is designed as a Generic Zigbee Outlet driver but has the additional capability to refresh and be polled as well as has a Toggle and Flash command for added functionality. This driver can be used for more than just eWeLink/CMARS/Seedan Zigbee outlets (CMARS and Seedan are two known repackages of the eWeLink device). In addition to the targeted device other manufacturers of Zigbee outlets are also supported. **Requirements** I have not tested this on any platforms besides my Hubitat c5 currently running 2.2.9.130 Firmware. That said, it is relatively benign and should work on any HE hub and with fingers crossed will continue to work as the HE world develops. Changelog (as of today, 2021-10-15 - all changes by JAS)
10/7/2021 | 0.1.0.2 | My 'fork' of this driver taken from the above original source |
---|---|---|
10/7/2021 | 0.1.0.3 | Fingerprint for eWeLink added |
10/8/2021 | 0.1.0.4 | Removed Presence capability so it doesn't show as a presence device in HE (left presence code intact for polling) |
10/9/2021 | 0.1.0.5 | Added Flash command to flash light for locating device |
10/9/2021 | 0.1.0.6 | Added Toggle command to flip state programmatically |
10/10/2021 | 0.1.0.7 | Changed toggle from using x06 02 to x06 01/x06 00 so as to work with other devices that do not have toggle command in device code |
10/15/2021 | 0.1.0.8 | Modified Text about send to developer so Markus doesn't get Fingerprint calls |
10/15/2021 | 0.1.1.0 | Released version |
11/23/2021 | 0.1.1.1 | Added AutoOff to Driver |
09/08/2023 | 0.1.1.5 | numerous changes I had locally that weren't being uploaded |