Hydrawise Binding - Bridge Error „unauthorized“

Indeed very easy - sometimes you don’t see what is so obvious :person_facepalming:t2:

Just FYI the fix was merged into main and (just) made into in the 4.1.1 release which is building right now, so if you upgrade, i would remove the binding from the addon so you get the distro version (which is why i don’t use the addon folder for temp fixes like this as i forget to remove them !)

2 Likes

I am running OH 4.1.1 now, and it happened again:

Disable/enable helps to bring it up again.

Anyone else have problems as well?

Yes, I had the same problem yesterday.

I didn’t update yet.
But even with the snapshot I have the same problem:
CONFIGURATION_ERROR
Exception in oauth communication, grant type refresh_token

Seems it is another error.

@WeRo
it is exactly the same error.
See my screenshot above and the error message.

Hydrawise changed something on their end, i’ll take a look at it.

2 Likes

I can confirm this, yesterday with 4.1.1 was everything fine for whole day. Now it’s acting like 4.1.0

disable/enable solve it for couple of hours and then error again.

Yes it’s the same message like yours but it’s different to the first error „configuration_error unauthorized“

So i think they may be trying to block us. I had reached out to an email address on their API docs inquiring about using the API token for GraphQL access, this was at the end of December. The product manager got back to me this week and said the GraphQL api is only for commercial use actually. I’m afraid i may have brought unwanted attention to our binding. I’ll keep looking.

3 Likes

At least they responded to you.
I’ve created 12tickets already to get my hydrawise to pws account type, without any luck so far.

They are just ignorants :frowning:

So the binding is working again for me, maybe this was a hiccup with their cloud service? Is it working for others as well ?

yes, I can agree. no more problems at the moment.
thank you!

Yes, seems to be working well again

no problems since 2 days.

Awesome :crossed_fingers:

4 Likes

The problem is back again:
„Exception in oauth communication, grant type refresh_token„
Two times the last days.

same here - my automatic restart script recognized yesterday two times the auth error.

BTW - if it helps … this is what I implemented as workaround. The rule runs every 15 minutes and checks, if Hunter-controller is still online. If not, the binding will be restated using SSH command:

rule "Hydrawise_Check"
when 
    Time cron "0 0/15 * 1/1 * ? *"  // every 15 Minutes
then
    if (getThingStatusInfo("hydrawise:controller:93b1aa87as:312xxx").toString == "ONLINE") {
        logInfo("Hydrawise_Check", "Hydrawise is ONLINE, all good")
    }  
    if (getThingStatusInfo("hydrawise:controller:93b1aa87as:312xxx").toString != "ONLINE") {
        logInfo("Hydrawise_Check", "Hydrawise is OFFLINE. Will restart the binding")
        executeCommandLine(Duration.ofSeconds(6), "sshpass", "-p", "habopen", "ssh", "-oStrictHostKeyChecking=no", "-oUserKnownHostsFile=/dev/null", "-p8101", "openhab@localhost", "bundle:restart", "org.openhab.binding.hydrawise")
    }
end

As prerequisite sshpass needs to be installed:

apt-get install sshpass

best, Kai

btw would it be possible to rewrite this binding to use Auth Token?
that seems to work just fine in HA which I have for my tests :person_shrugging:

@digitaldan

Hi Dan,

the problem „Exception in oauth communication, grant type refresh_token“ is back again. For me it is not an urgent issue. But if you could take a look, when you can afford some time for it.