[Backlogmanager] [FIWARE-JIRA] (HELP-15863) FIWARE.Question.Tech.What' s the right way to create a mosquitto subscription with a device and IoTAgent-UL.

Mohamed Sadiq (JIRA) jira-help-desk at jira.fiware.org
Thu Nov 28 15:42:00 CET 2019


     [ https://jira.fiware.org/browse/HELP-15863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mohamed Sadiq reassigned HELP-15863:
------------------------------------

    Assignee: Jose Gato Luis

> FIWARE.Question.Tech.What's the right way to create a mosquitto subscription with a device and IoTAgent-UL.
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HELP-15863
>                 URL: https://jira.fiware.org/browse/HELP-15863
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: Jose Gato Luis
>              Labels: fiware, mqtt
>
> Created question in FIWARE Q/A platform on 29-05-2019 at 21:05
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/56367445/whats-the-right-way-to-create-a-mosquitto-subscription-with-a-device-and-iotage
> +Question:+
> What's the right way to create a mosquitto subscription with a device and IoTAgent-UL
> +Description:+
> I'm currently developing a Fiware based network, in which I have devices that report via HTTP and JSON over MQTT and work fine. The network has increased and now I need to attach some devices that use the UltraLight protocol. Doing so, I encountered some troubles.
> I followed (to the best of my knowledge) the official documentation provided by the FIWARE Foundation in different sites (the official github repo, readthedocs, and so on). I tried installing the new agent on the same machine as the JSON agent, and it didn't work -more on that later-. In order to discard any conflicts, I used another VM in which -over Docker this time- I deployed a new instance of Orion CB, Mosquitto CB, mongo and the agent; a new complete stack of Fiware, basically.
> After everything was deployed, I created a new service group on the agent via the rest API (POST /iot/devices), gave it an api key and the CB address. In this step I left the resource field empty, because I don´t really know what role does it play in the whole system. The response was 201, as expected.
> The next step was to provision a device, which I did by POSTing to agent/iot/devices with the attributes I wanted, and the api key mentioned in last paragraph. Once again, the response was 201.
> The problem arises when I try to publish a new measurement using mosquitto_pub. The command runs smoothly but the entity in Orion does not get updated. Accessing Orions DB (mongo) I can check that the entity was created successfully but it has an empty value. Moreover, checking the logs yields the following:
> mosquitto    | 1559157902: New connection from 10.150.150.173 on port 1883.
> mosquitto    | 1559157902: New client connected from 10.150.150.173 as mosqpub|28750-mqtt (p1, c1, k60).
> fiware-iot-agent | time=2019-05-29T19:25:02.374Z | lvl=DEBUG | corr=2c8aa6e3-faab-4166-9e20-0b362c165939 | trans=2c8aa6e3-faab-4166-9e20-0b362c165939 | op=IoTAgentNGSI.MongoDBGroupRegister arams ["resource","apikey"] with queryObj {"resource":"/iot/d","apikey":"apikeymia"} | comp=IoTAgent
> fiware-iot-agent | time=2019-05-29T19:25:02.381Z | lvl=DEBUG | corr=2c8aa6e3-faab-4166-9e20-0b362c165939 | trans=2c8aa6e3-faab-4166-9e20-0b362c165939 | op=IoTAgentNGSI.MongoDBGroupRegister elds [["resource","apikey"]] not found: [{"resource":"/iot/d","apikey":"apikeymia"}] | comp=IoTAgent
> fiware-iot-agent | time=2019-05-29T19:25:02.382Z | lvl=ERROR | corr=2c8aa6e3-faab-4166-9e20-0b362c165939 | trans=2c8aa6e3-faab-4166-9e20-0b362c165939 | op=IOTAUL.Common.Binding | srv=n/a | essing device measures [/apikeymia/motion003/attrs] | comp=IoTAgent
> mosquitto    | 1559157902: Client mosqpub|28750-mqtt disconnected.
> (sorry about the format, first time asking and I couldn't find how to format the code section)
> after each try of publishing a new meassurment.
> Any help would be appreciated



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

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