Git Product home page Git Product logo

samsung_washer's Introduction

Getting token from Samsung Ecobubble washer

Connect to wifi

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

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

Start listening at port 8889

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

Request a new device token

  1. Turn on washer and make sure it is connected to the wifi
  2. 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 
    
  3. 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

Test the token

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

Hassio

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 }}'
Credits.

Most of this info I got trough the work on samsungAC at openhab/openhab1-addons#2863

samsung_washer's People

Contributors

timdj avatar

Watchers

 avatar

samsung_washer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.