homebridge-plugins / homebridge-ewelink

Homebridge plugin to integrate eWeLink devices into HomeKit.
MIT License
389 stars 127 forks source link

Unable to create a faucet/irrigation via Accessory Simulation #137

Closed shanelilley closed 4 years ago

shanelilley commented 4 years ago

Hi! I love this plugin and I recently bought some eatra ewelink single and double wifi relay switches. They work great in Homebridge but I am struggling to get accessroy simulation working. I plug in the details for a single or double switch and it always turns up as "not supported" in Home App.

Log entry in homebridge.log - [11/5/2020, 1:29:22 PM] [eWeLink] → [T4 Deviced5d0b3] could not be initialised as Cannot read property 'context' of undefined.

This occurs after I attempt an accessory simulation.

I tried this with a single and a double switch (multi channel?) and obtain the same result. Not sure what I am missing here?

Many thanks. Shane

bwp91 commented 4 years ago

Hi @shanelilley The irrigation system requires a multi channel device, and works with channels 0 and 1 being used for the water valves. Which device model are you trying to use with this?

shanelilley commented 4 years ago

hi @bwp91 I use this one - https://www.ebay.com.au/itm/eWeLink-Smart-Wifi-Switch-Universal-Module-Switch-Phone-APP-Remote-Control-T9F7/283934348706?ssPageName=STRK%3AMEBIDX%3AIT&var=585375241821&_trksid=p2057872.m2749.l2649

"eWeLink Smart Wifi Switch Universal Module Switch Phone APP Remote Control T9F7"

I specifically purchased the two channel version.

If you think this is not a supported model, can you recommend which I should purchase?

Many thanks Shane

bwp91 commented 4 years ago

I have managed to recreate this error, which is good (for me!) because then I'll know when it's fixed.

It's nothing you're doing wrong, it's a problem with the plugin which I will sort out.

Thanks

bwp91 commented 4 years ago

If you're happy to try out a beta version, please follow the instructions in this wiki article to update to v3.11.2-0.

Restart Homebridge, and hopefully it will fix the issue you are having :)

shanelilley commented 4 years ago

Hi @bwp91 - the beta plugin works perfectly! It even removed a secondary issue which required me to delete all cached accessories. This plugin is working really nicely, great work!

A few questions, and this may be feature requests but I will ask any way - Can we set a decisecond timeout of infinite? I notice that trying to manually add '1000' deciseconds causes it to default to 100 deciseconds. My plan is to remove an existing device for a 20 minute watering of the grass in my yard. Will you support single channel device in the future?

Many thanks for your help! Kind regards, Shane.

shanelilley commented 4 years ago

ok quick update - I have found that any new settings I apply to the accessory simulation are not put in to effect (eg timeout changes). Removing cached accessories makes no difference. I will try removing the Bridge itself and strarting again. Kind regards, Shane

bwp91 commented 4 years ago

the operation time for a valve is just to give an initial duration to HomeKit, after that it is never used again.

You can use the home app to change the duration, and the plugin will adhere to the home app value, making the plugin config setting redundant. I’m pretty certain you can use home app to set it to 20 minutes? infinity i’m not sure about!

and with regards to a valve for a single channel device, something i could look into!

bwp91 commented 4 years ago

i realise this isn't explained in the docs/config very well. i need to make this clearer!

shanelilley commented 4 years ago

Ah wonderful yep I found it. You can go up to 15 minutes besides setting a schedule, so this is good! Many thanks for pointing this out, makes perfect sense. Great work on your plugin! I have found it incredibly useful - garage door opener, vales, and gate opener. All perfect!

Kind regards, Shane.

bwp91 commented 4 years ago

If you wish to try my first attempt at a single device valve (i haven't even tested it yet), please:

  1. in your homebridge config, directly change your current line in the groups section, "type": "valve", to "type": "valve_two",
  2. save the config, but don't restart homebridge.
  3. update the plugin as you did before, it should show v3.12.0-0 as installed.
  4. now restart homebridge

the config change will 'keep' your current two-channel system configured correctly. you should then be able to add a "1 Irrigation Valve" from the plugin settings screen.

Let me know how you get on!

shanelilley commented 4 years ago

Great! Yep works perfectly - one and two channel! Great work!!!! These small ewelink devices are incredibly handy and with this plugin makes LOTS of great possiblities!

Kind regards, Shane

bwp91 commented 4 years ago

Ah i’m glad it works 👍

yghelmut commented 3 years ago

Hi !

Would it be possible to add "faucet" to the available types of device groups ? Sometimes it just makes more sense (eg. electric hot water boiler).

Once again thank you for maintaining such a great plugin.

bwp91 commented 3 years ago

@yghelmut which device do you have for this? a simple switch?

bwp91 commented 3 years ago

@yghelmut could I message you on my discord channel? https://discord.gg/cMGhNtZ3tW