gazoodle / geckolib

Library to interface with Gecko Alliance spa pack systems via in.touch2 module
GNU General Public License v3.0
62 stars 24 forks source link

Endless E2000 External Lights #35

Open dgwilson opened 1 year ago

dgwilson commented 1 year ago

This is the same issue reported here: https://github.com/gazoodle/gecko-home-assistant/issues/69

I've been attempting to change a local copy of the code to get the External Lights to work. I don't know Python (sorry) and have made some assumptions on how a few things work. I made changes to const.py to add support for UdL120 which I believe is the device that is the external lights.

2022-10-31 20:48:22,445 geckolib.driver.accessor INFO Value for UdL120 changed from OFF to ON 2022-10-31 20:48:22,445 geckolib.driver.observable DEBUG GeckoEnumStructAccessor 'UdL120': 'ON' changed from OFF to ON

KEY_USER_EXTERNAL_LIGHT = "UdL120" # DGW Nov 22 - # User devices are those that have a Ud in the tag name KEYPAD_LIGHT_EXTERNAL = 17 # DGW Nov 22 - value of 17 is guess work "L120": ("External Lights", KEYPAD_LIGHT_EXTERNAL, KEY_USER_EXTERNAL_LIGHT, DEVICE_CLASS_LIGHT), # DGW Nov 22 ("External LIGHT", "Lights Button", KEYPAD_LIGHT_EXTERNAL), # DGW Nov 22

After connecting I only see "Lights"... and I was thinking I'd see Lights and External Lights I'm also not certain if I can manually turn on/off UdL120

Connecting to spa Wilson E2000 Swim Spa at 192.168.11.112 ... connected! Heater: Temperature 30.5°C, SetPoint 30.0°C, Real SetPoint 30.0°C, Operation Cooling Lights: OFF WaterCare: Waiting... Smart Winter Mode:Risk: NO Circulating Pump: ON Ozone: OFF Smart Winter Mode:Active: False Filter Status:Clean: False Filter Status:Purge: False Economy Mode: False Wilson E2000 Swim Spa$ LI ON Turn device Lights ON Wilson E2000 Swim Spa$

I'm guessing... hoping someone is able to lend some guidance on what I could try next.

dgwilson commented 1 year ago

Update:

set UdL120=ON --- definately turned the external lights on

set UdL120=OFF --- tuning the external lights off seems to not work - at least it hasn't worked after the last 23 minutes'

accessors

UdL120: ON UdL120Time: 217

UdL120Time looks like a countdown timer in minutes

kiwibayer commented 7 months ago

@dgwilson did you had any further luck with this?

dgwilson commented 7 months ago

No luck at the end of the day... and I ended up uninstalling the main library. We'd be having an issue with the lights in the spa randomly not working... (like a really weird fault)... And since uninstalling the software that "fault" has gone away and the lights are working just fine.

by not working I mean turning them on via the physical control panel on the spa and that not working. Having the switch on (lights not working) and turning on one of the pumps and the lights would randomly work.

I finally did the uninstall and everything has worked as expected.

So, sorry - no progress on actually getting the integration working.

I have done Gecko surveys where I've feedback suggestions for improvements... especially with their app. Nothing has changed there. (I know that's not this project).

kiwibayer commented 4 months ago

Playing around with this a bit more following @dgwilson approach @gazoodle wondering if you can point us into the right direction (and also a big thank you in getting this lib up, it's much appreciated)

L120 is definitely the external light. Set UdL120=ON will turn it on and at the same time starts a 4 hour timer on UdL120Time (e.g. its set's UdL120Time to 240) Once the timer runs out UdL120 will be set to OFF, likewise if we set UdL120 to OFF UdL120Time will be set to 0

I think it's fair to just ignore the timer for now .... @dgwilson regarding your issues, what pump are you talking about in the e2000? The circulation pump on the pool side or the pumps on the spa side?

@gazoodle like David I'm assuming we will need to add this to the constant.py are there any other areas where we would need to add further details? can you help us finding the Keypad number for the external light?

from what I can see in the file we'll need:

Accessor keys for SpaPackStruct KEY_USER_DEMAND_LIGHT120 = "UdLi120" #new entry

Gecko keypad constants KEYPAD_LIGHT120 = ? #not too sure how we can get this one

Pack outputs Assuming we can use the current light class here DEVICE_CLASS_LIGHT = "LIGHT"

new device under DEVICES "UdLI120": ("External Lights", KEYPAD_LIGHT120, KEY_USER_DEMAND_LIGHT120, DEVICE_CLASS_LIGHT), #new entry

new button under BUTTONS

("External Light", "External Lights Button", KEYPAD_LIGHT120) #new entry