-
Notifications
You must be signed in to change notification settings - Fork 284
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
Added legrand-ecocompteur #757
Conversation
Automated adapter checkerioBroker.legrand-ecocompteur
Add comment "RE-CHECK!" to start check anew |
Seems to be a false positive ... sometimes that happens we don't know why ... so ok! |
LGTM |
Hi, some review comments from me, all no real blockers
Else also looking fine for me; the roles would be cool to get checked |
Please give a short info if you want to check these or if I should merge into repo |
If you want to critique the code for this adapter then you should really open an issue over in that repo: https://github.com/raintonr/ioBroker.legrand-ecocompteur/issues That said...
Yes, I looked at that list and there is nothing suitable. The adapter would need:
I notice there is
Good to know. You will notice I simply took the adapter template and did not touch anything I didn't need to. I left these methods because I didn't know if removing them would break the ioBroker world. If they can be safely removed I will do so. May I suggest the template should be updated to mention in the comments where code can be safely removed.
Yes, I thought about that. You will notice the minimum polling period is 1s whereas the HTTP request has a 750ms timeout. No problem as the request will always complete or error before the next is due. Of course I tested this by pulling the cable out of my router and also pointing the IP address at an incorrect device that would throw errors. Works perfectly. |
It is my fault with What do you suggest? When I translate with google, I get "power consumption"... I could find 'elecrical power consumption' and 'electricity consumption' as official translations too, but I could find 'electric energy consumption' in wiki |
Energy is the ability to do work. Measured in an amount of power spread over a period of time. Power is the rate of doing work. This is a good explanation: http://www.differencebetween.net/science/difference-between-energy-and-power/ Perhaps good roles would be:
All in W, kW, etc. It's good to separate consumption and production because someone might have a Solar PV or other generation system for which they would require that latter one. The 'instantaneous' part I mentioned before is probably redundant because thinking about it, by it's definition power is a constantly varying value so any reading only applies to that very instant in time it was taken. For example, with the device this adapter is polling, the best you can get is a reading every second so that is a 1 second sample. And therefore for energy one would need:
All in Wh, kWh, etc. Maybe you want to include 'electrical' in there? Eg. That said, further grouping these power/energy roles like that is probably overkill and unnecessary ;) |
Aaahhhh ... did not saw Bluefox answer :-) ... ignore what was here before |
Basically you rare right, we just did it inthe past so that for the "bring adapter in into latest the first time" we do this initial review here also to dicument that status in one place. |
PS: Also reading https://github.com/ioBroker/ioBroker.repositories#development-and-coding-best-practices is always a good starting point :-) Should be as comment in new adaoter screated by adater creator or newest templates |
So from all this... is there anything here that someone insists I must change in the adapter before merging this pull request? |
No I merge it ... |
That's good, thanks. With regards to the state roles... are those defined anywhere? I mean, I see they are documented in the file you linked... but is there anywhere in the code that actually validates a role to one of these accepted options? Or is it just a string and it will literally store anything you give it? Just if it's the latter I can simply update my code and it will work. |
No roles are not validated right now. |
Ps: but we think doing it ;-) |
Initial release of this adapter for test. Although it seems to work perfectly in my installation :)