denjello / pi-DJex

This is a project for creating visal feebdack when the DJ gets too loud.
GNU Affero General Public License v3.0
0 stars 2 forks source link

Add Web Login #7

Open Peersen opened 9 years ago

Peersen commented 9 years ago

setting the threshold level should be password protected. One useraccount and one adminaccount to change user pswd should do the job.

denjello commented 9 years ago

I believe @dasantonym suggested removing apache. since we we are using python, maybe a solution would be to use simpleserver...

Here is a gist that would let someone upload something: https://gist.github.com/touilleMan/eb02ea40b93e52604938

Here is a stack-overflow answer that uses basic auth. https://stackoverflow.com/questions/4287019/stuck-with-python-http-server-with-basic-authentication-using-basehttp

Does this need to be changed during the event, or is it a "set it and forget it" type of thing? If so, another way to deal with this might be a special file on a usb stick that is checked at init. If it is not found then a sensible default is chosen. The file wouldn't even need any content, just a name, like:

80.dbmax

And then this could be easily parsed with whatever (bash, python, node ...)

A final way to deal with it might be to query a service like curl http://10.10.10.10:21763/druckse/dbmax > /home/djex/current.dbmax

dasantonym commented 9 years ago

ok i guess we'll scratch #6 then.

right now i am configuring my version through command line arguments. so you can do

pi-djex.py --config --threshold=80 --rmswindowsize=2

the --config switch tells it to just update the conf and then exit, so no new server is spawned.

this way the security layer is just ssh and that's better than sending unencrypted replayable requests over the network.

denjello commented 9 years ago

true - using a console client is also possible on android. in my opinion running an additional server adds to process bloat.

dasantonym commented 9 years ago

addressed in the rewrite https://github.com/denjello/pi-DJex/pull/10