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

deconz: Add LEDVANCE / OSRAM otau firmware downloader #983

Merged
merged 18 commits into from Jan 11, 2020
Merged

deconz: Add LEDVANCE / OSRAM otau firmware downloader #983

merged 18 commits into from Jan 11, 2020

Conversation

olijouve
Copy link
Contributor

@olijouve olijouve commented Jan 6, 2020

Add LEDVANCE / OSRAM otau firmware downloader, respecting max 10 DL per minute Ratelimits

resolves #985

@olijouve
Copy link
Contributor Author

olijouve commented Jan 7, 2020

Can you make one PR with your change + changelog and update the version number in that PR. Thanks!

@pvizeli, I think that PR do respect what you asked me to rectify on my previous PRs ?
I closed them by the way.

@pvizeli
Copy link
Member

pvizeli commented Jan 7, 2020

Please address the lint issue. The script have the correct permission of a+x?

Fix lint issues:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2003 -- expr is antiquated. Consider rewr...
Fix lint issue:
  https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti...
Adressing @pvizeli comment : The script have the correct permission of a+x?

Add CMD to set a+x permission on ledvance-otau-dl.sh script
@olijouve
Copy link
Contributor Author

olijouve commented Jan 8, 2020

Please address the lint issue. The script have the correct permission of a+x?

it's done

COPY data/nginx.conf /etc/nginx/nginx.conf
COPY data/run.sh data/discovery.sh /

CMD ["/run.sh"]
CMD ["/bin/chmod a+x /bin/ledvance-otau-dl.sh && /run.sh"]
Copy link
Member

Choose a reason for hiding this comment

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

Setting permissions should be either in the Docker build or just ensure it is correctly set into the repository. Either way, not in the RUN command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok sorry, i’ll look to fix that this evening.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Between that two methods, does there is one to be prefered ?

Copy link
Member

@pvizeli pvizeli Jan 8, 2020

Choose a reason for hiding this comment

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

I prefer to use git-index: git update-index --chmod=+x path-name-shell-script So you need just copy the file on docker build like the other scripts

Copy link
Member

Choose a reason for hiding this comment

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

agreed.

@homeassistant
Copy link

Hello @olijouve,

When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).

The commits that are missing a linked GitHub account are the following:

Unfortunately, we are unable to accept this pull request until this situation is corrected.

Here are your options:

  1. If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

  2. If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

    • If you only made a single commit you should be able to run
      git commit --amend --author="Author Name <email@address.com>"
      
      (substituting Author Name and email@address.com for your actual information) to set the authorship information.
    • If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
      1. You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
      2. You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
    • Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.

Thanks, I look forward to checking this PR again soon! ❤️

@homeassistant
Copy link

Hello @olijouve,

When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).

The commits that are missing a linked GitHub account are the following:

Unfortunately, we are unable to accept this pull request until this situation is corrected.

Here are your options:

  1. If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

  2. If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

    • If you only made a single commit you should be able to run
      git commit --amend --author="Author Name <email@address.com>"
      
      (substituting Author Name and email@address.com for your actual information) to set the authorship information.
    • If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
      1. You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
      2. You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
    • Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.

Thanks, I look forward to checking this PR again soon! ❤️

remove dummy comment
@homeassistant
Copy link

Hello @olijouve,

When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).

The commits that are missing a linked GitHub account are the following:

Unfortunately, we are unable to accept this pull request until this situation is corrected.

Here are your options:

  1. If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

  2. If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

    • If you only made a single commit you should be able to run
      git commit --amend --author="Author Name <email@address.com>"
      
      (substituting Author Name and email@address.com for your actual information) to set the authorship information.
    • If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
      1. You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
      2. You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
    • Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.

Thanks, I look forward to checking this PR again soon! ❤️

remove dummy comment
@homeassistant
Copy link

Hello @olijouve,

When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).

The commits that are missing a linked GitHub account are the following:

Unfortunately, we are unable to accept this pull request until this situation is corrected.

Here are your options:

  1. If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.

  2. If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.

    • If you only made a single commit you should be able to run
      git commit --amend --author="Author Name <email@address.com>"
      
      (substituting Author Name and email@address.com for your actual information) to set the authorship information.
    • If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
      1. You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
      2. You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
    • Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.

We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.

Thanks, I look forward to checking this PR again soon! ❤️

@olijouve
Copy link
Contributor Author

olijouve commented Jan 8, 2020

@pvizeli, @frenck, thank you for your patience, i'm pretty bad using git and docker :-/
This one was the good one i think(...and hope :)

@frenck
Copy link
Member

frenck commented Jan 9, 2020

@olijouve You need to fix the CLA errors as described in the bot's comment. Could you take care of that? 👍

@olijouve
Copy link
Contributor Author

olijouve commented Jan 9, 2020

@olijouve You need to fix the CLA errors as described in the bot's comment. Could you take care of that? 👍

I tried and wasn't able to fix it 😓 the mail adress was an @hostname.local so email verification never succeeded, also script method failed then it was too much skilled for me.

@olijouve
Copy link
Contributor Author

olijouve commented Jan 9, 2020

Thanks to both of you !

@oncleben31
Copy link

Thank you for your PR. I was expecting to find a way to put firmware in the container.
From what I understand your script will download all the firmwares from Ledevance website. It is a good MVP. DO you think it could be improve in the future to perhaps use a setting to only download chosen firmware?

Copy link
Member

frenck commented Jan 10, 2020

@oncleben31, that is out of scope for this PR, besides, it the behavior we currently use for other vendors as well.

@oncleben31
Copy link

OK great. I didn't expect a take it into account in this PR. Just for the discussion ;-)
Great job.
Waiting the merge and the next add-on release.

@pvizeli pvizeli merged commit 6847f76 into home-assistant:master Jan 11, 2020
fredrike pushed a commit to fredrike/hassio-addons_deconz that referenced this pull request Sep 22, 2020
…#983)

* Update config.json

* Create ledvance-otau-dl.sh

* Update run.sh

* Update Dockerfile

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update ledvance-otau-dl.sh

Fix lint issues:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
  https://www.shellcheck.net/wiki/SC2003 -- expr is antiquated. Consider rewr...

* Update ledvance-otau-dl.sh

Fix lint issue:
  https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti...

* Update Dockerfile

Adressing @pvizeli comment : The script have the correct permission of a+x?

Add CMD to set a+x permission on ledvance-otau-dl.sh script

* Update Dockerfile

* Add exec permissions

* revert oups bad multiple cmdlines in CMD[]

* revert oups bad multiple cmdlines in CMD[]

* dummy commit

* Update Dockerfile

remove dummy comment

* Update ledvance-otau-dl.sh

remove dummy comment

* fix bug

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deCONZ add a way to upload firmware binaries in the container for OTA Zigbee device update
5 participants