Closed filgiuff closed 5 years ago
Could you please include the log of the LoRaServer.io application server where the messages published in the MQTT topics can be seen? Please check https://www.loraserver.io/guides/troubleshooting/application-server/ in order to see what we expect, something like:
INFO[0186] handler/mqtt: publishing message qos=0 topic=application/1/device/0101010101010101/rx
INFO[0186] finished unary call with code OK grpc.code=OK grpc.method=HandleUplinkData grpc.request.deadline="2018-09-24T10:54:37+02:00" grpc.service=as.ApplicationServerService grpc.start_time="2018-09-24T10:54:36+02:00" grpc.time_ms=6.989 peer.address="[::1]:63536" span.kind=server system=grpc
We would need also to know which version of LoRaServer.io you are using.
Attached a piece of docker-compose logs about Lora components, including the LoRaServer.io application server.
I found some messages similar to the info you wrote (note "integration/mqtt" instead of "handler/mqtt")
... appserver_1 | time="2019-06-03T15:47:00Z" level=info msg="device-activation created" dev_eui=17446f057c1054a1 id=47 appserver_1 | time="2019-06-03T15:47:00Z" level=info msg="integration/mqtt: publishing message" qos=0 topic=application/4/device/17446f057c1054a1/join appserver_1 | time="2019-06-03T15:47:00Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=HandleUplinkData grpc.request.deadline="2019-06-03T15:47:01Z" grpc.service=as.ApplicationServerService grpc.start_time="2019-06-03T15:47:00Z" grpc.time_ms=214.142 peer.address="172.19.0.8:51134" span.kind=server system=grpc appserver_1 | time="2019-06-03T15:47:00Z" level=info msg="integration/mqtt: publishing message" qos=0 topic=application/4/device/17446f057c1054a1/rx ...
We are using version 2.8.1.
Hi,
There are several problems in your setup:
{
"devices": [{
"device_id": "17446f057c1054a1",
"service": "test",
"service_path": "/test_issues",
"entity_name": "17446f057c1054a1",
"entity_type": "Device",
"transport": "LORA",
"attributes": [{
"object_id": "barometric_pressure_2",
"name": "barometric_pressure_2",
"type": "number"
}
],
"lazy": [],
"commands": [],
"static_attributes": [{
"name": "location",
"type": "geo:point",
"value": "13.265,37.499444"
},
{
"name": "transport_protocol",
"type": "Text",
"value": "LORA"
},
{
"name": "dataformat_protocol",
"type": "Text",
"value": "CAYENNELPP"
},
{
"name": "opType",
"type": "Text",
"value": "pending"
},
{
"name": "organization",
"type": "Text",
"value": "8129657f-2bfb-46c9-a211-060816f514de"
},
{
"name": "device_owner",
"type": "Text",
"value": "7da190b8-6373-45a3-b95a-d3601ac8a2c9"
},
{
"name": "screenId",
"type": "Text",
"value": "17446f057c1054a1"
},
{
"name": "mobile_device",
"type": "Text",
"value": "false"
},
{
"name": "retrieve_data_mode",
"type": "Text",
"value": "push"
},
{
"name": "loraStack",
"type": "Text",
"value": "LORASERVER"
},
{
"name": "dateModified",
"type": "DateTime",
"value": "2019-06-07T10:19:35.00Z"
},
{
"name": "loraDeviceProfileId",
"type": "Text",
"value": "cbe12593-d29a-4fa2-ba46-4b993b9cad26"
}
],
"internal_attributes": {
"lorawan": {
"application_server": {
"host": "XXX.XXX.XXX.XXX:8090",
"provider": "loraserver.io"
},
"app_eui": "0000000000000000",
"application_id": "4",
"application_key": "2a65089d5c205645be0d6f17299dbae6",
"data_model": "cayennelpp",
"dev_eui": "17446f057c1054a1"
}
}
}]
}
All these changes have been merged. In order to try again, please clean all the previously registered devices in the IoT Agent.
I've tested this new version and it works fine. About your points:
About that I wrote in the previous post at 2). I've just noticed that it just works in an old instance, if I create a new instance of the agent it needs "provider": "loraserver.io" for LoRaServer and "provider": "TTN" for The Things Network.
In the first instance, something probably got dirty in the db.
Great! Then we can close this issue. :)
I installed the loraserver.io architecture and registered a real device, it sends measures and I see them subscribing to all topics of the MQTT broker.
Considering an application with name hCfjWFtMwX8l38x and loraServer id = 4 and a device with a DevEUI 17446f057c1054a1, I have these measures on this topic application/4/device/17446f057c1054a1/rx
I've tried to do the provisioning of this device on the IoTagent-LoRaWAN:
it creates the entity on Orion and these messages about Mqtt topic subscription appears on the agent log:
after other logs:
The entity on Orion is created correctly, but the value of the measure is empty
As you can see I've tried both barometer and barometer_2 as parameters.
Note that the topic where the measures arrive application/4/device/17446f057c1054a1/rx is different than the subscribed topic shown on the log message 4/devices/17446f057c1054a1/up
I also tried to change
but in any cases the result was always the same.
Did I any mistake or is there any issue on the agent ?
Full log attached