[APP] LOQED - Your personal doorman

Yesterday I released an update for the LOQED app.

When you migrated to a new Homey, Homey would not register its new ID with the Loqed Api, so status updates like (un)lock wouldnt not be send instantly to Homey.

This has now been resolved. Just install the latest version and it will automaticly update the Loqed API with your new ID.

Out of the blue i got an error: “Invalid_grant”?

Is that because of an (automatic) update?

Well, no, it shouldn’t, the update just fixed the webhook for users who migrated from one homey to another homey.

Perhaps try the steps from posts 2 in this topic?

Let me know if that solves the issue for you.

That might work, my problem is that all of a sudden something is broken without me changing anything. I didn’t update my homey, but the app did update.

If it’s a sensor that would be annoyance, if it’s a lock .. that’s a bigger problem.
Maybe its not the (homey-)app, than i’ll complain to shelly

Yeah i understand that, that shouldn’t happen.

When did you first connect the homey app?

Did you try to restart the homey loqed app?

Hi @Arie_J_Godschalk, for a couple of weeks, I’ve been having issues with my lock.
Everything works fine with the native Shelly Loqed-app, but Homey doesn’t manage execute any command anymore.
Homey does still recieve the input from the lock.
However when it gives a command, I get the error ‘Invalid_grant’.

I removed all API keys and tried repairing but no solution yet.

The lock and bridge software is up-to-date.

I haven’t tried reinstalling the app on homey, cause I’d need to document all my flows first.
I don’t feel this would solve it either, because it looks like there’s a problem with the permission to operate through the api-key

Hope you can help

Can you:

Restart the homey loqed app.

Send a command (like unlock).

Send me a diagnostic report and post the diag id here?

I have tried restarting an app probably 100 times.
I’m using a bridge with homey cloud and cannot find it. (I know, I know, I should upgrade)
The only option i get is to uninstall the apps. tried finding it in developer tools as well, to no avail.

I did send a command and made the diagnostics report.
fcfbae46-5d09-4252-bc25-5716bc3f0452

Don’t know if you can figure something out with just this.

Big thank you in advance!

any update(s)?

Have you tried post 2?

You mean if i cannot set twist-assist etc but thats a new thing you suggest out of blue … ?
I tried different things, the only i didn’t try is remove evereything and/or buy a new lock.

Remember that i didn’t do anything and it went into this state. So either you did something in the app, shelley did something on the api, or athom F"CkED something up.

No, I suggested this in my past reply.

Invalid grant usually means something went wrong with the refresh token. There can be many reasons for this to happen.

However, there is nothing I can do as a developer to solve it. And I doubt, without you taking some form of action, like written on post 2, clearing the loqed OAuth (logoff overal and relog) and/or clearing athoms OAuth (logoff overal and relog)(I have had this error “invalid grant” before and solved it bij relogging into homey), that there is something Athom or Shelly can do remotely.

If some tokens your OAuth (be it Homey or the Shelly connection) is invalid/expired, only relogging can solve it (even if it would need a remote/homey/app fix).

Where do you receive this error?

Could you make a full screenshot?

maybe it is expired ( i have it installed for quite some time ) , but shouldn’t the error display that instead of ‘invalid grant’ wwhat suggests that almost all is working? ( not fingerpointing or anything )

I’m hesitant to remove the lock becuase of the hasle to reconnect everything.

i’ll check/try this weekend to do the oath again

Indeed: do NOT remove your lock, thats not necesary and will not solve anything.

Invalid grant means there is something not going correctly with an OAuth (could be Athoms or Loqed OAuth).

First step: Post 2. This will NOT remove your locks, just reset the API keys, clear them. Homey will loose all access to the LOQED API for a moment, but just click on one lock in the Homey app and repair. This will retrieve the new API keys.
If this does not work, try logging out of the Homey App and relog into the Homey app.

Please let me know if it solves the issue.

it solved the issue (s) thanks.
but if things “suddenly” break either by athom or shelly, maybe i stop using their products as “stable” .. and i should see it as hobby-material… not something you can rely on.

thanks

Glad it worked!

That’s an option.
But just FYI, there are many ways this could have happened, just a few examples:

  • While refreshing the Access Token and receiving the Refresh Token, right at that time, the Homey app was updated, not saving the new refresh token. Now your OAuth is “out of sync”.
    (Disable auto update of apps to “prevent” this).
  • Your ISP generated a locked/denied page when the app requested a new access token.
    (Yes, this has happened for me, i have been blocked to outlook.com once for a few hours by my ISP because it “recoqnised” a potential hack.)

I understand it can be quite frustrating and can give a “bad feeling” about a product. However, it al works through internet and networking, and sorry to say, but that can cause (any) stuff not to work.

  • Sometimes Netflix won’t work for me and i need to restart the app or even my Samsung TV. But its not to say Samsung or Netflix is unreliable.
  • WhatsApp sometimes doesn’t send my messages and i get a alert, while the internet on my phone works just fine. A restart of the app or even phone is then needed to fix the issue.
  • etc.

My advice concerning Loqed:

  • When you use the Homey app and press a button on the device itself, you will get a notification if it goes wrong, so you’ll know if it doesn’t work (and can fix the issue).
  • When you use flows to automaticly (un)lock Locks, connect the Error part of the flowcards and send a notification to your phone.
  • If a not locked door really uneases your (my front door doesnt have a outside handle so if its not locked it doesnt freak me out.) and you use flows to lock the door, you could (next to using the error card to send a notification) add a check after a few seconds or minutes to check if the door is really locked and if not, again, send a notification.

This way, at least you’ll always know when something went wrong and don’t need to wonder every night if your locks are actually locked.

yeah a lock to you is about the same importance ..

Its all fun and games .. but not to me

if you can’t trust the apps or hardware and things brake while no-one is doing something .. i can’t have them.

like i said: it’s not the same category as a sensor or an rss-feed

Again , i understand that. I have more then just my front door.

That’s why i gave some tips on how you can possibly improve flows / usage to improve reliability.
Such error handling should be used added IMHO for flows that lock doors, because there are many ways a lock request could be unsuccessful (and not always something to do with Athom or Shelly or fixable by a developer). This is why Homey has Error parts in the flowcards and i have implemented quite some error handling in the Loqed app. But when an Error occurs, you need to be notified by a Push Notification, which you can only implement yourself through flowcards.

Personally i feel very happy with my Loqed locks, because it has quite some error handling making sure Errors are thrown when locking the door fails (for instance because my door is not shut and thus cannot be locked) so i receive a Push Notification that it could be locked and i can go check the door (and usually it means the kids left the door partly open).
If you manage the Errors correctly it will either work or you’ll be notified when it doesn’t.

Of course, switching to other systems is your prerogative :wink:
However, i am unaware of any 100% full-prove system, but perhaps others on this forum (or another forum) do know of any full-prove system.

Yes.

I have just released a new version (still needs to get through approval and then it will be published).
This new version contains:

  • Better error handling and status in device tab and flows when the lock has failed to lock (or unlock or open).
    For instance, if you, in the Homey app, press Lock, but the lock cannot physicly be locked, you will receive an error message from that within the homey app. Same goes with the flowcards.
  • Also a new flowcard: Status is unknown, triggers when the lock status becomes unknown.
    If for any reason the status of the lock is unknown, this flowcard will be triggered.
    This can happen when the batteries are to low to close the lock, or if the lock cannot be closed for some other reason.
  • Flowcards now have the AccountEmail and also the KeyAdminName as tokens.
    When you create extra keys with only codes, and that code is used to open the door, that key name will be put into the Key Name (Admin).
    Also, when using BlueTooth buttons, the name of the button will be shown in that tag.
  • Online is now received as webhook (instantly) and will be showning the device as unavailable if its offline.