Search found 12 matches

by Inso80
Tuesday 25 September 2018 14:36
Forum: dzVents
Topic: [SOLVED] Set variable for setRGB()
Replies: 15
Views: 3380

Re: Set variable for setRGB()

Hi Waaren, I checked my scripts and indeed the values were changed at start. Everything is working fine now, thank you! 1 more question. By setting the rgb you also automaticly change the brightness of the lights. Is it possible to only change the color without changing the brightness? And how? On ...
by Inso80
Tuesday 18 September 2018 14:52
Forum: dzVents
Topic: [SOLVED] Set variable for setRGB()
Replies: 15
Views: 3380

Re: Set variable for setRGB()

Thank you for your reply. I know how setRGB works, but that is not what I mean. I want to store a variable (like: 0,250,0) and set that in setRGB(). setRGB('Variable_here'') output: setRGB(0,250,0) Ah, sorry^^ you mean: a = 50; b = 50; c = 50; domoticz.devices('testrgb').setRGB(a, b, c) ? Just ...
by Inso80
Tuesday 18 September 2018 13:22
Forum: dzVents
Topic: [SOLVED] Set variable for setRGB()
Replies: 15
Views: 3380

Re: Set variable for setRGB()

Maybe take a look at: https://www.domoticz.com/wiki/DzVents:_next_generation_LUA_scripting#Device_object_API and scroll down to specific devices, rgb(w) For the call in DzVents: https://www.domoticz.com/wiki/DzVents:_next_generation_LUA_scripting#Domoticz_object_API_.28Application_Programming ...
by Inso80
Tuesday 18 September 2018 9:45
Forum: dzVents
Topic: dzVents - Possible to use a variable for a timed event
Replies: 21
Views: 6111

Re: dzVents - Possible to use a variable for a timed event

You are close... return { on = { timer = { function(domoticz) return domoticz.devices('Texttest').text == os.date("%H") end }}, execute = function(domoticz) print ( "Executing!!!") end } But would it not be less complicated to use timer = { "every minute" }, and a helper function in the execute ...
by Inso80
Monday 17 September 2018 23:58
Forum: dzVents
Topic: dzVents - Possible to use a variable for a timed event
Replies: 21
Views: 6111

Re: dzVents - Possible to use a variable for a timed event

Not quite sure I understand your question. Do you mean domoticz variables or variables from dzVents persistent data or something else? In short what I am planning to do: I´d like to change the time of my WakeUpLight on multiple places. MySensors, here in Domoticz event manager, later on Raspi, ...
by Inso80
Monday 17 September 2018 20:11
Forum: dzVents
Topic: dzVents - Possible to use a variable for a timed event
Replies: 21
Views: 6111

Re: dzVents - Possible to use a variable for a timed event

..... What am I missing? Dzvents documentation does not show anything helpful, it only says active = function(domoticz) ... the active = section defaults to true and can only be true or false If you need to evaluate something from domoticz you have to parse the domoticz object to it. Something like ...
by Inso80
Monday 17 September 2018 15:19
Forum: dzVents
Topic: dzVents - Possible to use a variable for a timed event
Replies: 21
Views: 6111

Re: dzVents - Possible to use a variable for a timed event

Define the time as a user variable of type string. Then you can read it into dzvents If I may ask: how? I am planning to do a lot with my global variables. Timer will become important, also f.e. active = true, would be awesome to be changeable with (global?) variables. If I try active = domoticz ...
by Inso80
Tuesday 05 June 2018 17:47
Forum: MySensors
Topic: RGB LED strip and json
Replies: 9
Views: 8881

Re: RGB LED strip and json

As the last post is around two years old, and it seems the "bug" is not fixed - is something else wrong with "setcolbrightnessvalue"? No matter if send through browser or Domoticz script, f.e. http://192.168.178.200:8080/json.htm?type=command&param=setcolbrightnessvalue&idx=51&hex=000000 results in ...
by Inso80
Friday 25 May 2018 21:11
Forum: dzVents
Topic: Yeelight (execute = function) time delay [Solved]
Replies: 3
Views: 1195

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

Code: Select all

domoticz.variables('anotherVar').set(1).afterMin(10)
awesome way to have a delay, thank you very much, works like a charm :D
by Inso80
Friday 25 May 2018 21:08
Forum: dzVents
Topic: Global variables always nil [Solved]
Replies: 4
Views: 2194

Re: Global variables always nil [Solved]

The syntax did the trick :oops: thank you very much :D

@dannybloe
the "check for updates" - dialog tells me I am up to date, also my Domoticz is max ~around a year old. As soon as I have more time, I will clean reinstall, hopefully it will not cause any other problems.
by Inso80
Thursday 24 May 2018 22:44
Forum: dzVents
Topic: Global variables always nil [Solved]
Replies: 4
Views: 2194

Global variables always nil [Solved]

Hi, I have created a "global_data.lua", stored in "/home/pi/domoticz/scripts/dzVents/scripts" return { helpers = {}, data = { testini = { initial = 12.4 } testinix = { initial = 12 } timedOff = { initial = false } } } all three of them are always "nil". When trying to print , f.e.: domoticz.log ...
by Inso80
Thursday 17 May 2018 13:47
Forum: dzVents
Topic: Yeelight (execute = function) time delay [Solved]
Replies: 3
Views: 1195

Yeelight (execute = function) time delay [Solved]

Hi, I have some Yeelight lamps and stripes, and use the folowing code to switch my lamp on (includes mode, color and so on) execute = function(domoticz, device) IPR1 = {'192.168.178.59'} PORT = '55443'; for n, IP in pairs(IPR1) do runcommandoff = "sudo echo -ne '{\"id\":1,\"method\":\"set_scene ...