Hello
I want to send some data from an power sensor to a website using Data-Push-HTTP.
On tne commandline it works with wget --post-data '{"watt":120}' https :// webseite . de
How I tried it you can see in the attached pic.
But it does not work.
* Is there a way to debug the way domoticz creates the URL, to see if it is correct?
* the second problem is, the Value %v is a number like 123 . 12, but the website only accept 123
* Is there a way to manipulate the data before sending them?
In the Log i only can see:
HttpLink: sending global variable Watt with value: -256 . 00
HttpLink: response Unexpected error occurred.
Thanks for help.
Sorry about the blanks, but it seems not to be allowed to send urls und numer with dots.
Howto modify data in DATA-PUSH HTTP?
Moderators: leecollings, remb0
-
- Posts: 2
- Joined: Wednesday 20 December 2023 12:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Howto modify data in DATA-PUSH HTTP?
- Attachments
-
- problem.jpg (85.89 KiB) Viewed 282 times
-
- Posts: 661
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Howto modify data in DATA-PUSH HTTP?
I assume you use dzVents.
* Is there a way to debug the way domoticz creates the URL, to see if it is correct?
You can send the url to the logfile and inspect it
domoticz.log("this is the url:"..yourUrl,domoticz.LOG_INFO)
* the second problem is, the Value %v is a number like 123 . 12, but the website only accept 123
you can round it to zero decimals
domoticz.utils.round(yourValue,0)
* Is there a way to manipulate the data before sending them?
yes, with dzVents you can do a lot
* Is there a way to debug the way domoticz creates the URL, to see if it is correct?
You can send the url to the logfile and inspect it
domoticz.log("this is the url:"..yourUrl,domoticz.LOG_INFO)
* the second problem is, the Value %v is a number like 123 . 12, but the website only accept 123
you can round it to zero decimals
domoticz.utils.round(yourValue,0)
* Is there a way to manipulate the data before sending them?
yes, with dzVents you can do a lot
-
- Posts: 2
- Joined: Wednesday 20 December 2023 12:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Howto modify data in DATA-PUSH HTTP?
Hello,
thanks for your respond. I am not very familiar with dzvents.
How do I get my dzvents posted here in the forum to show what I want to do?
I allways get an error that it is not allowed to post urls an other commands like domoticz (dot) openURL
I need to read the data of my power meter an strip the ending .00, then put this in postData = {"text" : powerdata} of domoticz . openURL
Markus
thanks for your respond. I am not very familiar with dzvents.
How do I get my dzvents posted here in the forum to show what I want to do?
I allways get an error that it is not allowed to post urls an other commands like domoticz (dot) openURL
I need to read the data of my power meter an strip the ending .00, then put this in postData = {"text" : powerdata} of domoticz . openURL
Markus
Who is online
Users browsing this forum: No registered users and 1 guest