Commitin programming crimes }:->

Few weeks ago I seriously looked to the mine OpenHAB installation and asked a question for myself: "Am I really need it?" Look, I have a few ZigBee devices, which are connected to the my server with the help of ZigBee2MQTT. Thusly, all necessary values and knobs are accessible through the MQTT topics.

And I'm using the OpenHAB (big Java application which eats ton's of RAM and constantly swapping) just to:
1) Read values from MQTT topic
2) Read weather forecast from Open-Meteo through simple REST API endpoints
3) Store all the data to the PostgreSQL DB.
4) Display these data in the nice Web page which works only in browsers with JS engine.

So, basically, I trade tons of RAM and processing power just for a nice web-page with few indicators. While retrieving data from my ZigBee devices processed by the another service.

After that thought, I started to think about replacing this monster with small hand-written program, which will not eat 700 MB of RAM. Just Nginx, small FastCGI script on C, which will read values from DB and display them on the simple HTML page. And another small daemon (also written in C) which will take data from MQTT topic (and from REST API of Open-Meteo) and will write them to the DB. And possibly some PGSQL procedures to analyze these data.

At least I'll have fun :drgn_happy_blep:

Emacs buffer with some C code, which spews out the string with HTML, with substituted values for temperature and humidity.
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.bsd.cafe/users/evgandr/statuses/115803131126845313 on your instance and quote it. (Note that quoting is not supported in Mastodon.)