cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

using Multitech Conduit EdgeMicroserver

pjoly
11-Garnet

using Multitech Conduit EdgeMicroserver

Hello

I have a Multitech Conduit with lorawan card.

I have installed the EMS in it from the maketplace and connected it to Thingworx ...

I can see the gateway associated Thing ("is connected" to true) but the document doesn't describe how to configure/send the data from the multitech to Thingworx (to get the lorawan payload and other information)

Is there something similar available somewhere ?

Regards..

30 REPLIES 30
cgerdes
5-Regular Member
(To:pjoly)

Hi Pascal,

congratulation for your successful installation!

Now let's get your task done.

As far as I can say, your may get the right principles in this tutorial:

http://developer.thingworx.com/guides/thingworx-java-sdk-tutorial​ (and look at STEPS>Filetransfer, e.g.)

(I'm not aware of one better fitting to your special case, someone else?)

I think, if you got the principles of the Edge MicroServer, your are almost there.

Or, you may ask a more detailed question, if my answer does not help you here.

Happy thinging...

CG

pjoly
11-Garnet
(To:cgerdes)

Hello

Thanks I'll look at this ...

To be more detailed on this , before Thingworx  I was using MQTT (in multitech  node-red) to get the data from the multitech conduit (as publisher)  into my server where I decoded the payload and stored data into a mysql Database (scripts python) for further analysis and web reports.

I'm trying to do all these steps directly into Thingworks

I have also other sources of data (other things)  I'm receiving from a cloud server on a websocket (should be the next connector)

Regards

cgerdes
5-Regular Member
(To:pjoly)

Hi,

ok, thanks for the details.

I must say, that I havn't tried THAT myself, so I would like some others to answer here.

But theoretically speaking this should be no problem, because of the ability to use Java-snippets and scripts.

And if you have the EMS working so far, you should be able to transfer your payload to Thingworx, where you can extract it and store it in your thing-attributes.

Happy thinging... ;o)

CG

Hi pjoly,

It is a much needed help. I am using multitech conduit which has established a PPP link with a cellular network. i basically want to send packets from the conduit to a thing in the thingworx platform. It appears to be that it is kind of similar what you did so please guide me with this. FYI, i am using MQTT clients to sent some dummy data to a property created in Thingworx already.

Waiting anxiously for your answer.

Best Regards

Yasmin Rumana

pjoly
11-Garnet
(To:ryasmin-2)

Hello Yasmin

If you have already your MQTT broker deployed and connected to ThingWorx MQTT extension, this is quite easy for Multitech.

I'm using node red and I just used the MQTT connector to publish the data to the broker "uplink"  (I also subscribed to another queue to send data to device "downlink") :

2017-03-20 07-50-19.png

I used the same topics into MQTT extension in Thingworx and I receive the data on a property with the same name (see extension documentation in the pdf attached to the extension)

2017-03-20 07-53-49.png

Hope it helps

Pascal

Hi Pascal,

Thanks alot for the information. We are using our own sensor nodes, whose data i receive at the multitech conduit using mosquitto. Now i have to publish this data (received in the multitech base station from sensor) to Thingworx. The MQTT broker is in place and also the MQTT extension is imported in the Thingworx. Could you please give some steps to follow for such a scenario? Do i have to use red-node in this case as well?

FYI, I have never used red-node. Previously i created a property on thingworx i.e Temperature and send a random value from the base station using mosquitto_sub script from the conduit's terminal. Also should the name of 'server name' on ThingWorx while creating a 'Thing' be some specific name or it could be any random name?

Thanks in advance.

Best Regards

Yasmin Rumana

pjoly
11-Garnet
(To:ryasmin-2)

Hello

yes you have to use node-red to connect your Multitech conduit to MQTT , this is the simplest way as it is a graphical tool

You can access it from the multitect web HMI in the menu Apps->node-red (or with the IP of the conduit and the port 1880 by default. Same login and password than for multitech web HMI)

you have some videos to train on multitech site but it is very easy you'll see , like a game ;-)

http://www.multitech.net/developer/software/lora/conduit-aep-lora-communication/

But perhaps it is more a multitech oriented topics rather than a Thingworx and you can find solutions/helps/tutos on Multitech community

Pascal

Hi Pascal,

Thanks for the information. yet i am getting a strange issue with the node-red deployent, the messages says Error:Lost connection to server. Could you please give some hints on this one. Please also refer to the Image attached hereby.lost.png

BR

Yasmin

pjoly
11-Garnet
(To:ryasmin-2)

Hello

I have no real idea. I did not face this issue

are you sure your port 1880 is accessible from your client ?

regards

Hi Pascal,

Thanks for your information. Now the server is connected and I am able to see the message payload when lora is connecting to debug.

Could you help me to write the function on Node red for transfer packet to the Thingworx Using MQTT mosquitto? I did not understand the format of the function.

BR

Yasmin Rumana

pjoly
11-Garnet
(To:ryasmin-2)

hello

if you just need the message payload you just have to connect "lora" to "MQTT" in node red (and configure this MQTT box with your broker information )

You must use the same "topic" to publish in Node-red and to subscribe in Thingworx

(you can test with any MQTT client to see what you are receiving to be sure )

I created a function to add information (RSSI, SNR, gateway id, etc ...) to the message payload  itself but it is not necessary

Pascal

Hi pascal,

THanks alot for your help.

I have connected only lora and mqtt according your instructions but I didn't see anything on property setting value. I set the format on json. Do you have any idea to set the property format on thingworx and how could i see the message payload on the thingworx?

pjoly
11-Garnet
(To:ryasmin-2)

1/ shoud should enable the auto mapping

2/ After You should have the same name in the MQTT thing property and in the subscribtion in Configuration

Configuration :

Properties

after you'll get your message from device in this property (downlink is not working but uplink from device yes)

Hi Pascal,

thanks alot for your support and guidance. Finally, i managed to observe the payload on thingworx. Yet, when i connect multiple sensor nodes, i cannot differentiate the payload from each one. As far as i understand, i have to configure the gateway( or add some function) on node-red accordingly.

Any thoughts on this one?

Yasmin Rumana

pjoly
11-Garnet
(To:ryasmin-2)

thanks alot for your support and guidance

you can recommand my answers to encourage myself  

to differentiate devices I took inspiration from Sigfox extension documentation :

the main principle (you will have to search deeper  in Thingworx documentation to code)

1/ create a subscription service to the MQTT thing for exemple "UpdateData()"

this service will be call each time you will publish on MQTT from multitech

2/ Create your thing template (for your devices) and add this EUI property

create your things manually from this template and set the right EUI for your device manually

(or more advanced :  create a service for auto provisionning your devices when you will get unknown EUI in the next step 4/ )


3/ in the UpdateData() extract the EUI from the Json received from MQTT


4/ create a service  which will return the thing name associated to an EUI

for example :

var query = {

  "filters": {

    "fieldName": "EUI",

    "type": "EQ",

    "value": EUI

  }

};

var params = {

  query: query

};

var things = ThingShapes["LorawanShape"].QueryImplementingThingsWithData(params);

if(things.getRowCount() > 0) {

  var result = things.rows[0].name;

} else {

  var result ="";

}

5/  update your thing properties knowing the thing name

Hi Pascal,

pjoly

I couldn't quite get what are you refering to? The idea is that, when i connect multiple sensor nodes to the gateway, i can observe data(Payload+EUI etc.) from multiple sensor nodes transmitting simultaneously which i can distinguish by their EUI. Similarly, i want to see the payload on Thingworx including their respective EUI. Currently contrary to what i require, i can see the payload only when multiple sensor nodes are transmitting at a time (i don't know from which sensor node the paylaod is coming from as the payload is similar in all the connected nodes). Moreover i can define only one property on Thingworx.

Do i have to add a function which could tell the EUI information of the sensor node and payload also?. Or if i have to follow the instructions you sent in the last reply, please elaborate a bit where i should define that 'code'?

P.S. How could i recommend your answers. Please let me know as i don't know how to do it.

Thanks a million!

pjoly
11-Garnet
(To:ryasmin-2)

hello

to get extra data from the multitech you need to insert a node between 'lora' and "mqtt" (see my screen copy it is "full message into payload"

I inserted EUI, gateway Id, gateway type etc ..; into the payload and tarnsfer it to MQTT

for exemple :

/*

"msg": {

  "chan": 5,

  "codr": "4/5",

  "datr": "SF7BW125",

  "freq": "903.3",

  "lsnr": "85",

  "modu": "LORA",

  "rfch": 1,

  "rssi": -55,

  "size": 12,

  "timestamp": "2015-04-09 16:22:12",

  "tmst": 67346764,

  "payload": "hi mike",

  "eui": "00:11:22:33:44:55:66:88"

}

*/

var chaine =

    "{\"EUI\":\""+ msg.eui +

        "\",\"chan\":" + msg.chan +

        ",\"rfch\":" + msg.rfch +

        ",\"port\":" + msg.port +

        ",\"seqn\":" + msg.seqn +

        ",\"rssi\":" + msg.rssi +

        ",\"tmst\":" + msg.tmst +

        ",\"freq\":\"" + msg.freq +

        "\",\"codr\":\"" + msg.codr +

        "\",\"lsnr\":\"" + msg.lsnr +

        "\",\"datr\":\"" + msg.datr +

        "\",\"timestamp\":\"" + msg.timestamp +

        "\",\"gw\":\"00:00:00:00:00:00\"" +

        ",\"source\":\"multitech\"" +

        ",\"payload\":\"" + msg.payload.toString('hex') +

    "\"}";

var newMsg = { payload : chaine };

return newMsg;

Hi pascal,

Thanks alot for your support. By your suggestions i have successfully deployed the whole setup. I owe you a great deal. I can see the data from sensor nodes on the thingworx propertty. Now, when i send data from multiple sensor nodes, it overlaps the data on thingworx everytime. Is there a way to get it separately at the same  on thingworx when send  from both sensir nodes?

yasmin

pjoly
11-Garnet
(To:ryasmin-2)

Hello

As I explained you ealier you need to create one thing per device (with its right EUI Lorawan) and dispatch the data to the right thing depending of the EUI field when you receive a message from MQTT

You have only one channel from the gateway to Thingworx so you have to dispatch at reception

Regards

Hi pascal,

Thanks.

Actually i am using mosquitto.org as a server to communicate between multiconnect conduit and thingworx. I want to create own server for communication using MQTT. when i use another server IP (any dummy IP) that i defined in the mosquitto.conf file. It is not connected to thingworx. I am confused about the server creation. Do i need to create own server or configure this mosquitto.Conf file in the multitech conduit? Could you please explain the server i defined in thingworx i.e mosquitto.org?

Yasmin

Hello Yasmin,

Maybe this two links can help you :

MQTT support in ThingWorx

The second part of this thread (Testing the MQTT extension in Thingworx) is describing the configuration of Mqtt extension and how to exchange property value . It will provide you more details on "server name".

Securing MQTT connection to Thingworx platform

This link could be useful if you want to establish a secured connection between you Multitech conduit and the Thingworx platform

I hope this help you.

-Franck

Hi Franck,

Thanks for the links and information. Those were very helpful.

BR

Yasmin

Hi pjoly,

I am using mosquitto.org as a broker to trsnsmit packet from multitech conduit to thingworx. It means, i am using another server i.e. mosquitto.org. so the packet flow like this: multitech conduit->mosquitto.org->Thingworx. Is it right?

But I want to create my own mosquitto broker. Do you have any idea how i create mosquitto broker to transmit packet from conduit to thingworx? As multitech conduit have already mosquitto.conf file. Should i change this file to create my own server? What is the serverName when i configured 'Thing'?

Regards

pjoly
11-Garnet
(To:ryasmin-3)

Hello

I installed my own mosquitto server on Ubuntu following some guides found on internet (there are a lot)

after I just configured node-red MQTT in the multitech conduit accordingly (server IP/name, port, login, password and topic)

I did not used mosquitto;conf on the conduit, I did all with node-red.

Hi pascal,

Thanks a lot.

I did install mosquitto broker/server in my laptop (ubuntu) but i am confused with the IP address to be mention in the thingworx. What server name/ Ip address should i place on thingworx? Is it the loop back IP or my wlan inet address of my laptop? Please suggest accordingly.

pjoly
11-Garnet
(To:ryasmin-3)

I don't know. i installed everything on different servers in different locations and I access from another one to developp with thingworx composer.

perhaps you could try "localhost"

Hi pascal,

Actually i don't understand what server name should i used on thingworx. Is there any public mosquitto server like mosquitto.org? Or i can create my own server which can further connect to thingworx? If i create my own server on my laptop, does it connects to thingwork ?

pjoly
11-Garnet
(To:ryasmin-3)

MQTT Thing / Configuration / Server Name

Got it. Could you please provide me a link, explaining creation of MQTT server of own. I am actually looking for particular details like server name, IP adress etc which i have to put in thingworx keeping in view the same configurations on the conduit. I don't actually know what IP address i have while i create my own mosquitto server on my laptop.

Urgent help needed! I appreciate it

Top Tags