Server that is supposed to handle everything what smart home requires. It communicates with sensors and displaying aggregated results. Additionally it also provides API for performing file backups.
git clone https://github.com/JanPalasek/smart-home-server
# for linux
cd smart-home-server
Create SmartHome database and user with privileges.
# run mysql command line
sudo mysql
CREATE USER 'HomeUser' IDENTIFIED BY 'noPass1234';
GRANT ALL PRIVILEGES ON *.* TO 'HomeUser';
CREATE DATABASE SmartHome;
# create tables
mysql --user="HomeUser" --database="SmartHome" -p"noPass1234" < "Scripts/RenewDb.sql"
# insert test data
mysql --user="HomeUser" --database="SmartHome" -p"noPass1234" < "Scripts/RenewTestData.sql"
cd SmartHome.Web
dotnet restore
# expected directory: SmartHome.Web
npm install
Create configuration files from defaults, for example from appsettings.development.json.defaults create a valid appsettings.development.json replacing some placeholders.
Go to SmartHome.Web directory and run
dotnet build
dotnet run
Go to project root directory and run
dotnet test