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
735 views 6 comments
by anonymous

I'm sending I/O statuses to Losant (IoT) platform using the Data to Server feature. It works great as with this setup:

I'm receiving this in Losant:

Note that the object is not perfect, I'm not too sure why.

I want to receive the data on change of input, not just every X seconds. I've tried the I/O juggler for this:

I'm not receiving anything from the I/O juggler, any idea what difference between these two function could cause a problem?

Cheers

Jules

1 Answer

0 votes
by anonymous

Hello, 

I have tested it on my side using a local platform (Hercules). And I am able to receive data using IO Juggler and Modbus. 

For the comparison, Modbus data is based on registers and numbers you need to have a platform that will allow you to convert Modbus data to readable text. But from the HTTP post, you can specify the data that you want to get to readable data. 



Clearer image: https://prnt.sc/wz1bhs

For your issue about the I/O Juggler not sending data could you try disabling the Verify option and check if you are able to receive the data from the platform you are using. 


Let me know the results 

Regards,
Jerome

by anonymous
Hi Jerome,

Thanks for your answer. I have tested without the "checked verify" and had the same issue.

I have tested both solutions with https://webhook.site/ and I'm receiving the data properly with the I/O juggler.

By trying to find the issue I figured that the input field for the URL in the I/O juggler action doesn't take all the characters, there must be a length limit?

The input field only takes this:

https://triggers.losant.com/webhooks/fdF2AJx4n9tkR2bc5UoPCpoXBA2

and I need this:

https://triggers.losant.com/webhooks/fdF2AJx4n9tkR2bc5UoPCpoXBA2I2dOe9pSBYkwt

(note that these URL have been disabled now)

Any way we can increase the number of characters' limit? The Data To Server doesn't have this problem, I'm guessing it's only an easy bug to fix? FYI I'm running on TRB1_R_00.02.06

Further to my query, how can I change the content-type from "application/x-www-form-urlencoded" to "application/json"?

Cheers

Jules
by anonymous

Hello, 

For the issue you are having you can temporarily do it using UCI commands. 

1. Run uci show iojuggler in CLI.
2. Look for the link line where contains the url. 
It should be contained on this variable:  iojuggler.@action[1].url 
Full line similarly like this: iojuggler.@action[1].url='https://triggers.losant.com/webhooks/fdF2AJx4n9tkR2bc5UoPCpoXBA2'
3. After navigating that you can execute this command:

- uci set iojuggler.@action[1].url=https://triggers.losant.com/webhooks/fdF2AJx4n9tkR2bc5UoPCpoXBA2I2dOe9pSBYkwt
- uci commit iojuggler
- /etc/init.d/iojuggler restart

Note: iojuggler.@action[1].url must match with the result with uci show. 
 
For the question about changing the content-type, you need to do it via SDK file if you are capable of doing that. If not you may contact your sales manager to request additional development if the said changes are needed

For the limit URL issue, I will be informing our RnD Team and maybe there's a chance it will be included on the next firmware update. 

Hope it helps.

Regards,
Jerome




 

by anonymous
Thanks Jerome,

All sorted now.

While I'm here, I'm wanting to create a time accumulator that starts when an input is high and stops when low. Is there a way to create this with its own register that can be read as modbus data?

Cheers

Jules
by anonymous

Hello, 

Regarding customization of the features, it is possible with changes with the SDK or with custom scripting. 

You may refer to this link for the  SDK files: Software Development Kit - Teltonika Networks Wiki (teltonika-networks.com)

Hope it helps :) 

Regards,
Jerome

by anonymous
Thanks Jerome,

This is something I'd need to have done by someone else, any idea where I can find a custom scripting expert?

Cheers

Jules
by anonymous
Hello Jules,

You can try contacting your assigned sales manager for this additional development needed.

Thank you and have a nice day!

Regards,
Jerome