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

Add DaheimLaden charger #1699

Merged
merged 8 commits into from
Dec 6, 2021
Merged

Conversation

utsavanand2
Copy link
Contributor

Integration with DaheimLaden charging stations with it's REST API

Description

This PR implements the methods on the skeleton recommended by @andig.
Any recommendations for improvement and making the code more readable are welcome :)

@andig andig added the devices Specific device support label Oct 4, 2021
charger/daheimladen/const.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Show resolved Hide resolved
@utsavanand2
Copy link
Contributor Author

Thanks for the review @andig

charger/daheimladen.go Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
@andig andig force-pushed the master branch 3 times, most recently from 525a995 to 6f3f0f7 Compare October 13, 2021 18:06
Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
}

if changeConfigRes.Status != "Accepted" {
return fmt.Errorf("charging station refused to change max current")
Copy link
Member

Choose a reason for hiding this comment

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

Ping

charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
@andig
Copy link
Member

andig commented Oct 24, 2021

/rebase

@andig
Copy link
Member

andig commented Oct 28, 2021

LGTM apart from the strange timeout setting- that needs be fixed

@utsavanand2 utsavanand2 force-pushed the feature/daheimladen branch 2 times, most recently from c3412a5 to c9af273 Compare November 23, 2021 16:56
@utsavanand2
Copy link
Contributor Author

Hi @andig :)
Does it look good to you?

charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
charger/daheimladen.go Outdated Show resolved Hide resolved
@utsavanand2
Copy link
Contributor Author

Once everything seems good to you, before we do the final merge to master, I'll make sure that I change the BASE_URL back to the production endpoint i.e. https://api.daheimladen.com/v1 instead of https://beta.api.daheimladen.com/v1

@scrub11
Copy link

scrub11 commented Nov 24, 2021

As a request from andig, I apply here for an implementation of my wallbox. I apologize if I posted in the wrong place - if that is the case, please help me out. Thank you in advance.

Current state of my progress:

  • Wallbox ready and waiting.
  • Running Raspi with evcc v .54
  • Some issues with configuring my evcc.yaml

What comes up next?

@andig
Copy link
Member

andig commented Nov 24, 2021

What comes up next?

If you have a working config you can try this binary and add your charger to the config.
evcc.gz

@utsavanand2
Copy link
Contributor Author

Hi @scrub11 :) I'm Utsav from Daheimladen.
You're at the right place.
I believe you have the daheimladen wallbox?
Do you have an account created at https://daheimladen.com ? If so could you please send me your email address that you used to register so I can provide you with a token that you would need for the evcc yaml config?

@scrub11
Copy link

scrub11 commented Nov 25, 2021

@andig
Ok, I will try and get my config working.

@utsavanand2
Send you an email. :)

@scrub11
Copy link

scrub11 commented Nov 27, 2021

I am on it today and I have two questions:

  • What am I doing with the binary, you gave me, @andig ?
  • What is my chargingstation-pile-number? Software version? Serial number?

Thank you in advance.
@utsavanand2: Thank you, received your email. :)

@utsavanand2
Copy link
Contributor Author

utsavanand2 commented Nov 27, 2021

I am on it today and I have two questions:

  • What is my chargingstation-pile-number? Software version? Serial number?

Hi @scrub11 !
It will be your software serial number displayed on the display of the wallbox, specifically for you it must be ending with: xxxxxxxxxxxx990

@scrub11
Copy link

scrub11 commented Nov 27, 2021

Hi @utsavanand2:
Thank you for your quick reply, I found it.

@utsavanand2
Copy link
Contributor Author

I am on it today and I have two questions:

  • What am I doing with the binary, you gave me, @andig ?

PS: As I have the time to look at this today, I would take the liberty to help out @andig with this question. Please feel free to correct me if I'm wrong @andig ;)

@scrub11 The compressed file ending with .gz that Andreas provided you with when uncompressed will give a binary file that is the executable you will be running on the raspberry pi.
I am assuming you have enough technical know how as you own a Pi ;), if not I would be happy to help in every step of the way.

Probably the next thing to do here would be to add the configuration to the PV system you own. You can check the list of the meters supported here and add them to the evcc.dist.yaml .
Next add the daheimladen charger to the yaml as I described here.
Now you can transfer both the binary and the evcc.dist.yaml file to the raspberry pi.
Next thing to do would be to allow the evcc binary to be executed, you can do that by running:

sudo chmod +x /path/to/evcc

The last thing to do would be to try and run the evcc binary with the yaml configuration you edited.

/path/to/evcc -c /path/to/evcc.dist.yaml

@scrub11
Copy link

scrub11 commented Nov 28, 2021

@utsavanand2: Thank you very much, thanks to your advice I got it up and running so far! :)

@andig
Copy link
Member

andig commented Nov 30, 2021

@scrub11 I undestand the DaheimLaden integration is working and we can merge it now?

@andig andig changed the title Add DaheimLaden ChargingStation to EVCC Add DaheimLaden charger Nov 30, 2021
@scrub11
Copy link

scrub11 commented Dec 1, 2021

I don't know if I really understand what you mean. I used your zipped binary and put it on my Raspi. As you know from the other discussion, I still encounter some unsolved issues. Due to that I cannot tell you if the complete integration is working... EVCC seems to work, or, to be more precise, it's diagnostic tool seems to work.
More I cannot confirm at this very moment. I hope it nevertheless helps you along.

@ExecuteGK
Copy link

Good afternoon,
would it be possible to get a latest test build for x86-64 and a valid token in order to test the implementation? I suffer errors when compiling and I am not really a go expert.

I have a working config for a phoenix contact wallbox and the E3DC PV / Battery / Grid. The daheimladen V1 is not yet integrated, but should join latest when our BEV will arrive.

Best Regards and thank you for the great work.

Sebastian Dietz

@andig
Copy link
Member

andig commented Dec 1, 2021

Binary kommt morgen… Welches OS?

@ExecuteGK
Copy link

Ubuntu server.
Hab aber gerade nochmal gebastelt und siehe da hab jetzt ein binary.
Warum das die letzten 2 Stunden nicht wollte, keine Ahnung. War Vermutlich Blindheit..... oder Überlastung durch die Kinder....

Der Api key fehlt allerdings noch von daheimladen.....

@utsavanand2 utsavanand2 force-pushed the feature/daheimladen branch 2 times, most recently from 3090613 to dd8c4cf Compare December 4, 2021 12:45
Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
@utsavanand2
Copy link
Contributor Author

Hi @andig ! I just realised that when I run these commands:

git clone https://github.com/evcc-io/evcc.git
git checkout feature/daheimladen

Then it doesn't contain the latest changes that we made. But it does show up in the Files changed tab at the top.
Do you have any ideas what am I doing wrong?

@andig
Copy link
Member

andig commented Dec 4, 2021

Strange. What does git log say?

@utsavanand2
Copy link
Contributor Author

@andig This is what I see, seems to be in line with what Github is saying in the commit history at the top
Screenshot 2021-12-05 at 1 15 21 AM

@andig
Copy link
Member

andig commented Dec 4, 2021

Looks as expected. What exactly are you missing?

@andig
Copy link
Member

andig commented Dec 5, 2021

Just checked the code- PR looks as I would expect?

@utsavanand2
Copy link
Contributor Author

utsavanand2 commented Dec 6, 2021

@andig Yes the PR looks just fine. I believe we can merge it now based on the user test results?

Looks as expected. What exactly are you missing?
When doing this:

git clone https://github.com/evcc-io/evcc.git
git checkout feature/daheimladen

I was able to see my previously made changes like seeing the timeout set to 0, but in the later commits I had them removed. But I guess its not showing up probably because of some user permissions, the previous ones were showing up because of your rebase (which was your commit), this might be the reason why I couldn't see those changes in git checkout but in my repo.

@andig andig merged commit de031b4 into evcc-io:master Dec 6, 2021
dontbyte pushed a commit to dontbyte/evcc that referenced this pull request Aug 2, 2022
Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
Co-authored-by: andig <cpuidle@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devices Specific device support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants