Forum

Browse topics, discover Works With Legrand community!

Classe 100X16E & Easy Kit Connected

Hello,

the OATH flow works great, I get a access_token, an id_token and a refresh_token.

Now I try:

curl "https://api.developer.legrand.com/vdeproducts/v1.0/plants" \
-H "Ocp-Apim-Subscription-Key:{my key}" \
-H "Authorization:Bearer {access_token}"

or:
curl "https://api.developer.legrand.com/vdeproducts/v1.0/plants" \
-H "Ocp-Apim-Subscription-Key:{my key}" \
-H "Authorization:Bearer {id_token}"

but I get:
{“message”: “Expression evaluation failed. JWT_ERROR”}

or:

{“message”: “Invalid token”, “code”: 12}

What is wrong with this curl? Do I try-it, then it works.

Thanks fiveyears

  • This topic was modified 3 years, 1 month ago by Five Years.
  • This topic was modified 3 years, 1 month ago by Five Years.

Hello,

First of all, I confirm that there is no direct API call to manage your lock. You have to use DoorEntry SDK for it

Can you please send me the error log – or crash log – you have after trying to compile with Xcode 12.4 ?

Thanks and have a good day,

Leslie – Community Manager

The error is caused of new restrictions by apple and the format of frameworks:

/Users/fiveyears/Downloads/DoorEntrySDK_3.1_iOS/DoorEntry-ios-SDK-demo/DoorEntry-ios-SDK-demo.xcodeproj Building for iOS Simulator, but the linked and embedded framework ‘DoorEntrySDK.framework’ was built for iOS + iOS Simulator.

 

 

Images:
You must be logged in to view attached files.

the provided SDK consists in a Debug version, compiled with all the architectures, to be used for both iPhones and Simulator, and a Release version, compiled with armv7 and arm64 only, to be used for release on iPhones

The newest Xcode is not able anymore to separate the architectures, so you might use the Release framework on iPhones. To use the simulator, lipo or other tools might be used to extract the x86_64 architecture

I invite you to see online where you can find solutions

Have a good day,

Leslie – Community Manager

Yes, I tried to extract the x86_64 for the Simulator, but till without success, but I will try further

I managed to build a XCFramework and now it works. But the whole thing needs improvement, ’cause many yellow warnings and some red errors appear – the Api is quite old.

Is it possible to get a version for macOS or better a API-call to use the ticket and open the door?

 

fiveyears

To end up this discussion, there is no possibility to open the lock per HomeKit or OpenHab because you must use the API, which is only available for Android and iOS and the source code is not public.

Is this right?

Hello,

Here is a more complete answer from the SDK developer :

It’s not possible to have a macOS version, since the core library we currently use is designed (and compiled) to work with iOS low level APIs which are unavailable for macOS. As mentioned, x86_64 is available for iOS Simulator and will be provided independently in future releases.
As for the warnings, this may be due to the deprecation of some linphone-sdk APIs, which is constantly being updated, in contrast to DoorEntry SDK, whose latest release dates back to Sept. 2020. Consider sticking to the linphone-sdk 4.4.0 or 4.2.x
Also, many pods used in the demo app are being deprecated.
Finally, iOS 14 introduced many breaking changes, as well as Xcode 12.4 did.
Take in mind that opening a lock is no easy task, certainly not a simple HTTP REST, indeed, it involves a SIP session under the hood.
Have a good day,
Leslie – Community Manager
Viewing 7 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic.