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

Add Solaredge adapter to latest #1153

Closed
wants to merge 1 commit into from
Closed

Conversation

92lleo
Copy link

@92lleo 92lleo commented Feb 28, 2021

Add Solaredge Adapter
Tracked in 92lleo/ioBroker.solaredge#3

@GermanBluefox GermanBluefox added the auto-checked This PR was automatically checked for obvious criterias label Feb 28, 2021
@ioBroker ioBroker deleted a comment from Apollon77 Feb 28, 2021
@Apollon77 Apollon77 added the Adapter-Review needed A developer from the ioBroker Team will review the adapter, will provide comments or require changes label Feb 28, 2021
@Apollon77
Copy link
Collaborator

You also should:

  • think about to upgrade dependencies
  • add "request" package as dependecy if you use it (see testing failures)
  • enter news in all languages (see translate tools in dev-best-practices in readme of this repo)
  • add the default values of your two config vars to native section in io-package
  • you set the values using default value of the created objects? this will not work and should never update the value on next run; also ideally use async/await then you also do not need that kill-timer. also https://github.com/92lleo/ioBroker.solaredge/blob/master/main.js#L146 will not work if the system is a bit slower ...
    Please check and fix

@Apollon77 Apollon77 added must be fixed The Adapter request got review/automatic feedback that is required to be fixed before another review question Something needs to be done or answered by the adapter developer and removed Adapter-Review needed A developer from the ioBroker Team will review the adapter, will provide comments or require changes auto-checked This PR was automatically checked for obvious criterias labels Feb 28, 2021
@Apollon77
Copy link
Collaborator

@92lleo Do you need any kind of support to adress the topics from above?

@92lleo
Copy link
Author

92lleo commented Apr 9, 2021

@Apollon77 thanks for asking.
92lleo/ioBroker.solaredge#3 tracks your points.

  • Do you have an example for async/await?
  • Whats the problem with adapter.stop and slow systems? Is there a better way for scheduled adapters?

PS:
I knew that using createState to update the states is not the desired way, but it worked before the js-controller update, so I never bothered to change it.

@Apollon77
Copy link
Collaborator

  • async/await: we just helped an other dev ... look added awattar adapter #986 (comment), else on discord and telegram are developer channels to also get infos and support
  • no it is not about using adapter.stop, you need to, but you should make sure top call it when all logic is really done. all actions to create objects or set states are executed asynchronously. So if you assume that a system needs 5s to process all stuff then it is an asumption. your stop could kick in too early and so only parts of the data is set. thats why make sure that all stiuff is done and then directly call adapter.stop and you can be sure all is good

@92lleo
Copy link
Author

92lleo commented Apr 10, 2021

Ah, thanks for the clarification. Changed async/timeout to async/await: 92lleo/ioBroker.solaredge@f1b1c64
Seems to work just fine. I'll see if I get it a bit cleaner, also the tests still need work, seems like I broke them when updating dependencies

@Apollon77
Copy link
Collaborator

cool, just poke when ready for next review

@Apollon77
Copy link
Collaborator

@92lleo Any update?

@Apollon77
Copy link
Collaborator

@92lleo Anything we can help with?

@ldittmar81
Copy link
Collaborator

Hello @92lleo are you ready for the next review? Do you need some help?

@Apollon77
Copy link
Collaborator

@92lleo How we should continue? Can we help somehow? Should we do a PR with relevant changes? But that would still require you to verify and test and release it afterwards because the changes can only be done "blind".

@92lleo
Copy link
Author

92lleo commented Sep 23, 2022

Hi @Apollon77 , @ldittmar81
sorry to leave you waiting, thanks for your support! I haven't done much for that topic lately, as far as i can tell the biggest issue missing was the tests. If you can help out in any way it's highly appreciated. Tests&verficiation + release can be done from my side. I'll also check&update the correspoinding issue(s) over the next weeks

@Apollon77
Copy link
Collaborator

Please approve testing for 92lleo/ioBroker.solaredge#19

@92lleo
Copy link
Author

92lleo commented Nov 20, 2022

@Apollon77 tested, reviewed & merged. Preparing the release this week. sorry for the long wait

@Apollon77
Copy link
Collaborator

@92lleo any news for the release? last step missing

@92lleo
Copy link
Author

92lleo commented Feb 20, 2023

@Apollon77 sorry again for the long wait.. Release is pushed and tagged -> https://github.com/92lleo/ioBroker.solaredge/releases/tag/0.3.0

@mcm1957
Copy link
Collaborator

mcm1957 commented Feb 20, 2023

First of all - THANK YOU for the time and effort you spend to maintain this adapter.

I would like to give some (preliminary) feedback based on my personal oppinion. This is NOT an offical review and @Apollon77 might have several additional suggestions or even a different oppinion to one or the other statement. Please feel free to contact him (or wait for a response from him) if you cannot follow my suggestsions or before you spend major effort.

  • scheduled adapters should have random delays

    An unmodified schedule adapter that queries data from external systems will produce a lot of issues because usually the default schedule stays unchanged for all users and so all installations out there will then contact the server at the exact same time create a "potentially huge" request spike. The best practice for now is at least to add a random delay to spread the calls within that minute - or even move the "minutes" on first start and so persist that (e.g. see https://github.com/ioBroker/ioBroker.yr/blob/master/main.js#L84-L90) ... if the adapter gets successfull then we have a big issue and the webpage owner contacting us ... we should prevent that from the beginning.

    io-package.json specifies "schedule": "*/15 * * * *" which will execute at minute 0, 15, 30 and 45 of every hour as far ass I know. Please ignore, if I'm wrong.

  • github dependabot support seems to be missing

    It looks like you did not yet setup dependabot support; at least .github/dependaboit.yml is missing.

    Please consider setting up dependabot support (and to ease life the workflow auto-merge.yml). Dependabot will ensure that your adapter uses the most recent versions of external packages and avoids problem due to outdted base libraries. Dependabit provides PRs at you repository to update the dependencies. Depending on you setting, especially on auto-merge.yml configuration no or only minor revisions will be outmatically merged into you main branch. All major revisions must (ans should) be reviewed by you. But its fully OK if you wish to check dependencies manually too.

Thanks for reading and evaluating this suggestions.
McM1957

@mcm1957
Copy link
Collaborator

mcm1957 commented May 18, 2023

RE-CHECK!

@GermanBluefox GermanBluefox added the auto-checked This PR was automatically checked for obvious criterias label May 18, 2023
@Apollon77
Copy link
Collaborator

Both your comments from @mcm1957 are correct and @92lleo should consider it, especially the random delays. Depending on how users use the data the delay should be static per instance that it is always 15 mins difference or it could be really dynamic (determined per run) ... @92lleo wdyt? And yes I could provide another PR for that if you like.

@github-actions github-actions bot deleted a comment from GermanBluefox Aug 6, 2023
@github-actions github-actions bot deleted a comment from mcm1957 Aug 6, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Aug 6, 2023

@92lleo

Please let us know if you are still maintaining this adapter and are intrested in registratrion at latest repositories.
Currently tests at adapter repo seem to fail:
image

If you are still interested I will do a new review to check what issues are still open / already fixed and to get this PR merged.

Please simüply post any reply (and check and fix github tests at repository).

If we do not get any responce with 30 days we will close this PR.
But of course a new PR will be welcome at any time.

@mcm1957 mcm1957 added the stale PR seems has no activity, will be closed after some time label Aug 6, 2023
@mcm1957 mcm1957 changed the title Add Solaredge adapter Add Solaredge adapter to latest Aug 6, 2023
@github-actions
Copy link

github-actions bot commented Aug 6, 2023

Automated adapter checker

ioBroker.solaredge

Downloads Number of Installations (latest)
NPM

  • ❗ [E118] Versions in package.json and in io-package.json are different
  • ❗ [E605] No actual year found in copyright. Please add "Copyright (c) 2019-2023 92lleo [email protected]" at the end of README.md
  • ❗ [E701] No actual year found in LICENSE. Please add "Copyright (c) 2019-2023 92lleo [email protected]" at the start of LICENSE
  • 👀 [W171] "common.title" is deprecated in io-package.json
  • 👀 [W105] "common.titleLang" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • 👀 [W109] "common.desc" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • 👀 [W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI
  • 👀 [W145] Each "common.news" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • 👀 [W145] Each "common.news" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • 👀 [W145] Each "common.news" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • 👀 [W145] Each "common.news" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • 👀 [W145] Each "common.news" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • 👀 [W202] Version of package.json (0.3.0) doesn't match latest version on NPM (0.2.0)
  • 👀 [W400] Cannot find "solaredge" in latest repository
  • 👀 [W513] "gulpfile.js" found in repo! Think about migrating to @iobroker/adapter-dev package

Add comment "RE-CHECK!" to start check anew

@mcm1957 mcm1957 removed the auto-checked This PR was automatically checked for obvious criterias label Aug 6, 2023
@92lleo
Copy link
Author

92lleo commented Aug 8, 2023

Hello @mcm1957
Unfortunately I don't have the capacity to do anything for this currently. If anyone is interested I'd be glad to move the repo to the comunnity repos. If it does not meet the requirements yet, lets just close the PR

@mcm1957
Copy link
Collaborator

mcm1957 commented Aug 16, 2023

Bypass commit by @GermanBluefox
9ff2c9e

@mcm1957 mcm1957 added the (RE-)REVIEW pending (mcm1957) Changes requested by review have been applied, re-review could be done. label Aug 29, 2023
@mcm1957 mcm1957 removed stale PR seems has no activity, will be closed after some time question Something needs to be done or answered by the adapter developer must be fixed The Adapter request got review/automatic feedback that is required to be fixed before another review (RE-)REVIEW pending (mcm1957) Changes requested by review have been applied, re-review could be done. labels Oct 11, 2023
@mcm1957 mcm1957 self-assigned this Oct 11, 2023
@mcm1957 mcm1957 added the ⚠️check Issue/PR needs attention label Oct 11, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Oct 11, 2023

PR will be checked / closed after transfer of adapter to community area

@mcm1957
Copy link
Collaborator

mcm1957 commented Dec 4, 2023

Adapter has been trasferred to iobroker-community-adapters orga.

@mcm1957 mcm1957 closed this Dec 4, 2023
@mcm1957 mcm1957 added lgtm Looks Good To Me and removed ⚠️check Issue/PR needs attention labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Looks Good To Me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants