OpenIoT | Open source IoT platform for makers

 by   ItayRosen JavaScript Version: v0.1.3 License: GPL-3.0

kandi X-RAY | OpenIoT Summary

OpenIoT is a JavaScript library typically used in Internet of Things (IoT), Docker applications. OpenIoT has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.
Lightweight open source IoT platform for makers. Control your IoT devices from the cloud with OpenIoT. The platform allows you to update code over the air, set up custom notifications and access its components in real time. OpenIoT currently supports ESP8266 boards with programming using Arduino environment.
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        OpenIoT has a low active ecosystem.
                        summary
                        It has 30 star(s) with 2 fork(s). There are 5 watchers for this library.
                        summary
                        It had no major release in the last 12 months.
                        summary
                        There are 5 open issues and 6 have been closed. On average issues are closed in 4 days. There are 33 open pull requests and 0 closed requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of OpenIoT is v0.1.3
                        OpenIoT Support
                          Best in #JavaScript
                            Average in #JavaScript
                            OpenIoT Support
                              Best in #JavaScript
                                Average in #JavaScript

                                  kandi-Quality Quality

                                    summary
                                    OpenIoT has 0 bugs and 119 code smells.
                                    OpenIoT Quality
                                      Best in #JavaScript
                                        Average in #JavaScript
                                        OpenIoT Quality
                                          Best in #JavaScript
                                            Average in #JavaScript

                                              kandi-Security Security

                                                summary
                                                OpenIoT has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                OpenIoT code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                OpenIoT Security
                                                  Best in #JavaScript
                                                    Average in #JavaScript
                                                    OpenIoT Security
                                                      Best in #JavaScript
                                                        Average in #JavaScript

                                                          kandi-License License

                                                            summary
                                                            OpenIoT is licensed under the GPL-3.0 License. This license is Strong Copyleft.
                                                            summary
                                                            Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.
                                                            OpenIoT License
                                                              Best in #JavaScript
                                                                Average in #JavaScript
                                                                OpenIoT License
                                                                  Best in #JavaScript
                                                                    Average in #JavaScript

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        OpenIoT releases are available to install and integrate.
                                                                        summary
                                                                        Installation instructions are available. Examples and code snippets are not available.
                                                                        summary
                                                                        OpenIoT saves you 1055 person hours of effort in developing the same functionality from scratch.
                                                                        summary
                                                                        It has 2392 lines of code, 85 functions and 65 files.
                                                                        summary
                                                                        It has high code complexity. Code complexity directly impacts maintainability of the code.
                                                                        OpenIoT Reuse
                                                                          Best in #JavaScript
                                                                            Average in #JavaScript
                                                                            OpenIoT Reuse
                                                                              Best in #JavaScript
                                                                                Average in #JavaScript
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi has reviewed OpenIoT and discovered the below as its top functions. This is intended to give you an instant insight into OpenIoT implemented functionality, and help decide if they suit your requirements.
                                                                                  • Registers the swagger worker .
                                                                                    • register the service worker
                                                                                      • Checks if the Service worker is reloaded
                                                                                        • Send email .
                                                                                          • Initialize the Router .
                                                                                            • Unregister the service worker
                                                                                              • Validate an email address .
                                                                                                • Download a webhook
                                                                                                  Get all kandi verified functions for this library.
                                                                                                  Get all kandi verified functions for this library.

                                                                                                  OpenIoT Key Features

                                                                                                  [ ] Web IDE - for OTA firmware updates
                                                                                                  [ ] Mobile App
                                                                                                  [ ] Github OTA - push OTA updates from Github
                                                                                                  [X] API - http api for 3rd party applications
                                                                                                  [X] Data Charts - log components data on platform and plot charts with it.
                                                                                                  [X] Wifi Manager - add support for Wifi Manager (insert wifi credentials via web server instead of hard-coding)
                                                                                                  [ ] Coding Hub - create applications that can control multiple Things in one code

                                                                                                  OpenIoT Examples and Code Snippets

                                                                                                  No Code Snippets are available at this moment for OpenIoT.
                                                                                                  Community Discussions

                                                                                                  Trending Discussions on OpenIoT

                                                                                                  Fiware Draco - Subscription works only for the first payload. Only the first payload is saved in historical mongodb
                                                                                                  chevron right
                                                                                                  fiware quantumleap insert into cratedb not working (schema missing)
                                                                                                  chevron right
                                                                                                  Fiware IoT Agent Json refused to POST to /v2/op/update
                                                                                                  chevron right
                                                                                                  Context broker is ignoring value, fiware orion and iotagent
                                                                                                  chevron right

                                                                                                  QUESTION

                                                                                                  Fiware Draco - Subscription works only for the first payload. Only the first payload is saved in historical mongodb
                                                                                                  Asked 2022-Mar-07 at 01:42

                                                                                                  I am trying to save historical context data in Mongo, but without success. Only the first payload sent to Draco is saved to MongoDB for historical data, but Mongo does not react to attribute updates. Versions used for the test: Orion-LD version 0.8.0, Mongo version 4.4, Draco version 1.3.6. I tested it also with the 3.4 version of Mongo and the behavior is the same.

                                                                                                  Can you, please, help me to fix a problem?

                                                                                                  Below are the steps I performed:

                                                                                                  Create a Draco subscription:

                                                                                                  curl --location --request POST 'http://localhost:1026/v2/subscriptions' \
                                                                                                  --header 'Fiware-Service: test' \
                                                                                                  --header 'Fiware-ServicePath: /openiot' \
                                                                                                  --header 'Content-Type: application/json' \
                                                                                                  --data-raw '{
                                                                                                    "description": "Notify Draco of all context changes",
                                                                                                    "subject": {
                                                                                                      "entities": [
                                                                                                        {
                                                                                                          "idPattern": ".*"
                                                                                                        }
                                                                                                      ]
                                                                                                    },
                                                                                                    "notification": {
                                                                                                      "http": {
                                                                                                        "url": "http://10.0.0.5:5050/v2/notify"
                                                                                                      }
                                                                                                    },
                                                                                                    "throttling": 0
                                                                                                  }'
                                                                                                  

                                                                                                  Create an entity:

                                                                                                  curl --location --request POST 'http://localhost:1026/v2/entities' \
                                                                                                  --header 'Fiware-Service: test' \
                                                                                                  --header 'Fiware-ServicePath: /openiot' \
                                                                                                  --header 'Content-Type: application/json' \
                                                                                                  --data-raw ' {
                                                                                                        "id":"urn:ngsi-ld:Product:0102", "type":"Product",
                                                                                                        "name":{"type":"Text", "value":"Lemonade"},
                                                                                                        "size":{"type":"Text", "value": "S"},
                                                                                                        "price":{"type":"Integer", "value": 99}
                                                                                                  }'
                                                                                                  

                                                                                                  Overwrite the value of an attribute value:

                                                                                                  curl --location --request PUT 'http://localhost:1026/v2/entities/urn:ngsi-ld:Product:0102/attrs' \
                                                                                                  --header 'Fiware-Service: test' \
                                                                                                  --header 'Fiware-ServicePath: /openiot' \
                                                                                                  --header 'Content-Type: application/json' \
                                                                                                  --data-raw '{
                                                                                                      "price":{"type":"Integer", "value": 110}
                                                                                                  }'
                                                                                                  

                                                                                                  LISTEN_HTTP PROCESSOR: LISTEN_HTTP

                                                                                                  NGSITOMONGO PROCESSOR:NGSITOMONGO

                                                                                                  Template: Template

                                                                                                  MongoDB: mongo

                                                                                                  ANSWER

                                                                                                  Answered 2022-Mar-04 at 10:35

                                                                                                  We do not use that precise stack, but we have got many production deployments keeping context historical data on MongoDb by using FIWARE Orion (v2 API) with FIWARE Cygnus (NGSIMongo Sink for historical raw data, and NGSISTH Sink for aggregated data at MongoDB).

                                                                                                  https://github.com/telefonicaid/fiware-cygnus/blob/master/doc/cygnus-ngsi/flume_extensions_catalogue/ngsi_mongo_sink.md

                                                                                                  https://github.com/telefonicaid/fiware-cygnus/blob/master/doc/cygnus-ngsi/flume_extensions_catalogue/ngsi_sth_sink.md

                                                                                                  Maybe this help.

                                                                                                  Source https://stackoverflow.com/questions/71204976

                                                                                                  QUESTION

                                                                                                  fiware quantumleap insert into cratedb not working (schema missing)
                                                                                                  Asked 2021-Feb-24 at 10:49
                                                                                                  goal

                                                                                                  Use qunatumleap to move data into a crate_db to display later using Grafana.

                                                                                                  what I did
                                                                                                  • follow tutorial to setup Docker images
                                                                                                  • setup opc-agent to provide data to the orion broker
                                                                                                  • setup quantumleap to move data from broker to crate_db on change
                                                                                                  • checked that a subscription is present in the contextBroker
                                                                                                  Expected behavior

                                                                                                  on subscription of a new item quantumleap will create a entry in a table in the crate_db to store the provided values

                                                                                                  what actually happens

                                                                                                  Instead of creating a entry in the Crate_db quantumleap throws a "schema not existing" fault. The provided tutorials do not talk about setting those schema up myself, therefore I assume that quantumleap normally sets them up. Right now I do not know why this is failing, most likely it is a configuration mistake on my side

                                                                                                  additional information
                                                                                                  1. subscription present in contextBroker:
                                                                                                       curl -X GET \
                                                                                                         'http://localhost:1026/v2/subscriptions/' \
                                                                                                         -H 'fiware-service: openiot' \
                                                                                                         -H 'fiware-servicepath: /'
                                                                                                  
                                                                                                   [
                                                                                                  {"id":"60360eae34f0ca493f0fc148",
                                                                                                  "description":"plc_id",
                                                                                                  "status":"active",
                                                                                                  "subject":{"entities":[{"idPattern":"PLC1"}],
                                                                                                  "condition":{"attrs":["main"]}},
                                                                                                  "notification":{"timesSent":1748,
                                                                                                  "lastNotification":"2021-02-24T08:59:45.000Z",
                                                                                                  "attrs":["main"],
                                                                                                  "onlyChangedAttrs":false,
                                                                                                  "attrsFormat":"normalized",
                                                                                                  "http":{"url":"http://quantumleap:8668/v2/notify"},
                                                                                                  "metadata":["dateCreated","dateModified"],
                                                                                                  "lastSuccess":"2021-02-24T08:59:45.000Z",
                                                                                                  "lastSuccessCode":500},
                                                                                                  "throttling":1}
                                                                                                  ]
                                                                                                  
                                                                                                  1. Orion log:
                                                                                                  orion_1        | INFO@09:07:55  logTracing.cpp[130]: Request received: POST /v1/updateContext, request payload (327 bytes): {"contextElements":[{"type":"plc","isPattern":"false","id":"PLC1","attributes":[{"name":"main","type":"Number","value":"12285","metadatas":[{"name":"SourceTimestamp","type":"ISO8601","value":"2021-02-24T09:07:55.033Z"},{"name":"ServerTimestamp","type":"ISO8601","value":"2021-02-24T09:07:55.033Z"}]}]}],"updateAction":"UPDATE"}, response code: 200
                                                                                                  
                                                                                                  1. Quantum Leap log:
                                                                                                  quantumleap_1  | time=2021-02-24 09:07:55.125 | level=ERROR | corr=c7df320c-767f-11eb-bbb3-0242ac1b0005; cbnotif=1 | from=172.27.0.5 | srv=openiot | subserv=/ | op=_insert_entity_rows | comp=translators.crate | msg=Failed to insert entities because of below error; translator will still try saving original JSON in "mtopeniot"."etplc".__original_ngsi_entity__ | payload=[{'id': 'PLC1', 'type': 'plc', 'main': {'type': 'Number', 'value': '12285', 'metadata': {'dateCreated': {'type': 'DateTime', 'value': '2021-02-24T08:28:59.917Z'}, 'dateModified': {'type': 'DateTime', 'value': '2021-02-24T09:07:55.115Z'}}}, 'time_index': '2021-02-24T09:07:55.115000+00:00'}] | thread=140262103055136  | process=67
                                                                                                  
                                                                                                  1. Traceback from Qunatumleap
                                                                                                  quantumleap_1  | Traceback (most recent call last): quantumleap_1  |   File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 365, in _insert_entity_rows 
                                                                                                  quantumleap_1  |     self.cursor.executemany(stmt, rows) quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/cursor.py", line 67, in executemany quantumleap_1  |     self.execute(sql, bulk_parameters=seq_of_parameters) 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/cursor.py", line 53, in execute quantumleap_1  |     self._result = self.connection.client.sql(sql, parameters, 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 331, in sql quantumleap_1  |     content = self._json_request('POST', self.path, data=data) 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 458, in _json_request quantumleap_1  |     _raise_for_status(response) 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 187, in _raise_for_status 
                                                                                                  quantumleap_1  |     raise ProgrammingError(error.get('message', ''), 
                                                                                                  quantumleap_1  | crate.client.exceptions.ProgrammingError: SQLActionException[SchemaUnknownException: Schema 'mtopeniot' unknown] quantumleap_1  |  quantumleap_1  | During handling of the above exception, another exception occurred: quantumleap_1  |  
                                                                                                  quantumleap_1 | Traceback (most recent call last): 
                                                                                                  quantumleap_1  |   File "/src/ngsi-timeseries-api/src/reporter/reporter.py", line 195, in notify quantumleap_1  |     trans.insert(payload, fiware_s, fiware_sp) 
                                                                                                  quantumleap_1  |   File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 221, in insert 
                                                                                                  quantumleap_1  |     res = self._insert_entities_of_type(et, 
                                                                                                  quantumleap_1  |   File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 354, in _insert_entities_of_type 
                                                                                                  quantumleap_1  |     self._insert_entity_rows(table_name, col_names, entries, entities) quantumleap_1  |   File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 381, in _insert_entity_rows 
                                                                                                  quantumleap_1  |     self._insert_original_entities_in_failed_batch( 
                                                                                                  quantumleap_1  |   File "/src/ngsi-timeseries-api/src/translators/sql_translator.py", line 437, in _insert_original_entities_in_failed_batch 
                                                                                                  quantumleap_1  |     self.cursor.executemany(stmt, rows) 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/cursor.py", line 67, in executemany 
                                                                                                  quantumleap_1  |     self.execute(sql, bulk_parameters=seq_of_parameters) 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/cursor.py", line 53, in execute 
                                                                                                  quantumleap_1  |     self._result = self.connection.client.sql(sql, parameters, 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 331, in sql 
                                                                                                  quantumleap_1  |     content = self._json_request('POST', self.path, data=data) 
                                                                                                  quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 458, in _json_request 
                                                                                                  quantumleap_1  |     _raise_for_status(response) quantumleap_1  |   File "/usr/local/lib/python3.8/site-packages/crate/client/http.py", line 187, in _raise_for_status 
                                                                                                  quantumleap_1  |     raise ProgrammingError(error.get('message', ''), 
                                                                                                  quantumleap_1  | crate.client.exceptions.ProgrammingError: SQLActionException[SchemaUnknownException: Schema 'mtopeniot' unknown]
                                                                                                  
                                                                                                  1. Tables in cratedb after running qunatumleap for a while:

                                                                                                  screenshot of cratedb tables

                                                                                                  1. docker-compose file
                                                                                                  version: "3"
                                                                                                  
                                                                                                  services:
                                                                                                    iotage:
                                                                                                      hostname: iotage
                                                                                                      image: iotagent4fiware/iotagent-opcua
                                                                                                      networks:
                                                                                                        - hostnet
                                                                                                        - iotnet
                                                                                                      ports:
                                                                                                        - "4001:4001"
                                                                                                        - "4081:8080"
                                                                                                      extra_hosts:
                                                                                                        - "iotcarsrv:192.168.2.16"
                                                                                                   #     - "PLC1:192.168.2.57"
                                                                                                      depends_on:
                                                                                                        - iotmongo
                                                                                                        - orion
                                                                                                      volumes:
                                                                                                        - ./certificates:/opt/iotagent-opcua/certificates
                                                                                                        - ./AGECONF:/opt/iotagent-opcua/conf
                                                                                                      command: /usr/bin/tail -f /var/log/lastlog
                                                                                                  
                                                                                                    iotmongo:
                                                                                                      hostname: iotmongo
                                                                                                      image: mongo:3.4
                                                                                                      volumes:
                                                                                                        - iotmongo_data:/data/db
                                                                                                        - iotmongo_conf:/data/configdb
                                                                                                         
                                                                                                    crate-db:
                                                                                                      image: crate
                                                                                                      hostname: crate-db
                                                                                                      ports:
                                                                                                          - "4200:4200"
                                                                                                          - "4300:4300"
                                                                                                      command:
                                                                                                          crate -Clicense.enterprise=false -Cauth.host_based.enabled=false  -Ccluster.name=democluster
                                                                                                          -Chttp.cors.enabled=true -Chttp.cors.allow-origin="*"
                                                                                                      networks:
                                                                                                        - hostnet
                                                                                                          
                                                                                                    quantumleap:
                                                                                                      hostname: quantumleap
                                                                                                      image: smartsdk/quantumleap
                                                                                                      ports:
                                                                                                          - "8668:8668"
                                                                                                      depends_on:
                                                                                                          - crate-db
                                                                                                      environment:
                                                                                                          - CRATE_HOST=crate-db
                                                                                                      networks:
                                                                                                        - hostnet
                                                                                                          
                                                                                                    grafana:
                                                                                                      image: grafana/grafana
                                                                                                      depends_on:
                                                                                                          - crate-db
                                                                                                      ports:
                                                                                                          - "3003:3000"
                                                                                                      networks:
                                                                                                        - hostnet
                                                                                                  
                                                                                                    ################ OCB ################
                                                                                                  
                                                                                                    orion:
                                                                                                      hostname: orion
                                                                                                      image: fiware/orion:latest
                                                                                                      networks:
                                                                                                        - hostnet
                                                                                                        - ocbnet
                                                                                                      ports:
                                                                                                        - "1026:1026"
                                                                                                      depends_on:
                                                                                                        - orion_mongo
                                                                                                      #command: -dbhost mongo
                                                                                                      entrypoint: /usr/bin/contextBroker -fg -multiservice -ngsiv1Autocast -statCounters -dbhost mongo -logForHumans -logLevel DEBUG -t 255
                                                                                                  
                                                                                                    orion_mongo:
                                                                                                      hostname: orion_mongo
                                                                                                      image: mongo:3.4
                                                                                                      networks:
                                                                                                        ocbnet:
                                                                                                          aliases:
                                                                                                            - mongo
                                                                                                      volumes:
                                                                                                        - orion_mongo_data:/data/db
                                                                                                        - orion_mongo_conf:/data/configdb
                                                                                                      command: --nojournal
                                                                                                  
                                                                                                  volumes:
                                                                                                    iotmongo_data:
                                                                                                    iotmongo_conf:
                                                                                                    orion_mongo_data:
                                                                                                    orion_mongo_conf:
                                                                                                  
                                                                                                  networks:
                                                                                                    hostnet:
                                                                                                    iotnet:
                                                                                                    ocbnet:
                                                                                                  
                                                                                                  edits
                                                                                                  • added docker compose file

                                                                                                  ANSWER

                                                                                                  Answered 2021-Feb-24 at 10:49

                                                                                                  after changing the database to a more recent version (for example crate-db:3.1.2) the data arrives at the database nicely

                                                                                                  Source https://stackoverflow.com/questions/66348247

                                                                                                  QUESTION

                                                                                                  Fiware IoT Agent Json refused to POST to /v2/op/update
                                                                                                  Asked 2020-Nov-07 at 17:31

                                                                                                  I am interested in fiware IoT Agent JSON, and i tried to work things out. I've mange to install the IoT Agent JSON using this tutorial. The tutorial refers about IoT Actuator Connection and to check the connection we have to POST to {IoTAgentIP:Port}/v2/op/update. When I post to this endpoint I get:

                                                                                                  
                                                                                                  
                                                                                                  
                                                                                                     
                                                                                                     Error
                                                                                                  
                                                                                                  
                                                                                                  
                                                                                                     
                                                                                                  Cannot POST /v2/op/update

                                                                                                  My Post Command Is:

                                                                                                  curl -iX POST \
                                                                                                    http://localhost:4041/v2/op/update \
                                                                                                    -H 'Content-Type: application/json' \
                                                                                                    -H 'fiware-service: openiot' \
                                                                                                    -H 'fiware-servicepath: /' \
                                                                                                    -d '{
                                                                                                      "actionType": "update",
                                                                                                      "entities": [
                                                                                                          {
                                                                                                              "type": "Alarm",
                                                                                                              "id": "urn:ngsi-ld:Alarm:001",
                                                                                                              "ring" : {
                                                                                                                  "type": "command",
                                                                                                                  "value": ""
                                                                                                              }
                                                                                                          }
                                                                                                      ]
                                                                                                  }'
                                                                                                  

                                                                                                  And

                                                                                                  curl -iX POST \
                                                                                                    http://localhost:4041/v2/op/update \
                                                                                                    -H 'Content-Type: application/json' \
                                                                                                    -H 'fiware-service: openiot' \
                                                                                                    -H 'fiware-servicepath: /' \
                                                                                                    -d '{
                                                                                                      "actionType": "update",
                                                                                                      "entities": [
                                                                                                          {
                                                                                                              "type": "Bell",
                                                                                                              "id": "urn:ngsi-ld:Bell:001",
                                                                                                              "ring" : {
                                                                                                                  "type": "command",
                                                                                                                  "value": ""
                                                                                                              }
                                                                                                          }
                                                                                                      ]
                                                                                                  }'
                                                                                                  

                                                                                                  My IoT agent version is:

                                                                                                  {
                                                                                                      "libVersion": "2.12.0-next",
                                                                                                      "port": 4041,
                                                                                                      "baseRoot": "/",
                                                                                                      "version": "1.14.0-next"
                                                                                                  }
                                                                                                  

                                                                                                  Update - With latest Version of IoTA and orion I get in the IoTA log File the below:

                                                                                                  time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Creating initial entity in the Context Broker:
                                                                                                   {
                                                                                                      "url": "http://localhost:1026/v1/updateContext",
                                                                                                      "method": "POST",
                                                                                                      "json": {
                                                                                                          "contextElements": [
                                                                                                              {
                                                                                                                  "type": "Bell",
                                                                                                                  "isPattern": "false",
                                                                                                                  "id": "urn:ngsi-ld:Bell:001",
                                                                                                                  "attributes": [
                                                                                                                      {
                                                                                                                          "name": "refStore",
                                                                                                                          "type": "Relationship",
                                                                                                                          "value": "urn:ngsi-ld:Store:001"
                                                                                                                      },
                                                                                                                      {
                                                                                                                          "name": "ring_status",
                                                                                                                          "type": "commandStatus",
                                                                                                                          "value": "UNKNOWN"
                                                                                                                      },
                                                                                                                      {
                                                                                                                          "name": "ring_info",
                                                                                                                          "type": "commandResult",
                                                                                                                          "value": " "
                                                                                                                      },
                                                                                                                      {
                                                                                                                          "name": "TimeInstant",
                                                                                                                          "type": "ISO8601",
                                                                                                                          "value": " "
                                                                                                                      }
                                                                                                                  ]
                                                                                                              }
                                                                                                          ],
                                                                                                          "updateAction": "APPEND"
                                                                                                      },
                                                                                                      "headers": {
                                                                                                          "fiware-service": "openiot",
                                                                                                          "fiware-servicepath": "/",
                                                                                                          "fiware-correlator": "7c9fba8d-9262-4f81-9b4e-f71ab57953ff"
                                                                                                      }
                                                                                                  } | comp=IoTAgent
                                                                                                  time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=executeWithSecurity | comp=IoTAgent
                                                                                                  time=2020-10-22T20:46:49.063Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["type"] with queryObj {"type":"Bell"} | comp=IoTAgent
                                                                                                  time=2020-10-22T20:46:49.069Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["type"]] not found: [{"type":"Bell"}] | comp=IoTAgent
                                                                                                  time=2020-10-22T20:46:49.069Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=error {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group for fields: [\"type\"] and values: {\"type\":\"Bell\"}","code":404} in get group device | comp=IoTAgent
                                                                                                  time=2020-10-22T20:46:49.097Z | lvl=DEBUG | corr=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | trans=7c9fba8d-9262-4f81-9b4e-f71ab57953ff | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Initial entity created successfully. | comp=IoTAgent
                                                                                                  

                                                                                                  ANSWER

                                                                                                  Answered 2020-Nov-07 at 17:31

                                                                                                  I manage to make it to work with one service group (/iot/d). So Post requests to append a sensor goes from /iot/d service group. I use docker images (compiled with docker compose, like the example). I also have modified in docker file the IOTA_DEFAULT_RESOURCE just in case to be: IOTA_DEFAULT_RESOURCE= I've used the latest IoT Agent JSON 1.15.0 and the previous Version 2.4.0 of Orion.

                                                                                                  Source https://stackoverflow.com/questions/64419174

                                                                                                  QUESTION

                                                                                                  Context broker is ignoring value, fiware orion and iotagent
                                                                                                  Asked 2020-Apr-24 at 09:31

                                                                                                  orion version : 2.3.0 iotagent-ul version : 1.12.0

                                                                                                  I am using fiware and iotagent over mqtt. I want to send commands to some devices with different values. I have followed https://github.com/FIWARE/tutorials.IoT-over-MQTT and read some documentation. After provisionning a service group (with apikey: 123456) and an actuator, I can send commands with values by following the iota URL :

                                                                                                  curl -iX POST \                       
                                                                                                    'http://localhost:4041/iot/devices' \
                                                                                                    -H 'Content-Type: application/json' \
                                                                                                    -H 'fiware-service: openiot' \
                                                                                                    -H 'fiware-servicepath: /' \
                                                                                                    -d '{
                                                                                                    "devices": [
                                                                                                      {
                                                                                                        "device_id": "dev001",
                                                                                                        "entity_name": "urn:ngsi-ld:Device:001",
                                                                                                        "entity_type": "Device",
                                                                                                        "protocol": "PDI-IoTA-UltraLight",
                                                                                                        "transport": "MQTT",
                                                                                                        "commands": [
                                                                                                          {"name": "date","type": "command", "value": {"hour": 9, "minute": 31, "second": 0}}
                                                                                                         ]
                                                                                                      }
                                                                                                    ]
                                                                                                  }
                                                                                                  '
                                                                                                  

                                                                                                  iota publish a mqtt message to : /123456/dev001/cmd with payload dev001@date|hour=9|minute=31|second=0

                                                                                                  But when using the context broker, the value is ignored :

                                                                                                  curl -iX PATCH \                                 
                                                                                                    'http://localhost:1026/v2/entities/urn:ngsi-ld:Device:001/attrs' \
                                                                                                    -H 'Content-Type: application/json' \
                                                                                                    -H 'fiware-service: openiot' \
                                                                                                    -H 'fiware-servicepath: /' \
                                                                                                    -d '{
                                                                                                    "date": {            
                                                                                                        "type" : "command",
                                                                                                        "value" : {"hour": 9, "minute": 31, "second": 0}     
                                                                                                    }                                                                            
                                                                                                  }' 
                                                                                                  

                                                                                                  Here, iota publish a mqtt message to : /123456/dev001/cmd with payload dev001@date|

                                                                                                  Why is it ignored ? Am I doing somthing wrong ?

                                                                                                  sorry for my poor english.

                                                                                                  ANSWER

                                                                                                  Answered 2020-Apr-24 at 09:31

                                                                                                  I found a solution... adding the type in the url make the context take account of the value... weird.

                                                                                                  The final url must be :

                                                                                                  curl -iX PATCH \                                 
                                                                                                    'http://localhost:1026/v2/entities/urn:ngsi-ld:Device:001/attrs?type=Device' \
                                                                                                    -H 'Content-Type: application/json' \
                                                                                                    -H 'fiware-service: openiot' \
                                                                                                    -H 'fiware-servicepath: /' \
                                                                                                    -d '{
                                                                                                    "date": {            
                                                                                                        "type" : "command",
                                                                                                        "value" : {"hour": 9, "minute": 31, "second": 0}     
                                                                                                    }                                                                            
                                                                                                  }' 
                                                                                                  

                                                                                                  EDIT:

                                                                                                  knowing the solution, I have tried to understand the problem and found this issue : https://github.com/telefonicaid/fiware-orion/issues/3647

                                                                                                  According to CPrs and request forwarding documentation

                                                                                                  On forwarding, any type of entity in the NGSIv2 update/query matches registrations without entity type. However, the opposite doesn't work, so if you have registrations with types, then you must use ?type in NGSIv2 update/query in order to obtain a match. Otherwise you may encounter problems, like the one described in this post at StackOverflow.

                                                                                                  EDIT 2:

                                                                                                  This is a duplicate of : Orion CB doesn't update lazy attributes on IoT Agent

                                                                                                  Source https://stackoverflow.com/questions/61359704

                                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                                  Vulnerabilities

                                                                                                  No vulnerabilities reported

                                                                                                  Install OpenIoT

                                                                                                  You need an Arduino environment IDE with ESP8266 support. Arduino IDE and PlatformIO are recommended.
                                                                                                  Add the OpenIoT Library to Arduino IDE or PlatformIO.
                                                                                                  Register on the platform, add a new thing and follow the steps for a quick start.

                                                                                                  Support

                                                                                                  As of now, only ESP8266 is supported. I do wish to add support for as many boards as possible. Any help with this task is appreciated.
                                                                                                  Find more information at:
                                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                                  Find more libraries
                                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                                  Save this library and start creating your kit
                                                                                                  CLONE
                                                                                                • HTTPS

                                                                                                  https://github.com/ItayRosen/OpenIoT.git

                                                                                                • CLI

                                                                                                  gh repo clone ItayRosen/OpenIoT

                                                                                                • sshUrl

                                                                                                  git@github.com:ItayRosen/OpenIoT.git

                                                                                                • Share this Page

                                                                                                  share link

                                                                                                  Explore Related Topics

                                                                                                  Consider Popular JavaScript Libraries

                                                                                                  Try Top Libraries by ItayRosen

                                                                                                  LinkedIn-Mass-Connect

                                                                                                  by ItayRosenJavaScript

                                                                                                  Serial-Plotter

                                                                                                  by ItayRosenHTML

                                                                                                  cryptophp

                                                                                                  by ItayRosenPHP

                                                                                                  stickyboard

                                                                                                  by ItayRosenHTML

                                                                                                  Compare JavaScript Libraries with Highest Support

                                                                                                  next.js

                                                                                                  by vercel

                                                                                                  vue

                                                                                                  by vuejs

                                                                                                  node

                                                                                                  by nodejs

                                                                                                  react

                                                                                                  by facebook

                                                                                                  react-native

                                                                                                  by facebook

                                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                                  Find more libraries
                                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                                  Save this library and start creating your kit