Connecting to Elli Wallbox over EEBus to HEMS and sharing my experience/trial/errors in the process ... #71
Replies: 3 comments 5 replies
-
Some extra information. There was a small error with devices-app, so please check if you have the latest version: Elli Wallbox recognizing the Devices-app as the possibility to pair: Checking with what SSL does Elli Wallbox responded: depth=0 CN = EEBUS, O = EVBox Intelligence, C = NL Software to try out the EEBus-go library |
Beta Was this translation helpful? Give feedback.
-
While checking the terminal using EEBus-go library, I noticed "failed: tls: failed to parse certificate from server: x509: invalid basic constraints". From reading evcc-io/eebus#1, and then golang/go#11091 and looking at the proposed patch golang/go#11091, which was declined, I went to #70 and from there to EVCC MakeFIle: https://github.com/evcc-io/evcc/blob/master/Makefile#L134-L144 ... and running following commands on Linux arm:
Source:
... after this patch I still get: |
Beta Was this translation helpful? Give feedback.
-
This comment was saying gorilla/websocket#321, that increasing HandshakeTimeout fixed the problem. However, it does not work on my end after increasing value to 45 seconds. Compiling everything on Windows, and uploading to Linux takes some time. Let's see how to compile, run and connect from Windows to Elli Wallbox trough SSH tunnel. 1. Set back the GOARCH and GOOS 2. Running >go run cmd/hems/main.go 4715 --- which will generate cert files -----BEGIN EC PRIVATE KEY-------> create cert.key file and copy paste the content there (watch for spaces before/after) 3. Making mDNS available trough SSH tunnel? ... trying to use https://github.com/miselin/mDNS-Unicast-Lookup with https://github.com/realk1ko/mdns-proxy/blob/main/build.sh, installing pip (https://www.tecmint.com/install-pip-in-linux/) ... but ended up with no device left and problems due to that :) ... so I have to come up with another solution :) |
Beta Was this translation helpful? Give feedback.
-
Goal:
Connect Elli Wallbox over EEBus to HEMS
Research:
Tried to do it with OpenMuc, a Java library, as their documentation looks good: https://www.openmuc.org/eebus/jspine/javadoc/, however, there is no Download button on the page https://www.openmuc.org/eebus/jspine/. I was trying to call them and I got some emails to write, but until now, no response. I have also sent a contact form, no response yet.
Next try was the Go library from @DerAndereAndi .
Support
Everything written here was tested with the great help of @DerAndereAndi , he was always willing to help, connect and talk over Slack (https://enbility.slack.com/).
Connecting to Elli Wallbox Configuration page
We are using a Linux-based controller where Elli and Reduxi are connected to the same network,.
So I tried to ping the Elli and it works.
The next step was to create an SSH tunnel to my local host machine so I can open the configuration page of the Elli Wallbox.
ssh -i "C:\Users\user\.ssh\openssh_user" -L :443:192.168.1.200:443 [email protected]
We need the Energy Manager page where we will start the pairing process with the EEBus Go Library.
Specific Go library problems
#1 problem: It's specific to our Linux version ... just short info. The best method for me was to install Go using https://go.dev/doc/install and remember to export PATH=$PATH:/usr/local/go/bin.
#2 problem: cert related, read this for more info - evcc-io/eebus#1
Running EEBus-go Go library
It did not work for me. It's related to our specific Linux version, so @DerAndereAndi was kind enough to provide me with another option.
Running Devices app
Going to https://github.com/enbility/devices-app and selecting the latest version - https://github.com/enbility/devices-app/releases/tag/v0.1-20230724, choosing the right version for our Linux type. Setting correct permission and then running this.
... next step is to access the Devices app over a web browser. If you are using SSH access to connect to the HEMS controller, you can always do an SSH tunnel, for example:
ssh -i "C:\Users\user\.ssh\openssh_user" -L :7050:127.0.0.1:7050 [email protected]
Wierd Elli software problems
Maybe it's me doing something wrong, but I had some problems with the Energy Manager page at Elli WallBox. The service was stopping, restarting ... so the page looked like this was normal for me:
... this also affects pairing Devices-app Go Library with Elli Wallbox. The process started, however in the middle, the connection stopped. @DerAndereAndi told me it's normal that the Elli Wallbox services "stops/crashes" at the first attempt, but for me, it was always starting, communicating started, stopped... and looping again.
websocket: close 1006 (abnormal closure): unexpected EOF
Checking the communication data
@DerAndereAndi told me TRACE SEND RECV and DEBUG SEND RECV commands ... are showing there is some communication going on, however, it is stopped due to the error above.
DEBUG Recv: d:_i:47859_Elli-Wallbox-: to NodeManagement read 13 NodeManagementDestinationListData
2023-07-24 14:34:50 DEBUG Send: d:_i:47859_Elli-Wallbox- reply 9 13 NodeManagementDestinationListData
2023-07-24 14:34:50 DEBUG Send: d:_i:47859_Elli-Wallbox-**** result 10 13 ResultData 0
Why do I see EEBus-go library first connecting to IP and then to hostname?
Because connection was lost over IP, so EEBus-go library is trying to connect over hostname:
9 failed: dial tcp: lookup wallbox-******.local. on 192.168.1.1:53: no such host
Going from 1,2, trying to go the 3 and back
I did never get to the third screen ( 3. View capabilities ) ... as it always went fiding, pairing, communicating some data ... and then the connection dropped.
Trying to ....
Refreshing the Elli Wallbox page, starting/stopping the devices-app library ... nothing worked. Bouncing through errors on the Elli Wallbox configuration page or not being able to go further than the 2. step, pairing the device with the devices-app library.
It's weird that sometimes both pages were saying the pairing is done, but because of the connection being dropped, it was always going back and forth.
2023-07-24 12:52:15 DEBUG 676c21ca6a0e**** websocket read error: websocket: close 1006 (abnormal closure): unexpected EOF
Some communication going on:
2023-07-24 12:53:01 DEBUG Send: d:_i:47859_Elli-Wallbox-****result 12 15 ResultData 0 2023-07-24 12:53:01 TRACE Send: 676c21ca**** {"data":[{"header":[{"protocolId":"ee1.0"}]},{"payload":{"datagram":[{"header":[{"specificationVersion":"1.1.1"},{"addressSource":[{"device":"d:_i:EnbilityNet_Devices-App-123456789"},{"entity":[0]},{"feature":0}]},{"addressDestination":[{"device":"d:_i:47859_Elli-Wallbox-****"},{"entity":[0]},{"feature":0}]},{"msgCounter":11},{"msgCounterReference":15},{"cmdClassifier":"reply"}]},{"payload":[{"cmd":[[{"nodeManagementUseCaseData":[]}]]}]}]}}]} 2023-07-24 12:53:01 TRACE Send: 676c21ca**** {"data":[{"header":[{"protocolId":"ee1.0"}]},{"payload":{"datagram":[{"header":[{"specificationVersion":"1.1.1"},{"addressSource":[{"device":"d:_i:EnbilityNet_Devices-App-123456789"},{"entity":[0]},{"feature":0}]},{"addressDestination":[{"device":"d:_i:47859_Elli-Wallbox-****"},{"entity":[0]},{"feature":0}]},{"msgCounter":12},{"msgCounterReference":15},{"cmdClassifier":"result"}]},{"payload":[{"cmd":[[{"resultData":[{"errorNumber":0}]}]]}]}]}}]} 2023-07-24 12:53:01 DEBUG 676c21ca6a**** websocket read error: websocket: close 1006 (abnormal closure): unexpected EOF 2023-07-24 12:53:01 DEBUG delaying connection to 676c21c****9 by 5.371s to minimize double connection probability
Trying build version of EEBus-go library
@DerAndereAndi was kind enough to build the go library. Example ...
./main 4715 "676C 21CA 6A0E ****" cert.crt cert.key
cert note: running devices-app already generated cert.cert and cert.key, so I reused them running EEBus-go library.
... this did not work due to SKI.
In this case copy paste the SKI from the console and use that SKI format (without spaces, lower case) running the library.
./main 4715 "676c21ca6a0e****" cert.crt cert.key
... but the same problem appeared. Connecting, pairing, communication and then the communication drops.
Checking the firmware version
Checking at the https://www.elli.eco/en/changelog/wallbox website, there is a new firmware being released tomorrow, however, it does not say it affects any kind of EEBus-related problems. However, it would be nice to try.
Any other solution*
@DerAndereAndi said one option is to power out/power in (restart) the Elli Wallbox and try again. This is on my TODO list before giving up :)
... thank you @DerAndereAndi for going the extra mile and helping me understand how this works.
This research was paid by Reduxi - Energy management System
Beta Was this translation helpful? Give feedback.
All reactions