First connect your washer to wifi by using the Samsung Smarthings. I couldn't get mine to work in there because it failed after connecting. It was however connected to the wifi
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
To retrieve a token we need to request one from the washer trough port 8888. It will return a token to port 8889. We need the client ssl
use server.py to start a listening server on port 8889 and leave this terminal open
python3 server.py
- Turn on washer and make sure it is connected to the wifi
- In another terminal send a token request
curl -k -H "Content-Type: application/json" -H "DeviceToken: xxxxxxxxxxx" --cert ac14k_m.pem --insecure -X POST https://192.168.XXX.XXX:8888/devicetoken/request
- Press smart control button on washer
You should now receive a token back in your terminal. If this doesn't work try turning the washer off and on in between step 2 and 3
curl -k -H "Content-Type: application/json" -H "Authorization: Bearer <YOUR NEW TOKEN>" --cert ac14k_m.pem --insecure -X GET https://192.168.xxx.xxx:8888/devices/0
In home assistant I use the following configuration to be able to get a notification when the washer is done.
- platform: command_line
command: 'curl -m 8 -k -H "Content-Type: application/json" -H "Authorization: Bearer <YOUR NEW TOKEN>" --cert /config/ac14k_m.pem --insecure -X GET https://192.168.XXX.XXX:8888/devices/0/operation'
name: "Samsung washer"
value_template: '{{ value_json.Operation.state }}'
Most of this info I got trough the work on samsungAC at openhab/openhab1-addons#2863