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

SynologyDSM Sensor does not respect standard SCAN_INTERVAL option #23528

Closed
SiliconAvatar opened this issue Apr 29, 2019 · 11 comments
Closed

SynologyDSM Sensor does not respect standard SCAN_INTERVAL option #23528

SiliconAvatar opened this issue Apr 29, 2019 · 11 comments

Comments

@SiliconAvatar
Copy link
Contributor

Home Assistant release with the issue:

0.92.1

Last working Home Assistant release (if known):
Unknown

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io on ubuntu.
Component/platform:

SynologyDSM Sensor

Description of problem:
This sensor has a hardcoded 15 minute update time ("MIN_TIME_BETWEEN_UPDATES").

This component should use the standard SCAN_INTERVAL (Per the entity documentation) so this can overridden by the user.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

#scan_interval option has no effect, and still updates every 15 minutes
- platform: synologydsm
  host: !secret synology_ip
  username: !secret synology_user
  password: !secret synology_pass
  scan_interval: 60
  monitored_conditions:
    - cpu_total_load
    - memory_real_usage
    - volume_percentage_used

Traceback (if applicable):

N/A

Additional information:

@ssmithTaylor
Copy link

ssmithTaylor commented May 2, 2019

Nm, I see you're working on it already.

@pergolafabio
Copy link

Are you guys owner of Synology code? Can you also have a look at my issue? I need some kind of new variable to identify a Synology...

#22571

@SiliconAvatar
Copy link
Contributor Author

Nm, I see you're working on it already.

Me?

No, I just hard coded it to a different value lol. I gave it a shot but wasn't able to get it working properly. I'd be happy to try your code though!

@ssmithTaylor
Copy link

Nm, I see you're working on it already.

Me?

No, I just hard coded it to a different value lol. I gave it a shot but wasn't able to get it working properly. I'd be happy to try your code though!

Could you give this a shot?

https://github.com/ssmithTaylor/home-assistant/blob/dev/homeassistant/components/synologydsm/sensor.py

@SiliconAvatar
Copy link
Contributor Author

@ssmithTaylor
Just gave it a shot. It locked up the system and wouldn't allow it to boot.

Lots of errors, but I believe this is the important part:

  File "/config/custom_components/synologydsm/sensor.py", line 147, in SynoApi
    @Throttle(min_update_interval)
NameError: name 'min_update_interval' is not defined

@ssmithTaylor
Copy link

@ssmithTaylor
Just gave it a shot. It locked up the system and wouldn't allow it to boot.

Lots of errors, but I believe this is the important part:

  File "/config/custom_components/synologydsm/sensor.py", line 147, in SynoApi
    @Throttle(min_update_interval)
NameError: name 'min_update_interval' is not defined

I see my mistake, commited a fix, could you try one more time?

@SiliconAvatar
Copy link
Contributor Author

SiliconAvatar commented May 9, 2019

commited a fix, could you try one more time?

I've loaded the new component. Good news is that it loads correctly now, and I get the warning that I'm using the synologydsm custom component.

Bad news is that with scan_interval set to 60, it still only updates every 15 minutes.
Below is my component config:

- platform: synologydsm
  host: !secret synology_ip
  username: !secret synology_user
  password: !secret synology_pass
  scan_interval: 60
  monitored_conditions:
    - cpu_total_load
    - memory_real_usage
    - network_up
    - network_down
    - volume_percentage_used
    - disk_temp

I've tried rebooting it a few times but the results have not changed.
You can see in the photo below that the scan interval has indeed slowed from 1 minute down to 15.
https://i.imgur.com/iYMAYEC.png

If I change line 24 to a hardcoded 1 min default ( MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=1)) then it goes back to 1 minute updates.

@stale
Copy link

stale bot commented Aug 7, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 7, 2019
@SiliconAvatar
Copy link
Contributor Author

This issue is not yet resolved.

Please keep open, as that's the point of an issue tracker, to track open issues.

@stale stale bot removed the stale label Aug 8, 2019
@kuchel77 kuchel77 mentioned this issue Oct 2, 2019
9 tasks
@stale
Copy link

stale bot commented Nov 6, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 6, 2019
@stale stale bot closed this as completed Nov 13, 2019
@kevin14389
Copy link

Why this issue has been close without yet resolved ?

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.

5 participants