-
Notifications
You must be signed in to change notification settings - Fork 62
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
Not working on CS-Z35XKEW / probably new protocol/change? #94
Comments
The handshake is just a 1:1 replay of what my DNSK-P11 sent when I captured it years ago. As a quick test you could try disabling the checksum test to see if the handshake runs through: https://github.com/DomiStyle/esphome-panasonic-ac/blob/master/components/panasonic_ac/esppac_wlan.cpp#L32 It pretty much does not matter what the AC sends at this point, it just matters that the AC initializes successfully so that it starts accepting commands. If that does not work, do you have a CNT port as well? You can connect it there as well. |
Just commected Line 32/33 of esppac_wlan.cpp and recompiled. Now i am getting this: [22:25:00][V][panasonic_ac:247]: RX: 66.08.00.01.01.F6 (6) Yes, i do have a CNT port but no cable to use it - i've ordered connectors, but it'll take some time to arrive. EDIT: yay it seems to work now - no idea what happend. Some minutes later it seems to init successfully: [22:30:31][V][panasonic_ac:247]: RX: 66.08.00.01.01.F6 (6) |
I've tested some settings and it seems most work (swing mode etc). However and most important temperature change does not work: It always reverts back to the previous setting - i cant change the temperature. |
Is that with or without checksum enabled? Try setting the temperature via IR remote and take note of the differences in the packages you receive. The temperature should be in there in hexadecimal, just divide it by 2 and you should get the correct temperature. All info I collected about the protocol is available in this folder so you can compare: https://github.com/DomiStyle/esphome-panasonic-ac/tree/master/protocol |
Its without checksum. I changed the temp by IR remote to 21.5: So it should be 21.5x2 = 43 but the field after it is 02, in your doc it says 00 (but n/a, so not sure if that matters). To be precise, the logs also state this: so maybe something related to nanoex changed. |
Hmm, looks similar but much longer than a usual response to a temperature change. Depending on how far you want to go you will probably have to get a packet capture with a logic analyzer from the original wifi module or switch to the CNT port once it arrives. Hopefully nothing changed there.
Definitely, they rebranded and moved this feature around like 5 times already. |
Sorry, i guess it also changed some other settings as i turned the AC on via HA. |
Can you try again if setting the temperature works? That report looks identical to mine. |
Still doesnt work: [23:19:55][D][climate:039]: Target Temperature: 19.00 What seems to be different is that the string sent via the IR has a different "30" block. The IR one is |
You could try poking around in the code, the function that receives commands from Home Assistant is here: https://github.com/DomiStyle/esphome-panasonic-ac/blob/master/components/panasonic_ac/esppac_wlan.cpp#L62 The temperature gets set here: https://github.com/DomiStyle/esphome-panasonic-ac/blob/master/components/panasonic_ac/esppac_wlan.cpp#L105 The This is the function where the final packet is assembled and sent: https://github.com/DomiStyle/esphome-panasonic-ac/blob/master/components/panasonic_ac/esppac_wlan.cpp#L621 It just loops through the queue and adds all parameters that were set like this:
If you just want to replace the 00 at the end with 02 (whatever that means, I have no idea) you can change this line: https://github.com/DomiStyle/esphome-panasonic-ac/blob/master/components/panasonic_ac/esppac_wlan.cpp#L640 The function is fairly well documented, at least with what I know. Also, it should be noted that the syntax between the IR commands and the wifi module commands differs (there are 2 files in the protocol documentation), the key and values are identical but the structure of the packet is different and mostly unknown. |
Thanks, i'll try and see if that helps. Since the code does not work with checksumming enabled - how is it calculated? I seem to be unable to find info about that. |
The package is verified in this function: https://github.com/DomiStyle/esphome-panasonic-ac/blob/master/components/panasonic_ac/esppac_wlan.cpp#L231 The checksum is calculated here: https://github.com/DomiStyle/esphome-panasonic-ac/blob/master/components/panasonic_ac/esppac_wlan.cpp#L273 Essentially it just sums together every byte (including the checksum), if the sum is 0 the checksum is valid. In the command from above: Might also be an idea to create a branch that disable checksumming during initialization and enables it after it bruteforced its way through the initialization, that way you can keep checksumming enabled for regular packets. |
Ahh thanks for the insight on the checksum, got it now. As from the first post it appears the checksum is totally of. I'll poke around a bit and see if i can get the temp change working somehow (now that i know its probably not the checksum). |
I changed 00 to 02 from the "30" and i can set temperature now. However this breaks all other settings, i cant turn off/on the AC etc anymore. So this works just for the temperature. I made a quick and dirty hack for this: So 02 on the "30" header is only set if the command includes a tempature change. I've verified this works, all settings are fine including temperature - so everything works as intended. Btw, the wrong checksum packet is being sent at handshake 9. All other handshake packet checksums are good, so its just [00:09:39][D][panasonic_ac.dnskp11:579]: Answering handshake [8/16] |
Update: |
I have these and the CNT port works flawlessly alongside the original WiFi module (so you can keep the app running too). |
@JshGrn i do not want to use the CNT port - its old and outdated (newer units always use CN-WLAN). I also wanted to replace the DNSPK11 module completly (dont want any foreign/external cloud). So i replaced the DNSPK11 and used its connection (CN-WLAN) - and for this there are changes required. |
I know, but why does that concern you re it being outdated? There is no functionality that it doesnt provide that the CN-WLAN does... |
I assume the CN-CNT will be removed from future units since its no longer needed (reason: cost). Also as for feature wise comparision: i am not sure this is true. The etherea device have alot more protocol info than previous gen devices and its not fully decoded - so cant be sure if CN-CNT really would pass all that info. Anyway - the main reason people are doing the change is to remove the panasonic cloud and for that you have to open the unit and remove the DNSPK11 module - while there you can just use the connector there anyway (and dont need to go for CN-CNT). |
Removing CN-CNT... why is this a concern, are you updating your units every month? I am not sure I agree with your thoughts about them removing it, its there for a reason, its very likely they will keep it. What features do you think are missing? I currently use this with the Etherea range (3 x same model 1 x 2.5kw) and they all work perfectly. All features from the app work with this except position of vents, not sure that the WIFI version has this either as I think its missing from the package. I see your logic re removing the wifi module, although I don't understand why you would over using the CN-CNT currently, I'd just turn it off. Its still nice to have the app sometimes. |
No i dont touch the AC any month but i'd like to keep this project/code up2date, so future users will be able to use it (on either connector). |
I respect that! For me - I use the CNT, the power consumption isn't something I have paid much attention to. The cloud solution they offer is terrible and I do suffer from constant disconnects throughout the year, maybe I one day will go to the WLAN port if there is reason for me to do so, right now there is not. |
Very good solution that works perfectly on the older pumps. I have 3 new pumps and is testing now on a Panasonic CZ25WKE. On this I get error messages such as: [07:24:47][V][json:038]: Attempting to allocate 512 bytes for JSON serialization @jonasf21 and @DomiStyle: Could this have something to do with "buffersize" and "read_timeout" in esppac.h? Here is my entire log: [07:24:41][W][component:214]: Component panasonic_ac.climate took a long time for an operation (0.10 s). Any idea? |
@edalberg I have this working on the same models (1 2.5kw and 2 3.5kw) as you using the CN-CNT interface without any issues, I haven't seen that error. |
@JshGrn Strange! I have 2 more at the cabin, so I will test them out at the weekend. |
The problem was a bad soldering! |
I've got a panasonic CS-Z35XKEW (Etherea). It appears its no longer possible to replace the existing DNSK-P11 because the protocol seems to have changed. The module itself now also locks a bit different (different labels/style but still reads DNSK-P11).
I've captured the TX/RX and this is what it does:
[20:36:29][V][panasonic_ac:245]: TX: 5A.09.10.01.00.05.01.30.01.00.01.54 (12)
[20:36:29][V][panasonic_ac:247]: RX: 5A.09.10.81.00.D6.00.01.30.01.00.01.00.01.00.33.00.80.E2.01.00.85.42.04.00.86.62.2E.00.88.62.01.00.A0.E2.01.00.A1.E2.01.00.A4.E2.01.00.A5.E2.01.00.B0.E2.01.00.B2.E2.01.00.BB.42.01.00.BE.42.01.02.20.62.01.02.21.62.01.02.31.E2.01.02.32.62.01.02.33.E2.01.02.34.E2.01.02.35.E2.01.02.36.E2.01.02.42.82.01.02.7D.E2.01.02.7E.42.01.02.7F.42.02.02.80.42.02.02.81.42.02 (120)
[20:36:29][D][panasonic_ac.dnskp11:280]: Dropping invalid packet (checksum)
[20:36:29][V][panasonic_ac:247]: RX: 02.82.42.02.02.83.42.02.02.84.42.02.02.89.C2.0C.02.8A.C2.06.02.8B.C2.06.02.8C.C2.0E.02.91.42.02.02.92.C2.02.02.96.42.02.02.97.42.02.02.98.42.02.02.99.42.02.02.9A.42.02.02.9B.42.02.02.A0.C2.01.02.A1.C2.07.02.A2.C2.02.02.A3.C2.04.02.A4.C2.02.02.A5.C2.02.02.A8.42.02.02.A9.C2.03.02.AA.E2.02.02.FF.42.40.FC (101)
[20:36:29][W][panasonic_ac.dnskp11:249]: Dropping invalid packet (header)
[20:36:29][D][panasonic_ac.dnskp11:721]: Resending previous packet
[20:36:29][V][panasonic_ac:245]: TX: 5A.09.10.01.00.05.01.30.01.00.01.54 (12)
[20:36:30][V][panasonic_ac:247]: RX: 5A.09.10.81.00.D6.00.01.30.01.00.01.00.01.00.33.00.80.E2.01.00.85.42.04.00.86.62.2E.00.88.62.01.00.A0.E2.01.00.A1.E2.01.00.A4.E2.01.00.A5.E2.01.00.B0.E2.01.00.B2.E2.01.00.BB.42.01.00.BE.42.01.02.20.62.01.02.21.62.01.02.31.E2.01.02.32.62.01.02.33.E2.01.02.34.E2.01.02.35.E2.01.02.36.E2.01.02.42.82.01.02.7D.E2.01.02.7E.42.01.02.7F.42.02.02.80.42.02.02.81.42.02 (120)
[20:36:30][D][panasonic_ac.dnskp11:280]: Dropping invalid packet (checksum)
[20:36:30][E][component:113]: Component panasonic_ac.climate was marked as failed.
The RX packets are switching between those with invalid header and invalid checksum. The RX packets do not change (besides those with invalid header vs. those with invalid checksum). So its not noise or interference.
Any ideas?
The text was updated successfully, but these errors were encountered: