Hi everybody, i read a lot of posts on this forum but I really didn't find something (different from MQTT topics) regarding asking data from hydrosys. In my little project i would install a remote ESP32 with a very nice and small e-paper screen, where i can easily read few parameters: i.e "health" of hydrosys4 system (up and running), the humidity of the soil, how much weatherAPI will influence next irrigation cycle, and maybe the temperature max of tomorrow (via weatherAPI directly). Basically you can imagine all other values or parameter you want. The ESP32 will stay in deep-sleep for an hour and then awake itself and (in my mind) make a call to hydrosys.
Implementing maybe a token for safety, and obviously only for reading! I just made a mockup of what I'm talking about, with some fake data, just to help my poor english!
Thanks to everyone that will add some discussion about this topic :)
Hi everybody, just an update about my hydrosys4 project: I'm really waiting for springtime to see it in action, but now in winter I just improve my control box that I keep inside home; here some explanation:
1) Touch "button" to change info screen (Recap, Hydrosys, Power, Forecast)
2) RGB status led
3) Hydrosys4 data - taken from Raspberry
4) Energy used / generated
Forecast data are taken from weatherapi.com, while hydrosys4 data are first pulled to a web server and then "served" as BMP image to the ESP32 that drive this e-paper screen
Energy generated is from my solar inverter, while I'm waiting for a PZEM004-T in order to measure energy used.
This project is integrated by a web interface that collect in a database both data from hydrosys, inverter and forecast.
My goal is to have also the amount of water used to irragate the grass, It will be done simply counting secs per day of every actuator.
1) PCB board https://www.amazon.it/gp/product/B07CQQK214/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1
2) touch sensors - I used a paperclip
3) RGB led
4) ESP32 https://www.reichelt.com/it/it/led-rgb-5-mm-cablato-4-pin-rt-gn-bl-8000-mcd-25--led-ll-5-8000rgb-p156358.html?PROVID=2814&gclid=Cj0KCQiA_JWOBhDRARIsANymNOYgnA_IMdMasJAhsI-4HuEahXhLb-FF4VaRJvi2eLqMmJsJMX6-SXkaAimQEALw_wcBhttps://www.amazon.it/gp/product/B071P98VTG/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
5) Waveshare e-paper https://www.amazon.it/gp/product/B0751J99PS/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
I work to have a nice-and-clean interface :)
Dear Angelo, thank you for replying me and for your kind words, I'm not a programmer or a software engineer, I like just to put my hands into things trying to understand how they work :).
I have also really to thank you for sharing this project that is a very good way to understand better the world of raspberry and ESP32 and all the stuff related to. I'm not used to have a repository (as I said before i code only for amusement) but I try to fork you project on github and show my very little mods. For password disabling I just try to add a routing in start.py where inside it I check api_key that came from external call versus api_key stored in settings.txt (I thought was a good idea to store in the network-related things).
I really appreciate the logic you used for collecting sensor data, it makes high-level calls very easy; I never try MQTT (I have nothing in my house that use this protocol), but instead I have a little server over internet that I use to grab hydrosys data and convert in a .bmp file; the ESP32 just take this bmp and displays it;
About data exporting i think that in this kind of project is very hard to balance easiness and flexibility; my personal opinion is that if one person is interested in raspberryPI stuff it means he is ready to try something harder than just plug-n-play, so i would appreciate more "deep" functions, like add new sensor drivers or API management, or maybe homepage customization (it's boring to do ;))
A presto!
M
I have no words, you make it look so simple, your level of expertise about it is definitely way higher than mine. Do you have a repository where I can see the modifications you have done?
I'm quite interested to see how you disabled the password login.
In general I was thinking to implement some functions for data export using MQTT, but I also see that implementing HTTP query API can be quite useful for real time request.
Actually the implementation can be as follow:
- HTTP query for real time sensor interrogation, (and maybe relay activation)
- MQTT for periodic export the latest reading present in the datatbase.
I'd like to have your opinion about it.
Just to say I reach the result I want (for now) and I can take RainMultiplier directly from Hydrosys4 throught my new API call; this value is used together to weatherAPI data to show forecast and indicate if Hydrosys4 is up and running and how much will be reduced due to rain forecast.
I will keep this little display powered by a battery in deep-sleep mode, so it wakes up only once at hour just to update forecast and other data.
So, in order to better understand how this great project work, I made some modifications to "start.py", "network.html" and "networksetting.html" templates, and also in "networkdbmod.py" ; now I'm able to save a private API_KEY that will be use in future to access (without user and password authentication) to realtime data from my e-paper screen.
Just to help other with same case: using SSH terminal I create a password for the user "root" in order to use an external editor (Notepad++) to edit (and save) files on raspberry; I change a little "start.py" adding a route to my own service, by now taking out password control only for this purpose; now I can call directly the page and have what I need;