Skip to content

Comments

[tado] Adds proxy URL option#19588

Closed
ErikDB87 wants to merge 6 commits intoopenhab:mainfrom
ErikDB87:tado_api_proxy
Closed

[tado] Adds proxy URL option#19588
ErikDB87 wants to merge 6 commits intoopenhab:mainfrom
ErikDB87:tado_api_proxy

Conversation

@ErikDB87
Copy link
Contributor

@ErikDB87 ErikDB87 commented Oct 30, 2025

Description

There's a possible by-pass for tado's API limit, as discussed here: https://community.openhab.org/t/tado-api-limits/166127/32. I thought I'd attempt a PR.

Unfortunately, I'm stuck, as I'm getting this error when running mvn clean install:

[ERROR] C:\openHAB-dev\openhab-main\git\openhab-addons\bundles\org.openhab.binding.tado\src\main\java\org\openhab\binding\tado\internal\config\TadoHomeConfig.java:[28,19] The @NonNull field tadoApiUrl may not have been initialized

I tried searching for all instances of rfcWithUser, as that field raises no complaints, and I'm essentially copying it. But I can't find out how rfcWithUser gets initialized elsewhere...

I then tried debugging in Eclipse IDE to find out, but that also didn't provide any answer...

So for now, this is still a draft, but I'm afraid I need some assistance. :)

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/tado-api-limits/166127/38

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution. Left some comments to look at.

@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Oct 30, 2025
@ErikDB87 ErikDB87 marked this pull request as ready for review October 30, 2025 23:51
@ErikDB87 ErikDB87 requested a review from andrewfg as a code owner October 30, 2025 23:51
@ErikDB87
Copy link
Contributor Author

I now realize I had forgotten to sign off on my commits... Trying to fix this was unsuccessful, and now I think I made a mess of my local repository...

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Don’t forget to update the properties file

@andrewfg
Copy link
Contributor

@ErikDB87 thanks for your efforts. Personally I have my doubts that using a proxy could bypass the limits. I am sure they will figure it out and apply limits on that too. But in any case can you please explain more about what your change is doing. And also how is the proxy installed and on which machine does it run? Etc.

@lsiepel
Copy link
Contributor

lsiepel commented Oct 31, 2025

ur efforts. Personally I have my doubts that using a proxy could bypass the limits. I am sure they will figure it out and apply limits on that too. But in

This change is only allowing the URL to be changed / configurable. I think that in itself is good anyway.

@lsiepel
Copy link
Contributor

lsiepel commented Oct 31, 2025

@ErikDB87 cvould you also look at the signoff ?

@ErikDB87
Copy link
Contributor Author

@ErikDB87 cvould you also look at the signoff ?

That's where I struggle... I can't figure out how to sign off earlier commits...

@lsiepel
Copy link
Contributor

lsiepel commented Oct 31, 2025

@ErikDB87 cvould you also look at the signoff ?

That's where I struggle... I can't figure out how to sign off earlier commits...

Next to the DCO fail badge, you can click the dots and view details. That will bring you to this page:
https://github.com/openhab/openhab-addons/pull/19588/checks?check_run_id=54140866460

There it is explained how to fix the DCO by using GIT commands.

ccutrer and others added 6 commits October 31, 2025 15:19
* [homeassistant] Upgrade to Graal 25.01

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Erik De Boeck <deboeck.erik@gmail.com>
* [jsscripting] Upgrade to Graal 25.0.1

Signed-off-by: Florian Hotze <dev@florianhotze.com>
Co-authored-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Erik De Boeck <deboeck.erik@gmail.com>
Signed-off-by: Erik De Boeck <deboeck.erik@gmail.com>
… a problem

Signed-off-by: Erik De Boeck <deboeck.erik@gmail.com>
Signed-off-by: Erik De Boeck <deboeck.erik@gmail.com>
Signed-off-by: Erik De Boeck <deboeck.erik@gmail.com>
thing-type.config.tado.home.rfcWithUser.description = Determines if the user name is included in the oAuth RFC-8628 authentication
thing-type.config.tado.home.tadoApiUrl.label = elects the URL to be used for API calls (it's possible to use a proxy)
thing-type.config.tado.home.tadoApiUrl.description = he base URL used for all API requests. Can be changed to use a proxy.
thing-type.config.tado.home.tadoApiUrl.label = Selects the URL to be used for API calls (it's possible to use a proxy)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if you did this manually or by mvn i18n:generate-default-translations but this does not reflect the label from the thing-types.xml file. It should be the exact same.

@ErikDB87
Copy link
Contributor Author

ErikDB87 commented Oct 31, 2025

@ErikDB87 cvould you also look at the signoff ?

That's where I struggle... I can't figure out how to sign off earlier commits...

Next to the DCO fail badge, you can click the dots and view details. That will bring you to this page: https://github.com/openhab/openhab-addons/pull/19588/checks?check_run_id=54140866460

There it is explained how to fix the DCO by using GIT commands.

I'm sorry, but I'm running around in circles, I feel. I've done a whole lot of pulling and merging in order to push again, and now I'm back where I started:

Erik@LaptopRik2021 MINGW64 /c/openHAB-dev/openhab-main/git/openhab-addons/bundles/org.openhab.binding.tado (tado_api_proxy|MERGING)
$ git rebase HEAD~7 --signoff
Auto-merging bundles/org.openhab.binding.tado/src/main/java/org/openhab/binding/tado/internal/config/TadoHomeConfig.java
CONFLICT (content): Merge conflict in bundles/org.openhab.binding.tado/src/main/java/org/openhab/binding/tado/internal/config/TadoHomeConfig.java
error: could not apply 3f69f60d05... Removes redundant @NonNull, which I first thought was the solution to a problem
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Could not apply 3f69f60d05... Removes redundant @NonNull, which I first thought was the solution to a problem

Erik@LaptopRik2021 MINGW64 /c/openHAB-dev/openhab-main/git/openhab-addons/bundles/org.openhab.binding.tado (tado_api_proxy|REBASE 7/8)
$ git rebase HEAD~7 --signoff
fatal: It seems that there is already a rebase-merge directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
        git rebase (--continue | --abort | --skip)
If that is not the case, please
        rm -fr ".git/rebase-merge"
and run me again.  I am stopping in case you still have something
valuable there.


Erik@LaptopRik2021 MINGW64 /c/openHAB-dev/openhab-main/git/openhab-addons/bundles/org.openhab.binding.tado (tado_api_proxy|REBASE 7/8)
$ git rebase --continue
Auto-merging bundles/org.openhab.binding.tado/src/main/resources/OH-INF/i18n/tado.properties
CONFLICT (content): Merge conflict in bundles/org.openhab.binding.tado/src/main/resources/OH-INF/i18n/tado.properties
error: could not apply 4e2e7fabd6... Handles @lsiepel's comments
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Could not apply 4e2e7fabd6... Handles @lsiepel's comments

Erik@LaptopRik2021 MINGW64 /c/openHAB-dev/openhab-main/git/openhab-addons/bundles/org.openhab.binding.tado (tado_api_proxy|REBASE 8/8)
$ git rebase --continue
Successfully rebased and updated refs/heads/tado_api_proxy.

Looks great, but:

Erik@LaptopRik2021 MINGW64 /c/openHAB-dev/openhab-main/git/openhab-addons/bundles/org.openhab.binding.tado (tado_api_proxy)
$ git push
To https://github.com/ErikDB87/openhab-addons.git
 ! [rejected]              tado_api_proxy -> tado_api_proxy (non-fast-forward)
error: failed to push some refs to 'https://github.com/ErikDB87/openhab-addons.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

This is where I started 15 minutes ago.

@lsiepel
Copy link
Contributor

lsiepel commented Oct 31, 2025

ah.. there is a merge conflict. chatgpt.com can help you out and give you the exact commands and also explain what you need to do and why. Way better then i try to tell it.

Just state the problem and copy/paste the error.

@ErikDB87
Copy link
Contributor Author

ah.. there is a merge conflict. chatgpt.com can help you out and give you the exact commands and also explain what you need to do and why. Way better then i try to tell it.

Just state the problem and copy/paste the error.

Okay, it told me to run this:

Erik@LaptopRik2021 MINGW64 /c/openHAB-dev/openhab-main/git/openhab-addons/bundles/org.openhab.binding.tado (tado_api_proxy)
$ git push --force-with-lease
Enumerating objects: 168, done.
Counting objects: 100% (168/168), done.
Delta compression using up to 8 threads
Compressing objects: 100% (77/77), done.
Writing objects: 100% (116/116), 31.56 KiB | 702.00 KiB/s, done.
Total 116 (delta 49), reused 34 (delta 10), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (49/49), completed with 22 local objects.
To https://github.com/ErikDB87/openhab-addons.git
 + 4e36e54663...13cf88be27 tado_api_proxy -> tado_api_proxy (forced update)

It seems to have worked?

@ErikDB87
Copy link
Contributor Author

But I now see my pulling pulled too much...

I'm going to create a new PR, and close this one, I think.

@ErikDB87
Copy link
Contributor Author

I abandoned ship and tried again: #19596

@ErikDB87 ErikDB87 closed this Oct 31, 2025
@lsiepel
Copy link
Contributor

lsiepel commented Oct 31, 2025

yes, push with lease overwrites history, perfectly fine, but before you probably updated main and introduced other commits.

git rebase -i HEAD~6
This will rebase interactiver and show you your editor with the last 6 commits. Before each commit you see pick replace this with drop for those two commits you don;t want in this PR.
When done, close the editor and proceed:
git push --force-with-lease

@ErikDB87 ErikDB87 deleted the tado_api_proxy branch October 31, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature for an existing add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants