This comment has been minimized.
On your new script page please include these sections if relevant: Please add your new categories here!
Why GitHub? Gemakkelijker is een dzVents script, zodat stroom-, gas- en waterkosten met één script te zien zijn in Domoticz … Makes things much less flexible unfortunately.If a header line is terminated with crlf (\r\n) (which it should be according RFC 1945) then this might leave \r at the end in each vector item?Hmm I admit only checked if new lines would occur printing them, which doesn't when stopping at \n, but you're right, stopping at \r also prevents printing them. I already have a couple of those scripts that update some virtual devices like this.
This comment has been minimized. So were do we stand?Successfully merging this pull request may close these issues. This comment has been minimized. And add them to the end of your Wiki page.
This comment has been minimized.
Consider a cell network data plan with a dongle in order to send messages even if … This comment has been minimized.
Just a few lines of code and you are in business.Thats for the headsup! Features →. Als de data eenmaal in de InfluxDB database staat dan kan deze in Grafana gebruikt worden voor een grafische weergeven in de vorm van grafieken en bars. OpenURL only fills the commandArray and long after the script is finished the results will be fetched by Domoticz and this will again trigger dzVents. This comment has been minimized.
This comment has been minimized. But the least that has to be part of the callback data is the statusCode and mimeType.Just to give you an example.
In een eerder artikel hebben we uitgelegd hoe je door middel van 3 Python scripts de stroom-, gas- en waterkosten zichtbaar kunt maken in Domoticz. Make it a VERY valid reason because the code gets dirty now.Not sure if this is what I think it is (jvandenbroek has more details about the C++ implementation) but just to give you some background info about the http part of this PR: with this PR (dzVents 2.4) you can do a full This PR solves this in a very neat elegant way. This comment has been minimized. Domoticz executes the url and when it's done it triggers the event-system with a callback trigger token and the response data and headers. To make it easier for others to find your scripts use the following category conventions. dzVents will inspect the data and if the mime-type is application/json it will automatically convert it to a Lua table so you can directly access the response (and update your virtual devices or whatever). A typical dzVents script to make such a round trip is this:Here you have two triggers, one timer trigger that issues an url every 5 minutes and an httpResponse trigger that handles the url response:Of course, if passing the headers along has too many complications then we may just hand over a couple of necessary ones like statusCode and mimeType.But I must say, this openURL-roundtripping works awesome and is so elegant. Code review; Project management; Integrations; Actions This comment has been minimized. std::vector* pvHeaderData = (std::vector*)userp;Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments. This comment has been minimized.
"Lua - Automatic Garage Door Opening" / "Bash - Switch Lights Off When House Empty"
This function was OKActually I tried to reduce as much as possible code, which is why I changed this part to use just the already retrieved response code (since we need this for event processing as well). Didn't look into the possibility to use stringsplit for this, might be an option.It is asynchronous so you cannot wait for the return value. (\n\r as delimiter)Why do you need the returned headers? No more curl 'bashing' or os.executes or unresponsive scripts for more than 10s etc. It's quite some work (rewriting code, changing unit-tests, integration tests, rewriting a substantial part of the new documentation and do the whole test-shebang again). Of course you have to check that before you access the response data in your script.
Use the Edit button of a switch on the Switches tab. Use the Edit button of a switch on the Switches tab.
This comment has been minimized. Domoticz provides a wide range of capabilities in controlling your devices, but when further integration is needed, scripting opens up a tremendous degree of control for advanced users. Could also extend the LogError function to process it for returning the code, but IMO that isn't the correct place to do it.I do believe the response code is very important, so one way or the other we need to include it somewhere (and I decided to put it at the end of the header return vector, to use as little as possible return vars)If a HTTP request (get/post/binary) does NOT return successfully , and only if (so there is a problem) that log function is called.So if I understand it correctly, you only want to trigger dzVents with the response data only if there was a success? Now we only use CURLINFO_RESPONSE_CODE once on each call.
Pick the right items from the following trees, if you choose a lower item in the tree, like "TV" also include the categories higher up in the tree.