jeanmarc77 / 123solar

123Solar is a lightweight set of PHP/JS files that makes a web logger to monitor your photovoltaic inverter(s). It just need a web server and PHP, no databases are even needed. The philosophy is: To keep it simple, fast, with a low foot print to run on cheap and low powered devices.
GNU General Public License v3.0
36 stars 12 forks source link

Communication error only in 123solar, terminal works #58

Closed speeskeek closed 1 year ago

speeskeek commented 1 year ago

see screenshot. so the communication doenstn work in webpage, but it does on terminal. I'm trying to migrate my installation from debian_arm to debian_x64 to have a better server for all the other stuff I do Screenshot_20230910_110647

speeskeek commented 1 year ago

another test that I did afterwards:

sudo -u www-data aurora -a 2 -c -T -Y3 -d0 -e /dev/ttyUSB0 20230910-15:17:01: aurora: Problem opening serial device, check device name.

Is it true 123solar is running as www-data (webserver)? so a permission problem? has www-data access to /dev/ttyUSB0?

no it doesn' t sudo -u www-data cat /dev/ttyUSB0 cat: /dev/ttyUSB0: Permission denied

what do I need to do

speeskeek commented 1 year ago

okay solved. we need to add www-data to group dialout so it has access to the devices:

usermod -a -G dialout www-data