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

New Adapter iobroker.emporia #2194

Merged
merged 6 commits into from
Nov 12, 2023
Merged

New Adapter iobroker.emporia #2194

merged 6 commits into from
Nov 12, 2023

Conversation

Chris-656
Copy link
Contributor

@Chris-656 Chris-656 commented Mar 26, 2023

New adapter iobroker.emporia

Checklist
[ ] All requirements to bring a new adapter into Stable repository are fulfilled (see https://github.com/ioBroker/ioBroker.repositories#requirements-for-adapter-to-get-added-to-the-stable-repository)
[ ] Please add a link to Forum testing thread, if existing.

What will happen after creating this request?

  • We will do a short additional review of your adapter
  • After this we add the adapter to the stable repository

Thank you for your new adapter in ioBroker!

@Chris-656 Chris-656 closed this Mar 26, 2023
@Chris-656
Copy link
Contributor Author

new name

@Chris-656 Chris-656 changed the title Master New Adapter iobroker.emporia Mar 26, 2023
@Chris-656 Chris-656 reopened this Mar 26, 2023
@Chris-656
Copy link
Contributor Author

New adapter iobroker.emporia

@Apollon77 Apollon77 added the REVIEW needed (apollon77) A developer from the ioBroker Team will review the adapter, will provide comments or require changes label Mar 26, 2023
@GermanBluefox GermanBluefox added auto-checked This PR was automatically checked for obvious criterias must be fixed The Adapter request got review/automatic feedback that is required to be fixed before another review labels Mar 26, 2023
@ioBroker ioBroker deleted a comment from Apollon77 Mar 26, 2023
@ioBroker ioBroker deleted a comment from Chris-656 Mar 26, 2023
@ioBroker ioBroker deleted a comment from Chris-656 Mar 26, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Mar 26, 2023

Its at least unusual to add an Adapter to latest and stable at the same time. Please see README.md describing the normal sequence.

I would suggerst to remove addition to stable und create a second PR after this adapter is reviewed and added to latest and at leaset some users have tested it using latest repo.

But feel free to wait for any response from @Apollon77 - he will finally decide this topic

@mcm1957
Copy link
Collaborator

mcm1957 commented Mar 26, 2023

Adapter repo: https://github.com/Chris-656/ioBroker.emporia

@mcm1957
Copy link
Collaborator

mcm1957 commented Mar 26, 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.

  • consider using adapter.setTimeout / this.setTimeout instead of (standard) setTimeout

    The adapter package provides wrapper routines for native setTimeout, setInterval, clearTimeout and clearInterval. Using those routines ensures that timers are cancelled on on load. Additional checks on thomse limits might be performed, too. So consider replacing native setTimeout/clearTimeout by adapter.setTimeout/adapter.clearTimeout or this.setTimeout/this.clearTimeout. The same refers to setInterval/clearInterval.

  • check and limit configurable timeouts / intervals

    Node setTimeout/setInterval routines have a maximum allowed value of 2,147,483,647 ms. Using delays larger than 2,147,483,647 ms (about 24.8 days) result in the timeout being executed immediately. So all (user configurable) values passed to setTimeout / setInterval should be checked and limited.

  • check and limit intervals used to access cloud services

    Limit all intervals used to access cloud services to a reasonable value. If users configure an inapprobiate access rate this could lead to suspending the service by the provider for all ioBroker users.

  • Please remove addition to stable repository until your adapter has passed some time at latest repository.

Thanks for reading and evalutaing this suggestions.
McM1957

@Chris-656
Copy link
Contributor Author

Chris-656 commented Mar 27, 2023 via email

@mcm1957
Copy link
Collaborator

mcm1957 commented Mar 27, 2023

  • check and limit configurable timeouts / intervals
    :
    Not clear to me. In index_m.html there is the limitation implemented

OK, I did not check index_m.html. Limiting could be OK there. But users could change the value within objects too (manually). So personally I prefer to check the limits insode code too. But its your decision whether a double check is appropiate. I do not think, this would be blocking at Apollons check.

  • check and limit intervals used to access cloud services

            Ok understand. Try to implement a time out for the state active
    

No I think my comment was misleading. I do not think that a timeout is required. The important point is to limit polls from cloud to a maximum rate. The user should not be allowed to poll i.e. every second while a poll every minute would be more than sufficient (i.e. when polling whether data od currency exchange rates, ...) As notes above you limit to 5 (seconds I assume) so this limit ist low but might be ok. The problem which should be addressed is, that we already had situations where the cloud provider access from iobroker was blocking due to inappropiate high load caused by few but much to heavy polling.

Thanks for reading and reacting on the suggestions.

McM

@ioBroker ioBroker deleted a comment from mcm1957 Apr 1, 2023
@mcm1957 mcm1957 removed the must be fixed The Adapter request got review/automatic feedback that is required to be fixed before another review label May 18, 2023
@ioBroker ioBroker deleted a comment from mcm1957 May 20, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented May 22, 2023

Please remove node 14 from test-and-release.yml and (optionally) add node 20 to testing matrix.
Node 14 is no longer supported and tests will fail since 22.5.2023.

Thanks
McM1957

@mcm1957 mcm1957 added the must be fixed The Adapter request got review/automatic feedback that is required to be fixed before another review label May 22, 2023
@github-actions github-actions bot deleted a comment from GermanBluefox Aug 7, 2023
@github-actions github-actions bot deleted a comment from mcm1957 Aug 7, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Aug 7, 2023

I would like to give some additional (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.

  • reevaluate state roles

    Only the values specified here (https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/stateroles.md) may be used as state roles. Do not invent new names as this might disturb the functionalyity of other adapters or vis.

    In addition the roles MUST match the read/write functionality. As an example a role value.* requires that the state is a readable state. Input states (write only) should have roles like level.*. Please read the description carefully. States with role 'button' should (must) have attribute 'common.read=false' set. A button ( "Taster" in german only triggers when you press but else has no state), so it should also be not readable. This is also like HomeMatic does it. A switch has clear states true or false and so can be read.

    role 'name' does not exist, please use an existing role, i.e. 'text'

  • adapt testing to supported node releases

    As node 14 is end of life and will no longer be supported by js-controller 5.x, consider removing node 14.x tests from matrix id still present.
    Tests for node 16 is mandatory unless you require node 18 and higher.
    Tests for node 18 is mandatory as many users already use node 18 and node 16 will be eol and deprected Q3/2023.
    Consider adding node 20 tests unless you already know incompatibilities.

    So the recommended testmatrix is [16.x, 18.x, 20.x],

Thanks for reading and evaluating this suggestions.
McM1957

Please add a comment when you have reviewed and fixed the suggestionsor at least commented the suggestions and you think the adapter is ready for a re-review!

@mcm1957 mcm1957 removed the REVIEW needed (apollon77) A developer from the ioBroker Team will review the adapter, will provide comments or require changes label Aug 7, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Sep 7, 2023

How shall we continue?
Please let us know if you plan zu fix the noted issues in the near future - or as an alterntive - like to discuss some / all of those points.

@github-actions github-actions bot added the *📬 a new comment has been added label Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

Automated adapter checker

ioBroker.emporia

Downloads Number of Installations (latest)
NPM

👍 No errors found

  • 👀 [W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI
  • 👀 [W202] Version of package.json (0.0.12) doesn't match latest version on NPM (0.0.10)
  • 👀 [W400] Cannot find "emporia" in latest repository

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

@github-actions github-actions bot deleted a comment from Chris-656 Nov 1, 2023
Copy link
Contributor Author

@Chris-656 Chris-656 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New adapter iobroker.emporia

@Chris-656
Copy link
Contributor Author

Chris-656 commented Nov 1, 2023

@Chris-656

How shall we continue?

Please let us know if you plan zu fix the noted issues in the near future - or as an alterntive - like to discuss some / all of those points.

Looks like only adaption of node release (16 to 20, remove 14) was missing.

Please add any comment if you still maintain this adapter and want it listed at repositories If we do not receive any comment until mid of November this PR might be closed.

I changed the role names and added V 20.x in the tests. How we can now proceed ?

@mcm1957 mcm1957 added RE-REVIEW pending (by mcm1957) Changes requested by review have been applied, re-review could be done. and removed 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 stale PR seems has no activity, will be closed after some time *📬 a new comment has been added labels Nov 2, 2023
@mcm1957 mcm1957 added must be fixed The Adapter request got review/automatic feedback that is required to be fixed before another review and removed RE-REVIEW pending (by mcm1957) Changes requested by review have been applied, re-review could be done. labels Nov 2, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Nov 2, 2023

@Chris-656

Why did you add the adapter to stable (again) ?
Please remove changes to sources-dist-stable.json.
Adapter must first be available at latest bvore addition to stable con be considered.

Please add a comment when done!

@mcm1957 mcm1957 added the ON HOLD PR is set ON HOLD due to pending question or major issues. label Nov 3, 2023
@mcm1957 mcm1957 added RE-REVIEW pending (by mcm1957) Changes requested by review have been applied, re-review could be done. and removed must be fixed The Adapter request got review/automatic feedback that is required to be fixed before another review CHANGES-BOTH-REPOSITORIES ON HOLD PR is set ON HOLD due to pending question or major issues. labels Nov 11, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Nov 11, 2023

@Chris-656
I did not detect you removal if stable as you did not comment.
I'll continuer asap
No further action required by you

@mcm1957
Copy link
Collaborator

mcm1957 commented Nov 12, 2023

RE-CHECK!

@mcm1957 mcm1957 added lgtm Looks Good To Me and removed RE-REVIEW pending (by mcm1957) Changes requested by review have been applied, re-review could be done. labels Nov 12, 2023
@mcm1957
Copy link
Collaborator

mcm1957 commented Nov 12, 2023

This adapter has been released to latest repository and should be visible within 24h maximum.

Please create a thread at https://forum.iobroker.net/category/91/tester titled like "Test Adapter " to collect some user feedback and provide a link to this topic when requesting addition to stable repository later.

Note: If an other testing topic already exists, ist OK to continue using this topic too.

@mcm1957 mcm1957 merged commit 0ec5d5b into ioBroker:master Nov 12, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-checked This PR was automatically checked for obvious criterias lgtm Looks Good To Me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants