Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-13463

FIWARE.Request.Tech.Re: Queries related to SmartCity Project using Fiware.

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None
    • HD-Enabler:
      Unknown

      Description

      Hi All,

      Using below given docker-compose.yml, I am able to create devices/services.

      1. Note that mongo container is started before Orion, as Orion needs it
      2. as dependency and reserve the order has been found problematic in some
      3. low resource hosts
        mongo:
        image: mongo:3.2
        command: --nojournal
        ports:
      • "27017:27017"
        expose:
      • "27017"
        orion:
        image: fiware/orion
        links:
      • mongo
        ports:
      • "1026:1026"
        command: -dbhost mongo
        expose:
      • "1026"
        mosquitto:
        image: ansi/mosquitto
        ports:
      • "1883:1883"
        expose:
      • "1883"
        iotagent:
        image: fiware/iotagent-ul
        links:
      • mosquitto
      • mongo
      • orion
        ports:
      • "7896:7896"
      • "4041:4041"
        expose:
      • "7896"
      • "4041"
        log_opt:
        max-size: 5G

      Thanks & Regards,
      Krishan Babbar
      Technical Architect
      Manufacturing | Tech Mahindra
      Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

      • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

      ============================================================================================================================
      Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
      ===========================================================================================================================

      From: Krishan Babbar
      Sent: Wednesday, January 24, 2018 5:44 PM
      To: 'José Ignacio Carretero' <joseignacio.carretero@fiware.org>
      Cc: Srirangan C <csrirang@TechMahindra.com>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com>; 'Juanjo Hierro' <juanjose.hierro@fiware.org>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org>; Himanshu Kumar Upadhyay <HU00437051@TechMahindra.com>
      Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

      + Jose and Himanshu,

      Jose, kindly guide.

      Thanks & Regards,
      Krishan Babbar
      Technical Architect
      Manufacturing | Tech Mahindra
      Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

      • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

      ============================================================================================================================
      Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
      ===========================================================================================================================

      From: Krishan Babbar
      Sent: Tuesday, January 23, 2018 10:10 PM
      To: 'Juanjo Hierro' <juanjose.hierro@fiware.org<juanjose.hierro@fiware.org>>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org<fiware-tech-help@lists.fiware.org>>
      Cc: Srirangan C <csrirang@TechMahindra.com<csrirang@TechMahindra.com>>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com<Sanjeev.Kumar9@TechMahindra.com>>
      Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

      Hi Juanjo,

      I am stuck and need your help. I have following Docker containers.

      ubuntu@ubuntu16:~$ docker ps
      CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
      0d342bf05ee8 fiware/iotagent-ul "/bin/sh c 'bin/iot..." 42 minutes ago Up 42 minutes 0.0.0.0:4041>4041/tcp, 0.0.0.0:7896->7896/tcp festive_torvalds
      9d7ba0df6ea1 ansi/mosquitto "/usr/local/sbin/mos..." About an hour ago Up About an hour 0.0.0.0:1883->1883/tcp fiware_mosquitto_1
      043e141290f5 fiware/orion "/usr/bin/contextBro..." About an hour ago Up About an hour 0.0.0.0:1026->1026/tcp fiware_orion_1
      0edcd40bfc66 mongo:3.4 "docker-entrypoint.s..." About an hour ago Up 45 minutes 27017/tcp fiware_mongo_1
      ubuntu@ubuntu16:~$

      I am unable to create/get devices. In logs I found following errors.

      time=2018-01-23T15:47:32.722Z | lvl=ERROR | corr=fc7b2b20-e109-410e-b868-d2ad76f2e040 | trans=fc7b2b20-e109-410e-b868-d2ad76f2e040 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [mongo:27017] on first connect | comp=IoTAgent

      time=2018-01-23T15:51:14.684Z | lvl=DEBUG | corr=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | trans=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | op=IoTAgentNGSI.GenericMiddlewares | srv=/ | subsrv=/TechM/IoTRnD | msg=Error [TypeError] handling request: Cannot read property 'findOne' of undefined | comp=IoTAgent

      time=2018-01-23T15:53:20.125Z | lvl=DEBUG | corr=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | trans=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | op=IoTAgentNGSI.GenericMiddlewares | srv=howtoService | subsrv=/howto | msg=Error [TypeError] handling request: Cannot read property 'find' of undefined | comp=IoTAgent

      I followed below given steps.

      1. First I created Orion, Mongo and mosquitto containers using below given docker-compose.yml script.

      1. Note that mongo container is started before Orion, as Orion needs it
      2. as dependency and reserve the order has been found problematic in some
      3. low resource hosts
        mongo:
        image: mongo:3.4
        command: --nojournal

      orion:
      image: fiware/orion
      links:

      • mongo
        ports:
      • "1026:1026"
        command: -dbhost mongo
        mosquitto:
        image: ansi/mosquitto
        ports:
      • "1883:1883"
        expose:
      • "1883"

      2. Then I used below command to install Ultra Light IoT Agent.
      docker run -d --link fiware_orion_1 --link fiware_mosquitto_1 --link fiware_mongo_1 -p 7896:7896 -p 4041:4041 fiware/iotagent-ul

      Kindly guide what am I doing wrong? It seems that IoTAgent could not connect to Mongo DB but I am not sure what to change, where to change and how? Just FYI, I have Docker Containers on single Ubuntu 16.

      Thanks & Regards,
      Krishan Babbar
      Technical Architect
      Manufacturing | Tech Mahindra
      Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

      • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

      ============================================================================================================================
      Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
      ===========================================================================================================================

      From: Juanjo Hierro juanjose.hierro@fiware.org
      Sent: Thursday, January 18, 2018 7:54 PM
      To: Krishan Babbar <KB00449283@TechMahindra.com<KB00449283@TechMahindra.com>>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org<fiware-tech-help@lists.fiware.org>>
      Cc: Srirangan C <csrirang@TechMahindra.com<csrirang@TechMahindra.com>>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com<Sanjeev.Kumar9@TechMahindra.com>>
      Subject: Re: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

      Dear Krishan,

      Thank you for your interest in FIWARE.

      I hope some of my colleagues will come with a detailed answer regarding the issue with FIWARE Lab credentials you raised. I just pretend here to respond some of the other questions.

      You don't need to deploy all the GEs you list in order to setup a complete operational "Powered by FIWARE" IoT-enabled platform architecture.

      It should be enough to have:

      • Orion Context Broker (this is the core component you are required to have in a platform to actually claim it is "Powered by FIWARE")
      • Backend Device Management IDAS - here you have two options:
      • either some of the already existing IDAS IoT Agents works for your scenarios
      • or you have to develop a new IoT Agent using the IDAS Framework for development of IDAS IoT Agents

      With this approach, it should be enough.

      Of course, there are other components of FIWARE you may want to use to configure a more complete "Powered by FIWARE" Smart City platform. As an example, I mention here some examples:

      • CKAN extensions to support right-time open data: these are a number of plug-ins for CKAN (most widely open data publication platform adopted by many cities worldwide and particularly in Europe) enabling the publication of query resources on the Orion Context Broker as right-time open data resources.
      • Cygnus, in order to transfer history of Context Data managed by Orion into multiple data sinks (e.g., a Hadoop BigData system to perform bigdata analysis on Context history).
      • Perseo, in order to perform Complex Event Processing on top of Context data
      • etc

      If you wish, we can setup a confcall so that we can explain to you the reference architecture for "Powered by FIWARE" Smart City platforms and opportunities for collaboration.

      Hope it helps,

      Cheers,

      Juanjo

      On 18/01/2018 10:33, Krishan Babbar wrote:
      Hi All,

      I am working with FiWare to setup a Smart City project.
      As per my understanding so far, we need following GEs (considering minimum requirement)

      • Orion Context Broker
      • IoT Broker
      • Backend Device Management - IDAS
      • IoT Agent - having python script (At my local machine)

      I have following queries so far.

      • Do let me know what other GEs I need to install?
      • Can we install all required GEs on same instance (On Fiware cloud)?
      • Do let me know if I need to follow any particular steps and sequence?
      • How GEs interconnect with each other? Is there any configuration? E.g. How IoT Broker and Orinon Context Broker communicate?
      • I am following with https://fiware-orion.readthedocs.io/en/develop/quick_start_guide/index.html. Here what would be the credentials and URL to get the oAUTH token? I am using following with my Fiware LAB account credentials and these are not working.
        RESP=`curl -s -d " {\"username\": \"$USER\", \"password\":\"$PASSWORD\"}

        " -H "Content-type: application/json" https://orion.lab.fiware.org/token`

      • After installation of all GEs, I will do following steps. Please correct if I am wrong.
      • Using IoT Agent python scripts, create required Entities/Models.
      • Update attributes of the entity
      • Fetch the entities
      • Subscriptions

      Thanks & Regards,
      Krishan Babbar

      ============================================================================================================================
      Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
      ============================================================================================================================

      __________________________________________________________________________________________

      You can get more information about our cookies and privacy policies on the following links:

      Fiware-tech-help mailing list

      Fiware-tech-help@lists.fiware.org<Fiware-tech-help@lists.fiware.org>

      https://lists.fiware.org/listinfo/fiware-tech-help

      __________________________________________________________________________________________

      You can get more information about our cookies and privacy policies on the following links:

      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fiware.org
      https://lists.fiware.org/listinfo/fiware-tech-help

      [Created via e-mail received from: Krishan Babbar <KB00449283@TechMahindra.com>]

        Activity

        Hide
        fw.ext.user FW External User added a comment -

        Hi All,

        Now I am trying to run end to end flow.
        I have following Docker containers running.

        CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
        24f036202f78 fiware/iotagent-ul "/bin/sh c 'bin/iot..." 5 days ago Up 5 days 0.0.0.0:4041>4041/tcp, 0.0.0.0:7896->7896/tcp fiware_iotagent_1
        81e16c78312e fiware/orion "/usr/bin/contextBro..." 5 days ago Up 5 days 0.0.0.0:1026->1026/tcp fiware_orion_1
        bf699e1acdd3 ansi/mosquitto "/usr/local/sbin/mos..." 5 days ago Up 5 days 0.0.0.0:1883->1883/tcp fiware_mosquitto_1
        bfc256deddd0 mongo:3.2 "docker-entrypoint.s..." 5 days ago Up 5 days 0.0.0.0:27017->27017/tcp fiware_mongo_1

        I am using following tutorials.
        http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/

        I am able to create Service and devices. (data is given below).
        Now, when I am sending measurement it is not working. Please guide me what am I doing wrong? And if possible provide reference having step by step example to run end to end IoT testing.

        Request Details (Using POSTMAN)
        Header
        Content-Type:text/plain
        fiware-service:FiwareService
        fiware-servicepath:FiwareServicePath
        X-Auth-Token:AuthToken

        POST URL: http://130.206.XXX.XXX:4041/iot/d?k=tourguide-devices&i=restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f

        Body Contents:
        't|25'

        Response:
        <!DOCTYPE html>
        <html lang="en">
        <head>
        <meta charset="utf-8">
        <title>Error</title>
        </head>
        <body>
        <pre>Cannot POST /iot/d</pre>
        </body>
        </html>

        Service and Device Data with Header using IotAgent URL i.e. http://130.206.XXX.XXX:4041/iot/<object>
        Header
        Content-Type:application/json
        fiware-service:tourguide
        fiware-servicepath:/
        X-Auth-Token:AuthToken

        Service

        { "_id": "5a7063e6b8adcc0001c34723", "subservice": "/", "service": "tourguide", "apikey": "tourguide-devices", "resource": "/iot/dev-restaurants", "attributes": [], "lazy": [], "commands": [], "entity_type": "tourguide-devices", "internal_attributes": [], "static_attributes": [] }

        Device
        {
        "device_id": "restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f",
        "service": "tourguide",
        "service_path": "/",
        "entity_name": "0115206c51f60b48b77e4c937835795c33bb953f",
        "entity_type": "Restaurant",
        "transport": "HTTP",
        "attributes": [

        { "object_id": "t", "name": "temperature", "type": "number" }

        ],
        "lazy": [],
        "commands": [],
        "static_attributes": [],
        "protocol": "UL20"
        }

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        Manufacturing | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: Krishan Babbar
        Sent: Thursday, January 25, 2018 4:09 PM
        To: 'José Ignacio Carretero' <joseignacio.carretero@fiware.org>; 'Juanjo Hierro' <juanjose.hierro@fiware.org>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org>; Himanshu Kumar Upadhyay <HU00437051@TechMahindra.com>
        Cc: Srirangan C <csrirang@TechMahindra.com>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com>
        Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

        Hi All,

        Using below given docker-compose.yml, I am able to create devices/services.

        1. Note that mongo container is started before Orion, as Orion needs it
        2. as dependency and reserve the order has been found problematic in some
        3. low resource hosts
          mongo:
          image: mongo:3.2
          command: --nojournal
          ports:
        • "27017:27017"
          expose:
        • "27017"
          orion:
          image: fiware/orion
          links:
        • mongo
          ports:
        • "1026:1026"
          command: -dbhost mongo
          expose:
        • "1026"
          mosquitto:
          image: ansi/mosquitto
          ports:
        • "1883:1883"
          expose:
        • "1883"
          iotagent:
          image: fiware/iotagent-ul
          links:
        • mosquitto
        • mongo
        • orion
          ports:
        • "7896:7896"
        • "4041:4041"
          expose:
        • "7896"
        • "4041"
          log_opt:
          max-size: 5G

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        Manufacturing | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: Krishan Babbar
        Sent: Wednesday, January 24, 2018 5:44 PM
        To: 'José Ignacio Carretero' <joseignacio.carretero@fiware.org<joseignacio.carretero@fiware.org>>
        Cc: Srirangan C <csrirang@TechMahindra.com<csrirang@TechMahindra.com>>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com<Sanjeev.Kumar9@TechMahindra.com>>; 'Juanjo Hierro' <juanjose.hierro@fiware.org<juanjose.hierro@fiware.org>>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org<fiware-tech-help@lists.fiware.org>>; Himanshu Kumar Upadhyay <HU00437051@TechMahindra.com<HU00437051@TechMahindra.com>>
        Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

        + Jose and Himanshu,

        Jose, kindly guide.

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        Manufacturing | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: Krishan Babbar
        Sent: Tuesday, January 23, 2018 10:10 PM
        To: 'Juanjo Hierro' <juanjose.hierro@fiware.org<juanjose.hierro@fiware.org>>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org<fiware-tech-help@lists.fiware.org>>
        Cc: Srirangan C <csrirang@TechMahindra.com<csrirang@TechMahindra.com>>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com<Sanjeev.Kumar9@TechMahindra.com>>
        Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

        Hi Juanjo,

        I am stuck and need your help. I have following Docker containers.

        ubuntu@ubuntu16:~$ docker ps
        CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
        0d342bf05ee8 fiware/iotagent-ul "/bin/sh c 'bin/iot..." 42 minutes ago Up 42 minutes 0.0.0.0:4041>4041/tcp, 0.0.0.0:7896->7896/tcp festive_torvalds
        9d7ba0df6ea1 ansi/mosquitto "/usr/local/sbin/mos..." About an hour ago Up About an hour 0.0.0.0:1883->1883/tcp fiware_mosquitto_1
        043e141290f5 fiware/orion "/usr/bin/contextBro..." About an hour ago Up About an hour 0.0.0.0:1026->1026/tcp fiware_orion_1
        0edcd40bfc66 mongo:3.4 "docker-entrypoint.s..." About an hour ago Up 45 minutes 27017/tcp fiware_mongo_1
        ubuntu@ubuntu16:~$

        I am unable to create/get devices. In logs I found following errors.

        time=2018-01-23T15:47:32.722Z | lvl=ERROR | corr=fc7b2b20-e109-410e-b868-d2ad76f2e040 | trans=fc7b2b20-e109-410e-b868-d2ad76f2e040 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [mongo:27017] on first connect | comp=IoTAgent

        time=2018-01-23T15:51:14.684Z | lvl=DEBUG | corr=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | trans=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | op=IoTAgentNGSI.GenericMiddlewares | srv=/ | subsrv=/TechM/IoTRnD | msg=Error [TypeError] handling request: Cannot read property 'findOne' of undefined | comp=IoTAgent

        time=2018-01-23T15:53:20.125Z | lvl=DEBUG | corr=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | trans=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | op=IoTAgentNGSI.GenericMiddlewares | srv=howtoService | subsrv=/howto | msg=Error [TypeError] handling request: Cannot read property 'find' of undefined | comp=IoTAgent

        I followed below given steps.

        1. First I created Orion, Mongo and mosquitto containers using below given docker-compose.yml script.

        1. Note that mongo container is started before Orion, as Orion needs it
        2. as dependency and reserve the order has been found problematic in some
        3. low resource hosts
          mongo:
          image: mongo:3.4
          command: --nojournal

        orion:
        image: fiware/orion
        links:

        • mongo
          ports:
        • "1026:1026"
          command: -dbhost mongo
          mosquitto:
          image: ansi/mosquitto
          ports:
        • "1883:1883"
          expose:
        • "1883"

        2. Then I used below command to install Ultra Light IoT Agent.
        docker run -d --link fiware_orion_1 --link fiware_mosquitto_1 --link fiware_mongo_1 -p 7896:7896 -p 4041:4041 fiware/iotagent-ul

        Kindly guide what am I doing wrong? It seems that IoTAgent could not connect to Mongo DB but I am not sure what to change, where to change and how? Just FYI, I have Docker Containers on single Ubuntu 16.

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        Manufacturing | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: Juanjo Hierro juanjose.hierro@fiware.org
        Sent: Thursday, January 18, 2018 7:54 PM
        To: Krishan Babbar <KB00449283@TechMahindra.com<KB00449283@TechMahindra.com>>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org<fiware-tech-help@lists.fiware.org>>
        Cc: Srirangan C <csrirang@TechMahindra.com<csrirang@TechMahindra.com>>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com<Sanjeev.Kumar9@TechMahindra.com>>
        Subject: Re: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

        Dear Krishan,

        Thank you for your interest in FIWARE.

        I hope some of my colleagues will come with a detailed answer regarding the issue with FIWARE Lab credentials you raised. I just pretend here to respond some of the other questions.

        You don't need to deploy all the GEs you list in order to setup a complete operational "Powered by FIWARE" IoT-enabled platform architecture.

        It should be enough to have:

        • Orion Context Broker (this is the core component you are required to have in a platform to actually claim it is "Powered by FIWARE")
        • Backend Device Management IDAS - here you have two options:
        • either some of the already existing IDAS IoT Agents works for your scenarios
        • or you have to develop a new IoT Agent using the IDAS Framework for development of IDAS IoT Agents

        With this approach, it should be enough.

        Of course, there are other components of FIWARE you may want to use to configure a more complete "Powered by FIWARE" Smart City platform. As an example, I mention here some examples:

        • CKAN extensions to support right-time open data: these are a number of plug-ins for CKAN (most widely open data publication platform adopted by many cities worldwide and particularly in Europe) enabling the publication of query resources on the Orion Context Broker as right-time open data resources.
        • Cygnus, in order to transfer history of Context Data managed by Orion into multiple data sinks (e.g., a Hadoop BigData system to perform bigdata analysis on Context history).
        • Perseo, in order to perform Complex Event Processing on top of Context data
        • etc

        If you wish, we can setup a confcall so that we can explain to you the reference architecture for "Powered by FIWARE" Smart City platforms and opportunities for collaboration.

        Hope it helps,

        Cheers,

        Juanjo

        On 18/01/2018 10:33, Krishan Babbar wrote:
        Hi All,

        I am working with FiWare to setup a Smart City project.
        As per my understanding so far, we need following GEs (considering minimum requirement)

        • Orion Context Broker
        • IoT Broker
        • Backend Device Management - IDAS
        • IoT Agent - having python script (At my local machine)

        I have following queries so far.

        • Do let me know what other GEs I need to install?
        • Can we install all required GEs on same instance (On Fiware cloud)?
        • Do let me know if I need to follow any particular steps and sequence?
        • How GEs interconnect with each other? Is there any configuration? E.g. How IoT Broker and Orinon Context Broker communicate?
        • I am following with https://fiware-orion.readthedocs.io/en/develop/quick_start_guide/index.html. Here what would be the credentials and URL to get the oAUTH token? I am using following with my Fiware LAB account credentials and these are not working.
          RESP=`curl -s -d " {\"username\": \"$USER\", \"password\":\"$PASSWORD\"}

          " -H "Content-type: application/json" https://orion.lab.fiware.org/token`

        • After installation of all GEs, I will do following steps. Please correct if I am wrong.
        • Using IoT Agent python scripts, create required Entities/Models.
        • Update attributes of the entity
        • Fetch the entities
        • Subscriptions

        Thanks & Regards,
        Krishan Babbar

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ============================================================================================================================

        Show
        fw.ext.user FW External User added a comment - Hi All, Now I am trying to run end to end flow. I have following Docker containers running. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 24f036202f78 fiware/iotagent-ul "/bin/sh c 'bin/iot..." 5 days ago Up 5 days 0.0.0.0:4041 >4041/tcp, 0.0.0.0:7896->7896/tcp fiware_iotagent_1 81e16c78312e fiware/orion "/usr/bin/contextBro..." 5 days ago Up 5 days 0.0.0.0:1026->1026/tcp fiware_orion_1 bf699e1acdd3 ansi/mosquitto "/usr/local/sbin/mos..." 5 days ago Up 5 days 0.0.0.0:1883->1883/tcp fiware_mosquitto_1 bfc256deddd0 mongo:3.2 "docker-entrypoint.s..." 5 days ago Up 5 days 0.0.0.0:27017->27017/tcp fiware_mongo_1 I am using following tutorials. http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/ I am able to create Service and devices. (data is given below). Now, when I am sending measurement it is not working. Please guide me what am I doing wrong? And if possible provide reference having step by step example to run end to end IoT testing. Request Details (Using POSTMAN) Header Content-Type:text/plain fiware-service: FiwareService fiware-servicepath: FiwareServicePath X-Auth-Token: AuthToken POST URL: http://130.206.XXX.XXX:4041/iot/d?k=tourguide-devices&i=restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f Body Contents: 't|25' Response: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot POST /iot/d</pre> </body> </html> Service and Device Data with Header using IotAgent URL i.e. http://130.206.XXX.XXX:4041/iot/ <object> Header Content-Type:application/json fiware-service:tourguide fiware-servicepath:/ X-Auth-Token: AuthToken Service { "_id": "5a7063e6b8adcc0001c34723", "subservice": "/", "service": "tourguide", "apikey": "tourguide-devices", "resource": "/iot/dev-restaurants", "attributes": [], "lazy": [], "commands": [], "entity_type": "tourguide-devices", "internal_attributes": [], "static_attributes": [] } Device { "device_id": "restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f", "service": "tourguide", "service_path": "/", "entity_name": "0115206c51f60b48b77e4c937835795c33bb953f", "entity_type": "Restaurant", "transport": "HTTP", "attributes": [ { "object_id": "t", "name": "temperature", "type": "number" } ], "lazy": [], "commands": [], "static_attributes": [], "protocol": "UL20" } Thanks & Regards, Krishan Babbar Technical Architect Manufacturing | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: Krishan Babbar Sent: Thursday, January 25, 2018 4:09 PM To: 'José Ignacio Carretero' <joseignacio.carretero@fiware.org>; 'Juanjo Hierro' <juanjose.hierro@fiware.org>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org>; Himanshu Kumar Upadhyay <HU00437051@TechMahindra.com> Cc: Srirangan C <csrirang@TechMahindra.com>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com> Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware Hi All, Using below given docker-compose.yml, I am able to create devices/services. Note that mongo container is started before Orion, as Orion needs it as dependency and reserve the order has been found problematic in some low resource hosts mongo: image: mongo:3.2 command: --nojournal ports: "27017:27017" expose: "27017" orion: image: fiware/orion links: mongo ports: "1026:1026" command: -dbhost mongo expose: "1026" mosquitto: image: ansi/mosquitto ports: "1883:1883" expose: "1883" iotagent: image: fiware/iotagent-ul links: mosquitto mongo orion ports: "7896:7896" "4041:4041" expose: "7896" "4041" log_opt: max-size: 5G Thanks & Regards, Krishan Babbar Technical Architect Manufacturing | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: Krishan Babbar Sent: Wednesday, January 24, 2018 5:44 PM To: 'José Ignacio Carretero' <joseignacio.carretero@fiware.org< joseignacio.carretero@fiware.org >> Cc: Srirangan C <csrirang@TechMahindra.com< csrirang@TechMahindra.com >>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com< Sanjeev.Kumar9@TechMahindra.com >>; 'Juanjo Hierro' <juanjose.hierro@fiware.org< juanjose.hierro@fiware.org >>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org< fiware-tech-help@lists.fiware.org >>; Himanshu Kumar Upadhyay <HU00437051@TechMahindra.com< HU00437051@TechMahindra.com >> Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware + Jose and Himanshu, Jose, kindly guide. Thanks & Regards, Krishan Babbar Technical Architect Manufacturing | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: Krishan Babbar Sent: Tuesday, January 23, 2018 10:10 PM To: 'Juanjo Hierro' <juanjose.hierro@fiware.org< juanjose.hierro@fiware.org >>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org< fiware-tech-help@lists.fiware.org >> Cc: Srirangan C <csrirang@TechMahindra.com< csrirang@TechMahindra.com >>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com< Sanjeev.Kumar9@TechMahindra.com >> Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware Hi Juanjo, I am stuck and need your help. I have following Docker containers. ubuntu@ubuntu16:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0d342bf05ee8 fiware/iotagent-ul "/bin/sh c 'bin/iot..." 42 minutes ago Up 42 minutes 0.0.0.0:4041 >4041/tcp, 0.0.0.0:7896->7896/tcp festive_torvalds 9d7ba0df6ea1 ansi/mosquitto "/usr/local/sbin/mos..." About an hour ago Up About an hour 0.0.0.0:1883->1883/tcp fiware_mosquitto_1 043e141290f5 fiware/orion "/usr/bin/contextBro..." About an hour ago Up About an hour 0.0.0.0:1026->1026/tcp fiware_orion_1 0edcd40bfc66 mongo:3.4 "docker-entrypoint.s..." About an hour ago Up 45 minutes 27017/tcp fiware_mongo_1 ubuntu@ubuntu16:~$ I am unable to create/get devices. In logs I found following errors. time=2018-01-23T15:47:32.722Z | lvl=ERROR | corr=fc7b2b20-e109-410e-b868-d2ad76f2e040 | trans=fc7b2b20-e109-410e-b868-d2ad76f2e040 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [mongo:27017] on first connect | comp=IoTAgent time=2018-01-23T15:51:14.684Z | lvl=DEBUG | corr=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | trans=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | op=IoTAgentNGSI.GenericMiddlewares | srv=/ | subsrv=/TechM/IoTRnD | msg=Error [TypeError] handling request: Cannot read property 'findOne' of undefined | comp=IoTAgent time=2018-01-23T15:53:20.125Z | lvl=DEBUG | corr=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | trans=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | op=IoTAgentNGSI.GenericMiddlewares | srv=howtoService | subsrv=/howto | msg=Error [TypeError] handling request: Cannot read property 'find' of undefined | comp=IoTAgent I followed below given steps. 1. First I created Orion, Mongo and mosquitto containers using below given docker-compose.yml script. Note that mongo container is started before Orion, as Orion needs it as dependency and reserve the order has been found problematic in some low resource hosts mongo: image: mongo:3.4 command: --nojournal orion: image: fiware/orion links: mongo ports: "1026:1026" command: -dbhost mongo mosquitto: image: ansi/mosquitto ports: "1883:1883" expose: "1883" 2. Then I used below command to install Ultra Light IoT Agent. docker run -d --link fiware_orion_1 --link fiware_mosquitto_1 --link fiware_mongo_1 -p 7896:7896 -p 4041:4041 fiware/iotagent-ul Kindly guide what am I doing wrong? It seems that IoTAgent could not connect to Mongo DB but I am not sure what to change, where to change and how? Just FYI, I have Docker Containers on single Ubuntu 16. Thanks & Regards, Krishan Babbar Technical Architect Manufacturing | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: Juanjo Hierro juanjose.hierro@fiware.org Sent: Thursday, January 18, 2018 7:54 PM To: Krishan Babbar <KB00449283@TechMahindra.com< KB00449283@TechMahindra.com >>; 'fiware-tech-help@lists.fiware.org' <fiware-tech-help@lists.fiware.org< fiware-tech-help@lists.fiware.org >> Cc: Srirangan C <csrirang@TechMahindra.com< csrirang@TechMahindra.com >>; Sanjeev.Kumar <Sanjeev.Kumar9@TechMahindra.com< Sanjeev.Kumar9@TechMahindra.com >> Subject: Re: [Fiware-tech-help] Queries related to SmartCity Project using Fiware Dear Krishan, Thank you for your interest in FIWARE. I hope some of my colleagues will come with a detailed answer regarding the issue with FIWARE Lab credentials you raised. I just pretend here to respond some of the other questions. You don't need to deploy all the GEs you list in order to setup a complete operational "Powered by FIWARE" IoT-enabled platform architecture. It should be enough to have: Orion Context Broker (this is the core component you are required to have in a platform to actually claim it is "Powered by FIWARE") Backend Device Management IDAS - here you have two options: either some of the already existing IDAS IoT Agents works for your scenarios or you have to develop a new IoT Agent using the IDAS Framework for development of IDAS IoT Agents With this approach, it should be enough. Of course, there are other components of FIWARE you may want to use to configure a more complete "Powered by FIWARE" Smart City platform. As an example, I mention here some examples: CKAN extensions to support right-time open data: these are a number of plug-ins for CKAN (most widely open data publication platform adopted by many cities worldwide and particularly in Europe) enabling the publication of query resources on the Orion Context Broker as right-time open data resources. Cygnus, in order to transfer history of Context Data managed by Orion into multiple data sinks (e.g., a Hadoop BigData system to perform bigdata analysis on Context history). Perseo, in order to perform Complex Event Processing on top of Context data etc If you wish, we can setup a confcall so that we can explain to you the reference architecture for "Powered by FIWARE" Smart City platforms and opportunities for collaboration. Hope it helps, Cheers, Juanjo On 18/01/2018 10:33, Krishan Babbar wrote: Hi All, I am working with FiWare to setup a Smart City project. As per my understanding so far, we need following GEs (considering minimum requirement) Orion Context Broker IoT Broker Backend Device Management - IDAS IoT Agent - having python script (At my local machine) I have following queries so far. Do let me know what other GEs I need to install? Can we install all required GEs on same instance (On Fiware cloud)? Do let me know if I need to follow any particular steps and sequence? How GEs interconnect with each other? Is there any configuration? E.g. How IoT Broker and Orinon Context Broker communicate? I am following with https://fiware-orion.readthedocs.io/en/develop/quick_start_guide/index.html . Here what would be the credentials and URL to get the oAUTH token? I am using following with my Fiware LAB account credentials and these are not working. RESP=`curl -s -d " {\"username\": \"$USER\", \"password\":\"$PASSWORD\"} " -H "Content-type: application/json" https://orion.lab.fiware.org/token ` After installation of all GEs, I will do following steps. Please correct if I am wrong. Using IoT Agent python scripts, create required Entities/Models. Update attributes of the entity Fetch the entities Subscriptions Thanks & Regards, Krishan Babbar ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. ============================================================================================================================
        Hide
        jicg José Ignacio Carretero Guarde added a comment -

        finished in external mails

        Show
        jicg José Ignacio Carretero Guarde added a comment - finished in external mails

          People

          • Assignee:
            spain.node Spain Node Support Team
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: