-
Notifications
You must be signed in to change notification settings - Fork 5
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
Handle the events in separate class #19
Comments
Give it a try. Don't forget that you can assign a dependency on a device. A dependency is looking at the another device's ON/OFF state, like a relay is dependent on a pH sensor. The messiest part of the web logic part, those long if else statements. Wish I could clean that up somehow. |
Hi, I have the scheduler on my fork (scheduler or master branches). I also worked a bit on PWM4 and AdafriutPWM8, AdafruitPWM8 now extends PWM4 and most of its logic is in common. I plan to add storage for remaining classes (some inputs are not being stored), it should not be a big effort. I tested PWM4 and AdafruitPWM8 only looking at logs, I do not have real PWM controlled devices at the moment. |
Oh, I thought you were going to make a Event system of dispatcher and observers. |
I started with a publish subscribe idea but then I realized I had to do a rationalization of the events logic before. I am also thinking to test ESPAsyncWebServer that may give more speed to the html part, also using the two ESP32 cores may be an option. |
In my fork now all storage of settings should be done. Here the changes in my master/configuration_storage (they should be aligned):
Next step I want to try is the ezTime library to allow setting of time zones instead of current time add/subtract. In addition ezTime can mange timed events (like setting alarms at defined time) and this may substitute the current event handling. |
Don't mind about my comment on the example JSON file, I uploaded one in the Json folder |
What do you mean by "Access Point mode'? |
If the ESP32 does not have the JSON settings file starts as an access point so it does not try to connect to a WiFi network but instead it creates a WiFi network called ESP32-WAAC. At this point the user can connect to the ESP32-WAAC WiFi network, go to http://192.168.4.1 and access to the WACC settings. If the settings are saved then the WAAC tries to connect to the stored WiFi and IP settings. |
Hi,
I am moving all the logic that handles the events in a separate class common to all the classes that use this logic.
This should simplify the devices logic and focus on the single functionality. I am doing this to try to have a better understanding of the status of the class (e.g. relay ON vs OFF) and avoid mistakes in the event logic handling.
This logic will be present soon in my fork, what do you think about it?
The text was updated successfully, but these errors were encountered: