FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
500 views 2 comments
by anonymous
Hi,

I have I hope a simple question, how do I send data via Azure MQTT without using the modbus datasource.

Our requirement is rather simple in theory:

1) Read signal data from the Input, it can come (go from low to high) 5 times per second or 1 time per minute, store that in a counter
2) Once every x seconds, send that counter via MQTT to the Azure cloud

Step 1 we can probably accomplish via the I/O Juggler logic and a (batch?)script to write the counter to a file.
But how do I take that counter and send it via MQTT to the Azure cloud.

We are currently looking into accomplishing this using a TRB255 device.

Thank you in advance for any pointers you can give me.

1 Answer

0 votes
by anonymous

Hello, 

For this question of yours, there is no actual full solution that will be coming from our side. But I will give my thoughts about the solution you want to build. 

1) Read signal data from the Input, it can come (go from low to high) 5 times per second or 1 time per minute, store that in a counter
-> TRB device doesn't have any built-in counter so you will need to do some scripting for this counter feature  + in order to send it as a MQTT data I believe you will also need custom scripting for it or additional firmware changes for the MQTT feature because as default the parameters that it can read is found in this link:  Monitoring via MQTT - Teltonika Networks Wiki (teltonika-networks.com)

2) Once every x seconds, send that counter via MQTT to the Azure cloud
-> As mentioned on the previous point it would require custom scripting from your side. 

The sending part of that counter data will also require custom scripting and maybe additional firmware changes will be needed so it would be best to check these things with your sales account manager.

Here is a document configuration file for Azure IoT Hub in RUT955 but the same configuration will be applied in TRB255:
https://mega.nz/file/LttQEILC#Bp2tlUYWlIKqNjG_iKtu0mMd8P0-JPX5-miHmQtO7gM

I hope it somehow helps.

Regards,
Mellow


 

by anonymous
Hi Mellow,

Thank you for your answer. My question should have been a bit clearer I think. The gist of it is:
Can I ask the Azure IoT hub directly to send "this data" to the cloud via MQTT from a script? And if so, what is the command or where can I find the command(s) to do that.

If not, my next question would be, can a package tell the IOT hub to send "this data"?

Thank you in advance for your time.
by anonymous

Hello, 

I have received the reply from or HQ about this query of yours:

There's is no option to select custom data that could be sent to the Azure IoT hub, especially when there's no default parameter for the input counter.

The idea could be using MQTT forward data to Azure by requesting data from the device itself using MQTT, but once again no option to input counter. 

For such feature, additional development would be required.

If the customer planning development feature himself, SDK  could be used. Additionally, there's the option to download the Azure package from the wiki, which customers then try to modify according to its needs. 

For the commands, the standard would be the "azure_iothub" SSH command, but customers can use the command "find / -name "*azure*" to see all scripts and configuration files related to the Azure IoT hub feature.

To sum all things up we need to request additional research and development for this feature where the customer must contact his/her sales account manager to proceed with the request.  

But if you are willing to do it on your own the SDK file is available at this link: GPL - Teltonika Networks Wiki (teltonika-networks.com)
Only that customizations and revisions on the SDK, the client will be responsible and we cannot provide further support.

Thank you and have a nice day!

Regards,
Mellow