Hi ladies and gentlemen,

i installed two lorawangateways for testing and have a adeunis gps tracker test device. i am receiving perfectly the data and wondering how to get the data to flespi? As i understand TheThingsNetwork can talk mqtt but as a receiver? and not transfering it to flespi via mqtt?
Any hint on how to get the data from TTN to Flespi?
Thanks
Wolf.

  • dexif and ysv like this.
  • Dear Wolf,

    You can use flespi MQTT channel in order to consume data from TTN.
    First you need to understand MQTT connection string, authorization data and correct topics, you can try everything with MQTT Board. With this tool you will be able to see what kind of data you may receive into flespi from TTN. Once checked and data analyzed you may create channel with protocol=mqtt, subscribe it to correct topic and configure.

    Then you may create flespi devices of type MQTT generic with corresponding ident and your messages will be accumulated into devices. And from that point you may do various analytics tasks over data, render it into MQTTTiles dashboard or just stream to Wialon for further processing.

Dear Wolf,

You can use flespi MQTT channel in order to consume data from TTN.
First you need to understand MQTT connection string, authorization data and correct topics, you can try everything with MQTT Board. With this tool you will be able to see what kind of data you may receive into flespi from TTN. Once checked and data analyzed you may create channel with protocol=mqtt, subscribe it to correct topic and configure.

Then you may create flespi devices of type MQTT generic with corresponding ident and your messages will be accumulated into devices. And from that point you may do various analytics tasks over data, render it into MQTTTiles dashboard or just stream to Wialon for further processing.

To findout MQTT connection information fort TTN broker probably this link can help you: https://www.thethingsnetwork.org/docs/applications/mqtt/api.html

Also you may look into the possibility for TTN to report to flespi broker, then for flespi broker connection information you may find here: https://flespi.com/mqtt-broker#configuration

The scheme is like this: devices=>LoRa GW=>TTN=>Broker<=flespi-channel
Both devices and flespi channel should be connected to same broker - it can be TTN broker or flespi broker - upon your desire.

5 days later

great going to do it this way. sorry for late reply, i did not get notification from forum (also i enabled it?)

Best regards
Wolf.

hi dexif, i did :-)
now i received... i will check my spam...

10 days later

Hi Guys,

uff, long way to understand this a bit more...

If i understand (and testet) everything correct, than TTN (TheThingsNetwork) AND Flespi are both! MQTT Broker. But MQTT broker can not stream data FROM another MQTT Broker. So if i read and understand your 2nd text correct than Flespi can ALSO work as a MQTT Client (and subscribe to mqtt topics)

For example my testdevice in mqtt://eu.thethings.network is "hilltronic/devices/wolfgangadeunis/up" which i receive perfectly with any mqtt client.

So again, FLESPI can work also as MQTT Client? Or do i need to setup MQTT Bridge to read/subscribe data from TTN and upload it to Flespi?

Thanks a lot
Wolf.

P.S. if i get my data into flespi from TTN, than next step is to push them via mqtt to my playground "thingsboard", than next is to upload standard gsm tracker into flespi and from there to wialon AND to thingsboard...

    WolfgangBusch yes, you just need to create flespi channel, select mqtt protcol and configure the channel to connect to TTN broker and subscribe to correct topic.
    In channel configuration, you may map various fields to the generated message. But this is next step, first you need to specify correct connection and subscription information.

    This article also may help you further: https://flespi.com/blog/custom-naming-scheme-for-mqtt-message-parameters

      ok, here come the solution (thanks to Aliaksey)...

      If you want to connect TheThingsNetwork to Flespi, you need to use the MQTT-Client Functionality of flespi.
      TTN is a mqtt broker, so you need to configure in flespi a "channel" from type MQTT.

      the USERNAME in flespi for the mqtt client (channel) is the APPLICATION ID in TTN (here "hilltronic".)
      The PASSWORD for the connection is the "default access key". (you can create an additional key for security reasons...) it starts with "ttn-account-v2xxxxxxxxxxx".
      URL for flespi = eu.thethings.network:1883 (if you use EU gateways).

      Than come the next; you need to subscibe! to a mqtt topic.
      This you can do by adding a new topic in flespi.

      If you want to subscribe to ALL objects/devices in one "application-id" you just do it like this:

      hilltronic/devices/+/up (where hilltronic=the application id and the "+" sign asks for all devices and the "up" the upstream.

      (for downlink i will write another text after i understood this :-)

      The last thing is to use the parameter conversion (see the ttn3.png),

      If i am deeper into this, i will also update it,.

      And you should create a device in flespi to see the results you are receiving...,

      After you have the date in Flespi, voila you can forward it to wherever you want.

      Enjoy!
      Wolf.



      Write a Reply...