Closed brayStorm closed 3 years ago
I didn't want to link or upload the pem for legality reasons but instructions are below:
Get samsung client certificate This can be retrieved by decompiling the samsung android. However someone else has already done the hard work and you can find ac14k_m.pem at
https://github.com/cicciovo/homebridge-samsung-airconditioner
or
https://github.com/SebuZet/samsungrac/tree/master/custom_components/climate_ip
cert.pem == ac14k_m.pem
Still can't get this to work. So do I need 2 identical files in the same directory, 1 named cert.pem, and 1 named ac14k_m.pem? The server.py errors out in the absence of a file called cert.py, and step 2's curl command has a reference to the latter.
@brayStorm Stat seems to be an issue with your version of curl. I used Linux for this. Maybe you can check if the parameters are same for windows version of curl? Or try logging into your home assistant with ssh and run curl from there.
I feel like I'm being a useless pest, but getting my washer/dryer status in HA is a mini-holy grail for me. THANK YOU for responding to me at all! Ok, spun up a VM, and I'm getting this; Is it due to the version of openssl? Should I downgrade, or can I add a flag somewhere or something to force it to accept that cert?
I added ssl.PROTOCOL_SSLv3 could you try again? Also I changed cert name to ac14k_m.pem
Now I get this;
*Edit - I found this in the python docs, might be helpful
Use the default protocol PROTOCOL_TLS with flags like OP_NO_SSLv3 instead.
@brayStorm This all has to do with deprecation of SSLv3 I think. I committed which starts without error here. Could you check if this works for you? https://github.com/timdj/samsung_washer/commit/8557ec62093b3d331d9cd6ccd31c846b8dc78146
I haven't actually tried this with my washer since I don't want to risk not being able to get a new token ;)
server.py seems to run fine now. (on right) I am getting error with the curl command in the readme (on left) The washer is on, and connected to wifi. I tried both with the smartcontrol button on and off. I get the same error.
**if I run nMap, it does show an open 8888/tcp on the washer's ip.
@brayStorm Sorry for my late reply. Any luck so far. The curl error is strange and something you should investigate because it really seems it can't connect to that IP. Even though nmap does show.
I'm running curl in a vm, and nmap I'm not. I don't see that affecting much though.
@brayStorm certainly seems like you can't connect to the washer from your VM. Can you ping it from your VM?
I could not! So I fixed that. Now I can ping from the VM. Now I get this;
Someone with same issue: https://github.com/cicciovo/homebridge-samsung-airconditioner/issues/17
Long time no speak! I got it WORKINGGGGGG!
I had to adjust the cURL command.
curl -k -H "Content-Type: application/json" -H "DeviceToken: xxxxxxxxxxx" --cert ac14k_m.pem --insecure -X POST https://192.168.XX.XX:8888/devicetoken/request -H "Host: 192.168.YY.YY:8889"
XX being IP of applicance, YY being IP of device I'm sending the request from. Got working with both Samsung Washer and Dryer. Both dveices were OFF when sending the cURL command. After sending, turned them on, and pushed the Smart Control button.
Where would I find this?