Zooz Power Strip (ZEN20) - keeps Forgetting preferences, no power reporting

dev:27142023-10-11 07:20:45.823debugLiving Room Power Strip: reportingEnabled (#28) = 1

dev:27142023-10-11 07:20:45.415debugLiving Room Power Strip: ledIndicator (#27) = 1

dev:27142023-10-11 07:20:45.052debugLiving Room Power Strip: manualControl (#26) = 1

dev:27142023-10-11 07:20:44.618debugLiving Room Power Strip: onTimer3 (#17) = 60

dev:27142023-10-11 07:20:44.210debugLiving Room Power Strip: onTimer3Enabled (#16) = 0

dev:27142023-10-11 07:20:43.811debugLiving Room Power Strip: offTimer3 (#15) = 60

dev:27142023-10-11 07:20:43.409debugLiving Room Power Strip: offTimer3Enabled (#14) = 0

dev:27142023-10-11 07:20:43.005debugLiving Room Power Strip: onTimer3 (#17) = 60

dev:27142023-10-11 07:20:42.601debugLiving Room Power Strip: onTimer3Enabled (#16) = 0

dev:27142023-10-11 07:20:42.212debugLiving Room Power Strip: offTimer3 (#15) = 60

dev:27142023-10-11 07:20:41.797debugLiving Room Power Strip: offTimer3Enabled (#14) = 0

dev:27142023-10-11 07:20:41.398debugLiving Room Power Strip: onTimer2 (#13) = 60

dev:27142023-10-11 07:20:40.994debugLiving Room Power Strip: onTimer2Enabled (#12) = 0

dev:27142023-10-11 07:20:40.619debugLiving Room Power Strip: offTimer2 (#11) = 60

dev:27142023-10-11 07:20:40.205debugLiving Room Power Strip: offTimer2Enabled (#10) = 0

dev:27142023-10-11 07:20:39.794debugLiving Room Power Strip: onTimer1 (#9) = 60

dev:27142023-10-11 07:20:39.388debugLiving Room Power Strip: onTimer1Enabled (#8) = 0

dev:27142023-10-11 07:20:38.983debugLiving Room Power Strip: offTimer1 (#7) = 60

dev:27142023-10-11 07:20:38.604debugLiving Room Power Strip: offTimer1Enabled (#6) = 0

dev:27142023-10-11 07:20:38.183debugLiving Room Power Strip: overloadProtection (#5) = 1500

dev:27142023-10-11 07:20:37.780debugLiving Room Power Strip: currentFrequency (#25) = 3600

dev:27142023-10-11 07:20:37.378debugLiving Room Power Strip: voltageFrequency (#36) = 7200

dev:27142023-10-11 07:20:36.977debugLiving Room Power Strip: energyFrequency (#4) = 1800

dev:27142023-10-11 07:20:36.772debugLiving Room Power Strip: powerFrequency (#3) = 1800

dev:27142023-10-11 07:20:36.172debugLiving Room Power Strip: powerThreshold (#2) = 10

dev:27142023-10-11 07:20:35.783debugLiving Room Power Strip: powerFailure (#1) = 0

dev:27142023-10-11 07:20:35.366debugLiving Room Power Strip: Lifeline Association: [] | MC: [1:0]

dev:27142023-10-11 07:20:35.074debugLiving Room Power Strip: Changing reportingEnabled (#28) from null to 1

dev:27142023-10-11 07:20:35.069debugLiving Room Power Strip: Changing ledIndicator (#27) from null to 1

dev:27142023-10-11 07:20:35.065debugLiving Room Power Strip: Changing manualControl (#26) from null to 1

dev:27142023-10-11 07:20:35.060debugLiving Room Power Strip: Changing onTimer4 (#17) from null to 60

dev:27142023-10-11 07:20:35.056debugLiving Room Power Strip: Changing onTimer4Enabled (#16) from null to 0

dev:27142023-10-11 07:20:35.049debugLiving Room Power Strip: Changing offTimer4 (#15) from null to 60

dev:27142023-10-11 07:20:35.045debugLiving Room Power Strip: Changing offTimer4Enabled (#14) from null to 0

dev:27142023-10-11 07:20:35.039debugLiving Room Power Strip: Changing onTimer3 (#17) from null to 60

dev:27142023-10-11 07:20:35.034debugLiving Room Power Strip: Changing onTimer3Enabled (#16) from null to 0

dev:27142023-10-11 07:20:35.028debugLiving Room Power Strip: Changing offTimer3 (#15) from null to 60

dev:27142023-10-11 07:20:35.024debugLiving Room Power Strip: Changing offTimer3Enabled (#14) from null to 0

dev:27142023-10-11 07:20:35.017debugLiving Room Power Strip: Changing onTimer2 (#13) from null to 60

dev:27142023-10-11 07:20:35.013debugLiving Room Power Strip: Changing onTimer2Enabled (#12) from null to 0

dev:27142023-10-11 07:20:35.007debugLiving Room Power Strip: Changing offTimer2 (#11) from null to 60

dev:27142023-10-11 07:20:35.002debugLiving Room Power Strip: Changing offTimer2Enabled (#10) from null to 0

dev:27142023-10-11 07:20:34.996debugLiving Room Power Strip: Changing onTimer1 (#9) from null to 60

dev:27142023-10-11 07:20:34.992debugLiving Room Power Strip: Changing onTimer1Enabled (#8) from null to 0

dev:27142023-10-11 07:20:34.986debugLiving Room Power Strip: Changing offTimer1 (#7) from null to 60

dev:27142023-10-11 07:20:34.981debugLiving Room Power Strip: Changing offTimer1Enabled (#6) from null to 0

dev:27142023-10-11 07:20:34.975debugLiving Room Power Strip: Changing overloadProtection (#5) from null to 1500

dev:27142023-10-11 07:20:34.970debugLiving Room Power Strip: Changing currentFrequency (#25) from null to 3600

dev:27142023-10-11 07:20:34.966debugLiving Room Power Strip: Changing voltageFrequency (#36) from null to 7200

dev:27142023-10-11 07:20:34.961debugLiving Room Power Strip: Changing energyFrequency (#4) from null to 1800

dev:27142023-10-11 07:20:34.956debugLiving Room Power Strip: Changing powerFrequency (#3) from null to 1800

dev:27142023-10-11 07:20:34.951debugLiving Room Power Strip: Changing powerThreshold (#2) from null to 10

dev:27142023-10-11 07:20:34.946debugLiving Room Power Strip: Changing powerFailure (#1) from null to 0

dev:27142023-10-11 07:20:34.939infoLiving Room Power Strip: Logging Level is: Debug (3) for 30 Minutes

dev:27142023-10-11 07:20:34.896debugLiving Room Power Strip: executeConfigureCmds...

dev:27142023-10-11 07:20:33.027debugLiving Room Power Strip: Creating new child device for endPoint 7, did not find existing child

dev:27142023-10-11 07:20:33.015debugLiving Room Power Strip: Creating new child device for endPoint 6, did not find existing child

dev:27142023-10-11 07:20:33.004debugLiving Room Power Strip: Creating new child device for endPoint 5, did not find existing child

dev:27142023-10-11 07:20:32.992debugLiving Room Power Strip: Creating new child device for endPoint 4, did not find existing child

dev:27142023-10-11 07:20:32.980debugLiving Room Power Strip: Creating new child device for endPoint 3, did not find existing child

dev:27142023-10-11 07:20:32.968debugLiving Room Power Strip: Creating new child device for endPoint 2, did not find existing child

dev:27142023-10-11 07:20:32.955debugLiving Room Power Strip: Creating new child device for endPoint 1, did not find existing child

dev:27142023-10-11 07:20:32.188debugLiving Room Power Strip: Power Metering Support Detected and Enabled

dev:27142023-10-11 07:20:32.184debugLiving Room Power Strip: MeterSupportedReport(meterReset: true, meterType: 1, scaleSupported: 53), scaleBinary: 110101

dev:27142023-10-11 07:20:31.922debugLiving Room Power Strip: Endpoints (7) Detected and Enabled

dev:27142023-10-11 07:20:31.920debugLiving Room Power Strip: MultiChannelEndPointReport(dynamic:false, identical:true, endPoints:7)

dev:27142023-10-11 07:20:31.868debugLiving Room Power Strip: Probing for Power Metering Support

dev:27142023-10-11 07:20:31.865debugLiving Room Power Strip: Probing for Multiple End Points

dev:27142023-10-11 07:20:31.172debugLiving Room Power Strip: switch is turned on (physical) [NOT CHANGED]

dev:27142023-10-11 07:20:30.878debugLiving Room Power Strip: Set Device Info - Model: ZEN20 | Firmware: 3.00

dev:27142023-10-11 07:20:30.874debugLiving Room Power Strip: Received Version Report - Firmware: 3.00

dev:27142023-10-11 07:20:29.766warnLiving Room Power Strip: Clearing state variables and data...

dev:27142023-10-11 07:20:29.764debugLiving Room Power Strip: Enabling Full Re-Sync

dev:27142023-10-11 07:20:29.728warnLiving Room Power Strip: configure...

The log was too big to capture as an image, so above is the text.

THis is the log after I configured, and refreshed one of the child devices

Ok, its still not detecting the childs properly. It says in the log it is creating new ones but I actually had that commented out so as not to create a mess during testing. I will have to set up a little test here and get it figured out. Hopefully next version this will be mostly functional.

Ok I tested it myself this time. Was a silly type mismatch causing it not to find it. It should at least detect the existing child devices. I have the code disable that would create any new ones still. Update in the same place: GIST LINK REMOVED - Driver added to Github/HPM

Looking good so far!!

Funny, the only one that is not reporting power corectly is the one with the TV plugged in.
I think that may be because I have another plug acting as an intermediary (which reports power as well - a workaround). Will remove that and see what I get

UPDATE: That child device is still not reporting power. Not sure what is going on

I think I got most of the settings in there as well: https://www.support.getzooz.com/kb/article/1024-zen20-power-strip-advanced-settings/ , let me know if anything is missing.

I skipped 29-33 so if you somehow have #30 set to 0 (disabled) then power reporting for CH2 would be shut off. You could try setting it to 1 with the Set Parameter command like this:
image

Next up I need to get it to tell the difference between the metering endpoints and the switch only endpoints (USB). I can test that on my ZEN25 though and it should work the same for the ZEN20. This will allow it to create the children with the component switch driver for the USB ports.

So, Changed the paramater, and nothing happened.
Just switched some plugs around; moved phone to 2 and TV to 5, and now TV reporting correctly.

Would be nice to be able to control the USB plugs as well!

If it works like the ZEN25 you cannot control the USB ports, the on/off state is reported by the device, On = something is drawing power and Off = No draw. The intention was if you are charging a device you would know when its full because it would stop drawing power.

This is from ZEN20 manual:

On/off (charging/charged) reports from USB ports to the hub (no ZWave control) - turn off the charging device for best results

2 Likes

I have been on vacation, getting home tonight. Will try to check this out on my power strip sometime this weekend.

2 Likes

I got the new driver installed and the Power strip is now reporting Energy and Power for the entire device. Which is the main function I wanted. Energy was the main thing but I also wanted to see the power draw as well.

I had 7 child devices with the old driver and the new driver created 7 more. The old child devices show energy and power and other attributes but they don't appear to be updating. The new child devices do not show anything other than a switch capability of on and off.

I don't use energy or power from the child devices but it would be nice to see them.

Any info you need? I am going to now update my rules to use the new child devices. From some manual testing they seem to be working.

Not sure how that is possible I have the line which would create the child devices commented out for testing so it doesnt make a big mess on people. I just checked and this is the only place in the code calling that function.

What are the DNI(s) of the Old vs New child devices?
Are you sure you used the right driver?
What firmware of ZEN20 do you have (should be in the data section at bottom of parent device).

This is working for myself (on ZEN25) and @cuirbear

Also, FYI, I can add a function to clean up any abandoned/unused child devices to clean up the mess.

Here is the info and you can see all the child devices. Also the firmware is listed.
The ones with a device description are the old ones. I have updated the name of the channel 2 new child. This is in my shop and I have a camera in the office and I can see the light coming on and off when I switch the Channel 2 outlet.

The old child devices have a DNI of 13-CH(n) n being the outlet number. The two UBS are 13-USB(n) n being the USB port 1 or 2

The new child devices are 967-(n) n being the outlet number. The USBs are 6 and 7

Here is the header info from the driver I manually installed.. I got it from the link a few Reponses up.

/*

Changelog:

[0.0.4] - 2023-10-11 (@jtp10181)

  • Initial Release based on v1.2.1 of my Zooz Plugs driver
  • Copyright 2022-2023 Jeff Page
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  •  http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

*/

Everything looks right, but that code to add the child devices is commented out and I think it has been for every version I posted here. Also, my most current code should have detected and used the existing child devices (except not the USB ports yet) with the CH# DNIs, thats what I have been working on.

Did you uncomment the addChild line in the code by chance?

Also, I would not switch all your rules over to the new child devices just yet, you may want to just switch back to whatever other driver you were using for now. I would like to get all the new duplicated childs removed for you and have it work correctly as intended.

I did not edit code, see below. I only switched one at this point I will wait for another release before I change anything.

:person_shrugging:
There is no way possible it created child devices with that commented out. It’s the only call to that addChild function and that’s the only function that has code to create child devices.

It also detected and used the existing child devices for myself and the other tester.

So doesn’t make any sense and it’s nothing I can fix, the current code already has the fixes.

Next I just need to make it handle the USB ports properly.

I think I know what happened. I had switched drivers a a couple times recently and I think the new child devices got created then. I must just not have noticed. I was trying different drivers to try and get a power and energy reading on the main device. Wasn't really paying attention to child devices then.

I went back and looked and noticed the new child devices had a remove button the old did not. So apparently they were the devices actually tied to the driver. I switched the driver back to the one I was using originally and removed all the new child devices.

I then set it back to your updated driver and the new child devices did not come back. Also the current child devices seem to be updating power, The energy readings don't seem right but until it sits for a bit and runs, I won't be sure.

I think I am good now though.

1 Like

The energy is just passed on from what the device reports, I am not doing any calculations. So it should be correct.

I have 4 devices plugged into the power strip, a small PC, access point/router, a CPE device and a small LED light. Only two of those devices are drawing any power at the moment. The router is a constant 8 Watts and the CPE a constant 2. Only the CPE device shows energy usage and it is the same as the overall energy usage, the rest are all at 0. The energy duration is the same on all.

Also I have one pending change showing that won't go away. Any idea what would be causing that? When I first installed the driver and updated some parameters it had like 20 pending changes. After a configure it removed them one by one until it got to one and it won't get rid of that one.

Please turn on debug logging and then just save preferences. The logs will show me what setting it getting hung up on. You have an older firmware than @cuirbear so I may need to make an adjustment.

Also be sure to double check all your settings. I decided to do the reporting settings in minutes vs seconds so it possibly took your old settings and multiplied them by 60. Maybe I need to just do drop-down menus on those, not sure.

Just turned it on, got some errors right off the bat. About to go to bed so we will see what it has tomorrow.