open-building-management / emoncms Goto Github PK
View Code? Open in Web Editor NEWemoncms home-assistant addon
License: MIT License
emoncms home-assistant addon
License: MIT License
when crashing, apache2 can have problem with pid file already existing
a solution could be to change the apache run execlineb script for this one
#!/command/execlineb -P
/command/foreground { rm -f /var/run/apache2/httpd.pid } /usr/sbin/httpd -D FOREGROUND
https://forums.docker.com/t/httpd-already-running/33397
and
https://github.com/docker-library/httpd/blob/master/2.4/alpine/httpd-foreground
In the new release of HA there is an option to by UI configure a dashboard as a webpage.
To be able to get that to work with the addon I did need to add this to the security.conf in /etc/apache2 in the addon
Comment out
#Header always set X-Fram-Options "SAMEORIGIN"
#Header always set Referrer-Policy "same-origin"
Add
Header set Content-Security-Policy "frame-ancestors" 'self' https://<myhass>:8123"
Another thing is that I don't really know how the HA Companion app is accessing this so having some difficulties adding access for it.
Should this be configurable option or is there a better approach?
Thanks! :)
this version is adding ssl and https facilities
Line 79 in 53c40fe
when the container restarts for the nth time, there is n identical lines written in httpd.conf
it doesn't cause any trouble but it is not elegant
python has introduced the concept of EXTERNALLY-MANAGED packages
https://peps.python.org/pep-0668/
python3.11 on alpine3.19 is following Pep 668
we have to adapt the feedwriter run script which is /etc/s6-overlay/s6-rc.d/feedwriter/run
Starting to test an ingress version, cf #11 (comment)
config.yaml contains ingress_stream: true
but dont know which size can be uploaded to the backup module
reformat + error only by default
Hello, it's me again :).
I got the addon to work, however, when I try to create a new device for input, it doesn't work. I plan to get data from my HA instance and send it to this addon through this integration.
to make a backup, a simple way is to stop the container (or the addon), so you can backup the /data/emoncms
folder on the host with the tool you want....then you restart the container....
But how to backup if the container is running ?
see https://github.com/home-assistant/addons/tree/master/mariadb
maybe this is a clue ?
more details on s6-rc -u change service_name
and s6-rc -d change service_name
on https://skarnet.org/software/s6-rc/faq.html
s6-rc -u change mariadb-lock
runs a bundle service that actually launches these longrun services on the container :
https://github.com/home-assistant/addons/tree/master/mariadb/rootfs/etc/s6-overlay/s6-rc.d/mariadb-lock-core
https://github.com/home-assistant/addons/tree/master/mariadb/rootfs/etc/s6-overlay/s6-rc.d/mariadb-lock-post
cf
https://github.com/docker-library/httpd/blob/master/2.4/alpine/Dockerfile
search for CustomLog and ErrorLog
Error log is not problematic but access log can get very big
seems the solution is to run mariadb as root, in order for be able to use the HA restore with no problem : cf https://github.com/home-assistant/addons/blob/master/mariadb/rootfs/etc/s6-overlay/s6-rc.d/mariadb-core/run
this is only minor fix
investigating other solutions :
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.