Open bakkerrs opened 1 year ago
Decompiling is great work and a lot of command detail. Thank you. Is there a certain command sequence to authenticate required? Before getting the login response? Login CMD=0x01 originated "d" in the table is that correct? and what is the data structure for a login command
Hi @ceesgeert So the following seems to happen:
None of the commands sent by the app have any data attached (other than a single empty byte (0x00)) up until login is confirmed.
From that point the wallbox seems to accept other commands and regularly spits out information. After about half a minute the wallbox stops accepting new commands and starts sending login packets again at which point you need to re-authenticate.
Hi all,
I recently got a Telestar EC311S wallbox which also uses the EVSEMaster app, and the protocol discussed here. I'm building a webapp for managing the wallbox to get around the LAN-only functionality of the app (aside from its apparent phoning home and insisting on reconnecting via BT, even though the wallbox stays active on LAN). I'm only just starting, your findings so far have proven very helpful, but I've come with one deviation from your findings, one addition, and one question.
I noticed that my wallbox sometimes puts 2 message datagrams in a single UDP packet. There is no separator or anything; the second datagram's 0x0601 header will immediately follow the first datagram's 0x0f02 tail. Suggest to update the docs to take this into account. The solution I took was to process the first datagram from offset 0, and while there are bytes left in the UDP packet after processing the datagram, repeat the process using the earlier datagram(s) length(s) as offset. I did not see it place 3 datagrams in a packet yet but this way the code would handle that.
The Login (0x0001) datagrams that the wallbox broadcasts have the same payload as the LoginResponse (0x0002) datagram as described in @bakkerrs document.
~I'm seeing all the repeating Login datagrams, however I don't seem to get any LoginResponse after sending a RequestLogin datagram to the wallbox (either with valid or invalid password). I'm not sure why exactly; I've tried sending the datagram to the originating port of the Login broadcast packets I received earlier, and (just to check) also to the app port 28376. I've also tried both 0x00 and 0x01 as the single-byte payload. Any ideas? Which port are you sending the commands to?~ Never mind, I packed one of the 16-bit words little-endian accidentally ;)
I'll investigate more and post back any further findings.
@johnwoo-nl can you share your code? I would like to adopt this as nodejs mqtt app
@johnwoo-nl can you share your code? I would like to adopt this as nodejs mqtt app
[offtopic] Sorry, nothing to share yet. I'm only at the login flow. However I am splitting this into two parts from the start; a library for EVSE communication (protocol abstraction using nodejs dgram), and a separate Nuxt webapp on top of that. The library could be reused by other projects, like smarthome integrations. I'll create projects for each when they're at least usable.
Hi @ceesgeert So the following seems to happen:
The Wallbox spits out Login (0x0001) packets on a regular basis.
The app responds with a RequestLogin (0x8002) packet which includes the password of the wallbox (default '123456')
The Wallbox responds with a LoginResponse (0x0002) packet which contains some additional information about the wallbox
The app then confirms the login with a LoginConfirm (0x8001) packet.
None of the commands sent by the app have any data attached (other than a single empty byte (0x00)) up until login is confirmed.
From that point the wallbox seems to accept other commands and regularly spits out information. After about half a minute the wallbox stops accepting new commands and starts sending login packets again at which point you need to re-authenticate.
Some more findings on the discovery, login and session management:
Hi! Thanks for your work so far on this.
I decompiled the EVSE Master app itself in an attempt to understand the protocol better. The app has a list of commands embedded in it. It doesn't actually utilize all commands available, so I don't have an understanding of all commands. I've written some notes which you can find here.
What's the status on your investigation? Let me know if there's anything I can do to help further.