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

Homie ESP-8266 is not working without wifi #536

Closed
kmehran opened this issue Sep 14, 2018 · 6 comments
Closed

Homie ESP-8266 is not working without wifi #536

kmehran opened this issue Sep 14, 2018 · 6 comments

Comments

@kmehran
Copy link

kmehran commented Sep 14, 2018

[...template with no change deleted...]

@kmehran
Copy link
Author

kmehran commented Sep 14, 2018

I designed a wifi light-switch, based on Homie and Openhab Server, the first important function of
each light switch is turning on and off the lights, but it cannot turn on/off the light during wifi/mqtt
connection or even when one or both of them lost.
One of the Most important matter about adding extra functionality or new technology to an old
system (like Light Switch) is do not affect its basic function(s).

@Alex9779
Copy link

Alex9779 commented Oct 22, 2018

I found this somewhere else here, maybe in another issue description, the solution is depending on your implementation that you run the loop where you handle the events the manual switch raises in the mail loop in addition to the Homie.loop().
Here an excerpt of one of my implementations:

void loop()
{  
  Homie.loop();

  button.tick();
}

In this firmware is use the lib "OneButton" for handling a button, it is a uplight control firmware and the uplight has one button where you can turn it on and off in addtion to control it with Homie.
You can see the "loop" for handling the button events is also in the main loop where the Homie.loop() is too. So both are run and no matter how the Homie state is the button events are processed...

@kmehran
Copy link
Author

kmehran commented Oct 22, 2018 via email

@euphi
Copy link
Member

euphi commented Jan 22, 2019

@Misiu
Copy link

Misiu commented Feb 5, 2019

@euphi, as this is labeled with Feature_V3, does it means that this will be added to develop-v3 branch?
I'm trying to build Wemos D1 based multi-relay switch and recently I found this repo. Because OpenHab support homie 3.x I want to use this library.
As many wrote before sometimes we don't want to wait for MQTT to connect at the start, the most important thing is the working relay.

I've found an example that I want to use as a base for my sketch - https://github.com/homieiot/homie-esp8266/blob/develop-v3/examples/IteadSonoffButton/IteadSonoffButton.ino

How should I change it so that I can toggle replay when I don't have MQTT connected?
Example showing such behavior would be awesome.

@euphi
Copy link
Member

euphi commented Mar 10, 2019

Closed with #490.

@euphi euphi closed this as completed Mar 10, 2019
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

4 participants