runely / remootio-homey

Control your Remootio device with Homey
GNU General Public License v3.0
1 stars 0 forks source link

Open by URL externally #49

Closed felixoslo closed 4 months ago

felixoslo commented 7 months ago

Finally, Remootio has opened for users to be able to open the gate just by URL even if the unit isn't on the same LAN. Remootio gave me the syntax here:

To open the gate without the GUI You need to send a POST HTTP request to https://deviceapi.remootio.com/device And the request headers should contain: { ‘Authorization’: Bearer ${ACCESS_TOKEN}, ‘Content-Type’: ‘application/json’, } Where ACCESS_TOKEN is found in the URL that is shared when sharing a key from the RMT app: https://device.remootio.com?token=ACCESS_TOKEN it’s the token query parameter in that URL

Is it possible for you to implement this option? All my gates is on different LANs and the possibility to open the gates from Homey is highly appreciated!

Thx in advance!! Please let me know if this is something you can work on.

runely commented 7 months ago

Have you gotten this to work at your end? I just tried this one my test device, a Remootio 3, with the latest firmware, but i cant get it to work

runely commented 7 months ago

The app-free key link is working when used in a web browser.

But i can't get it to work in insomnia when sending a POST request to https://deviceapi.remootio.com/device with the ACCESS_TOKEN as Bearer token. It returns a 500 Internal Server Error

felixoslo commented 7 months ago

I can try checking with Remootio, I’m using version 1, but it should not make any difference when I talked with them.

Fra: Rune Moskvil Lyngås @.> Sendt: tirsdag 5. desember 2023 20:20 Til: runely/remootio-homey @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [runely/remootio-homey] Open by URL externally (Issue #49)

The app-free key link is working when used in a web browser.

But i can't get it to work in insomnia when sending a POST request to https://deviceapi.remootio.com/device with the ACCESS_TOKEN as Bearer token. It returns a 500 Internal Server Error

— Reply to this email directly, view it on GitHubhttps://github.com/runely/remootio-homey/issues/49#issuecomment-1841472622, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFBZXNQZH3367N5W2SALYH5XVZAVCNFSM6AAAAABAHUVRV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBRGQ3TENRSGI. You are receiving this because you authored the thread.Message ID: @.**@.>>

felixoslo commented 7 months ago

I did not try very much but I have asked support about the issue. I will get back to you as soon as I have received any answer.

Fra: Rune Moskvil Lyngås @.> Sendt: tirsdag 5. desember 2023 19:53 Til: runely/remootio-homey @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [runely/remootio-homey] Open by URL externally (Issue #49)

Have you gotten this to work at your end? I just tried this one my test device, a Remootio 3, with the latest firmware, but i cant get it to work

— Reply to this email directly, view it on GitHubhttps://github.com/runely/remootio-homey/issues/49#issuecomment-1841427428, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB6U4I7TDR7SOGC3KBDYH5USBAVCNFSM6AAAAABAHUVRV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBRGQZDONBSHA. You are receiving this because you authored the thread.Message ID: @.**@.>>

runely commented 7 months ago

I've tried with Remootio v2 and v3 and i cant get it to work in insomnia for either of them. The app-free key link from both is working in a web browser.

If they could send some documentation that would be most helpful

felixoslo commented 7 months ago

This is the reply I got from Remootio:

“Thank you for your reply!

Would you be so kind as to send us a screenshot so we can see exactly the details?

Our developers would like to have a look at it as this is, as you may understand, a more complicated inquiry.

I look forward to hearing from you!”

Is it possible for you to ask them directly? If you write to @.**@.> I have talked to Domonkos at support. I’m sending him a copy as well.

Thx!

Fra: Rune Moskvil Lyngås @.> Sendt: tirsdag 5. desember 2023 20:20 Til: runely/remootio-homey @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [runely/remootio-homey] Open by URL externally (Issue #49)

The app-free key link is working when used in a web browser.

But i can't get it to work in insomnia when sending a POST request to https://deviceapi.remootio.com/device with the ACCESS_TOKEN as Bearer token. It returns a 500 Internal Server Error

— Reply to this email directly, view it on GitHubhttps://github.com/runely/remootio-homey/issues/49#issuecomment-1841472622, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFBZXNQZH3367N5W2SALYH5XVZAVCNFSM6AAAAABAHUVRV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBRGQ3TENRSGI. You are receiving this because you authored the thread.Message ID: @.**@.>>

runely commented 7 months ago

GitHub has masked the email addresses in your reply so i cant do that.

But here's some screenshots you can send them:

Skjermbilde 2023-12-06 kl  20 38 25 Skjermbilde 2023-12-06 kl  20 38 42 Skjermbilde 2023-12-06 kl  20 43 17 Skjermbilde 2023-12-06 kl  20 39 13
felixoslo commented 7 months ago

Okay I will forward your links. Thx

Med vennlig hilsen Thomas Klevenberg Telefon 90190413


From: Rune Moskvil Lyngås @.> Sent: Wednesday, December 6, 2023 8:46:06 PM To: runely/remootio-homey @.> Cc: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Subject: Re: [runely/remootio-homey] Open by URL externally (Issue #49)

GitHub has masked the email addresses in your reply so i cant do that.

But here's some screenshots you can send them:

Skjermbilde.2023-12-06.kl.20.38.25.png (view on web)https://github.com/runely/remootio-homey/assets/25814673/1a808861-78eb-49c7-9248-439eac32e4ea Skjermbilde.2023-12-06.kl.20.38.42.png (view on web)https://github.com/runely/remootio-homey/assets/25814673/7649e114-86ce-4433-98ed-47be43fe50a6 Skjermbilde.2023-12-06.kl.20.43.17.png (view on web)https://github.com/runely/remootio-homey/assets/25814673/f7777d67-9524-4ac4-ab8c-13c5cb0c5d98 Skjermbilde.2023-12-06.kl.20.39.13.png (view on web)https://github.com/runely/remootio-homey/assets/25814673/53768a99-313a-4324-ad9c-80f52f49f6ff

— Reply to this email directly, view it on GitHubhttps://github.com/runely/remootio-homey/issues/49#issuecomment-1843581911, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB5XLJK3C2GRPE7QSHTYIDDP5AVCNFSM6AAAAABAHUVRV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBTGU4DCOJRGE. You are receiving this because you authored the thread.Message ID: @.***>

runely commented 7 months ago

Have you gotten any response from Remootio?

felixoslo commented 7 months ago

Not yet, I will try them again.

Fra: Rune Moskvil Lyngås @.> Sendt: søndag 17. desember 2023 11:10 Til: runely/remootio-homey @.> Kopi: Thomas Klevenberg (klevenberg.no) @.>; Author @.> Emne: Re: [runely/remootio-homey] Open by URL externally (Issue #49)

Have you gotten any response from Remootio?

— Reply to this email directly, view it on GitHubhttps://github.com/runely/remootio-homey/issues/49#issuecomment-1859112441, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB4CN4RG5ID7IWVE7RTYJ3AIRAVCNFSM6AAAAABAHUVRV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGEYTENBUGE. You are receiving this because you authored the thread.Message ID: @.**@.>>

runely commented 6 months ago

Your example in the first post is incomplete. I figured out that you also have to add a body to the request:

Remootio are using the same command for open and close in the requests (seems a little strange, but okey 🤷‍♂️)

{"command":"open"}

When i added this to the body of the POST request i could control my own Remootio device up and down.

By sendig a GET request without a body you get back a query with info about the Remootio device and its current status (open or closed)

I'll see if i can implement this

runely commented 5 months ago

Hi there. A new version with a new driver which supports the Device API is relased as a test version until Athom has reviewed it.

The test version can be installed here: https://homey.app/no-no/app/no.runely.remootio/Remootio/test/

Could you please install it, test it out and give some feedback, would be great

felixoslo commented 5 months ago

Super thx! Sorry for not follow you up better, Remootio is somtetimes fas sometimes slow and I didn't get any usefull answers. I will however try it now;)

felixoslo commented 5 months ago

EDIT: If I take the whole key it goes in like it should, but I can only close it, I can't open it. It does not update status if I open the gate by the app and the Gate is open, it shows closed all the time. As far as I can see, the close function works, but if it's open and I close it with Homey, the icon turns to show Open until it goes back after a short while.

felixoslo commented 5 months ago

Sorry for all my messages, I was so super keen on testing it so I started to write a bit early. The gate opens and it closes from Homey. My detector that shows if it's open or not, is at the end of the gate, meaning that the gate have to be fully opened to show that status. This means that when i open with Homey, the icon goes to closed right away, even though the gate goes up. When the app shows Open, Homey does not change status to open, it stays closed in the status.

runely commented 5 months ago

Thanks for testing. I'm guessing you didn't read the description for the Device API which states all the limitations to using the Device API instead of the Websocket API.

Also, if you read the settings section for the Device API it shows you how you can change the number of seconds before the status is updated after its operated in the app.

Hope this helps 😉

felixoslo commented 5 months ago

I didn't see that. Super thx!!

felixoslo commented 5 months ago

I get Timeout 30000 ms sometimes, my delay on the detector is now 23 seconds, the gate uses 20 seconds. Is this just a random message?

runely commented 5 months ago

I get Timeout 30000 ms sometimes, my delay on the detector is now 23 seconds, the gate uses 20 seconds. Is this just a random message?

Is this when pairing or when operated by clicking the garage door icon in the app?

Anyway, send me a diagnostics report so i can see what going on

runely commented 5 months ago

@felixoslo - Send me a diagnostics report right after you get a Timeout 30000 ms and i'll have a look

runely commented 4 months ago

Closing as complete since the app is relased to the app store, and can't see any received feedback from @felixoslo

felixoslo commented 4 months ago

Sorry the last feedback I gave was that the update of status doesn't work. The delay is set to 25 seconds and the gate uses 20 seconds. It shows opened all the time even if the gate is down

Med vennlig hilsen Thomas Klevenberg Telefon 90190413


From: Rune Moskvil Lyngås @.> Sent: Sunday, February 25, 2024 2:16:03 PM To: runely/remootio-homey @.> Cc: Thomas Klevenberg (klevenberg.no) @.>; Mention @.> Subject: Re: [runely/remootio-homey] Open by URL externally (Issue #49)

Closing as complete since the app is relased to the app store, and can't see any received feedback from @felixoslohttps://github.com/felixoslo

— Reply to this email directly, view it on GitHubhttps://github.com/runely/remootio-homey/issues/49#issuecomment-1962937572, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB6VVIXLPQXRXBUYHWTYVM2RHAVCNFSM6AAAAABAHUVRV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSHEZTONJXGI. You are receiving this because you were mentioned.Message ID: @.***>

runely commented 4 months ago

And this is when you operate the gate through the Homey Remootio app, @felixoslo ?

The app will never query the gate for its status when the gate is operated from outside the Homey Remootio app because Remootio's device api has a very low limit of allowed api calls..

Please operate the gate through the Homey Remootio app, wait a minute and send a diagnostics report so I can see what the query status is

felixoslo commented 4 months ago

Okay i thought it was polling, the reason it happened is that the gate auto close after 4 minutes, and if the app doesn't poll, it's important to fix it guess. Thx for fast reply.

Med vennlig hilsen Thomas Klevenberg Telefon 90190413


From: Rune Moskvil Lyngås @.> Sent: Sunday, February 25, 2024 11:39:56 PM To: runely/remootio-homey @.> Cc: Thomas Klevenberg (klevenberg.no) @.>; Mention @.> Subject: Re: [runely/remootio-homey] Open by URL externally (Issue #49)

And this is when you operate the gate through the Homey Remootio app, @felixoslohttps://github.com/felixoslo ?

The app will never query the gate for its status when the gate is operated from outside the Homey Remootio app because Remootio's device api has a very low limit of allowed api calls..

Please operate the gate through the Homey Remootio app, wait a minute and send a diagnostics report so I can see what the query status is

— Reply to this email directly, view it on GitHubhttps://github.com/runely/remootio-homey/issues/49#issuecomment-1963086310, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMGFB3QR2QR37IXLZKR24DYVO4TZAVCNFSM6AAAAABAHUVRV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGA4DMMZRGA. You are receiving this because you were mentioned.Message ID: @.***>

runely commented 4 months ago

It is not polling because of Remootio's very low limit of API calls. It's documented here on the readme: https://github.com/runely/remootio-homey?tab=readme-ov-file#device-api-1

This is how it works until Remootio allows a lot more of API calls