william-sy / Daikin-BRP069A62

Creating a daikin interface other than the apps
GNU General Public License v3.0
31 stars 2 forks source link

Help needed with BRP069A78 #13

Open Gollam opened 2 years ago

Gollam commented 2 years ago

Hi, We have a Daikin Altherma 3 with BRP069A78 lan adapter. Do you have any idea how can I get started with discovering the protocol? Your script cannot read anything, and all I get is 404 if I try the IP of the adapter.

uKL commented 2 years ago

I’m having the same model. The internet seems to be silent about it…

william-sy commented 2 years ago

Hi @Gollam and @uKL,

I am sorry to hear my script wont work for the BRP069A78.

In order to add support for it or to discover how to use it with python you will need to setup a proxy you can use a tool like charles https://www.charlesproxy.com/ Setup your phone to use this proxy and open your daikin controller app (the old one not the new one - I have the old APK available if you want)

Then its a matter of logging and analyzing the logs :)

Hope it helps.

Gollam commented 2 years ago

Thanks! Why do you say we'll need the old APK for it? And which one is considered old? When the heat pump was installed back in November, the app started with a firmware update. I think that is the reason why I cannot access anything on it, they closed everything.

william-sy commented 2 years ago

Hi @Gollam ,

The new app of daikin only scans your local LAN once (assumption), and then does everything trough the cloud. (Called ONECTA)

The old app can do all these things offline and locally only hence you would need the old one. (Called Controller) Firmware on your BRP069A78 should not matter.

Daikin never gives release notes, For all you know they remove the local LAN functionality.. So IMHO avoid the new app and firmware.

william-sy commented 2 years ago

Note:

Screenshot 2022-04-13 at 19 21 06

According to their own site. The old app still works, But I refuse firmware updates. Also Note that the old app is no longer in the play store or app store, and can only be side loaded on android.

Gollam commented 2 years ago

All right, I can give the old app a try, and of course the proxy as well. We'll see.

dpaccou commented 2 years ago

Hi, I try to clone your git but nothing work :'( I have a BRP069A62 model but I fash my firmware few month ago when ONECTA app ask me... After seeing your reply I think I can't use any LAN functionality anymore ... :( Have you already try downgrade firmware ? If downgrade is possible, can you send me old heating daikin app ? Thank you.

william-sy commented 2 years ago

Hi @dpaccou

Firmware:

You can try to reboot the controller and go to its ip adress, you should see a simple webpage.

To test if the WEBSOCKET still works you can try this script:

https://github.com/william-sy/Daikin-BRP069A62/blob/Backup-Branch/docs/files/scripts-old/Controller.py

Else I am afraid you are out of luck, Daikin is not supporting opensource firmware at this point in time nor has any one hacked it. But the firmware is in the app so someone could try..

dpaccou commented 2 years ago

Hi @william-sy Thank you for your reply. I try websocket but all my request result of 500 error code :

$  curl -v http://192.168.0.16
* Expire in 0 ms for 6 (transfer 0x144b950)
*   Trying 192.168.0.16...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x144b950)
* Connected to 192.168.0.16 (192.168.0.16) port 80 (#0)
> GET / HTTP/1.1
> Host: 192.168.0.16
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Connection: keep-alive
< Content-Length: 0
< Date: Sun, 17 Jul 2022 18:18:09 +0000
< Keep-Alive: timeout=15, max=65535
<
* Connection #0 to host 192.168.0.16 left intact

I try your script but I don't understand this return :

$ python3.7 Controller.py
/mn-cse-6e5bae21-063c-4346-b673-3082dfc263aa/MNAE/1/schedule/List/Heating/la
1

I think I made a mistake with updating the firmware, I'm not sure I can go back with the old versions of onecta... Besides, how to find old official versions on Android? Thank you Have a nice day

william-sy commented 2 years ago

Hi @dpaccou,

Well I have some good news for you ;) that 1 you got back tells you the heating is on schedule number 1, you can change the schedule in the thermostat in the living room to a other one and the number should change :)

So the firmware of your controller did not remove your ability to connect with the scripts to your controller Al tough I would recommend never to upgrade again unless daikin provides more info of their update.

Are you running into a specific error with the master branch ?

jukka5 commented 1 year ago

Hello,

Just FYI for anyone trying to get this working: I just recently (Nov 2022) bought Altherma, which has BRP069A78 and before starting to dig into home automation details, I let it install all updates that it wanted to. At least in the current state, it doesn't seem to respond to websocket calls - if I interprete the error from the test script correctly.

pi@home:~ $ python3 altherma.py Traceback (most recent call last): File "/home/pi/altherma.py", line 13, in <module> ws = create_connection("ws://"+ip+"/mca") File "/home/pi/.local/lib/python3.9/site-packages/websocket/_core.py", line 608, in create_connection websock.connect(url, **options) File "/home/pi/.local/lib/python3.9/site-packages/websocket/_core.py", line 253, in connect self.handshake_response = handshake(self.sock, url, *addrs, **options) File "/home/pi/.local/lib/python3.9/site-packages/websocket/_handshake.py", line 57, in handshake status, resp = _get_resp_headers(sock) File "/home/pi/.local/lib/python3.9/site-packages/websocket/_handshake.py", line 147, in _get_resp_headers raise WebSocketBadStatusException("Handshake status %d %s", status, status_message, resp_headers) websocket._exceptions.WebSocketBadStatusException: Handshake status 404 Not Found

So, have to figure out something else...

Cheers!

william-sy commented 1 year ago

Hi @jukka5,

Yes a BRP069A78 is different than a BRP069A62 which I have at home. (https://www.daikin.nl/nl_nl/products/product.html/BRP069A62.html)

This one works with the 2 wires on your thermostat instead of in the device itself.

In order for the BRP069A78 to be supported I would need a thermostat, and that sd card, or someone providing me with details.

Perhaps you can connect to the local IP of the wifi card in your browser? Or Perhaps you can install the old app from daikin and perform a proxy attack so sniff the traffic ?

Anyway sorry this project for now is unable to help you. There is: https://raomin.github.io/ESPAltherma/

Perhaps that will help it is a bit more involved with wires and such tough,

Regards, William

jukka5 commented 1 year ago

Hi William,

I may try the old app approach at some point. The wifi interface does respond to a normal http request. I'll poke around at some point and let you know if I find out anything useful.

You wrote a great piece of software - just my usual luck with things...

Thanks!

image

Gollam commented 1 year ago

@jukka5 if you are OK with cloud polling solution, this integration for HA works for me, and it's very stable: https://github.com/speleolontra/daikin_residential_altherma

william-sy commented 1 year ago

As much as the cloud is "handy" The point of this repo is to stay away from the cloud as much as possible :)

But its a cool plugin

Gollam commented 1 year ago

I know, but I haven't able to query any data through local network, so I have to use that one.

william-sy commented 1 year ago

Did you try to use the old controller app ?

it connects only trough wifi and scans devices on your local network (the new app only does cloud) From there you need to setup a proxy on your phone to your laptop with that you can see all the endpoints and how to connect to the daikin unit :)

william-sy commented 1 year ago

I see the app is no longer in the android app store Controller.apk.zip

In case you want to try :)

jukka5 commented 1 year ago

if you are OK with cloud polling solution, this integration for HA works for me, and it's very stable: https://github.com/speleolontra/daikin_residential_altherma

@Gollam Thanks - I'll try that out! I do prefer non-cloud solution, but if I can get it to work easily then why not, as I need to get some solution in place asap.

I will try to investigate the direct API matter a bit later - have to get an old Android phone from somewhere (shouldn't throw anything away - it always happens that you need it right after).

madmas commented 1 year ago

@jukka5 I'm also very much interested in a non-cloud solution - did you find any time to look into it?

jukka5 commented 1 year ago

Hi! Sorry - I haven’t had the time to look into it yet. The only progress is that there’s now a cable installed to one of the inputs of the heatpump control board. According to the company which installed my heatpump, it’s a 12V DC signal, which I can control with an external relay. Apparently, if I configure the heatpump firmware correctly, I can use the signal to disable the heatpump in a system friendly way - for example when electricity is too expensive. I do have a relay controlled by my HA, but I haven’t tested it, though.

On Wed 29. Mar 2023 at 10.04, Markus Schlichting @.***> wrote:

@jukka5 https://github.com/jukka5 I'm also very much interested in a non-cloud solution - did you find any time to look into it?

— Reply to this email directly, view it on GitHub https://github.com/william-sy/Daikin-BRP069A62/issues/13#issuecomment-1488051836, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6AMSK3RF6WPO5J7RJN4XDW6PNH5ANCNFSM5HQUXD4A . You are receiving this because you were mentioned.Message ID: @.***>

mathias-goebel commented 1 year ago

Hi. I just want to read the sensor data from the BRP069A78 device. It feels a bit overkill to setup a ESP for reading the serial data, just to get out 4 to 6 values. Having a debug output from the onecta app (anyone can prepare via settings menu, creates a zip with log and json data), i found the following endpoints to read via HTTP get request:

And the server sends some basic info via UDP.

I tried some vocabulary like “sensors”, “sensorydata” (sic!) but no success. Maybe someone ending up here was successful?

scan for UDP

nmap -sU -r -p30000-40000 $IP
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-22 15:57 CEST
Nmap scan report for 192.168.XXX.XXX
Host is up (0.0051s latency).
Not shown: 10000 closed udp ports (port-unreach)
PORT      STATE         SERVICE
30050/udp open|filtered unknown
MAC Address: XX:XX:XX:XX:XX:XX (AzureWave Technology)

Nmap done: 1 IP address (1 host up) scanned in 10.94 seconds

scan for TCP

nmap -Pn -sT -p1-65535 $IP
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-22 09:59 CEST
Nmap scan report for 192.168.1XXXXXX
Host is up (0.013s latency).
Not shown: 65534 closed tcp ports (conn-refused)
PORT   STATE SERVICE
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 172.64 seconds
Sesshoumaru-sama commented 11 months ago

Same here, I can confirm that on my BRP069A78 I get answers from /config/adapter/info /config/firmware/info /config/wlan/info /config/adapter/product_info

Would be nice to read the actual data from the HP. Luckily I had the presence of mind and installed a heat meter for heating and hotwater which can be read using modus so that I get the most basic values of operation (incluing energy usage from a deciated meter). Its hardly believable that such a huge company has such poor network connectivity.

Yes, I get some info from the cloud at the moment, but how shall I phrase it ... I... dispise the cloud? I want local controll.

parkyjimbo commented 3 months ago

Hi @Gollam and @uKL,

I am sorry to hear my script wont work for the BRP069A78.

In order to add support for it or to discover how to use it with python you will need to setup a proxy you can use a tool like charles https://www.charlesproxy.com/ Setup your phone to use this proxy and open your daikin controller app (the old one not the new one - I have the old APK available if you want)

Then its a matter of logging and analyzing the logs :)

Hope it helps.

Dear william-sy Do you still have the old App for android available, I have this wifi module installed on my Daikin display and would like to try and go cloudless. Any help is welcome, many thanks. Regards Jim