Atos-Research-and-Innovation / IoTagent-LoRaWAN

FIWARE IoT Agent for LoRaWAN protocol (with CayenneLpp and CBOR data models)
https://fiware-lorawan.readthedocs.io/en/latest/
Other
34 stars 40 forks source link

Failed to start #7

Closed jomarequena closed 6 years ago

jomarequena commented 6 years ago

good afternoon,

We are trying to integrate ttn with fiware and we are having problems when it comes to lifting it, you can help us.

[centos@orion-uah IoTagent-LoRaWAN-master]$ node bin/iotagent-lora time=2018-09-07T11:13:39.621Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=Activating IOT Agent NGSI Library. | comp=IoTAgent time=2018-09-07T11:13:39.624Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.Global | srv=n/a | subsrv=n/a | msg=MongoDB Device registry selected for NGSI Library | comp=IoTAgent time=2018-09-07T11:13:39.648Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=First connection attempt | comp=IoTAgent time=2018-09-07T11:13:39.649Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 1 | comp=IoTAgent time=2018-09-07T11:13:39.679Z | lvl=ERROR | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED ::1:27017] | comp=IoTAgent time=2018-09-07T11:13:39.679Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent time=2018-09-07T11:13:44.685Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 2 | comp=IoTAgent time=2018-09-07T11:13:44.702Z | lvl=ERROR | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED ::1:27017] | comp=IoTAgent time=2018-09-07T11:13:44.703Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent time=2018-09-07T11:13:49.711Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 3 | comp=IoTAgent time=2018-09-07T11:13:49.778Z | lvl=ERROR | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED ::1:27017] | comp=IoTAgent time=2018-09-07T11:13:49.778Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent time=2018-09-07T11:13:54.782Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 4 | comp=IoTAgent time=2018-09-07T11:13:54.803Z | lvl=ERROR | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED ::1:27017] | comp=IoTAgent time=2018-09-07T11:13:54.804Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Waiting 5 seconds before attempting again. | comp=IoTAgent time=2018-09-07T11:13:59.832Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance. Attempt 5 | comp=IoTAgent time=2018-09-07T11:13:59.839Z | lvl=ERROR | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED ::1:27017] | comp=IoTAgent time=2018-09-07T11:13:59.839Z | lvl=ERROR | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-002: Error found after [5] attempts: MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED ::1:27017] | comp=IoTAgent time=2018-09-07T11:13:59.843Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.NorthboundServer | srv=n/a | subsrv=n/a | msg=Starting IoT Agent listening on port [4061] | comp=IoTAgent time=2018-09-07T11:13:59.844Z | lvl=DEBUG | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.NorthboundServer | srv=n/a | subsrv=n/a | msg=Using config:

{ "logLevel": "DEBUG", "timestamp": true, "contextBroker": { "host": "localhost", "port": "1026", "ngsiVersion": "v2", "url": "http://localhost:1026" }, "server": { "port": 4061 }, "defaultResource": "/iot/d", "deviceRegistry": { "type": "mongodb" }, "mongodb": { "host": "localhost", "port": "27017", "db": "orion-uah" }, "types": {}, "service": "howtoService", "subservice": "/howto", "providerUrl": "http://localhost:4061", "deviceRegistrationDuration": "P1Y", "defaultType": "Thing" } | comp=IoTAgent time=2018-09-07T11:13:59.866Z | lvl=INFO | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.ContextServer | srv=n/a | subsrv=n/a | msg=Loading NGSI Contect server routes | comp=IoTAgent time=2018-09-07T11:13:59.869Z | lvl=DEBUG | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.ContextServer | srv=n/a | subsrv=n/a | msg=Loading access validation Templates | comp=IoTAgent info: iotagent-node-lib activated info: Loading types from configuration file info: Loading services from registry time=2018-09-07T11:13:59.898Z | lvl=ERROR | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=TypeError: Cannot read property 'find' of undefined | comp=IoTAgent time=2018-09-07T11:13:59.899Z | lvl=DEBUG | corr=d32e1352-b214-4d21-a70b-9e3619d30622 | trans=d32e1352-b214-4d21-a70b-9e3619d30622 | op=IoTAgentNGSI.DomainControl | srv=n/a | subsrv=n/a | msg=response-time: 21036 | comp=IoTAgent

Y mongo esta disponible:

[centos@orion-uah ~]$ netstat -na | grep 27017 tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:33415 127.0.0.1:27017 ESTABLISHED tcp 0 0 127.0.0.1:27017 127.0.0.1:33415 ESTABLISHED unix 2 [ ACC ] STREAM LISTENING 78483795 /tmp/mongodb-27017.sock [centos@orion-uah ~]$ mongo MongoDB shell version: 3.2.6 connecting to: test Server has startup warnings: 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] We suggest setting it to 'never' 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] We suggest setting it to 'never' 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 1024 processes, 64000 files. Number of processes should be at least 32000 : 0.5 times number of files. 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten]

show dbs local 0.000GB orion 0.000GB orion-uah 0.000GB

dcalvoalonso commented 6 years ago

Hi @jomarequena ,

From your logs I understand that you are not using the docker images, aren't you?

Could you please share your nodejs version?

Thanks,

Daniel

jomarequena commented 6 years ago

Hi Daniel,

No, I downloaded https://github.com/Atos-Research-and-Innovation/IoTagent-LoRaWAN.git about my Fiware virtual machine created with the image orion-psb-image-R5.4. In it, I have installed the nodejs version:

[centos@orion-uah ~]$ node -v v6.14.4

Thank you very much!

dcalvoalonso commented 6 years ago

Both your nodejs (v6.14.4) and Mongodb versions are supported (3.2.6). I have also reviewed your configuration file and it seems to be correct.

Could you please run:

mongo --port 27017

With this command, you shall be able to connect to your MongoDB running instance. It's just to check that everything is OK with Mongo.

jomarequena commented 6 years ago

Yes, It's ready. But iotagento not started.

[centos@orion-uah ~]$ mongo --port 27017 MongoDB shell version: 3.2.6 connecting to: 127.0.0.1:27017/test Server has startup warnings: 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] We suggest setting it to 'never' 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'. 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] We suggest setting it to 'never' 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 1024 processes, 64000 files. Number of processes should be at least 32000 : 0.5 times number of files. 2018-09-06T20:41:15.667+0000 I CONTROL [initandlisten]

show dbs local 0.000GB orion 0.000GB orion-uah 0.000GB

Thanks.

dcalvoalonso commented 6 years ago

This is quite strange because nobody has reported this kind of error yet and the connection to the MongoDB instance is part of the https://github.com/telefonicaid/iotagent-node-lib, which is common to all the agents.

Could you please do the same test in your local environment or try to use docker?

jomarequena commented 6 years ago

Good afternoon,

According to the last post, I installed the iotagent with the docker-compose and I get it to lift IoTA correctly. My question now is how can I create the devices and link them with TTN. When doing it with the example it fails me and the truth that I do not know very well because. Sorry but I'm a little lost.

Service run!

iotagent-lora_1 | iotagent-lora_1 | { iotagent-lora_1 | "logLevel": "DEBUG", iotagent-lora_1 | "timestamp": true, iotagent-lora_1 | "contextBroker": { iotagent-lora_1 | "host": "orion", iotagent-lora_1 | "port": "1026", iotagent-lora_1 | "ngsiVersion": "v2", iotagent-lora_1 | "url": "http://orion:1026" iotagent-lora_1 | }, iotagent-lora_1 | "server": { iotagent-lora_1 | "port": 4061 iotagent-lora_1 | }, iotagent-lora_1 | "defaultResource": "/iot/d", iotagent-lora_1 | "deviceRegistry": { iotagent-lora_1 | "type": "mongodb" iotagent-lora_1 | }, iotagent-lora_1 | "mongodb": { iotagent-lora_1 | "host": "mongodb", iotagent-lora_1 | "port": "27017", iotagent-lora_1 | "db": "iotagentlora" iotagent-lora_1 | }, iotagent-lora_1 | "types": {}, iotagent-lora_1 | "service": "howtoService", iotagent-lora_1 | "subservice": "/howto", iotagent-lora_1 | "providerUrl": "http://iotagent-lora:4061", iotagent-lora_1 | "deviceRegistrationDuration": "P1Y", iotagent-lora_1 | "defaultType": "Thing" iotagent-lora_1 | } iotagent-lora_1 | | comp=IoTAgent iotagent-lora_1 | time=2018-09-12T13:57:53.858Z | lvl=INFO | corr=195c77c8-6132-4251-9955-73801570b50a | trans=195c77c8-6132-4251-9955-73801570b50a | op=IoTAgentNGSI.ContextServer | srv=n/a | subsrv=n/a | msg=Loading NGSI Contect server routes | comp=IoTAgent iotagent-lora_1 | time=2018-09-12T13:57:53.862Z | lvl=DEBUG | corr=195c77c8-6132-4251-9955-73801570b50a | trans=195c77c8-6132-4251-9955-73801570b50a | op=IoTAgentNGSI.ContextServer | srv=n/a | subsrv=n/a | msg=Loading access validation Templates | comp=IoTAgent iotagent-lora_1 | time=2018-09-12T13:57:53.868Z | lvl=DEBUG | corr=195c77c8-6132-4251-9955-73801570b50a | trans=195c77c8-6132-4251-9955-73801570b50a | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=Mongo Driver open | comp=IoTAgent iotagent-lora_1 | info: iotagent-node-lib activated iotagent-lora_1 | info: Loading types from configuration file iotagent-lora_1 | info: Loading services from registry iotagent-lora_1 | (node:1) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html mongodb_1 | 2018-09-12T13:57:53.922+0000 I NETWORK [initandlisten] connection accepted from 172.20.0.4:42396 #13 (12 connections now open) iotagent-lora_1 | info: Loading devices from registry iotagent-lora_1 | info: LoRaWAN IoT Agent started

Conection is ok!

ubuntu@ip-172-31-39-47:~/IoTagent-LoRaWAN-master$ curl -v http://localhost:4061/iot/about

Create Device:

ubuntu@ip-172-31-39-47:~$ curl localhost:4061/iot/devices -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'fiware-service: smartcontrol' --header 'fiware-servicepath: /casacampo' -d @- <<EOF

{ "devices": [ { "device_id": "tfmiot_prototipo_nodobonzo", "entity_name": "tfmiot_prototipo_nodobonzo", "entity_type": "LoraDevice", "timezone": "Europe/Madrid", "attributes": [ { "object_id": "bp", "name": "presion", "type": "Number" }, { "object_id": "day", "name": "day", "type": "Integer" }, { "object_id": "month", "name": "month", "type": "Integer" }, { "object_id": "year", "name": "year", "type": "Integer" }, { "object_id": "hour", "name": "hour", "type": "Integer" }, { "object_id": "minute", "name": "minute", "type": "Integer" }, { "object_id": "second", "name": "second", "type": "Integer" }, { "object_id": "rh", "name": "relative_humidity", "type": "Number" }, { "object_id": "t", "name": "temperature", "type": "Number" } { "object_id": "bateria", "name": "nivel_carga", "type": "Number" }, ], "internal_attributes": { "lorawan": { "application_server": { "host": "eu.thethings.network", "username": "nodobonzo_tfmiot", "password": "ttn-account-v2.jNjJEPbSgjRPN44p3_B0SXNiuxXTCuW0Ob05fnYc", "provider": "TTN" }, "dev_eui": "006B579133ED7384", "app_eui": "70B3D57ED0011F99", "application_id": "nodobonzo_tfmiot", "application_key": "72CB543BC7342252199E42E17B8A0", "data_model": "cayennelpp" } } } ] } EOF {"name":"SyntaxError","message":"Unexpected token { in JSON at position 1114"}ubuntu@ip-172-31-39-47:~$

Could you help me?

Thanks

dcalvoalonso commented 6 years ago

There were a couple of very minor errors in your JSON payload:

The correct one is:

{
    "devices": [{
        "device_id": "tfmiot_prototipo_nodobonzo",
        "entity_name": "tfmiot_prototipo_nodobonzo",
        "entity_type": "LoraDevice",
        "timezone": "Europe/Madrid",
        "attributes": [{
                "object_id": "bp",
                "name": "presion",
                "type": "Number"
            },
            {
                "object_id": "day",
                "name": "day",
                "type": "Integer"
            },
            {
                "object_id": "month",
                "name": "month",
                "type": "Integer"
            },
            {
                "object_id": "year",
                "name": "year",
                "type": "Integer"
            },
            {
                "object_id": "hour",
                "name": "hour",
                "type": "Integer"
            },
            {
                "object_id": "minute",
                "name": "minute",
                "type": "Integer"
            },
            {
                "object_id": "second",
                "name": "second",
                "type": "Integer"
            },
            {
                "object_id": "rh",
                "name": "relative_humidity",
                "type": "Number"
            },
            {
                "object_id": "t",
                "name": "temperature",
                "type": "Number"
            },
            {
                "object_id": "bateria",
                "name": "nivel_carga",
                "type": "Number"
            }
        ],
        "internal_attributes": {
            "lorawan": {
                "application_server": {
                    "host": "eu.thethings.network",
                    "username": "nodobonzo_tfmiot",
                    "password": "ttn-account-v2.jNjJEPbSgjRPN44p3_B0SXNiuxXTCuW0Ob05fnYc***",
                    "provider": "TTN"
                },
                "dev_eui": "006B579133ED7384",
                "app_eui": "70B3D57ED0011F99",
                "application_id": "nodobonzo_tfmiot",
                "application_key": "72CB543BC7342252199E42E17B8A0***",
                "data_model": "cayennelpp"
            }
        }
    }]
}
jomarequena commented 6 years ago

Hi Daniel,

I think I already have it, but after lifting I get the following error:

iotagent-lora_1 | time=2018-09-17T18:21:13.973Z | lvl=DEBUG | corr=14b8c5b8-561f-46c4-8dc3-1b0b005782ec | trans=14b8c5b8-561f-46c4-8dc3-1b0b005782ec | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=n/a | subsrv=n/a | msg=Looking for device with id [tfmiot_prototipo_nodobonzo]. | comp=IoTAgent iotagent-lora_1 | info: IOTA provisioned devices: {"_id":"5b9944ff5f95b50fb03589be","internalAttributes":[{"lorawan":{"application_server":{"host":"eu.thethings.network","username":"nodobonzo_tfmiot","password":"ttn-account-v2.jNjJEPbSgjRPN44p3_B0SXNiuxXTCuW0Ob05fnYc6IY","provider":"TTN"},"app_eui":"70B3D57ED0011F99","application_id":"nodobonzo_tfmiot","application_key":"72CB543BC7342252199E42E17B8A0747","data_model":"cayennelpp","dev_eui":null}}],"subservice":"/casacampo","service":"smartFire","name":"tfmiot_prototipo_nodobonzo:LoraDeviceGroup","type":"LoraDeviceGroup","id":"tfmiot_prototipo_nodobonzo","creationDate":"2018-09-12T16:55:27.887Z","subscriptions":[],"staticAttributes":[],"commands":[],"active":[{"object_id":"bp0","name":"barometric_pressure_0","type":"Number"},{"object_id":"rh2","name":"relative_humidity_2","type":"Number"},{"object_id":"t1","name":"temperature_1","type":"Number"}],"lazy":[]} iotagent-lora_1 | info: Decoding CaynneLPP message:AWgBagJzbbQDZwNnBAAUBQAVBgAA iotagent-lora_1 | error: Error decoding CaynneLPP message:Error: Invalid CayennLpp channel iotagent-lora_1 | error: Could not cast message to NGSI iotagent-lora_1 | info: New message in topic nodobonzo_tfmiot/devices/tfmiot_prototipo_nodobonzo/up iotagent-lora_1 | time=2018-09-17T18:21:43.476Z | lvl=DEBUG | corr=14b8c5b8-561f-46c4-8dc3-1b0b005782ec | trans=14b8c5b8-561f-46c4-8dc3-1b0b005782ec | op=IoTAgentNGSI.MongoDBDeviceRegister | srv=n/a | subsrv=n/a | msg=Looking for device with id [tfmiot_prototipo_nodobonzo]. | comp=IoTAgent iotagent-lora_1 | info: IOTA provisioned devices: {"_id":"5b9944ff5f95b50fb03589be","internalAttributes":[{"lorawan":{"application_server":{"host":"eu.thethings.network","username":"nodobonzo_tfmiot","password":"ttn-account-v2.jNjJEPbSgjRPN44p3_B0SXNiuxXTCuW0Ob05fnYc6IY","provider":"TTN"},"app_eui":"70B3D57ED0011F99","application_id":"nodobonzo_tfmiot","application_key":"72CB543BC7342252199E42E17B8A0747","data_model":"cayennelpp","dev_eui":null}}],"subservice":"/casacampo","service":"smartFire","name":"tfmiot_prototipo_nodobonzo:LoraDeviceGroup","type":"LoraDeviceGroup","id":"tfmiot_prototipo_nodobonzo","creationDate":"2018-09-12T16:55:27.887Z","subscriptions":[],"staticAttributes":[],"commands":[],"active":[{"object_id":"bp0","name":"barometric_pressure_0","type":"Number"},{"object_id":"rh2","name":"relative_humidity_2","type":"Number"},{"object_id":"t1","name":"temperature_1","type":"Number"}],"lazy":[]} iotagent-lora_1 | info: Decoding CaynneLPP message:AWgBaQJzbbMDZwNnBAAUBQAVBgAeAgcCDQ== iotagent-lora_1 | error: Error decoding CaynneLPP message:Error: Invalid CayennLpp channel iotagent-lora_1 | error: Could not cast message to NGSI orion_1 | time=Monday 17 Sep 18:21:47 2018.956Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[701]:runCollectionCommand | msg=Database Operation Successful (command: { listDatabases: 1 }) orion_1 | time=Monday 17 Sep 18:21:47 2018.960Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[94]:collectionQuery | msg=Database Operation Successful (query: {}) orion_1 | time=Monday 17 Sep 18:21:47 2018.961Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[94]:collectionQuery | msg=Database Operation Successful (query: {}) ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

Could you help me?

Thanks

dcalvoalonso commented 6 years ago

As you can see in the log file:

iotagent-lora_1 | info: Decoding CaynneLPP message:AWgBaQJzbbMDZwNnBAAUBQAVBgAeAgcCDQ==
iotagent-lora_1 | error: Error decoding CaynneLPP message:Error: Invalid CayennLpp channel
iotagent-lora_1 | error: Could not cast message to NGSI

The problem now is that your CayenneLpp seems not to be valid. I have checked it and the problems are that you are using channel number above 100 which is not possible in our current implementation. There is also a problem with the size of the message since you are trying to use more than 11 bytes. You should split the message in two parts.

dcalvoalonso commented 6 years ago

Dear @jomarequena , have you been able to solve this problem?

dcalvoalonso commented 6 years ago

Since this issue has not had any activity for more than seven days, I will close it.

Please, don't hesitate in re-open it if you consider necessary @jomarequena.