Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    glennergeerts-aloxy
    @glennergeerts-aloxy
    Thanks @mena-bosch !
    Menahem Julien Raccah Lisei
    @mena-bosch
    @glennergeerts-aloxy most welcome :)
    Bob Claerhout
    @BobClaerhout

    I have created a model which uses the multiple keyword to add an array of objects. In my case, it is an array of statuses mandatory multiple Statuses as Status. The status functionblock looks as follows:

    functionblock Status {
        status {
            mandatory Type as StatusType
            mandatory Level as StatusLevel
        }
    }

    I'm trying to get this functionblock filled (in Ditto) using the java client. Is this possible using the client and if so, do you have an example of that?

    Menahem Julien Raccah Lisei
    @mena-bosch

    Hi @aedelmann , I have a bit of a tough one for you. Unfortunately given it involves quite a lot of black box/proprietary stuff, I don't think it's suitable for SO.
    TL;DR

    • Provisioning a thing through the Vorto Postman script does not generate a "fully usable" policy (i.e. it lacks a subject entry of type "bosch-id"), so it will not pop up in your things when examined from the solution dashboard at things.eu-1.bosch-iot-suite.com.
    • Provisioning a thing through the swagger API (here: apidocs.bosch-iot-suite.com) does provide the "fully usable" policy, hence the thing will appear in your... err... things.

    Details

    • The two methodologies seem to differ quite a lot, as the former uses Vorto notation while the other does not.
    • Also, the Vorto Postman script points to deviceprovisioning.eu-1.bosch-iot-suite.com/api/1/, while the one in swagger points to things.eu-1.bosch-iot-suite.com/api/2/things.
    • I have tried to modify the Postman script to point to the latter, but it does not seem to "understand" Vorto notation.

    As I'm not quite sure what happens behind the scenes there, I'm not sure how to address this, and which team(s) would ultimately be responsible to provide a solution (assuming a solution is desirable, which I think it is).

    Workaround

    • Haven't tried yet, but I suspect a simple PUT request from the things/policies swagger to add the missing policy bit should help complete the Vorto provisioning process and allow the thing to be visible in the things dashboard.
    • The missing bit looks like (under "entries"):

    "solution-owner": { "subjects": { "bosch:[my technical user id]@ciamids_[some UUID]": { "type": "bosch-id" } }, "resources": { "thing:/": { "grant": [ "READ" ], "revoke": [] } } },

    Menahem Julien Raccah Lisei
    @mena-bosch
    (btw if this question is too Bosch-centric even for this thread I'm happy to migrate to internal channels - after all the gist of the issue is about Vorto integration with Bosch Things I guess)
    Alexander Wellbrock
    @lionax_gitlab

    I'm still encountering the 'multiple is ignored' but and also left a comment on the already closed issue. Should I open a new issue instead or will someone reopen it @thjaeckle ?

    As stated in the issue I tested this with vorto 0.12.4 and the ditto json schema generator as well as my own generator.

    eclipse/vorto#2004

    Thomas Jaeckle
    @thjaeckle
    @lionax_gitlab I would create a new issue if I were you. I don't have any permission to reopen and the Vorto team seems to be on a leave.
    Alexander Wellbrock
    @lionax_gitlab

    I observed in my ditto skeleton generator if I have a infomodel -> functionblock.status.property -> datatype that the property of type object will have it's fields duplicated. If the datatype e.g. says

    mandatory name as string
    optional description as string

    the resulting json will be

    datatype: {
      name: "",
      description: "",
      name: "",
      description: ""
    }

    Do you think it's more lickly that this is a bug in the generator API or that it's a problem with my template?

    Alexander Edelmann
    @aedelmann
    Our generators don’t have that using the same API. I Guess must be your template :)
    Alexander Edelmann
    @aedelmann
    @mena-bosch coz when u provision the thing using swagger, do u log in with your Bosch ID before ? If that’s the case , the swagger takes your logged in user to create a thing in things without policy but coz u authenticated , things will auto create a policy for the authenticated user. U can try to do the same with the postman script and authenticate with Bosch ID wth the same result.
    Alexander Edelmann
    @aedelmann
    Alexander Wellbrock: can u provide me with the source code of your template so I can take a look at it ?
    Menahem Julien Raccah Lisei
    @mena-bosch
    @aedelmann not sure I fully understand here but I'll try again tomorrow (seems to be an outage right now). Thanks
    Alexander Edelmann
    @aedelmann
    :smile: no prob
    Alexander Wellbrock
    @lionax_gitlab
    I'm wondering, how should I contribute my addition to the generator-eclipseditto if I want to supply it with configuration options from APIv2? The generator runner in the repo does only support APIv1 options, right?
    Alexander Edelmann
    @aedelmann
    Yes please contribute. We can provide a config option as well as operate the generator in our infra.
    Alexander Wellbrock
    @lionax_gitlab
    Is it possible to upload more attachments like PDFs to a vorto model at this moment?
    Alexander Edelmann
    @aedelmann
    Attachment upload is restricted to sys admins at the moment.
    Alexander Wellbrock
    @lionax_gitlab
    Could it be that the BooleanPropertyAttribute and EnumLiteralPropertyAttribute from vortolang spec 1.0 are not yet part of the swagger 1.0 specification?
    I can't seem to find measurementUnit as well in the swagger spec
    Alexander Wellbrock
    @lionax_gitlab
    I'd also like to introduce the EnumLiteralPropertyAttribute severity for Alerting type fields. EnumLiteralPropertyAttribute: 'measurementUnit' | 'severity' ':' [Enum::ID | QualifiedName]; What do you think?
    Kevin Olotu
    @kolotu
    @lionax_gitlab you are right the property attributes are missing in the Swagger specification. I have created the Github issue #2116 to address that - if there's anything to add, just add a comment to that issue.
    @lionax_gitlab I'm not sure, if I understand your second question completely - do you want to extend the DSL for this use case?
    Alexander Wellbrock
    @lionax_gitlab
    I'm basically requiring something like measurementUnit, but with a new / other context. I could use the measurementUnit and assign is an enum, but since "severity" is no "unit" it would be strange to do so. So to keep backwards compat I'd rather use a new enumliteralproperty which is more generic for these kinds of use-cases and deprecate measurementUnit, or simply introduce more of these types of properties and maybe make them all applicable at the same time, like metadata for a datapoint. Currently it is not possible to set something else as enumliteralproperty than measurementUnit - the editor will complain. I hope it's a bit clearer now.
    For the integration in the swagger docs I stumbled upon this while generating a vorto client sdk from the swagger yaml.
    Kevin Olotu
    @kolotu
    @lionax_gitlab Okay I now understand how you want to use it - could you please open a Github issue for your new EnumLiteralProperty, so we can share, discuss and track it easier?
    Julian
    @JulianFeinauer
    Hi Vorto Experts : )
    Alexander Edelmann
    @aedelmann
    Hello Julian. How can we help ?
    Julian
    @JulianFeinauer
    I came across vorto now for the third time, I think and wanted to give it a closer look
    And as it's a bit of a meta technology I struggle a bit to fully understand it
    Julian
    @JulianFeinauer
    So, one question in Short.. vortolang describes one „type“ of device, as I undertand it, not one specific devices. I sthere a possibility to pass not only attributes and ops but also technical metadata (like memory adresses, …)?
    Alexander Edelmann
    @aedelmann
    With the vortolang u can create a semantic abstraction of device functionality as so called Function Blocks. These can be used to define device types such as a Bosch XDK or CISS Sensor as Information Models. If I understand u correctly is that u want to assign static meta data values for a device type. This is not possible at this point but would be a good add on for vorto Lang 2.0 :smile:
    U can only define a function block say device Information which would merely define properties such as memory etc on meta level. To assign actual values to them is not possible.
    But it Anyway makes only sense on information model level as function blocks are device type agnostic
    Julian
    @JulianFeinauer
    Okay thanks @aedelmann. To give you a bit of content our "things" are usually big industrial machines
    And many of them are pretty similar but never the same. And my idea was to pass some configuration data via the vorto model
    Alexander Edelmann
    @aedelmann
    U might wanna check out the payload mapping stuff of Vorto that addresses mapping heterogenic payloads to a single semantic data model defined with Vorto.
    Coz I would assume that your industrial machines would either send the same semantic data in various formats
    When u mean configurations , what is that for example ?
    Julian
    @JulianFeinauer
    We use plc4x to fetch data from the machines plcs. So it would be nice for us to partially already pass plc address information with the model
    Then we could write a client that is totally agnostic and mostly configured via vorto
    Alexander Edelmann
    @aedelmann
    U can pass this kind of information in the mapping model of either function blocks or information models. At eg code generation time the PLC4X Mapping model and Vorto model are merged and passed to the generator for adapting Vorto Interface to the PLC4X api and vice versa
    Julian
    @JulianFeinauer
    @aedelmann thanks for the response although i do not yet fully get it. Do you have an example somewhere?
    Alexander Edelmann
    @aedelmann
    Take a look at the amazon Alexa skill set generator where there is a Colorlight functionblock defining pure functionality of a Colorlight
    And the amazon skill set specific meta data in a mapping file for the Color light
    In the Alexa skillet generator both the Vorto functionblock and the Alexa skill set specific meta data from the functionblock and it’s mapping is processed in order to generator source code
    Alexander Edelmann
    @aedelmann
    In your case u can put plc4x specific meta data in the mapping model for each functionblock to process them in your code generator or eventual other component