Page 2 of 2
Re: Demanding the state of a device (Woox R7060)
Posted: Wednesday 17 May 2023 9:14
by Kedi
I already mentioned that my device is behaving as expected for more then a year now. So logging to me is not of any interest.
I mentioned before that I looked at the logging and it shows as expected.
If I had any behavior like On-Off-On then I would have noticed, because then the garden would be soaked with water the next day.
First you write that the logging still shows On-Off-On behavior, and then you write "it's not possible to find out in 20 minutes because about 80% of the time it's first time right On or Off"
Change the code to:
Code: Select all
local SENSOR = 'Buitenkraan'
return {
on = {
timer = { 'every 3 minutes' },
devices = { SENSOR },
},
logging = {
marker = 'WOOX',
level = domoticz.LOG_DEBUG,
},
execute = function(dz, item)
if item.isTimer then
if dz.devices(SENSOR).active then
dz.devices(SENSOR).switchOff().afterMin(1)
else
dz.devices(SENSOR).switchOn().forMin(1)
end
elseif item.isDevice then
dz.log(SENSOR..' state is: '..item.state, dz.LOG_INFO)
end
end
}
And see what is in the Domoticz.log if that could lead to a conclusion. And let it run for a few hours.
Re: Demanding the state of a device (Woox R7060)
Posted: Thursday 18 May 2023 18:41
by peterbos
Hi Kedi,
Again, it's not the script that's wrong. As I wrote before, I changed to your script and the device still showed the dubious behavior. Most of the time the behavior is right. It's the wrong behavior the rest of the time that bothers me. The reason I asked you for your logging is that I was curious whether your device shows the same behavior although you may not notice when in use. I don't doubt it works okay with you, but it did not here and therefore I don't trust the device. Maybe my devices are part of a series with hardware issues. I sent a letter to Woox but they didn't answer so far so I decided to send back both devices today
Peter
Re: Demanding the state of a device (Woox R7060)
Posted: Thursday 18 May 2023 18:54
by Kedi
I know that my script is not wrong, I wrote it and tested it.
My suggestion was that the problem might have been the 2 extra lines ( .afterMin(12) ) you put in.
If you put my script to the test it should give you a clue what happens when the unwanted "on' or 'off' took place, because there is some extra logging.
Good luck with your Woox.
B.t.w. on this device you can read the current status on Z2M.
Re: Demanding the state of a device (Woox R7060)
Posted: Thursday 18 May 2023 19:29
by waltervl
How many zigbee devices do you have in your network? Do they show similar behavior? What is your link quality for this device? Is it relatively far from the coordinator or nearest router? Could be just a communication issue with the zigbee coordinator (as mentioned before..)
Re: Demanding the state of a device (Woox R7060)
Posted: Thursday 18 May 2023 20:25
by peterbos
Hi Walter,
The rest of my devices don't show any problems. The Woox devices had problems. I forgot to mention that you could hear the valve in the device make the Off-On-Off sequence so it's really internal. Maybe they would work fine if I kept using them but I simply don't trust them anymore...
Peter
Re: Demanding the state of a device (Woox R7060)
Posted: Friday 19 May 2023 0:29
by waltervl
Ok, important information. The problem you started with is that it did not switch off. That it switches off-on-off is not a real problem as it switches off in the end.
If it is really doing these kind of switching it seems to be a scripting issue. Or a plugin timing issue but less obvious as you should have it also for other devices in your zigbee network. So check your script as Kedi also advised.
Re: Demanding the state of a device (Woox R7060)
Posted: Friday 19 May 2023 21:18
by peterbos
Hi Walter,
It should switch first time right and it does not always. I think the valve signals it did not switch right and then corrects itself. If that is reliable, it is fine with me. The problem I started with showed it isn't reliable. It really isn't a scripting problem. I showed the script, that doesn't switch the device On-Off-On or Off-On-Off. I sent the devices back today, so for me it's case closed.
Peter
Re: Demanding the state of a device (Woox R7060)
Posted: Thursday 25 May 2023 23:10
by BazemanKM
I have 2 Woox R7060, the worked last year perfect. My script:
Code: Select all
return {
on = {
timer = {'20 minutes before sunset','20 minutes after sunset','21 minutes after sunset'},
},
logging = {
level = domoticz.LOG_ERROR, -- LOG_DEBUG or LOG_ERROR
marker = "Sproeien voor: "
},
execute = function(domoticz, item, info, timer, device)
local Sproeier = domoticz.devices('Besproeiing Voor')
local VochtId = 317
local Vocht = tonumber(domoticz.devices(VochtId).moisture)
local Time = require('Time')
local currentTime = Time()
if currentTime.matchesRule("20 minutes before sunset") and not Sproeier.active and Vocht < 35 then
Sproeier.switchOn()
domoticz.notify("Sproeier", "Sproeier voor aan", domoticz.PRIORITY_NORMAL,domoticz.SOUND_DEFAULT, "" , "")
Sproeier.switchOn()
elseif currentTime.matchesRule("20 minutes after sunset") and Sproeier.active then
Sproeier.switchOff()
domoticz.notify("Sproeier", "Sproeier voor uit", domoticz.PRIORITY_NORMAL,domoticz.SOUND_DEFAULT, "" , "")
elseif currentTime.matchesRule("21 minutes after sunset") then
Sproeier.switchOff()
end
end
}
Re: Demanding the state of a device (Woox R7060)
Posted: Friday 26 May 2023 13:27
by Kedi
Nice script.
I have a little more complicated script with 2 extra dummy selector switches.
Which anybody can use to set the start time and duration of the watering.
If have some time I will document and upload my script here too.
I see you have the same fear for not turning Off as the OP because you switch Off twice too.
Re: Demanding the state of a device (Woox R7060)
Posted: Friday 26 May 2023 21:51
by BazemanKM
Kedi wrote: ↑Friday 26 May 2023 13:27
I see you have the same fear for not turning Off as the OP because you switch Off twice too.
Yes, just to be sure.
Re: Demanding the state of a device (Woox R7060)
Posted: Saturday 27 May 2023 7:23
by Kedi
Zigbee is has a mesh network topology. So if the first 'Off' does not work are you sure that the second 'Off' will work?
