Search found 1328 matches

by dannybloe
Friday 25 May 2018 22:41
Forum: dzVents
Topic: Yeelight (execute = function) time delay [Solved]
Replies: 3
Views: 121

Re: Yeelight (execute = function) time delay [Solved]

Or use openURL. It supports delays.
by dannybloe
Thursday 24 May 2018 22:59
Forum: dzVents
Topic: Global variables always nil [Solved]
Replies: 3
Views: 71

Re: Global variables always nil [Solved]

It looks like you are using a very old version of dzVents. Can you try this with a more recent one? Yours is located in scripts/ instead of in dzVents/. That is really old.
by dannybloe
Saturday 19 May 2018 9:16
Forum: Bugs and Problems
Topic: Lua_Parser scripts - global tables
Replies: 2
Views: 151

Re: Lua_Parser scripts - global tables

Use dzVents and you don't have to do all of this and still code in Lua.
by dannybloe
Thursday 17 May 2018 6:41
Forum: Examples & Solutions
Topic: Luftdaten
Replies: 2
Views: 219

Re: Luftdaten

You are using features that are not available in your version of Domoticz. Switch to the beta version.
by dannybloe
Wednesday 16 May 2018 14:35
Forum: dzVents
Topic: switchOff().afterMin(10) [Solved]
Replies: 17
Views: 847

Re: switchOff().afterMin(10) [Solved]

Or use a timer in where you check if the lastUpdate of the switch is older than 5 minutes and then send the notification.
by dannybloe
Wednesday 16 May 2018 7:59
Forum: dzVents
Topic: how to pass a table to the notify function?
Replies: 3
Views: 177

Re: how to pass a table to the notify function?

I really have no idea why that would be. Looking at the internals there should be no difference. It checks if the 6th parameter is a table and then turns it into a ;-separated string (in case you're interested: dzVents/runtime/Domoticz.lua, function self.notify).
by dannybloe
Wednesday 16 May 2018 7:51
Forum: dzVents
Topic: switchOff().afterMin(10) [Solved]
Replies: 17
Views: 847

Re: switchOff().afterMin(10) [Solved]

Mm.. I see it is not in there. I've put it on my list (again?). Sorry about that.
by dannybloe
Tuesday 15 May 2018 12:19
Forum: dzVents
Topic: persistent data reporting nil value over and over
Replies: 1
Views: 99

Re: persistent data reporting nil value over and over

Not sure yet what might be wrong but in your case I would use an historical persistent variable because there each value that you put in there already has a time-stamp. So, when gpio turns 1 you put 1 in that history value and when it turns 0 you clear the history. So, assuming that water(gpio) is a...
by dannybloe
Sunday 13 May 2018 22:38
Forum: dzVents
Topic: EventSystem reset at midnight
Replies: 4
Views: 193

Re: EventSystem reset at midnight

You value your logs too much. It’s not a thing of beauty. Just reflects what is happening. No big deal.
by dannybloe
Saturday 12 May 2018 8:15
Forum: Camera's
Topic: Start camera recording on surveillance station by switch
Replies: 12
Views: 6571

Re: Start camera recording on surveillance station by switch

You will have to dive into the api I guess. The scripts loops over all cams and starts them all I believe (last time I looked). Shouldn't be so hard figure that out (and let me know when you did that coz I need it too ;-) )
Or create a dzVents script to do this...
by dannybloe
Thursday 10 May 2018 10:28
Forum: dzVents
Topic: Great tool
Replies: 2
Views: 183

Re: Great tool

You're welcome :)
by dannybloe
Thursday 10 May 2018 10:03
Forum: dzVents
Topic: luftdaten "nested" json [Solved]
Replies: 1
Views: 113

Re: luftdaten "nested" json [Solved]

It is an indexed table so you can do it like this:
item.json.sensorvalues[1].value
by dannybloe
Wednesday 09 May 2018 8:58
Forum: dzVents
Topic: how to create a unique parameters table?
Replies: 4
Views: 229

Re: how to create a unique parameters table?

You can also consider to define groups of devices in Domoticz GUI and use them in you scripts: domoticz.groups('myGroup').devices().forEach(..) etc.
by dannybloe
Tuesday 08 May 2018 7:40
Forum: dzVents
Topic: Error /scripts/dzVents/runtime/EventHelpers.lua:69
Replies: 5
Views: 390

Re: Error /scripts/dzVents/runtime/EventHelpers.lua:69

You are mixing things up. history = true is a setting for the variable declaration type and so is maxItems. In your example you create a non-history persistent variable who's initial value is { history = true, maxItems = SMOOTH_FACTOR }. That doesn't make sense. No to me at least ;-)
by dannybloe
Monday 07 May 2018 20:17
Forum: dzVents
Topic: if os or domoticz time is....
Replies: 2
Views: 230

Re: if os or domoticz time is....

Code: Select all

if domoticz.time.matchesRule('at 20:00') then
else if domoticz.time.matchesRule('at 19:05')
end
or

Code: Select all

if domoticz.time.hour == 20 and domoticz.time.minutes == 0 and domoticz.time.seconds == 0 then
or

Code: Select all

if domoticz.time.rawTime == '20:00:00'
It's all in the documentation.
by dannybloe
Monday 07 May 2018 11:51
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 251

Re: Nested HTTPResponse

This should do the trick (it is exactly the same as in HTTPResponse.lua that you adapted): domoticz.utils.fromJSON(response.data) And response is the same object as in your script. You see, the reason why the json is available on the response object in dzVents is more of a convenience. IF the respon...
by dannybloe
Monday 07 May 2018 7:06
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 251

Re: Nested HTTPResponse

Besides. Your change will throw errors if the data is text and not json.
by dannybloe
Monday 07 May 2018 7:04
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 251

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.
by dannybloe
Sunday 06 May 2018 14:31
Forum: dzVents
Topic: Nested HTTPResponse
Replies: 7
Views: 251

Re: Nested HTTPResponse

Have you tried to set it in debug mode and see what is being logged? Also try to log the response headers and the raw data.
by dannybloe
Friday 04 May 2018 20:36
Forum: dzVents
Topic: switchOff after restart Domoticz
Replies: 2
Views: 202

Re: switchOff after restart Domoticz

The timer fires every minute and systemUpTime is in seconds. So before the timer triggers your script it is very likely that more than 10 seconds have passed and your if-statement is false. Better use a persistent data value that you compare with the uptime and when the uptime is lower than the curr...