Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apex smart plug - adjust reporting #4532

Closed
svenove opened this issue Mar 7, 2021 · 10 comments · Fixed by #4765
Closed

Apex smart plug - adjust reporting #4532

svenove opened this issue Mar 7, 2021 · 10 comments · Fixed by #4765

Comments

@svenove
Copy link

svenove commented Mar 7, 2021

Describe the question or issue you are having

In regards to #3943.
The plug is working great, but I'm struggeling to adjust the reporting intervals.

See screenshot no 1.
These are the default values. I've tried to change them, but it doesn't seem to have any effect. I am able to read the new configuration back, so it seems the config is indeed saved. But, after some hours/days (or perhaps a deCONZ restart?) the values are set back to default again.

I've been in contact with @haarvig in a Norwegian forum and he's confirmed with their developers that this should work.
He also uses the plug in their own hub, and the settings seems to work fine there.
I noticed that in their hub, the default values are different, but that could be the hub is set to change them on inclusion? Or is there some datatype-issue with deCONZ that makes the default values to read different?
Screenshot no 2 is a screenshot from their own hub.

Screenshots

image

image

Environment

  • Host system: PC
  • Running method: Virtual machine running Ubuntu 16.04 LTS
  • Firmware version: 26390500
  • deCONZ version: 2.10.01
  • Device: ConBee I
  • Do you use an USB extension cable: No
  • Is there any other USB or serial devices connected to the host system? If so: Which? RFXtrx433E

deCONZ Logs

Additional context

About 15 IKEA-bulbs and 25 Xiaomi sensors. 2 Philips Hue light strips.

@SwoopX
Copy link
Collaborator

SwoopX commented Mar 7, 2021

Well, that indeed feels a bit odd. So firstly. what you see in your first screenshot is deconz' default configuration for smart plugs. As you already discovered, the settings are generally freely configurable.

Now, let me give you a better understanding how deconz handles this internally. During pairing, deconz typically creates the required sensors, does the cluster bindings (simplified, which cluster should talk) as well as the corresponding attribute reportings. Additionally, there's a safeguard which checks if reports are overdue and if they are, binding and reporting is re-initiated. If I recall correctly, this mechanism also kicks in when the device is rebooted due to whatever reason or deconz is restarted (as the settings are kept in memory).

Presumably, one of the last mentioned curcumstances occurred, so this could explain the "reset to default values". Interestingly, I never had any noticable issues with that. I prefer not to collect current and voltage from all my plugs and therefore disabled reporting, and that seemed to have survived all deconz restarts so far.

I might have overlooked some details here and the code is a bit scattered. For mid term, it is planned to also include reporting configuration in device specific configuration files to better fit that to ones needs. Adjusting the configuration in the meantime to the Datek defaults also does not seem the proper solution here, as it has potential to make other people unhappy, I presume.

@SwoopX
Copy link
Collaborator

SwoopX commented Mar 14, 2021

Would you be able to compile the plugin? There might be something to try out.

@svenove
Copy link
Author

svenove commented Mar 17, 2021

Sorry for the delay, I believe I compiled the plugin myself a while ago, so I guess I could try doing it again? :)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2021

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Apr 8, 2021
@quack3d
Copy link
Contributor

quack3d commented Apr 8, 2021

Bump. :)

@github-actions github-actions bot removed the stale label Apr 10, 2021
@SwoopX
Copy link
Collaborator

SwoopX commented Apr 13, 2021

Well, I guess I figured something out which should at least ease the situation a bit, so you might want to try that out once I got the PR ready. Please not that I've just tested this in my dev network so far and that needs to be discussed with the other devs.

So what I cannot change is the initial reporting configuration upon deconz start. That would simply go too deep. However, I brought that topic up to be considered in a huge refactoring of the code to be considered.

Now, what I did is streamlining the process throughout the resource types (lights and sensors) to behave equally. That implies to fall pack to polling once a report from the measurement sensors has been missed and presumably causing the "reconfiguration" of the reporting in your case. That worked fine and reliable so far for a smart plug I have which doesn't access any reporting configuration.

As indicated, the corresponding PR needs to be set up and get the others buy in.. Regardless, once the PR is available, you can check it out.

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2021

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label May 5, 2021
@quack3d
Copy link
Contributor

quack3d commented May 5, 2021

Bumpetibump.

@SwoopX SwoopX linked a pull request May 5, 2021 that will close this issue
@github-actions github-actions bot removed the stale label May 6, 2021
@github-actions
Copy link
Contributor

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label May 27, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2021

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

@github-actions github-actions bot closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants