Search found 164 matches

by elmortero
Thursday 24 May 2018 17:15
Forum: Temperature and Weather
Topic: Translate curl command to get UV data to URL
Replies: 3
Views: 88

Re: Translate curl command to get UV data to URL

waaren wrote:
Thursday 24 May 2018 16:20

but I only want aSync type of calls to external URL's or to OS functions that could cause a delay to the event system.
Again thanks for your reaction and script.
That's what I want too :-)
But sometimes when it cannot be as it must be, it must be as it can.
by elmortero
Thursday 24 May 2018 3:08
Forum: Temperature and Weather
Topic: Translate curl command to get UV data to URL
Replies: 3
Views: 88

Re: Translate curl command to get UV data to URL

Hi, You cannot pass your token (apikey) to Openiv.io as a query string like with darksky for example. As an alternative you can use io.popen (sorry Dannybloe, I tried to pass the -H x-access-token with your asynchronous http requests but gave up on it :( ) Here is the script I came up with(dzvents):...
by elmortero
Monday 07 May 2018 12:42
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 233

Re: Nested HTTPResponse

Great!
It works now.
by elmortero
Monday 07 May 2018 11:00
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 233

Re: Nested HTTPResponse

You don’t need to do that. You can convert the raw data to json in your script using domoticz.utils. And report a bug that they don’t set their content headers properly. hi Daniel, You are talking about fromJSON(json) I assume? Already been looking at that but honestly I am having a hard time figur...
by elmortero
Sunday 06 May 2018 23:02
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 233

Re: Nested HTTPResponse

Hi, Seems that the headers say it is text/plain, even though a copy and paste to jsonlint.com says is a valid JSON table. dzVents: Info: beach: {["Accept"]="*/*", ["Content-Length"]="2666", ["Server"]="Apache/2.2.15 (CentOS)", ["Connection"]="close", ["Date"]="Sun, 06 May 2018 20:40:14 GMT", ["Conte...
by elmortero
Sunday 06 May 2018 12:41
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 233

Nested HTTPResponse

Hi all, Our national Weather Service has a rather complicated way of fetching info. FIrst you access the API with a URL constructed of several parameters (type of data you want, stationID and API key): https://opendata.aemet.es/opendata/api/prediccion/especifica/playa/0301408/?api_key=XXXXXX That re...
by elmortero
Saturday 05 May 2018 13:19
Forum: dzVents
Topic: script does not work
Replies: 7
Views: 590

Re: script does not work

pvklink wrote:
Monday 05 March 2018 21:49
thanks!
Got it working?
by elmortero
Saturday 05 May 2018 13:18
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

Should work.
Please post the error you get, and your script.
by elmortero
Wednesday 28 February 2018 15:06
Forum: dzVents
Topic: script does not work
Replies: 7
Views: 590

Re: script does not work

http://www.domoticz.com/forum/viewforum.php?f=59

The first 3 topics should be all you need to get started
by elmortero
Wednesday 21 February 2018 21:27
Forum: Other questions and discussions
Topic: React on RSS feed
Replies: 9
Views: 1040

Re: React on RSS feed

Hello MatthijsD, Can you please tell me how you fix it? I work also as a fire-fighter in Holland. Please contact me. Ok, guys, I didn't realize it was for the P2000 stream. This code might actually do what you need. In it's current version it writes it's output to a text device and (as test, I do n...
by elmortero
Monday 19 February 2018 14:52
Forum: LUA
Topic: Read text file and assign value to virtual temp sensor?
Replies: 3
Views: 367

Re: Read text file and assign value to virtual temp sensor?

Maybe post what you have so far here ?
by elmortero
Monday 19 February 2018 0:07
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

Should be Rain device
by elmortero
Monday 19 February 2018 0:07
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

Should be Rain device
by elmortero
Sunday 18 February 2018 23:15
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

ah, my bad! Didn't check very well when pasting the code here.
this is what you need:
'http://api.wunderground.com/api/' .. apikey .. '/hourly/forecast/q/' .. country .. '/' .. city .. '.json'

That should do it!
by elmortero
Sunday 18 February 2018 20:13
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

Maybe you can put a print(url) just before where it says
elseif (triggerItem.isHTTPResponse) then
That way the log will show the composed url and it might already be clear what is wrong.
by elmortero
Sunday 18 February 2018 20:07
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

You will have to give more info. Maybe an error message?
by elmortero
Sunday 18 February 2018 10:09
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

You need to create the virtual devices yourself and put the correct names in the "Variables to customize" part of the script. Also, if your dzVents version is 2.3 or higher this script will not work due to the breaking changes that were announced with the release of 2.3. Updated script below in spoi...
by elmortero
Sunday 18 February 2018 1:45
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 21
Views: 2504

Re: Rain prediction - weather underground

Well, on weatherunderground pop is the percentage of probability of any precipitation so that could be anything. They do however also have a prediction of the quantity of snowfall (in metric and imperial value) so you could first check if that value is > 0 and assume then that the qpf refers to snow...
by elmortero
Saturday 17 February 2018 13:03
Forum: Examples & Solutions
Topic: Fetching and processing SolarEdge JSON data with 2.4
Replies: 20
Views: 1407

Re: Fetching and processing SolarEdge JSON data with 2.4

[/quote]
Is it possible to get the revenue rounded at two decimals?
[/quote]

You can use the dzVents round function