Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ondrej Tomcik
    @ondrejtomcik
    @WAvdBeek small wrapping in main will make it running in console.
    Wouter
    @WAvdBeek
    hopefully next week, I have asked Kishen to find time tomorrow to release 2.2.2. that will unblock quite a bit of that backlog.
    if we merge now, then we need to do a full run of CTT tests again, hence there is order involved to avoid creating work.
    David Márquez Fàbrega
    @DavidMarquezF
    Hello, I'm starting to develop an app and was looking at using plgd with the esp32. I set the OC_DEBUG flag in order to see if I could find any information on why PKI certificates were not working. However, once I turned on OC_DEBUG, the plgd mobile phone app couldn't discover the device (while the OTGC app did). Could it have something to do with timeouts (since while debugging it's writing a lot of stuff in the serial port, so it wastes more time) or do you think it's something else?
    Ondrej Tomcik
    @ondrejtomcik
    @DavidMarquezF are you sure your device didn't crash due to insufficient memory? I doubt default ESP32 is able to run with OC_DEBUG unless you installed additional PSRAM.
    Discovery is in the mobile app hardcoded to 5seconds - https://github.com/plgd-dev/plgd.mobile/blob/master/lib/services/ocfClient.dart#L87 .
    What you can try is to build a simple go client to call the discovery on your own with bigger timeout.
    This can help you. Just create your own go file and do some copypasting.
    https://github.com/plgd-dev/plgd.mobile/blob/master/ocfclient/OCFClient.go#L29-L87
    Wouter
    @WAvdBeek
    Ondrej are you using https://hub.docker.com/u/ocfcloud user id for pldg?
    Ondrej Tomcik
    @ondrejtomcik
    we used ocfcloud org on the dockerhub 7months ago. But not anymore.
    David Márquez Fàbrega
    @DavidMarquezF
    @ondrejtomcik Thanks for the info, i'll give it a try. It does crash, but it did already before turning DEBUG it on (when onboarding with PKI certificates). I'm trying to find out the reason why
    Ondrej Tomcik
    @ondrejtomcik
    @DavidMarquezF Try to log your heapsize; or disable reboot when the heap is fully consumed.
    David Márquez Fàbrega
    @DavidMarquezF
    Yup, done that, it has 136964bytes of memory and then it just crashes with LoadProhibited error (it looks like oc_server_api.c tries to access request->response and its null)
    Ondrej Tomcik
    @ondrejtomcik
    @WAvdBeek are you around please? Would need some support with device builder :)
    Wouter
    @WAvdBeek
    i am now... what needs to be added?
    Ondrej Tomcik
    @ondrejtomcik
    wrote you private message.
    Martin Eliáš
    @melias122
    Hey guys, let me know if I can help with some small tasks.
    Ondrej Tomcik
    @ondrejtomcik
    Hello Martin :) Do you have experience with the MongoDB?
    Martin Eliáš
    @melias122
    I know just basics, what is the problem?
    Ondrej Tomcik
    @ondrejtomcik
    @melias122 sorry Martin, had a busy morning. Okay, so let’s skip MongoDB. @Trishia started to refactor our configuration to yaml files from env variables. Tests needs to be adapted and it needs to be rebased to current v2. Would you be interested in this? You would co-author Trishias work.
    Wouter
    @WAvdBeek
    about: This is the library (for now we call it SDK but it will be sooner or later renamed) - https://github.com/plgd-dev/sdk
    and here is the simple client using that SDK, which methods are invoked by the mobile app.
    https://github.com/plgd-dev/plgd.mobile/blob/master/ocfclient/OCFClient.go
    I have now written a mediator, what info need I to pass to coapcloudconfig resource to talk securely to the local plgd cloud?
    Ondrej Tomcik
    @ondrejtomcik
    @melias122 or deletion of devices would be perfect. In the authorization service, new endpoint to delete user device and handle this action also in gateways - disconnect the tcp connection for the device. (Very briefly explained)
    @WAvdBeek are you using secure or unsecure device?
    Wouter
    @WAvdBeek
    secure devices
    Wouter
    @WAvdBeek
    test
    plgd
    coaps+tcp://192.168.178.85:8443
    00000000-0000-0000-0000-000000000001
    and then the callback indicates failure of the registration.
    ok at least the mediator that I have coded up is now working.
    Ondrej Tomcik
    @ondrejtomcik
    You have wrong port. It’s not 8443. CoAP gateway is accessible on 5684
    5 replies
    Martin Eliáš
    @melias122
    @ondrejtomcik I will take a look there.
    Yorick Coleu
    @YorickColeu

    Hi, I'm trying to use the plgd/bundle:v2next with an OAuth provider for user authentication. I followed the "How to congigure Auth0" tutorial here: https://plgd.dev/guide/getting-started/1-deploy.html#bundle
    I have set the following env variables:

    ENDPOINT_OAUTH_DOMAIN: The domain suggested by Auth0 for my account, found in "Domain" field of regular_web or m2m application
    PLGD_DOMAIN: The domain where plgd_cloud can be reached, in my case, this redirect to my local computer IP address.
    REGULAR_WEB_CLIENT_ID: The Auth0 regular_web app "Client ID"
    M2M_CLIENT_ID: The Auth0 m2m app "Client ID"
    M2M_CLIENT_SECRET: The Auth0 m2m app "Client Secret"

    I have also configured the plgd.mobile app with the following variables in appConstants.dart:

    static Uri defautPlgdCloudEndpoint = Uri.parse('https://<PLGD_DOMAIN>' + cloudConfigurationPath);

    I have also set up the sentryDSN variable with my own sentry token.

    Then I run the plgd cloud solution with the following command:

    docker run -d \
    --name plgd \
    -p 443:443 \
    -p 5683:5683 \
    -p 5684:5684 \
    -e FQDN=${PLGD_DOMAIN} \
    -e OAUTH_ENDPOINT=${ENDPOINT_OAUTH_DOMAIN} \
    -e OAUTH_AUDIENCE=https://${PLGD_DOMAIN}/ \
    -e OAUTH_ENDPOINT_AUTH_URL=https://${ENDPOINT_OAUTH_DOMAIN}/authorize \
    -e OAUTH_ENDPOINT_TOKEN_URL=https://${ENDPOINT_OAUTH_DOMAIN}/oauth/token \
    -e JWKS_URL=https://${ENDPOINT_OAUTH_DOMAIN}/.well-known/jwks.json \
    -e OAUTH_CLIENT_ID=${REGULAR_WEB_CLIENT_ID} \
    -e SERVICE_OAUTH_CLIENT_ID=${M2M_CLIENT_ID} \
    -e SERVICE_OAUTH_CLIENT_SECRET=${M2M_CLIENT_SECRET} \
    plgd/bundle:v2next

    By doing so, I have access to the Oauth webview provided by Auth0 through the plgd mobile app, but once I have entered by Google login/password, the webview just froze indefinetly with the blue waiting circle.

    I have the following Flutter error, but I'm not sure this is relevant:

    ```
    03-22 09:04:32.940 2699 2718 E flutter : [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: NoSuchMethodError: The method 'call' was called on null.
    03-22 09:04:32.940 2699 2718 E flutter : Receiver: null
    03-22 09:04:32.940 2699 2718 E flutter : Tried calling: call()
    03-22 09:04:32.940 2699 2718 E flutter : #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
    03-22 09:04:32.940 2699 2718 E flutter : #1 _OAuthHandlerState.build.<anonymous closure>.<anonymous closure> (package:client/components/oauthHandler.dart:91:46)
    03-22 09:04:32.940 2699 2718 E flutter : #2 InAppWebViewController.handleMethod (package:flutter_inappwebview/src/in_app_webview_controller.dart:103:30)
    03-22 09:04:32.940 2699 2718 E flutter : #3 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:430:55)
    03-22 09:04:32.940 2699 2718 E flutter : #4 MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:383:34)
    03-22 09:04:32.940 2699 2718 E flutter : #5 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:283:33)
    03-22 09:04:32.940 2699 2718 E flutter : #6 _invoke3.<anonymous closure> (dart:ui/hooks.dart:280:15)
    03-22 09:04:32.940 2699 2718 E flutter : #7 _rootRun (dart:async/zone.dart:1190:13)

    <Rest of Flutter error trace:>

    03-22 09:04:32.940  2699  2718 E flutter : #8      _CustomZone.run (dart:async/zone.dart:1093:19)                                                                                                                  
    03-22 09:04:32.940  2699  2718 E flutter : #9      _CustomZone.runGuarded (dart:async/zone.dart:997:7)                                                                                                             
    03-22 09:04:32.940  2699  2718 E flutter : #10     _invoke3 (dart:ui/hooks.dart:279:10)                                                                                                                            
    03-22 09:04:32.940  2699  2718 E flutter : #11     _dispatchPlatformMessage (dart:ui/hooks.dart:154:5)

    What did I do wrong? Thanks in advance for your help.

    Wouter
    @WAvdBeek
    About: u have wrong port. It’s not 8443. CoAP gateway is accessible on 5684
    POST response: CHANGED
    {"rt":["oic.r.coapcloudconf"],"if":["oic.if.rw","oic.if.baseline"],"apn":"plgd","cis":"coaps+tcp://192.168.178.85:5684","sid":"00000000-0000-0000-0000-000000000001","clec":2,"cps":"readytoregister"}
    it still give me the connection status error on the device side.
    Wouter
    @WAvdBeek
    I am starting docker with: docker run --rm -it -e NGINX_PORT=8443 -p 8443:8443 -p 5683:5683 -p 5684:5684 -e FQDN=192.168.178.85 plgd/bundle:v2next-d55f695
    mentions: apn test
    also tried that and also does not work
    Ondrej Tomcik
    @ondrejtomcik
    @YorickColeu are you building the mobile app on your own? That's not needed. When you run the plgd mobile app, you can set endpoint of your own bundle and it shall work.
    Or are you e.g. branding the mobile app and that's why you want to have your own build of the app?
    This message was deleted
    This message was deleted

    @WAvdBeek

    https://github.com/plgd-dev/cloud/tree/v2/bundle

    Sorry, that one is outdated. documentation is part of the /doc, that's what is available on plgd.dev web. So "plgd" is correct.

    Are you using mobile app to onboard the device @WAvdBeek connected to your bundle or your self-made proxy-aware go client?
    Wouter
    @WAvdBeek
    onboarding with the pldg app works, i am adapting the onboarding tool so that has the cloud mediator features
    Ondrej Tomcik
    @ondrejtomcik
    Best would be to share the code of your onboarding-tool @WAvdBeek
    Ondrej Tomcik
    @ondrejtomcik
    It's not only about setting coapcloudconf resource. It's also about having right certificates, but if you're using SDK in a same way as we do in the plgd.mobile, it should work. And setting ACLs.
    Yorick Coleu
    @YorickColeu
    Hi Ondrej, thanks for your response. I use devices that don't have Google Play Store, so I tried to retrieved the APK using APKPure application. I successfully retrieved the plgd.dev app with the following version: Nov 25 2020, version: 1.0.1 (6).
    Ondrej Tomcik
    @ondrejtomcik
    Ok, and this one is not working?
    Yorick Coleu
    @YorickColeu
    Actually using that version, It's worse. When I press the "Continue with Google button", I get the following error:
    ```
    03-22 13:13:07.313 6560 6578 E flutter : [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Null check operator used on a null value
    03-22 13:13:07.313 6560 6578 E flutter : #0 _AndroidMotionEventConverter.toAndroidMotionEvent.<anonymous closure> (package:flutter/src/services/platform_views.dart:601)
    03-22 13:13:07.313 6560 6578 E flutter : #1 MappedListIterable.elementAt (dart:_internal/iterable.dart:417)
    03-22 13:13:07.313 6560 6578 E flutter : #2 ListIterator.moveNext (dart:_internal/iterable.dart:343)
    03-22 13:13:07.313 6560 6578 E flutter : #3 new List.from (dart:core-patch/array_patch.dart:38)
    03-22 13:13:07.313 6560 6578 E flutter : #4 new List.of (dart:core-patch/array_patch.dart:68)
    03-22 13:13:07.313 6560 6578 E flutter : #5 ListIterable.toList (dart:_internal/iterable.dart:102)
    03-22 13:13:07.313 6560 6578 E flutter : #6 _AndroidMotionEventConverter.toAndroidMotionEvent (package:flutter/src/services/platform_views.dart:602)
    03-22 13:13:07.313 6560 6578 E flutter : #7 AndroidViewController.dispatchPointerEvent (package:flutter/src/services/platform_views.dart:864)
    03-22 13:13:07.313 6560 6578 E flutter : #8 _GrowableList.forEach (dart:core-patch/growable_array.dart:313)
    03-22 13:13:07.313 6560 6578 E flutter : #9 _PlatformViewGestureRecognizer._flushPointerCache (package:flutter/src/rendering/platform_view.dart:560)
    03-22 13:13:07.313 6560 6578 E flutter : #10 _PlatformViewGestureRecognizer.acceptGesture (package:flutter/src/rendering/platform_view.dart:542)
    03-22 13:13:07.313 6560 6578 E flutter : #11 _CombiningGestureArenaMember.acceptGesture (package:flutter/src/gestures/team.dart:42)
    03-22 13:13:07.313 6560 6578 E flutter : #12 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157)
    03-22 13:13:07.313 6560 6578 E flutter : #13 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:362)
    03-22 13:13:07.313 6560 6578 E flutter : #14 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:338)
    03-22 13:13:07.313 6560 6578 E flutter : #15 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:267)
    03-22 13:13:07.313 6560 6578 E flutter : #16 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:295)
    03-22 13:13:07.313 6560 6578 E flutter : #17 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:240)
    03-22 13:13:07.313 6
    The rest of error:
    03-22 13:13:07.313 6560 6578 E flutter : #18 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:213)
    03-22 13:13:07.313 6560 6578 E flutter : #19 _rootRunUnary (dart:async/zone.dart:1206)
    03-22 13:13:07.313 6560 6578 E flutter : #20 _CustomZone.runUnary (dart:async/zone.dart:1100)
    03-22 13:13:07.313 6560 6578 E flutter : #21 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005)
    03-22 13:13:07.313 6560 6578 E flutter : #22 _invoke1 (dart:ui/hooks.dart:265)
    03-22 13:13:07.313 6560 6578 E flutter : #23 _dispatchPointerDataPacket (dart:ui/hooks.dart:174)