It's still not clear.
Give an example of the URL format you want.
Make it clear which is the piece of data that you want sent with the URL.
The instruction requires only the value ...
What instruction?
Notice that in the previous post you replied to yourself!
1 Like
Yes, I have answered the question in my previous post for more clarification.
Give an example of the URL format you want.
I don't want the URL format, I just want to send the value for the specific URL.
Make it clear which is the piece of data that you want sent with the URL.
Value format sent in the URL :
(requires an integer or float or bool value)
(it's 234 or 234.67 or (0/1)
How?
For example, normally you would use GET key=value pairs.
https://https://chat.teamlocus.com/.../sns?test_provider=234.0
Are you trying to do this instead?
https://https://chat.teamlocus.com/.../sns/234.0
Again, please provide an example URL and explain which part is the variable data retrieved from values[0].value
.
Hi,
' I have written the script and it is working. Data is sent to third-party URLs at specific times. I have implemented the script in the gateway event using the tag change function
Script
current_time = system.date.now()
notification_start_time = system.date.setTime(current_time, 19, 0, 0) # Set start time to 7:00 PM
notification_end_time = system.date.setTime(current_time, 10, 0, 0) # Set end time to 10:00 AM (next day)
if current_time >= notification_start_time and current_time <= notification_end_time:
# Send notification only if current time falls within the specified range
paths = ["[test_provider]C_tag.value"]
values = system.tag.readBlocking(paths)
url = "http://third-party-url.com/endpoint"
payload = {paths[0]:values[0].value}
response = system.net.httpPost(url,payload)
My question is how to send data every hour according to a defined time range (19:00 to 10:00) until the data value becomes zero?
Also, I want to send different data with different formats. As (23.78 = chamber temperature, 45.90 = vapor temperature.)
Data currently sends it to a URL in this format.{"test_provider":"78.0"}
Test provider is a tag path