Coder Social home page Coder Social logo

waringer / neatobotlib Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 9 KB

This is an unofficial API client which can help you to interact with the Neato cloudservices which are used to control you Neato Connected vacuum robot.

License: BSD 3-Clause "New" or "Revised" License

Go 100.00%
golang golang-library neato

neatobotlib's Introduction

NeatoBotLib

This is an unofficial API client which can help you to interact with the Neato cloudservices which are used to control you Neato Connected vacuum robot.

Thanks to Lars Brillert @kangguru who reverse engineered the Neato API from which this library is ported from. Port is based on https://github.com/kangguru/botvac

Usage

Check the examples to get a hint on how to use the library, most is self explanatory.

Currently the following methods are available in the NeatoBotLib class

  • Auth
  • GetDashboard
  • GetRobotState

The method names should give you an idea what the specific action will cause. Still this is not all, but that's what is available for the moment.

OAuth2

Make a token request using the following curl command:

curl -X "POST" "https://mykobold.eu.auth0.com/passwordless/start" \
     -H 'Content-Type: application/json' \
     -d $'{
  "send": "code",
  "email": "ENTER_YOUR_EMAIL_HERE",
  "client_id": "KY4YbVAvtgB7lp8vIbWQ7zLk3hssZlhR",
  "connection": "email"
}'

After receiving the OTP:

curl -X "POST" "https://mykobold.eu.auth0.com/oauth/token" \
     -H 'Content-Type: application/json' \
     -d $'{
  "prompt": "login",
  "grant_type": "http://auth0.com/oauth/grant-type/passwordless/otp",
  "scope": "openid email profile read:current_user",
  "locale": "en",
  "otp": "ENTER_OTP_HERE",
  "source": "vorwerk_auth0",
  "platform": "ios",
  "audience": "https://mykobold.eu.auth0.com/userinfo",
  "username": "ENTER_YOUR_EMAIL_HERE",
  "client_id": "KY4YbVAvtgB7lp8vIbWQ7zLk3hssZlhR",
  "realm": "email",
  "country_code": "DE"
}'

From the output, the id_token value is the token you need. (OAuth OTP original from https://github.com/nicoh88/node-kobold/)

neatobotlib's People

Contributors

waringer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.