Code Monkey home page Code Monkey logo

Comments (10)

drasko avatar drasko commented on June 11, 2024

@ezequiel-umu can you please describe the procedure of registering LED. I would like to try on my side, but with lacking documentation I find it a bit difficult to get going. I could use your knowledge to put me on the track and test your problem in my set-up.

from iotagent-json.

ezequiel-umu avatar ezequiel-umu commented on June 11, 2024

Of course. I just used the passive option in type configuration, as described in other iota project which I can't remember now. The configuration follows:

    types: {
        'Device': {
            "service": "/",
            "subservice": "/mqtt",
            "removeSuffix": true,
            "active": [{
                "name": "Boton",
                "type": "Integer"
            }],
            "lazy": [{
                "name": "Led",
                "type": "Integer"
            }],
            "commands": [],
        }
    }

This configuration works if you use lwm2m IoTAgent, because reading of passive (aka lazy) attributes is well defined using CoAP Get method.

Y also used this curl script to provision the device:

(curl localhost:4041/iot/devices -s -S --header 'Content-Type: application/json' \
  --header 'Accept: application/json' --header 'fiware-service: /' --header 'fiware-servicepath: /mqtt' \
  -d @- | python -mjson.tool) <<EOF
{
  "devices": [
    {
      "device_id": "MQTT",
      "protocol": "GENERIC_PROTO",
      "entity_name": "MQTT Device",
      "entity_type": "Device",
      "timezone": "America/Santiago"
    }
  ]
}
EOF

You can simulate Boton changes using mosquitto_pub with topic /apikey/MQTT/attributes/Boton.

from iotagent-json.

drasko avatar drasko commented on June 11, 2024

@ezequiel-umu I have made some progress, documented at #87.

However - what is apikey in /apikey/MQTT/attributes/Boton and how do I obtain one?

from iotagent-json.

dmoranj avatar dmoranj commented on June 11, 2024

A global API Key can be configured for this case in the config.js file in the defaultKey attribute. Specific API Keys for each service can be provisioned using the Configuration API.

from iotagent-json.

drasko avatar drasko commented on June 11, 2024

@dmoranj you said in #85 : "Devices must be provisioned via Device Provisioning API. The IoT Agent model gives the option of creating a Configuration for groups of devices, so to allow autoprovisionig of those devices in possesion of the API Key. That should ease the application from the burden of provisioning each one of the devices. But a configuration for each Service must be created in any case."

Is apikey a security token, or is it just a group ID? I.e. do we use it for security purposes or just to mark a specific group?

from iotagent-json.

dmoranj avatar dmoranj commented on June 11, 2024

Kind of both. The idea is to provide a way to separate requests coming from devices of different customers, thus grouping them (to be able to separate them in the CB and other components, also) and also to forbid devices not knowing the APIKey from accessing devices of other customers. That last part stands as part of a security mechanism, but a bit insecure on its own... In order to have a properly secured south bound, access to topics with a particular API Key should also be authenticated using the mechanisms provided by the MQTT broker (certificates, credentials, and so) with ACLs for all the topics of a particular APIKey.

from iotagent-json.

ezequiel-umu avatar ezequiel-umu commented on June 11, 2024

About the main question. Is it planned to be done passive (or lazy) reading for MQTT's IoTA?

Thank you.

from iotagent-json.

dmoranj avatar dmoranj commented on June 11, 2024

There is a kind of proactive passive reading with this IoTA (that was needed on a prototype for an incoming project) that probably could be transformed into support for the lazy attributes. I have created an issue for that particular feature, and we will try to push it (as I found it interesting to cover all the IOTALib functionality in the IOTA), but I can't guarantee you a date (it will heavily depend on our team backlog, that is changing pretty fast these days).

from iotagent-json.

dmoranj avatar dmoranj commented on June 11, 2024

The issue is #89

from iotagent-json.

dmoranj avatar dmoranj commented on June 11, 2024

Closing the issue, as an issue with the proposed enhancement has been created. We will update the issue number #89 in case there are updates on this subject.

from iotagent-json.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.