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 could you please describe the flow, what needs to be done to onboard devices that are talking to the cloud proxy? How are these devices discovered? Are they onboarded separately or is it enough to onboard cloud proxy itself?
    I didn’t track this topic in the OCF, so feel free to point me to some sequence diagram in the KAVI.
    Wouter
    @WAvdBeek
    It is CR2599
    the cloud proxy (my own code, not yet released) can be onboarded to plgd with plgd app.
    the issue is then that the client of the cloud proxy that talks to the OCF devices needs to be configured, hence the plgd app is not doing that.
    reading Kishens email (you are cc'ed) Kishen indicates that this code does not yet exists.
    Ondrej Tomcik
    @ondrejtomcik

    You could extend mobile app, or write your own console app which does the same as mobile app + additional required requests. It's fairly simple, but not sure if you want to use our OCF CoAP Client.

    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

    Soneca-ii
    @Soneca-ii
    @ondrejtomcik Hi, thanks for the answer. Sorry for the late reply but had some trouble with the local setup. I have successfully connected the cloud device (non-secure and secured). Meantime I have another question, could you please share some example where it would be possible to use cloud2cloud between two PLGD bundle deployments? Is this even possible using the test bundle provided?
    Ondrej Tomcik
    @ondrejtomcik
    @Soneca-ii Hello. C2C is not part of the bundle. Currently the priority is pretty low to include it there as we are working on another topics.If you want to speed it up rapidly, you can contribute or we can assign one developer to this task, but this would be considered as paid support.
    Ondrej Tomcik
    @ondrejtomcik
    @WAvdBeek are you around?
    Wouter
    @WAvdBeek
    Hi Ondrej, i am around, but not working on this right now.
    I have created the mediator in lite (obt) as preliminary code. however I still have issues with having the correct access and something else is wrong (e.g. code crashes)
    does the go code work somehow in command line mode? adapting the android app is currently too much work to proof that the full chain : local device - cloud proxy - plgd can be set up. we know that all individual components already can be set up.
    Ondrej Tomcik
    @ondrejtomcik
    @WAvdBeek have a different topic. IoTivity Lite MRs. Any idea when somebody will find some time to review them?
    @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