Z-wave device switches off immediately after switching it on

Moderator: leecollings

Post Reply
JeroenL
Posts: 54
Joined: Sunday 27 December 2015 19:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Z-wave device switches off immediately after switching it on

Post by JeroenL »

Dear all,

Funny problem, I do not manage to debug at all.

What happens is the following, if a user or a timer switches on my Kitchen light, it immediately switches off again. Each time within 4 seconds. My suspicion was a faulty script, but disabling all scripts does not make the issue go away.

Has anyone else seen this? Does anyone have an idea, how I can "debug" this?

Thanks. Jeroen
Screenshot 2020-10-26 at 19.50.59.png
Screenshot 2020-10-26 at 19.50.59.png (246.71 KiB) Viewed 1040 times
Keesje
Posts: 6
Joined: Sunday 03 November 2019 13:53
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Z-wave device switches off immediately after switching it on

Post by Keesje »

hi Jeroen,

I'm experiencing exactly the same issue. PowerPlugs switching on after switches off within 5 seconds or vice versa.
First, I thought it was a bug in my (very simple) script but it also happens when manually switching the switch.

I have restarted Domoticz and it appeared to be solved but it occurs again a few days later.

Did you found the source already? Anybody else any ideas?

Thanks in advane,
Kees
JeroenL
Posts: 54
Joined: Sunday 27 December 2015 19:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: Z-wave device switches off immediately after switching it on

Post by JeroenL »

Dear Kees,

‘Happy’ to read someone else has the same issue. I had indeed also the same when using the physical switch.
I tried many things nothing seemed to work. I compared all setting of the zwave node, but they are the same as other similar working switches.

In the end I used a ‘rigorous’ solution, excluding and including the device again as a new node. This “fixed” it, but not in a nice way.
Am not a zwave expert, but I suspect something went wrong with the group functions. Meaning the device became part of some sort of group, whatcha switches it off again.

Hope re-including also works for you.
Regards jeroen
smartel
Posts: 6
Joined: Monday 24 December 2018 0:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Quebec,Canada
Contact:

Re: Z-wave device switches off immediately after switching it on

Post by smartel »

Hello Guys,

I have this weird issue on one of my Zwave switch, it does the same thing as yours. This problem started when I wrote a lua script to turn on/off with a motion detector.

That same script is working for many other switches, I have tried to disable all scripts, rebooted Domoticz, tried the exclusion/incluson trick, still does it.

I have to turn on the switch twice before it stays on, same thing to turn it off!

Any ideas?
smartel
Posts: 6
Joined: Monday 24 December 2018 0:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Quebec,Canada
Contact:

Re: Z-wave device switches off immediately after switching it on

Post by smartel »

Very strange, another one of my Zwave switch have started acting up the same way, I have to issue the On command twice before it stays on, same thing to turn it off, the log shows On-Off within the same second. Nothing has changed!

Any pointers are welcome, don’t know what to try anymore.

Thank you!
lost
Posts: 659
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Z-wave device switches off immediately after switching it on

Post by lost »

Hello,

Experienced the exact same behavior, from the very beginning & for only one device in my setup: A qubino smart-meter. This device primary function is monitoring my house electric power consumption, but also includes an internal solid state relay I use for the command of my hot water tank.

This internal relay shows same behavior. After a 1st switch to on, it goes off within 1 second for 99% of tries. If I retry just after (but not too long, less than 5s), required state remains stable at 99%.

Only way to handle this was reproducing what I was doing manually, with the timings that proved to mostly work, from a device script:

~/domoticz/scripts/lua $ cat script_device_SmartMeterHack.lua

Code: Select all

-- Duplicate user Smart-Meter relay switch command after a few
-- seconds to cope with immediate spurious invalidating command on
-- device state change...
--
-- For hereunder tunables, take care not to set duplicate < spurious
-- to avoid making a switching loop + short duplicate times lead to
-- several retries (<= 3s).
--
-- A (string) user variable timeSmartMeterRelay must be created to 'nil'
-- before copying this script under domoticz/scripts/lua
--
-- Changelog:
--   20/04/2017, YL, 1st version.

spuriousCmdDelaySec=1
timeDuplicateCmdSec='5'
SmartMeterSwitch='Relais Smart-Meter HP/HC Actif'
timeLastCmd='timeSmartMeterRelay'

commandArray = {}

if (devicechanged[SmartMeterSwitch]) then
    devState = devicechanged[SmartMeterSwitch]
    
    t1 = os.time()
    t0 = uservariables[timeLastCmd]
    
    -- 1st time init for user variable...
    if (t0 == 'nil') then
        t0 = t1
    end
    
    tDiff = os.difftime(t1, t0)
    
    -- Debug :
    --print(SmartMeterSwitch..' = '..devState)
    --print('t1 : '..t1..' / t0 : '..t0.. ' ; Diff = '..tDiff)
    
    -- Do we have the immediate change state spurious (buggy device?) invalidating current command ?
    if (tDiff <= spuriousCmdDelaySec) then
        if (devState == 'On') then
            commandArray[SmartMeterSwitch] = 'Off AFTER '..timeDuplicateCmdSec
        end

        if (devState == 'Off') then
            commandArray[SmartMeterSwitch] = 'On AFTER '..timeDuplicateCmdSec
        end
    end
    commandArray['Variable:'..timeLastCmd] = tostring(t1)
end

return commandArray
I sent a ticket to qubino at the time, their answer was device was reporting it's change state with some delay that was a bit longer than what Open-Zwave expected... and they did an open-zwave ticket that never triggered a fix before I gave up expecting one!

Hope this helps... Take care to tune delays to the one that works for your device & change SmartMeterSwitch to your own switch name. As written, a user variable must also be created manually to record previous switch time & only send back command in case of almost immediate state change.

If this was a device I could have an easy alternative I would have sent it back to seller. But this is not the case for this module!
smartel
Posts: 6
Joined: Monday 24 December 2018 0:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Quebec,Canada
Contact:

Re: Z-wave device switches off immediately after switching it on

Post by smartel »

Thank you!

It’s a great ‘fix’ I will give that a try, I took those switches out of service, but they’re expensive, I’d rather use them!

I will try and post back results
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest