Search found 180 matches

by elmortero
Friday 22 June 2018 21:19
Forum: Examples & Solutions
Topic: World Cup Scoreboard - new version
Replies: 20
Views: 635

Re: World Cup Scoreboard - new version

There are problems with the feed today. The matches are in the wrong order, with the wrong times, and the 3rd match (which appears second) is showing a status of 'pending correction' - which the dzVents script doesn't recognise. Haven't had any issues. About the wrong order: you can add this to the...
by elmortero
Thursday 21 June 2018 12:17
Forum: Examples & Solutions
Topic: Script to display next F1 Race
Replies: 3
Views: 226

Re: Script to display next F1 Race

Nice. Works like a charm. 8-) Maybe implement free practice and qualifying sessions too. And it sure would be nice to list the top 3 drivers during the GP itself until a day later or so. If you mean the season ranking Top 3: T3.JPG return { on = { timer = { 'at 0:58', 'every 15 minutes on sat, sun,...
by elmortero
Monday 18 June 2018 20:45
Forum: Examples & Solutions
Topic: World Cup Scoreboard - new version
Replies: 20
Views: 635

Re: World Cup Scoreboard - new version

Well, that's a shame - yes, I'm on version 2.2, with Domoticz stable 3.8153. I believe I would need to upgrade to Domoticz beta in order to get dzVents 2.4. You should, there are some nice features in the later versions of dzVents. Meanwhile, I took the time to make a pre-httpresponse version of th...
by elmortero
Monday 18 June 2018 19:18
Forum: Examples & Solutions
Topic: World Cup Scoreboard - new version
Replies: 20
Views: 635

Re: World Cup Scoreboard - new version

MikeF wrote:
Monday 18 June 2018 15:06
I've just set this up as described, but I'm getting this dzVents error:

Code: Select all

Error: dzVents: Error: ...omoticz/scripts/dzVents/generated_scripts/scoreboard.lua:11: attempt to index local 'triggerItem' (a nil value)
That means that you are on a dzVents version prior to 2.4
by elmortero
Sunday 17 June 2018 11:56
Forum: Examples & Solutions
Topic: Script to display next F1 Race
Replies: 3
Views: 226

Script to display next F1 Race

This script gets the next F1 race from https://ergast.com/mrd/ and writes it to a text sensor. Ergast offers more info on F1 - I need a race in progress to see if it provides live position information. return { on = { timer = { 'at 10:00' }, httpResponses = { 'nextF1' } -- matches callback string be...
by elmortero
Friday 15 June 2018 15:54
Forum: Examples & Solutions
Topic: World Cup Scoreboard - new version
Replies: 20
Views: 635

Re: World Cup Scoreboard

Found an error (needed a match in progress to test)
it should be: if #response.json > 0 then and not > 1
by elmortero
Friday 15 June 2018 13:48
Forum: Examples & Solutions
Topic: World Cup Scoreboard - new version
Replies: 20
Views: 635

World Cup Scoreboard - new version

Hi all, Not a real football fan myself but with the World Cup I make a little exception. For that reason - and because I am always looking for data sources to play with the asynchronous http requests - I wrote this script. The data are fetched from http://worldcup.sfg.io/ and they offer other data s...
by elmortero
Friday 15 June 2018 13:10
Forum: Bugs and Problems
Topic: 3.9639 dzvents persistant data failure
Replies: 4
Views: 127

Re: 3.9639 dzvents persistant data failure

Before going to a fresh install, try removing the data file.
Dzvents will then recreate it.
Should do the trick.
by elmortero
Saturday 09 June 2018 10:19
Forum: General Discussion
Topic: [Idea] A script that check is a update is available
Replies: 12
Views: 725

Re: [Idea] A script that check is a update is available

Hi, I have been using this bash script to download the available Beta update and just store it with it's version number in the name. I have a second script that installs the local update when I run it. That way I can test it on my 2nd Domoticz that is for testing and some json processing only. It al...
by elmortero
Friday 08 June 2018 8:52
Forum: General Discussion
Topic: Possible to decode/use json in domoticz?
Replies: 1
Views: 186

Re: Possible to decode/use json in domoticz?

If you do a search in this board for 'asynchronous http requests' you will find several examples of that
by elmortero
Wednesday 30 May 2018 19:44
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 28
Views: 3369

Re: Rain prediction - weather underground

It is not working because in your URL you only get forecast but try to read hourly_forecast. This works (tested it here). Also I joined the 2 URLs into one. (forecast and hourly) return { active = true, on = { timer = {'every 15 minutes'} }, execute = function(domoticz) -- Variables to customize ---...
by elmortero
Wednesday 30 May 2018 14:51
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 28
Views: 3369

Re: Rain prediction - weather underground

If you enter the URL you had in a browser you will get a JSON response.
In that there will be all the stations for PL/Poznan each with their zmw
The one I used in above script is the first one of the results
by elmortero
Wednesday 30 May 2018 12:00
Forum: General Discussion
Topic: Lightning and Domoticz
Replies: 103
Views: 15573

Re: Lightning and Domoticz

Hi, Is there a way to parse parameters to http://www.onweeractueel.nl/domoticz_bo.json ? I wrote a script in dzvents for this but sometimes the json result is too large (which returns "lua script execution exceeded maximum number of lines") What would be great, if possible, is to send a parameter wi...
by elmortero
Tuesday 29 May 2018 20:46
Forum: dzVents
Topic: Rain prediction - weather underground
Replies: 28
Views: 3369

Re: Rain prediction - weather underground

Hi arek156 If you use the countrycode + citycode there are 2 results. WUnderground shows the 2 posible locations and no weather results. Because of that the data you try to get is non-existing(nil) With these changes it should be ok: Replace ' .. countryCode .. '/' .. city .. '.json' with zmw:00000....
by elmortero
Monday 28 May 2018 12:02
Forum: Bugs and Problems
Topic: Problem with virtual selector switch (3.9464)
Replies: 22
Views: 988

Re: Problem with virtual selector switch (3.9464)

Hi guys, Any chance you are using the Weekly Programming (from this topic ? I just noticed that while updating the selector switches go back to normal. After applying the changes needed for the Weekly programming it goes bad again. Confirmed this by 1. updating to latest beta 2. apply "weekly progra...
by elmortero
Thursday 24 May 2018 22:51
Forum: Temperature and Weather
Topic: Translate curl command to get UV data to URL
Replies: 6
Views: 413

Re: Translate curl command to get UV data to URL

Excellent, couldn't figure that one out last night..
Thanks a lot!
by elmortero
Thursday 24 May 2018 17:15
Forum: Temperature and Weather
Topic: Translate curl command to get UV data to URL
Replies: 6
Views: 413

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: 6
Views: 413

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: 407

Re: Nested HTTPResponse

Great!
It works now.