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
1,033 views 4 comments
by

As part of the development of a condition monitoring system we use the Teltonika Router RUT955 (Firmware Version: RUT9XX_R_00.06.07).

A test setup with various I/O-Link sensors connected to an I/O-Link master is used for this purpose. The digital sensor measured values are tapped using the Modbus protocol and transferred to the Condition Monitoring Software.

Now we will try to establish the Modbus connection directly via the router and forward the received Modbus data to the IP address of the Condition Monitoring Software.

For this purpose, we have configured the Modbus TCP slave and the Modbus TCP slave device in the router menu under Services/Modbus, and have tested them successfully. The test has returned the desired, correct value.

However, the problem now is to correctly perform the configuration "Modbus data to server". We have added a new Modbus data sender, named it and selected http(S) as transmission protocol. In the field JSON format we have specified the following values: {"stationId": "1", datapointId": "99980009" "value": "%a"}. The sensor value is to be transferred to the Condition Monitoring Software, so we assumed that "%a" is a placeholder for it. For a better understanding you will find below an excerpt from the Condition Monitoring Software user manual on this topic:

POST a single datapoint, updating station 20001's name (datapoint 5000) to "Wasserbecken 1":

curl -X POST -d '{

"id": 0,

"stationId": 20001,

"datapointId": 5000,

"value": "Wasserbecken 1"

}' \

"https://$USERNAME:$PASSWORD@$SERVER/api/v1/datapoints“

In the field URL/Host/Connection string we have entered the address to which the data should be transmitted: https://192.168.1.128:8443/api/v1/datapoints.

The question now arises whether the verification by entering the user name and password at the destination address should be carried out by inputting these according to the scheme of the above example (https://$USERNAME:$PASSWORD@$SERVER/api/v1/datapoints) or whether a different procedure is planned for this. We have executed both variants and in both versions we did not receive a result in the form of a reported measured value in the software.

Which values are expected in the last field "Custom header"?

Many thanks in advance.

1 Answer

0 votes
by anonymous
Hi,

Could you define what kind of server you're using? From syntax I see that you're trying to use basic authentication for HTTP(S), but could you tell me in more detail what you're running?

EB.
by anonymous

Exactly, we have tried to use HTTP basic authentication, but could not get any result. After consulting a colleague we tried again by encoding the authentication data with Base64. Unfortunately this attempt also failed.

Although I have consulted my colleagues, I cannot answer your question about the exact server type more precisely...

by anonymous
Hi again,

As there is no way then I can test this, could you try disabling authentication and trying to send data without it?

EB.
by anonymous

unfortunately we cannot disable the authentication...

 

by anonymous
In this case, I can't really test where could be the problem. Maybe you have another server where this Modbus information could be passed without authentication and see if it works normally?