Giter Club home page Giter Club logo

Comments (5)

enesbcs avatar enesbcs commented on July 21, 2024

Interesting, but i do not really understand how and why? This code looks like a simple serial to MQTT gateway, which is nothing to do with this ESPNow sensor project.

from easyespnow.

happytm avatar happytm commented on July 21, 2024

This is simply mqtt broker. So if activated you can make option in firmware to get rid of all controller code related to MQTT and instead use umqttbroker library to handle mqtt part. If anyone wants to use your code without espnow protocol and they do not want to use ESPEasy firmware which even does not compile under arduino right now can use your fork of espeasy and disable espnow feature and enable wifi feature with umqtt broker. That way they have standalone system for home automation with most of the old features of espeasy inluding rule engine but not all new complications came in last 2 years with espeasy firmware.

Thanks.

from easyespnow.

happytm avatar happytm commented on July 21, 2024

uMQTTBroker is also a bridge to external second mqtt broker like local broker on raspberry pi or any public broker in cloud. So when internet is available it can communicate with outside world via MQTT or when there is no internet it can still do all automation locally over MQTT protocol.

Thanks

from easyespnow.

enesbcs avatar enesbcs commented on July 21, 2024

I see your point now. So MQTT can be an alternative for ESPNow. But uMQTTBroker if i understand correctly is a server-like (receiver) method, but most ESPEasy plugins only sends data (sender), except the Rule engine of course. How do you imagine data flow inside the core program?

from easyespnow.

happytm avatar happytm commented on July 21, 2024

I have implemented uMQTT broker with simple modification to another minimal fork of ESPEasy (ESPCoreRules). In this implementation the main controller where uMQTT is installed as a broker is called receiver. The controller act as Station & AP at the same time and receive messages from remote sensors which have sender code installed.Once message is received at receiver the broker publish the sensor data automatically so broker installed at RPIEasy capture this MQTT messages and further process it. So there is no physical connection required between Raspberry PI and ESP8266 receiver device. In my test the sender devices take only 200 to 230 milliseconds to send data and then they can go to sleep for predefined minutes to save power. Sender devices can get message from Receiver device if sent by receiver when they wake up and can perform certain actions when they wake up next time or change sleep time to few seconds and wake up to perform those actions.

Remember I am learning to code in arduino so it could be very bad code but for my test purpose it works reliably. Please test my repo and help me improve the code.

The code is at following link:

https://github.com/happytm/ESPCoreRules

On receiver side only setting required is ssid and password for access point the receiver will connect to and on sender side it will need receiver devices's ssid and channel.If you need to do further setting on receiver device instruction are here to do it over webserver:

https://github.com/SmartNodeRules/Documentation/wiki/SampleRules

Thanks

from easyespnow.

Related Issues (5)

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.