cupshir / homebridge-aqua-connect-lite

A Homebridge plugin that exposes limited functionality of Aqua Connect to Homekit.
GNU General Public License v3.0
4 stars 3 forks source link

Light Function #3

Open pateboyd opened 1 year ago

pateboyd commented 1 year ago

The light switch always reports to be on. The aux work as described.

I'm running on prologic.

cupshir commented 1 year ago

Does the light turn on and off when you toggle it (regardless of reporting on)? Or does the state stay the same?

pateboyd commented 1 year ago

The light turns on when I turn the light on from home kit. It will turn off from HomeKit as well. Then without changing the state of the light, HomeKit reports the light as on. from my iPhoneOn Dec 8, 2022, at 12:30 PM, Christopher Upshir @.***> wrote: Does the light turn on and off when you toggle it (regardless of reporting on)? Or does the state stay the same?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

cupshir commented 1 year ago

Ok, I will try to reproduce the issue and get it resolved.

cupshir commented 1 year ago

I just pushed out an update with some minor improvements, an exclusion feature, and improvements to the debug logging output. If you continue to have this issue after you update, can you attach some of your log outputs while the issue is happening? You will have to go into your Homebridge settings and turn on Debug Mode (assuming you are using the homebridge UI). If you arent using the UI and dont know how to get the logs, let me know and I will figure out what you need to do.

Hopefully the logs will expose what the issue is.

pateboyd commented 1 year ago

Thanks for your work on this. I will update asap.

pateboyd commented 1 year ago

It is still switch back on automatically. I can email you the debug log if you send me a private address.

cupshir commented 1 year ago

It is still switch back on automatically. I can email you the debug log if you send me a private address.

aquaconnectlite@gmail.com

cupshir commented 1 year ago

So far nothing is jumping out in the log file thats pointing to an obvious problem.

If its ok with you, I would use the new exclusion setting to remove the pool light from your system. This will flush out the cached data for the pool light. Then after its gone, go back and remove the exclusion so that it adds the pool light back. It will add the light back as a new device.

Keep in mind, doing this will make the pool light appear as a brand new device in Homekit. You will have to reset it up along with any automations you had setup with the old device.

cupshir commented 1 year ago

Another idea, is to power cycle your aquaconnect device if you havent already and possibly your pool controller. If you want to try that before removing the pool light.

pateboyd commented 1 year ago

I have tried to power cycle and same results. Thanks for your work on this. Sent from my iPhoneOn Dec 16, 2022, at 7:03 PM, Christopher Upshir @.***> wrote: Another idea, is to power cycle your aquaconnect device if you havent already and possibly your pool controller. If you want to try that before removing the pool light.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

cupshir commented 1 year ago

The log file you sent shows Homebridge restarting fairly often (maybe due to settings changes of other plugins). Can you send another log file of 2-3 mins of Homebridge being up without it restarting? Thanks!

ifeign commented 1 year ago

I just wanted to add to this:

The light function works pretty well except for one issue. When using automations to turn off the pool lights, if the lights are already off, they get powered on.. I think this is because of how the plugin works by pressing the virtual button in the AquaConnect web ui. Is there a way for your plugin to check the power status before sending the button press? This also happens with voice commands like "turn off all the lights" all my smart lights will shut off, but if the pool light is already off, it'll turn on

cupshir commented 1 year ago

Following up, I haven't made any progress on this. I started a new job this year and have been a bit buried in work. Ill get to it soon as I can. Sorry for the inconvenience!

ifeign commented 1 year ago

Following up, I haven't made any progress on this. I started a new job this year and have been a bit buried in work. Ill get to it soon as I can. Sorry for the inconvenience!

You have nothing to apologize for, this plugin while useful isn't anything to stress about. Thank you for what you've done and congrats on the new job!

cupshir commented 1 year ago

I just wanted to add to this:

The light function works pretty well except for one issue. When using automations to turn off the pool lights, if the lights are already off, they get powered on.. I think this is because of how the plugin works by pressing the virtual button in the AquaConnect web ui. Is there a way for your plugin to check the power status before sending the button press? This also happens with voice commands like "turn off all the lights" all my smart lights will shut off, but if the pool light is already off, it'll turn on

Finally got some time to look into this, I want to confirm its still a problem before I dive in. Let me know, thanks!

ifeign commented 1 year ago

Yeah this still happens

cupshir commented 1 year ago

I have tried to power cycle and same results. Thanks for your work on this. On Dec 16, 2022, at 7:03 PM, Christopher Upshir @.> wrote: Another idea, is to power cycle your aquaconnect device if you havent already and possibly your pool controller. If you want to try that before removing the pool light. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

Checking in to see if you are still having this issue, let me know and I will take another look.

cupshir commented 1 year ago

Yeah this still happens

Ok, its supposed to check the state of the light before sending the toggle command. Ill review the code to see what I can find.

cupshir commented 1 year ago

Yeah this still happens

@ifeign I was able to recreate the issue and I think I have it fixed.

Update your plugin and let me know if its working now.

cupshir commented 1 year ago

I have tried to power cycle and same results. Thanks for your work on this. On Dec 16, 2022, at 7:03 PM, Christopher Upshir @.> wrote: Another idea, is to power cycle your aquaconnect device if you havent already and possibly your pool controller. If you want to try that before removing the pool light. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

@pateboyd The update I just pushed fixed an issue with on/off state. Hoping it also fixes the issue you were having. Update, test it out and let me know. Thanks!

ifeign commented 1 year ago

Works perfectly, thank you!!

pateboyd commented 1 year ago

I finally had a chance to update the plugin, but I am still having the same issue. The light always turns itself back on. If the light is on, the plugin will turn it off, but then the plugin sets the state back to on. When this happens, it doesn't actually turn the light on.

pateboyd commented 1 year ago

Also, do you mind removing my phone number from a couple of quotes emails I sent?

pateboyd commented 1 year ago

Thanks for the info. I did know I can edit my comments and I have edited my comments, but it is him comments too. I missed my phone number in my email signature when I replayed once. Sent from my iPhoneOn Apr 11, 2023, at 8:52 PM, ifeign @.***> wrote: You can edit your comments lol

On Tue, Apr 11, 2023 at 7:52 PM pateboyd @.***> wrote:

Also, do you mind removing my phone number from a couple of quotes emails I sent?

— Reply to this email directly, view it on GitHub https://github.com/cupshir/homebridge-aqua-connect-lite/issues/3#issuecomment-1504351746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWLHYAKRWNGMQSUZ3GQPGTXAX4DTANCNFSM6AAAAAASYMVI2U . You are receiving this because you were mentioned.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

cupshir commented 1 year ago

Sorry about that! I removed your number.

I can't remember, did you already try removing the cached accessory by going into "Remove Single Cached Accessory" in Homebridge settings and then restart home bridge?

pateboyd commented 1 year ago

I started a new Homebridge with a new SD card and a new pi. I reset my devices manually and one at a time. I am still having the same issue with the light being on. 

The light does seem to follow the switch now, but the state is inverse.

ifeign commented 1 year ago

It's been working perfectly on my end. Have you tried re-pairing the gateway with the pool controller?

It also sounds like a latency issue, how is your system set up?

cupshir commented 1 year ago

Let's try confirming some info from your AquaConnect bridge. Bring up the web interface in your browser (using your bridge ip address) and test the light button from the web interface.

If it works as expected, then right click on the "lights" button and choose "inspect" or "inspect element" depending on your browser. See if your "id" and WebsProcesskey is the same as mine. mine looks like...

<td id="Key_04" onclick="WebsProcessKey("09")" class="WEBS_OFF"> LIGHTS

Key(Status Key): 04 ProcessKey: 09

Process key is what turns the light on and off and status key is what is used to parse the output to determine if the state of the light is on or off.

Im hoping that your controller has different keys then mine (I can build in an override for this).

If they are the same, I will keep trying to think of what could be causing this.

Bummer its not working, hopefully we can get this figured out for ya!