Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: This plugin slows down Homebridge. #6

Open
shayneob opened this issue Jan 7, 2023 · 35 comments
Open

Warning: This plugin slows down Homebridge. #6

shayneob opened this issue Jan 7, 2023 · 35 comments

Comments

@shayneob
Copy link

shayneob commented Jan 7, 2023

I'm running the plugin as a child bridge, and I am getting warnings about the plugin slowing down Homebridge. Also, the child bridge process seems to end and restart frequently. I'm not sure if these issues are related or not
Do you have idea what the issue could be? Thanks for your help.

[1/7/2023, 7:28:20 AM] [homebridge-spanet] This plugin generated a warning from the characteristic 'Target Heater-Cooler State': characteristic was supplied illegal value: number 3 exceeded maximum of 2. See https://homebridge.io/w/JtMGR for more info.
[1/7/2023, 7:28:22 AM] [homebridge-spanet] This plugin slows down Homebridge. The read handler for the characteristic 'Target Temperature' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[1/7/2023, 7:28:22 AM] [homebridge-spanet] This plugin slows down Homebridge. The read handler for the characteristic 'Current Heater-Cooler State' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[1/7/2023, 7:28:22 AM] [homebridge-spanet] This plugin slows down Homebridge. The read handler for the characteristic 'Active' was slow to respond! See https://homebridge.io/w/JtMGR for more info.

[1/7/2023, 7:25:03 AM] [homebridge-spanet] Child bridge process ended
[1/7/2023, 7:25:03 AM] [homebridge-spanet] Process Ended. Code: 1, Signal: null
[1/7/2023, 7:25:10 AM] [homebridge-spanet] Restarting Process...

@BlaT2512
Copy link
Owner

BlaT2512 commented Jul 8, 2023

Sorry for very late reply haven't caught up on this library for a while. If you're still interested in using your spa with homebridge you may have noticed that SpaNET transitioned to a newer app and their API is rewritten now. I will be rewriting this library for the new API over next 2 weeks and this should iron out all the bugs and slowness in the plugin right now.

@shayneob
Copy link
Author

Thanks heaps!!

@darrendrysdale
Copy link

Thanks for reviewing this. Look forward to an update. Reach out if you need help with testing.

@BlaT2512
Copy link
Owner

@darrendrysdale @shayneob Thanks both for your interest, I will keep in contact over you next few weeks when I get time to finish it off and am ready for testing 👍

@darrendrysdale
Copy link

Hey Blake @BlaT2512 any progress with the update that you can share?

@TheTeeDot
Copy link

Hi @BlaT2512, I'll also be keen to test and provide feedback

@aldobalducci
Copy link

aldobalducci commented Aug 31, 2023 via email

@darrendrysdale
Copy link

Hey @BlaT2512, just checking to see if you have had any success with updating your code to work with the changes to the SpaNet servers.

@joelhinch
Copy link

@BlaT2512 would really love to get this working with my spa also. let me know if i can contribute in any way.

@BlaT2512
Copy link
Owner

BlaT2512 commented Nov 4, 2023

@darrendrysdale @shayneob @joelhinch @aldobalducci @TheTeeDot Apologies for the very long delay, been very busy and hardly on Github the past few months. Have rewritten and just about to publish new version of the library, haven't tested it that much so please feel free to let me know how it works for you and any bugs encountered, feature requests or make pull requests. Cheers

It is not necessary to run the plugin on a child bridge, however due to the SpaNET api rate limit 3 requests per second, when the Home app requests to refresh all the spa accessories it takes a good 5-6 seconds. So if you have lots of other devices on Homebridge, may be a good idea to make it a child bridge still to improve speed.

@darrendrysdale
Copy link

darrendrysdale commented Nov 4, 2023 via email

@darrendrysdale
Copy link

Hey @BlaT2512, have tried loading this and still generating an error. I am using regular username and password which is used for spanet server/app. Is this correct as I know that in previous build you needed it to be encrypted/hash using the other password generator.

Error I have is as follows which suggests that the details are incorrect but I have rechecked and they are what's used to access app/server.

4/11/2023, 7:40:32 pmSpa BridgeLoading 1 platforms...
4/11/2023, 7:40:32 pmSpa BridgeBridge is running on port 51836.
4/11/2023, 7:40:32 pmSpa BridgeSpaNETPluginERRORError: Unable to login with details provided. Please ensure that you have the correct username and encrypted password (see Github for details).
4/11/2023, 7:40:32 pmSpa BridgeSpaNETPluginWARNINGWarning: SpaNET plugin inactive. Please address specified issue and reboot Bridge to re-attempt setup.

Suggestions?

@BlaT2512
Copy link
Owner

BlaT2512 commented Nov 4, 2023

Hey @darrendrysdale, it appears you are still on the old version as this error message is not in the new version I published. Please ensure you are on version 2.0.0 or update with npm i -g homebridge-spanet.

Once you are on the new version, that is correct you don't need the encrypted form of your password anymore, just regular text. However make sure to set your email in the config as the API uses email not username to login now.

@darrendrysdale
Copy link

Thanks @BlaT2512 , I was using a HB client and thought it had updated but obviously not. Have tried again and getting this error:
8:28:46 pmWARNINGplugin site unavailable
8:28:47 pmyarn add v1.22.19
8:28:47 pm[1/4] Resolving packages...
8:28:48 pmerror An unexpected error occurred: "https://registry.yarnpkg.com/homebridge-spanet: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
8:28:48 pminfo If you think this is a bug, please open a bug report with the information provided in "/var/lib/hoobs/spabridge/yarn-error.log".
8:28:48 pminfo Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Possibly it's not accessing the updated version and I can check again tomorrow, wonder if you have thoughts though.

@BlaT2512
Copy link
Owner

BlaT2512 commented Nov 4, 2023

This is odd @darrendrysdale , I don't use yarn but just made a folder and tried yarn add homebridge-spanet and worked fine. Looks like this is normally a yarn bug or internet/vpn issue or something https://stackoverflow.com/questions/54254121/error-an-unexpected-error-occurred-https-registry-yarnpkg-com-react-getaddr

Maybe try updating through the homebridge online UI, restart, reconnect internet or wait till tomorrow and hopefully fixes itself.

@darrendrysdale
Copy link

Thanks @BlaT2512. Possibly it's an issue with Hoobs. I'll check tomorrow and if still happening look at another way to install/update. Appreciate your help.

@BlaT2512
Copy link
Owner

BlaT2512 commented Nov 4, 2023

No worries @darrendrysdale, let me know how it goes. Can always locally clone the repo if needed.

@darrendrysdale
Copy link

Screenshot 2023-11-04 at 10 49 41 pm Hey @BlaT2512. I attempted to ssh to hoobs terminal and install the home bridge-spanet package that way but I'm still getting error. Not sure if you can help me find another way to get around this yarn error - you did mention clone but apologies Im not sure how to do that but am willing to try if you can lead me through it

@shayneob
Copy link
Author

shayneob commented Nov 4, 2023 via email

@BlaT2512
Copy link
Owner

BlaT2512 commented Nov 4, 2023

@shayneob Have fixed this, will push in an update once I fix one other thing in the next couple hours

@BlaT2512
Copy link
Owner

BlaT2512 commented Nov 4, 2023

@darrendrysdale This does look correct, strange you are still getting the error. You could try these commands to manually install it:

git clone https://github.com/BlaT2512/homebridge-spanet
cd homebridge-spanet
yarn run build
yarn link

Then restart homebridge instance / HOOBS if it does not immediately show up

@joelhinch
Copy link

Thanks so much for putting in the work here. I am having some trouble setting the Operation Mode: Normal/Away doesnt seem to stick. Just reverts?

@BlaT2512
Copy link
Owner

BlaT2512 commented Nov 9, 2023

@joelhinch Yeah same for me going to fix that shortly. Setting a lot of the controls has strange behaviour like the jets turn on when clicked but are stuck saying loading, will work to fix it all. Have also reduced the time for refreshing all the devices now from 6 seconds to 1.

@joelhinch
Copy link

@joelhinch Yeah same for me going to fix that shortly. Setting a lot of the controls has strange behaviour like the jets turn on when clicked but are stuck saying loading, will work to fix it all. Have also reduced the time for refreshing all the devices now from 6 seconds to 1.

Awesome! Thanks a heap.

Do you use home assistant at all? I’ve actually got homebridge paired directly to home assistant so I can use this plugin. Which works well enough. Have you ever consider writing the plugin for HA?

@BlaT2512
Copy link
Owner

@joelhinch I do not use home assistant, however would be open to this. Just quickly googled and appears intergrations are written in Python, doesn't look like it'd be too big an effort to port it over so I will consider this in future.

Also please find fixed operation mode switch in the latest release just published

@shayneob
Copy link
Author

Hi @BlaT2512 I appear to be getting a bunch of errors, but things seem to work.
image

@BlaT2512
Copy link
Owner

@shayneob Appears still rate limit error happens every now and again which causes these errors, happens for me about every 20th open of the home app. Will try work again on the rate limiting in next release

@joelhinch
Copy link

@joelhinch I do not use home assistant, however would be open to this. Just quickly googled and appears intergrations are written in Python, doesn't look like it'd be too big an effort to port it over so I will consider this in future.

Also please find fixed operation mode switch in the latest release just published

youre an absolute champion! would be amazing to have it direct if you do get around to it one day. i love homekit but have started moving to homeassistant (have been holding off for so long)

@darrendrysdale
Copy link

Hey Blake @BlaT2512. Managed to install finally however it seems the temp settings for spa are not coming across (unless I am doing something wrong). I have cleared the Homebridge cache and installed a couple of times but result still the same. Is this a known issue or something I need to fix on this end.
Thanks D

image

@joelhinch
Copy link

joelhinch commented Nov 22, 2023

Hi Blake @BlaT2512
Is there a way to specify the power save level? You have on/off but it defaults to low, rather than high when on, (spanet has 3 states for power save, off, low, high). Trying to automate when my spa is allowed to heat. Cheers!

@BlaT2512
Copy link
Owner

Hi @joelhinch , currently you can change whether the switch turns it to low or high by default when switching on in the plugin settings in Homebridge.
However, if you prefer it to be similar to the operation mode with 3 seperate switches for off, low and high let me know.
Cheers

@joelhinch
Copy link

joelhinch commented Nov 22, 2023

Hi @joelhinch , currently you can change whether the switch turns it to low or high by default when switching on in the plugin settings in Homebridge. However, if you prefer it to be similar to the operation mode with 3 seperate switches for off, low and high let me know. Cheers

Thats fantastic @BlaT2512 I missed that, but have found that setting and turned it on. This is great as is, the low setting is kind of irrelevent in most use cases when schedules can accomplish the same thing.
Thanks!

@joelhinch
Copy link

Hi @joelhinch , currently you can change whether the switch turns it to low or high by default when switching on in the plugin settings in Homebridge. However, if you prefer it to be similar to the operation mode with 3 seperate switches for off, low and high let me know. Cheers

@BlaT2512 hi mate I have the option ticked but it still seems to switch to Low not High. Are you able to test to see if the behaviour is the same on your end? Thanks!

@BlaT2512
Copy link
Owner

Hi @joelhinch, I was not able to reproduce this bug on my end. The only thing I can think of is that you didn't restart Homebridge after changing the setting, as the plugin loads the config when it first starts up. Try restarting Homebridge and let me know if that works.

@darrendrysdale
Copy link

Hey Blake @BlaT2512, I have now installed plugin under Hoobs and it brings down all function except the spa temp function. Is this something that others have experienced or is there a way to correct this within the config. Appreciate any support that may help fix this, Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants