Search found 9 matches

by zuputrus
Friday 18 August 2023 9:01
Forum: dzVents
Topic: incremental timer for device
Replies: 8
Views: 503

Re: incremental timer for device

I think the last part should be in the item.isTimer section. else it will only be run when switch is switched I wrote next code. Tomorrow i'll know if it's working or not. return { active = true, on = { devices = {'WII'}, timer = { 'every 5 minutes', 'every day at 00:00' } }, data = { startTime ...
by zuputrus
Friday 18 August 2023 8:34
Forum: dzVents
Topic: incremental timer for device
Replies: 8
Views: 503

Re: incremental timer for device

Oks. Tested a couple of days the script, the main code seems to work fine.

However, the date change does not seem to be working as it should. It does not detect that a day has passed and therefore the counter is not reset (the last part of script). Can anyone give me a hint on how to fix it?
by zuputrus
Wednesday 16 August 2023 15:45
Forum: dzVents
Topic: incremental timer for device
Replies: 8
Views: 503

Re: incremental timer for device

Addition, check this script, it uses a counter device to calculate the usage of the switch then you can check the counterToday value to switch off after 3 hours. https://www.domoticz.com/forum/viewtopic.php?t=27776 I think I have it. Thanks again @waltervl for your help. It's been very useful¡¡ I l ...
by zuputrus
Wednesday 16 August 2023 13:29
Forum: dzVents
Topic: incremental timer for device
Replies: 8
Views: 503

Re: incremental timer for device

A lot of the logic is when the device is off (elseif device.state == 'Off' then..) and that seems unlogic. Se perhaps you are misplaced an "end" here, Also the script is triggered only when the device is switched on/off and I suppose you need to trigger it also every x minutes to update the ...
by zuputrus
Monday 14 August 2023 8:33
Forum: dzVents
Topic: incremental timer for device
Replies: 8
Views: 503

incremental timer for device

Hi, I'm trying to program a script to control a smart plug, so that if over the course of the day between several off and on totaling more than 3 hours of use automatically turn off the plug and not turn on until the next day. I have the following code, but it doesn't work. Could someone give me a ...
by zuputrus
Friday 30 December 2022 18:58
Forum: PHP and all others
Topic: [NodeRed][Alexa] Read Temperature
Replies: 7
Views: 5367

Re: [NodeRed][Alexa] Read Temperature

I wanted to have alexa read the energy and outdoor temperature sensors vocally , the system that @emme uses in the post above would be interesting but it doesn't seem to work ; I also put debugs in the process but it doesn't seem to activate,i don't want to use cloud services .I have node-red 3.0.2 ...
by zuputrus
Wednesday 27 January 2021 15:45
Forum: Python
Topic: ShellyCloudPlugin
Replies: 148
Views: 30845

Re: ShellyCloudPlugin

Since it's possible to have 2 router at home, one master and other repeating signal, but instead of 192.168.1.xxx it could be 192.168.31.xxx. How could be possible to detect one shelly device connected to second wifi? It doesn't work for me, at least. I have some shellys devices in first wifi 192 ...
by zuputrus
Sunday 24 January 2021 10:02
Forum: dzVents
Topic: activate from change state in a device
Replies: 2
Views: 284

Re: activate from change state in a device

Thanks a lot Waaren¡¡ I'm going to work with it. I'll tell you how it works. Great¡
by zuputrus
Saturday 23 January 2021 16:47
Forum: dzVents
Topic: activate from change state in a device
Replies: 2
Views: 284

activate from change state in a device

Sorry for question, since I'm newbie in dzVents, there is a lot of things I don't know. I'm reading the wiki, but still I'm confused with some concepts. I want to give a variable a value (value 1) if a device changes its state 3 or more times in a minute. In other case value should be 0 by default ...