ioBroker.repositories
ioBroker.repositories copied to clipboard
Add notificationforandroidtv to latest
Please add my adapter ioBroker.notificationforandroidtv to latest.
This pull request was created by https://www.iobroker.dev c0726ff.
note from #3164
https://forum.iobroker.net/topic/71123/neuer-adapter-android-tv-fire-tv-benachrichtigungen/24?_=1704149932016
Why did you close this PR?
OK - seems to be an misundersatnding of web portal "add to latest". See remark at Forum. https://forum.iobroker.net/topic/71123/neuer-adapter-android-tv-fire-tv-benachrichtigungen/54
Why did you close this PR?
OK - seems to be an misundersatnding of web portal "add to latest". See remark at Forum. https://forum.iobroker.net/topic/71123/neuer-adapter-android-tv-fire-tv-benachrichtigungen/54
Yep, seem so, because there was an error while "add to latest" > there is a open PR,...
First of all - THANK YOU for the time and effort you spend to maintain this adapter.
I would like to give some feedback based on my personal oppinion. @Apollon77 might have additional suggestions or even a different oppinion to one or the other statement. Please feel free to contact him if you cannot follow my suggestions or want to discuss some special aspects.
-
[x] Readme.md should be written in pure english
As ioBroker is an international software supporting several languages the main Readme.md file should be written in english. Its ok to add additional Readme-
.mds of course. -
[x] Readme.md contains multiple languages
Please remove the german version / all non english versions from Readme.md because Readme.md gets automatically translated and this will not work with multiple languages within Readme.md. You can add locatlized README-
.md or add documentaion pages in (docs/de and docs/en) like https://github.com/iobroker-community-adapters/ioBroker.pvforecast/tree/main/docs and add links into the main README:md -
[x] package.json should not package test scripts
Test scripts (typically located at test directory are not needed at user systems. So they should not be included into npm package. Please remove form dir section
Theres no need to add lib to directory section as files located at lib are already packaged by standard files section coontents.
So complete dirs section should be removed from package.json. see https://github.com/DNAngelX/ioBroker.notificationforandroidtv/blob/b582fae8bdc64800b80f2e194cdd79b7ab617c85/package.json#L73
-
[x] please verify that all used dependencies are listed at package.json and are up to date
At least axios is NOT listed as a production dependency. Please add axios and eventually other external packaged included by require to package.jsosn (best by using npm i
command. Please verify that one package is not listed both at depencencies and dev-dependencies.
-
[x] consider using jsonConfig (non blocking)
Please consider using jsonCOnfig as this adapter seems t o have very simple configuration interface. Metrialize UI should no longer be used for new adapters as long as jsonConfig is sufficient. Otherwise you should consider to use react.
See message from checker: [W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI
-
[x] native objects at io-package.json are incorrect
io-package.json contains inital demo configuration objetcs (options1, options2) but is missing real configuration objects. https://github.com/DNAngelX/ioBroker.notificationforandroidtv/blob/b582fae8bdc64800b80f2e194cdd79b7ab617c85/io-package.json#L163
-
[ ] Why reading state before writing?
Its overhead to read every state before writing to it. If you really want to avoid writing unchanges values for whatever reason remeber the value at adapetr level (best practice) or use setStateChangedAsync
see https://github.com/DNAngelX/ioBroker.notificationforandroidtv/blob/b582fae8bdc64800b80f2e194cdd79b7ab617c85/main.js#L80
-
[x] invalid characters should be filtered from object ids
Some characters are not allowed to be used as part of an object id. If an object id is not hardcoded or even depending on user input you should ensure that such an object id does not contain an invalid character. Iobroker provides the constant
adapter.FORBIDDEN_CHARS
, i.e. by using the following snippet:
function name2id(pName) {
return (pName || '').replace(adapter.FORBIDDEN_CHARS, '_');
}
You seem to be using the data entered by user at config without any filtering. The IP address could contain any other data i.e. as the user would enter ain IPv6 Address. Please add conversion or blocking of illegal characters. ote that dots are ONLY allowed to seperate between device / channel / folder and states.
-
[x] onStateChange handler ignores ack flag
The adapter must honor the ack flag when processing onStateChange events. Whenever the onStateChange handler is called for an own state (a state owned by the processing instance of the adapter) it must ignore this event if the ack flags is set. Only stateChanges with ack==false are allowed to be processed.
When processing foreign states which are output of another adapter processing must only occure if the ack flag is true.
-
[x] reevaluate state roles and write flag
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.
Please avoid using general roles (state, value) whnever a dedicated role exists.
Please note that i.e. roles of type value must bnot be writeable, The same is true for indicator.
-
[x] axios seems to be missing a timeout
The default for axios response timeout is ß0 indicating NO timeout. This can lead to a hanging adapter. Please add a timout value to all axios calls (or add it as a default)
-
[x] some labels seem to have no translation into all languages
It seems that some labels are not translated into all supported languages, i.e. ... Please consider adding missing translations
-
[x] console.log should be replaced by this.log.xxx
As console.log output is not visible at user system it seems to be better to use this.log.xxx with xxx i.e. error depending on severity of message
-
[x] minimize non exceptional logging
Please review all log.info logging whther the really provide some benefit to users. Users often complain about adapter logging to much withgout real benefit. I would suggest to log the fact that that a message has been received only as log.debug. So it is available when looking for problems but does not spam the log file. (But this suggstion will not be considered blocking)
-
[ ] check and adapt testing
Standard iobroker testing is present but checks do not pass currently. Especially linter throws severyl errors. Many of them can be fixed using npm run lint --fix as suggested at log. Tests must show a green checkmark and run for all supported node versions.(This is already configured correctly)
Use of var is outdated due to sideeffects caused by var. use let or const whichever is appropiate.
Please avoid changing linter config or discuss before any changes performed. Lint tries to ensure a common programming standard for ioBroker adapters.
Whether real tests are passing could be checked after linter passes.
Please feel free to ask for support if needed.
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!
reminder 28.01.2024
- [x] Readme.md should be written in pure english
- [x] Readme.md contains multiple languages
- [x] package.json should not package test scripts
- [x] please verify that all used dependencies are listed at package.json and are up to date
- [ ] consider using jsonConfig (non blocking) I will try to do it in the next versions. There is not a really good description about that, I did not found anything related to "how add dynamicly lines" or like this. If I know where to search, no problem then.
- [x] native objects at io-package.json are incorrect
- [ ] Why reading state before writing? first of all, this will be read only when the config is changed (how often you will buy and config a new android tv) or when the plugin boots up. The values I'm writing at the initial setup are suggestions from my site. IF a user will change it, the value from the user should be there and my value should never overwrite this again. I didn't saw a method which can handle this case to put values only at initial the device.
- [x] invalid characters should be filtered from object ids
- [x] onStateChange handler ignores ack flag
- [x] reevaluate state roles and write flag
- [x] axios seems to be missing a timeout
- [ ] some labels seem to have no translation into all languages
Yes, labels like type, icon URL and payload and all selections. For selections I didn't found an working possibility how to do it.
const bkgcolor = {
0:"neutral blue",
1:"black",
2:"blue",
3:"green",
4:"red",
5:"light blue",
6:"turquoise",
7:"orange",
8:"purple"
}
- [x] console.log should be replaced by this.log.xxx
- [x] minimize non exceptional logging mostly debug now
- [x] check and adapt testing
@DNAngelX
Standard checks are failing. Please fix. All adapters must use standadard github testing (as minimum) and tests must pass.
Errors reported by adapter checker must be fixed. You can run Repo Checker using www.iobroker.dev at any time too. Native must be present at least as an empty attribute. Seems you removes lately.
reminder 12.2.2024
RE-CHECK
@mcm1957 To be honest I have absolute no clue, why the "Adapter Check" fails with
[E101] io-package.json must have at least empty "native" attribute
In the io-package.json I didn't changed anything (may be npm run lint --fix broke something,...) and the E101 error does not tell me what to do, so very unclear for me.
So I don't know what to do here
No problem, feel free to ask whenever you have a question.
The checker demands thet the "NATIVE" Object insiode io-package.json is missing. It must be at least an empty object and should contain initial config values in many cases. I've created a PR to add an empty object.
https://github.com/DNAngelX/ioBroker.notificationforandroidtv/pull/13
reminder 19.2.2024
RE-CHECK
Merged, so hope all is good now :)
Thanks for fixing all issues notes at he review and providing a detailled feedback. Those issues seem to be solved all together now.
BUT - sad to say - standard github based test are still not passing:
Thats for several reasons:
-
linter tests are not passing. Please fix source and eventually adapt linter setting depending on your preferences to use single or double quotes
-
standard test environment is missing completly test directory is missing test scripts are missing at package.,json
I've provided at PR to add test directory and text scritps to pacakge,json: https://github.com/DNAngelX/ioBroker.notificationforandroidtv/pull/14
Please mote that the standard tests seem to fail as there is a problem with "adapter already running". Maybe there is a issue at your shutdown code. Bute I do not have time at the momengt to analyze. Please ask at teglegram developer channels (links at www.iobroker.dev) if you need help
In any case running the standard github bases tests must be fixed before adding to repository. Sorry.
Please drop a note if fied or some otehr reaction is required.
reminder 05.03.2024
@DNAngelX
How shall we continue? Do you need any help? Did you notice the last comment and the provided PR?
reminder 12.3.2024
@DNAngelX
How shall we continue? Do you need any help? Did you notice the last comment and the provided PR?
Please check and merge PR https://github.com/DNAngelX/ioBroker.notificationforandroidtv/pull/14
Working / passing standard Github tests is mandatory for an adapter to be added to the repository.
reminder 25.3.2024
@DNAngelX
How shall we continue? Do you need any help? Did you notice the last comment and the provided PR?
Please check and merge PR https://github.com/DNAngelX/ioBroker.notificationforandroidtv/pull/14
As the PR might need an adaption in the meantime, please let me know if you need help.
Working / passing standard Github tests is mandatory for an adapter to be added to the repository.
If there is no reaction / comm ent until 30.4.2024 this PR will be closed
reminder 15.4.2024
@DNAngelX
How shall we continue? Do you need any help? Did you notice the last comment and the provided PR?
Please check and merge PR https://github.com/DNAngelX/ioBroker.notificationforandroidtv/pull/14
As the PR might need an adaption in the meantime, please let me know if you need help.
Working / passing standard Github tests is mandatory for an adapter to be added to the repository.
If there is no reaction / comm ent until 30.4.2024 this PR will be closed
reminder 1.5.2024
@DNAngelX
How shall we continue? Do you need any help? Did you notice the last comment and the provided PR?
Please check and merge PR DNAngelX/ioBroker.notificationforandroidtv#14
As the PR might need an adaption in the meantime, please let me know if you need help.
Working / passing standard Github tests is mandatory for an adapter to be added to the repository.
If there is no reaction / comm ent until 30.4.2024 this PR will be closed
reminder 1.5.2024
Hey, I don't know what to do because the issues we faced up have nothing to do with the written code from me and relations.
It's something what came up after lint --fix, so I have absolute no idea what's the issue there and don't know how to fix that.
Everything from the request on Jan 14th was changed exact as expected.
So if after lint --fix some parts in the ground adapter are not working anymore,... I can't do there anything.
Automated adapter checker
ioBroker.notificationforandroidtv
:thumbsup: No errors found
- [ ] :eyes: [W171] "common.title" is deprecated in io-package.json. Please remove from io-package.json.
- [ ] :eyes: [W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI
- [ ] :eyes: [W181] "common.license" in io-package.json is deprecated. Please define object "common.licenseInformation"
- [ ] :eyes: [W173] "@iobroker/adapter-core" (^3.0.4) should be 3.0.6 or newer - please update
- [ ] :eyes: [W115] common.tier is required in io-package.json. Please check https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/objectsschema.md#adapter.
- [ ] :eyes: [W028] Minimum node.js version 18 recommended. Please adapt "{'engines' : { 'node' >= '16' } }" at package.json.
- [ ] :eyes: [W400] Cannot find "notificationforandroidtv" in latest repository
Add comment "RE-CHECK!" to start check anew
@DNAngelX
Hey, I don't know what to do because the issues we faced up have nothing to do with the written code from me and relations. It's something what came up after lint --fix, so I have absolute no idea what's the issue there and don't know how to fix that.
Well github based tests are mandatory. Adapter code must be written so that they pass. So failing tests are related to the coe in some form. But we will try to fix this together - so no worry.
To get this PR done the following topics are open:
- Testing must pass
THANKS that you merged the older PR adding tests. As I stated some changes would be required in the meantime as supprot for node 16 has been dropped. (at testing). I have provides a PR to fix this for you.
- Tests failed as adapter did not do a clean start
I've analyzed your code in Detail. The reason for this problem is / was that you write the adapter using class style (that the current style and is ok) BUT in addition used adapter=util.adapter(....) which is the initalization to be used for old legacy, non class code. So you created to instzancey of teh adapter during startup causing problems later. I provided a PR to adapt your code to use class style (this.xxx) only.
So please check the PR https://github.com/DNAngelX/ioBroker.notificationforandroidtv/pull/20 which fixes all issues causing problems with testing.
Please note that code review revealed two more suspect code places which should be checked by you. They are listed at the PR.
Please create a new release after merging the PR and check that the test are passing then. As soon as this is done, let me know by dropping a comment here.
reminder 1.5.2024
Testing seems to be fixed now. So no more blocking is present. I did not see a co ment from your site - so I did not notice this until today.
@DNAngelX
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, it' OK to continue using this topic too.
Testing seems to be fixed now. So no more blocking is present. I did not see a co ment from your site - so I did not notice this until today.
Hey, thought the github-actions comment was enought :)
Better late then never I would say :)
THX