Demanding the state of a device (Woox R7060)

Moderator: leecollings

Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
peterbos
Posts: 79
Joined: Saturday 07 November 2020 21:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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..)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
peterbos
Posts: 79
Joined: Saturday 07 November 2020 21:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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.
Last edited by waltervl on Friday 19 May 2023 21:58, edited 1 time in total.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
peterbos
Posts: 79
Joined: Saturday 07 November 2020 21:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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
BazemanKM
Posts: 33
Joined: Wednesday 22 July 2015 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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

}
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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.
Logic will get you from A to B. Imagination will take you everywhere.
BazemanKM
Posts: 33
Joined: Wednesday 22 July 2015 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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.
Kedi
Posts: 536
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Demanding the state of a device (Woox R7060)

Post 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? ;)
Logic will get you from A to B. Imagination will take you everywhere.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests