motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.97k stars 651 forks source link

Is it possible to "host" a txt file through the motionEye front end? #1760

Closed achesloc closed 4 years ago

achesloc commented 4 years ago

Hi all! I hope everybody is doing well out there during these crazy times. I hope I am placing this into the correct "issues" place, since it sort of falls between the OS and front end.

First, Motion Eye OS is amazing as are these raspberry pi boards. I have been tinkering with this as a distraction from work over the last two weeks and it has been a blast. What started out as a dog monitoring project has now morphed into me developing a distributed sensor network to monitor temperature and humidity inside our older home since we are in the middle of a renovation (great timing of course), and during that renovation completely replaced the HVAC system. We also live a very damp place (Alexandria, VA), so humidity monitoring is of great interest and the BME280 seems to do very well with that.

I have figured out a lot on my own with help from the issues posted here, including how to overlay sensor information on top of the video directly. Tonight I stumbled on the fact that Motion Eye OS does not have i2c disabled, which means I can run a python script as a cron job to update some text files in /data/etc using a BME280 sensor. Monitor_1 (for camera 1) uses that text to overlay on top of the live video. But, that is where my dilemma lies.

On the other nodes I am deploying, I am just running apache and hosting the .txt files that way and pulling them periodically for insertion into a MariaDB/MySQL table using a main Pi 4 as the "server." I could replicate the same thing through an SFTP scripted deal with a motion eye node pulling the text files from /data/etc, but would prefer to host via http for debug and security reasons. Is there any place to sneak a text file or two into whatever directory the motion eye os front end serves from? Or another way anybody can think of beyond the kludge of using SFTP?

I also have some information on how to integrate the BME280 with motion eye and overlay the video. I did not see that anywhere else. Is there a place to best place that information for others to use?

Any help appreciated. And again, software is very cool!

achesloc commented 4 years ago

So, I ended up finding the directory where the web front end is hosted from and ultimately gave up on my http solution. Instead, I am using a curl/sftp solution. It is working great. I was just trying to avoid having this one board be different than the others. I will try and find a place to post the information I have about how I integrated the BME280 with motioneyeos and also how I overlaid that information on the video image directly.