Page 25 of 36

Re: Blockly examples

Posted: Friday 04 August 2017 16:21
by HM31
Wirehead wrote:
Image
This event uses the script that allows "presence checking" by means of an IP. I have a smart TV; which in turn is connected to the network. If the lights are on in the TV room and it's after sunset; and the TV is on; then dim those lights to 20% - giving you a pleasant background lighting. 8-) (again, you might want to open the image in a new frame - as it's quite wide)
Want to do the same but only if my actual dim level is above 20%. How can I test actual dim level in Blocky ?

Re: Blockly examples

Posted: Monday 14 August 2017 12:25
by tozzke
HM31 wrote: Friday 04 August 2017 16:21
Wirehead wrote:
Image
This event uses the script that allows "presence checking" by means of an IP. I have a smart TV; which in turn is connected to the network. If the lights are on in the TV room and it's after sunset; and the TV is on; then dim those lights to 20% - giving you a pleasant background lighting. 8-) (again, you might want to open the image in a new frame - as it's quite wide)
Want to do the same but only if my actual dim level is above 20%. How can I test actual dim level in Blocky ?
I got an error when I checked on a certain dim level in the if statement. I think the only way is to add a variable which you give the same value as you do the dimmer in question. You will have to switch the lights with scripts in which you change the value of the variable because it won't be updatet automatically.

Re: Blockly examples

Posted: Tuesday 22 August 2017 10:10
by matteos1
this is my scenario
light open between sunset and 23.00 and if sensor lux xiaomi is under 20
only notification in kodi not work :(
lucigiardino.jpg
lucigiardino.jpg (38.19 KiB) Viewed 9487 times

Re: Blockly examples

Posted: Friday 25 August 2017 0:22
by videodrome
I've set up the plugin to monitor my UPS with this switch
Image
When the AC is off the status is Backup Power"

I'd like to send a message when the status of UPS goes to "Backup Power" with this script but it doesn't work, why?
Image

Re: Blockly examples

Posted: Friday 25 August 2017 8:27
by snuiter
Are you maybe using the latest beta version as there are some setups that have notification issues in the latest release.

Re: Blockly examples

Posted: Friday 25 August 2017 9:23
by videodrome
snuiter wrote: Friday 25 August 2017 8:27 Are you maybe using the latest beta version as there are some setups that have notification issues in the latest release.
No, i'm using the last stable version; I think the problem is in my script.

Re: Blockly examples

Posted: Friday 25 August 2017 11:32
by snuiter
A few suggestions
* does the status of the switch change from online to offline ?
* which notification system are you using and does it work with other scripts
* did you check the settings/notifications tab if your notification system used in this blocky is enabled and configured correctly
* you can try if notification is working using a simple light switch, so on/off status change triggers a notification
Often best is to try a simple script to find out what is working and what not. I wonder if your notification system is working at all and if the switch doesn't change from online to offline status

Re: Blockly examples

Posted: Saturday 26 August 2017 9:49
by matteos1
Cattura.PNG
Cattura.PNG (55.5 KiB) Viewed 9391 times
this is mine for living room.
only a question is it possible add the set group .... after (3) minute ?

Re: Blockly examples

Posted: Monday 28 August 2017 15:49
by Phuturist
I'm just starting out with Domoticz and Blocky so sorry about the newbish question but is there a way to send the value of a sensor as a parameter in the open URL block?

Re: Blockly examples

Posted: Tuesday 29 August 2017 2:07
by videodrome
snuiter wrote: Friday 25 August 2017 11:32 A few suggestions
* does the status of the switch change from online to offline ?
* which notification system are you using and does it work with other scripts
* did you check the settings/notifications tab if your notification system used in this blocky is enabled and configured correctly
* you can try if notification is working using a simple light switch, so on/off status change triggers a notification
Often best is to try a simple script to find out what is working and what not. I wonder if your notification system is working at all and if the switch doesn't change from online to offline status
Stupid me...
the correct script is: if APC status mode is different from "On Line"
then message AC interruption
else if APC status mode is different from "Backup Power"
then message the AC is restored

Re: Blockly examples

Posted: Tuesday 29 August 2017 9:46
by Nautilus
Edit: Sorry, read the question a bit hastily, thought it was about notifications but it was about the "OpenURL" :) Well, it could still work but doubt it and I'm afraid I don't know if there is any officially supported way. With LUA you can do it of course...

Original message:
============================================================
Phuturist wrote: Monday 28 August 2017 15:49 I'm just starting out with Domoticz and Blocky so sorry about the newbish question but is there a way to send the value of a sensor as a parameter in the open URL block?
I hope this helps: https://www.domoticz.com/wiki/Events#Th ... _interface
You can use expressions in your notifications/email and SMS messages like:

"My temperature is {{temperaturedevice[1234]}} degrees, and the humidity is {{humiditydevice[1234]}} %"

Possible expressions:

temperaturedevice
dewpointdevice
humiditydevice
barometerdevice
utilitydevice
weatherdevice
raindevice
rainlasthourdevice
uvdevice
winddirdevice
windspeeddevice
windgustdevice
variable

Re: Blockly examples

Posted: Tuesday 29 August 2017 19:03
by Phuturist
Nautilus wrote: Tuesday 29 August 2017 9:46 Edit: Sorry, read the question a bit hastily, thought it was about notifications but it was about the "OpenURL" :) Well, it could still work but doubt it and I'm afraid I don't know if there is any officially supported way. With LUA you can do it of course...

Original message:
============================================================
Phuturist wrote: Monday 28 August 2017 15:49 I'm just starting out with Domoticz and Blocky so sorry about the newbish question but is there a way to send the value of a sensor as a parameter in the open URL block?
I hope this helps: https://www.domoticz.com/wiki/Events#Th ... _interface
You can use expressions in your notifications/email and SMS messages like:

"My temperature is {{temperaturedevice[1234]}} degrees, and the humidity is {{humiditydevice[1234]}} %"

Possible expressions:

temperaturedevice
dewpointdevice
humiditydevice
barometerdevice
utilitydevice
weatherdevice
raindevice
rainlasthourdevice
uvdevice
winddirdevice
windspeeddevice
windgustdevice
variable
Thanx, I decided to go with dzVents scripts though, not such a steep learn curve ...

Re: Blockly examples

Posted: Tuesday 29 August 2017 23:50
by Nautilus
A good choice I'm sure as well...:)

Re: Blockly examples

Posted: Wednesday 13 September 2017 22:58
by Benneton
Hi,

Just build a small blocky script to turn on my lights when it gets dark, use philips Hue motion/dusk sensor.
First line is to switch lights on with the group setting when dusk sensor goes on and time is after 07:15 and before 23:15
second event is when the motion sensor detects motion to let lights in Hal and overloop burn at 50% for 2 minutes, could not use group so did it per light.
Third event is to switch lights of when dusk sensor is of or time is after 23:15 before 07:15.
Script seems to work but issue is that when motion is detected lights go to 50% but only for 30 to 45 seconds it varies when I messured.
Attached my blocky script. I most likely make an error in my reasoning with the script. help appreciated :)

Re: Blockly examples

Posted: Thursday 14 September 2017 7:43
by StanHD
Benneton wrote:Hi,

Just build a small blocky script to turn on my lights when it gets dark, use philips Hue motion/dusk sensor.
First line is to switch lights on with the group setting when dusk sensor goes on and time is after 07:15 and before 23:15
second event is when the motion sensor detects motion to let lights in Hal and overloop burn at 50% for 2 minutes, could not use group so did it per light.
Third event is to switch lights of when dusk sensor is of or time is after 23:15 before 07:15.
Script seems to work but issue is that when motion is detected lights go to 50% but only for 30 to 45 seconds it varies when I messured.
Attached my blocky script. I most likely make an error in my reasoning with the script. help appreciated :)
Not sure if this will solve the timing problem, but your time period on the last "Else If" should be:-

"after 23:15 OR before 07:15".

This is because Domoticz changes to the next day at 00:00. So the time can't be:-

"after 23:15 (and before 00:00) AND (after 00:00 and) before 07:15.

Apologies if this does not fix the problem but worth a try? Image

Re: Blockly examples

Posted: Thursday 14 September 2017 8:51
by Benneton
Not sure if this will solve the timing problem, but your time period on the last "Else If" should be:-

"after 23:15 OR before 07:15".

This is because Domoticz changes to the next day at 00:00. So the time can't be:-

"after 23:15 (and before 00:00) AND (after 00:00 and) before 07:15.

Apologies if this does not fix the problem but worth a try? Image
Hi StanHD,

Thanks for the support. Did change the last one to "or", but then for some reason when motion is detected nothing happens.
So I did set this back to "and".
Today I also noticed (could not try yesterday) is that when Dusk sensor is of and motion is detected light will go to 50%, but only for approx. 10 to 15 seconds.

My reasoning is that it is a human interface error and that my logic in thinking is incorrect.
Is there someone out here who has the timer function working correctly i.e. if event happens set light to 50% for x amount of time?

Thanks for the support

Bernard

Re: Blockly examples

Posted: Friday 15 September 2017 13:55
by Stanleyk
Hello ,

Why this is not work, please ?
Image

Re: Blockly examples

Posted: Friday 15 September 2017 14:35
by chatjozef
Benneton wrote: Thursday 14 September 2017 8:51
Not sure if this will solve the timing problem, but your time period on the last "Else If" should be:-

"after 23:15 OR before 07:15".

This is because Domoticz changes to the next day at 00:00. So the time can't be:-

"after 23:15 (and before 00:00) AND (after 00:00 and) before 07:15.

Apologies if this does not fix the problem but worth a try? Image
Hi StanHD,

Thanks for the support. Did change the last one to "or", but then for some reason when motion is detected nothing happens.
So I did set this back to "and".
Today I also noticed (could not try yesterday) is that when Dusk sensor is of and motion is detected light will go to 50%, but only for approx. 10 to 15 seconds.

My reasoning is that it is a human interface error and that my logic in thinking is incorrect.
Is there someone out here who has the timer function working correctly i.e. if event happens set light to 50% for x amount of time?

Thanks for the support

Bernard

i have the same problem with the HUE bulbs.
Set the lights on with "set level 50% and, set lamp off after 120 seconds. resolved the problem for me.

Maybe it wil work for you/

Re: Blockly examples

Posted: Friday 15 September 2017 15:39
by sisaenkov
Stanleyk wrote: Friday 15 September 2017 13:55 Hello ,

Why this is not work, please ?
Image
Add another one condition. Total looks like this:

IF teplota1 < 28 AND Relay1 == OFF THEN Relay1 = On

etc.

Re: Blockly examples

Posted: Friday 15 September 2017 15:52
by Stanleyk
still not work :(

Image

But I dont see nothing in the log about running script or errors.. is it ok ?