Giter Club home page Giter Club logo

Comments (4)

aholstenson avatar aholstenson commented on August 14, 2024

I'm not familiar with this feature of the gateway, do you have a link to the documentation for it?

For normal interaction with a device they emit events, most things on the gateway are exposed as controllers and are documented at https://github.com/aholstenson/miio/blob/master/docs/devices/controller.md

from miio.

brianping7 avatar brianping7 commented on August 14, 2024

https://cdn.cnbj2.fds.api.mi-img.com/lumiaiot/common/gateway/%E7%BB%BF%E7%B1%B3%E7%BD%91%E5%85%B3%E5%B1%80%E5%9F%9F%E7%BD%91%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AEV1.0.7_2017.05.25_01.doc

this is a chinese doc, it mentioned, we could send write cmd to gateway as follow.
{"cmd":"write","model":"switch","sid":"112316","short_id":4343,"data":"{"status":"click"}" }
this could simulate the click event.

from miio.

brianping7 avatar brianping7 commented on August 14, 2024

can you explain me a liitle bit where you process the heartbeat message from gateway. i can't ready any heartbeat message. thanks.

from miio.

aholstenson avatar aholstenson commented on August 14, 2024

The library has all the code related to the Local Developer API in the file lib/devices/gateway.js, but it's not used much. Instead of using the developer API for calls (writes in the documentation) I've opted to use it only for reports (such as clicks on a switch or temperature changes) to stay compatible with other libraries that use the Developer API.

If you want to send write commands via the Developer API to your gateway you should look into other libraries for the Aqara gateway, there are several libraries if you search through NPM that should be able to do what you are looking for.

from miio.

Related Issues (20)

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.