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

Binary Sensor Help Please #725

Closed
Odianosen25 opened this issue Aug 11, 2017 · 8 comments
Closed

Binary Sensor Help Please #725

Odianosen25 opened this issue Aug 11, 2017 · 8 comments
Labels
stale Action - Issue left behind - Used by the BOT to call for attention

Comments

@Odianosen25
Copy link

Hello,

Many thanks for your firmware, and it must be great knowing your code helps thousands of ppl like myself to achieve awesome things.

Please a quick question, how can I connect a binary sensor to the sonoff basic. Like PIR or Window/door sensors that are either closed or opened so the status can be sent to an MQTT server?

Regards

@davidelang
Copy link
Collaborator

davidelang commented Aug 12, 2017 via email

@Odianosen25
Copy link
Author

Hello @davidelang ,

Thanks for the response. I do understand I have to define my GPIO14 sensor as a switch, also understand I have to set it to switchmode=2 so that it can send a message to a defined mqtt topic set by myself. I also understand I have to set the switchtopic to what I want to use.

But how to do all these is quite confusing I am afraid. I understand I can send command via http requests, web or mqtt, but I don't understand how the syntax come together. Please I just need a clearer way to achieve this, as this is quite new to me.

Kind regards

@Odianosen25
Copy link
Author

Odianosen25 commented Aug 12, 2017

Don't worry @davidelang thanks and I have gotten it to work now. Many thanks again and I am most grateful.

But another different question, is there a command I can send to the sonoff (as I got a couple of them around my home) to let me know its status?

@mkh595
Copy link

mkh595 commented Aug 12, 2017

Read in Wiki Commands topic
E.g. command Status 0 returns all information

@CommodoreWhite
Copy link

Consider setting up a grouptopic and assigning all (or both in your case) your Sonoffs to it. Send the "status 0" to the grouptopic and all (or in your case, both) devices will respond with their status. Neat!

Peter

@PeggyFree
Copy link

PeggyFree commented Aug 13, 2017 via email

@stale
Copy link

stale bot commented Apr 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Action - Issue left behind - Used by the BOT to call for attention label Apr 23, 2018
@stale
Copy link

stale bot commented May 7, 2018

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.

@stale stale bot closed this as completed May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Action - Issue left behind - Used by the BOT to call for attention
Projects
None yet
Development

No branches or pull requests

5 participants