Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set sensors' state by sending commands to them using MQTT #30

Open
ghasemikasra39 opened this issue Oct 5, 2018 · 1 comment
Open

Comments

@ghasemikasra39
Copy link

I've read the source code of your module, many articles about MQTT topic naming, a virtual scenario of a garage application, getting data from a sensor using MQTT, etc.

Now I am able to receive the states and updates from Xiaomi sensors with MQTT using (node-xiaomi2mqtt module which is built based on your module).

My question is: Is it possible to set the state of a sensor (e.g. I want to turn on a light from my nodeJs web application by publishing MQTT message to that light) using MQTT?

This question is somehow asked in this issue last year.

Is sending commands to Xiaomi sensors possible ? If yes, how ? (Could you provide me with references, links to articles, examples, etc)

@curry684
Copy link
Contributor

curry684 commented Feb 5, 2019

This is not possible in the "driver" as the hardware does not support it, nor should it. Faking this data should be a part of the application test suite, you could easily do this using mosquitto_pub in your case as you are using an MQTT bridge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants