„README.md“ ändern
This commit is contained in:
parent
1b520d5daf
commit
22141ab2d7
17
README.md
17
README.md
|
@ -7,15 +7,15 @@ Make sure you have installed apache2 with php8.1 (and mysql extension). You need
|
|||
<code>python3 -m pip install mysql-connector-python</code>
|
||||
|
||||
## Create folders and rights
|
||||
<code>mkdir /opt/hoymiles && mkdir /opt/hoymiles/www</code>
|
||||
<code>chown -R fhem:dialout /opt/hoymiles/www</code>
|
||||
<code>mkdir /opt/hoymiles && mkdir /opt/hoymiles/www</code>
|
||||
<code>chown -R fhem:dialout /opt/hoymiles/www</code>
|
||||
|
||||
## Upload files
|
||||
Upload index.php into /opt/hoymiles/www folder. It acts as an JSON-API for serving data to FHEM.
|
||||
Upload solar.py into /opt/hoymiles folder. It will gather data from Hoymiles API and stores it in the database.
|
||||
|
||||
## Create database
|
||||
Use the script solar.sql to create your database for storing solar data. Make sure you configure the rights accordingly.
|
||||
Use the script solardata.sql to create your database for storing solar data. Make sure you configure the rights accordingly.
|
||||
|
||||
## Change values
|
||||
In file index.php insert your database connection details. Do this also in solar.py, where you add also your Hoymiles credentials for login.
|
||||
|
@ -24,7 +24,16 @@ In file index.php insert your database connection details. Do this also in solar
|
|||
|
||||
## Apache mysql example
|
||||
This example shows how to set up the JSON API in apache2.
|
||||
<code></code>
|
||||
<code><VirtualHost *:80>
|
||||
ProxyPreserveHost On
|
||||
ServerName automation.${MYDOMAIN}
|
||||
Alias /solarapi "/opt/hoymiles/www"
|
||||
<Directory "/opt/hoymiles/www/">
|
||||
AllowOverride none
|
||||
Require all granted
|
||||
</Directory>
|
||||
CustomLog /var/log/apache2/${LOG} combined
|
||||
</VirtualHost></code>
|
||||
|
||||
## FHEM example
|
||||
This is an example, how you can show the data in your FHEM instance.
|
||||
|
|
Loading…
Reference in New Issue