diff --git a/README.md b/README.md index 623b36bf..90a70e16 100644 --- a/README.md +++ b/README.md @@ -272,11 +272,11 @@ docker-compose up -d ## MyEMS镜像 -[1]. [https://github.com/MyEMS/myems](https://github.com/MyEMS/myems) +[1]. [Github](https://github.com/MyEMS/myems) https://github.com/MyEMS/myems -[2]. [https://gitee.com/myems/myems](https://gitee.com/myems/myems) +[2]. [Gitee](https://gitee.com/myems/myems) https://gitee.com/myems/myems -[3]. [https://bitbucket.org/myems/myems](https://bitbucket.org/myems/myems) +[3]. [Bitbucket](https://bitbucket.org/myems/myems) https://bitbucket.org/myems/myems -[4]. [https://gitlab.com/myems/myems](https://gitlab.com/myems/myems) +[4]. [Gitlab](https://gitlab.com/myems/myems) https://gitlab.com/myems/myems diff --git a/README_DE.md b/README_DE.md index 77315f15..e550796e 100644 --- a/README_DE.md +++ b/README_DE.md @@ -274,11 +274,11 @@ docker-compose up -d ## MyEMS Spiegel -[1]. [https://github.com/MyEMS/myems](https://github.com/MyEMS/myems) - -[2]. [https://gitee.com/myems/myems](https://gitee.com/myems/myems) +[1]. [Github](https://github.com/MyEMS/myems) https://github.com/MyEMS/myems -[3]. [https://bitbucket.org/myems/myems](https://bitbucket.org/myems/myems) +[2]. [Gitee](https://gitee.com/myems/myems) https://gitee.com/myems/myems -[4]. [https://gitlab.com/myems/myems](https://gitlab.com/myems/myems) +[3]. [Bitbucket](https://bitbucket.org/myems/myems) https://bitbucket.org/myems/myems + +[4]. [Gitlab](https://gitlab.com/myems/myems) https://gitlab.com/myems/myems diff --git a/README_EN.md b/README_EN.md index a7dc6d4d..a7684be4 100644 --- a/README_EN.md +++ b/README_EN.md @@ -274,12 +274,11 @@ docker-compose up -d ## MyEMS Mirrors -[1]. [https://github.com/MyEMS/myems](https://github.com/MyEMS/myems) - -[2]. [https://gitee.com/myems/myems](https://gitee.com/myems/myems) +[1]. [Github](https://github.com/MyEMS/myems) https://github.com/MyEMS/myems -[3]. [https://bitbucket.org/myems/myems](https://bitbucket.org/myems/myems) +[2]. [Gitee](https://gitee.com/myems/myems) https://gitee.com/myems/myems -[4]. [https://gitlab.com/myems/myems](https://gitlab.com/myems/myems) +[3]. [Bitbucket](https://bitbucket.org/myems/myems) https://bitbucket.org/myems/myems +[4]. [Gitlab](https://gitlab.com/myems/myems) https://gitlab.com/myems/myems diff --git a/admin/README.md b/admin/README.md index 1ecae0b2..339d9a81 100644 --- a/admin/README.md +++ b/admin/README.md @@ -7,7 +7,6 @@ Providing admin panel for MyEMS system administration and configuration ## Prerequisites nginx-1.18.0 or later - ## Option 1: Install on NGINX Server * Install NGINX Server @@ -15,8 +14,8 @@ nginx-1.18.0 or later refer to http://nginx.org/en/docs/install.html * Configure NGINX -``` -$ sudo nano /etc/nginx/nginx.conf +```bash +sudo nano /etc/nginx/nginx.conf ``` In the 'http' section, add some directives: ``` @@ -54,20 +53,20 @@ Add a new 'server' section with direstives as below: ``` * Download myems -``` -$ cd ~ -$ git clone https://github.com/MyEMS/myems.git +```bash +cd ~ +git clone https://github.com/MyEMS/myems.git ``` * Install myems-admin : If the server can not connect to the internet, please compress the myems/admin folder and upload it to the server and extract it to ~/myems/admin -``` -$ sudo cp -r ~/myems/admin /var/www/html/admin -$ sudo chmod 0755 -R /var/www/html/admin +```bash +sudo cp -r ~/myems/admin /var/www/html/admin +sudo chmod 0755 -R /var/www/html/admin ``` Check the config file and change it if necessary: -``` -$ sudo nano /var/www/html/admin/app/api.js +```bash +sudo nano /var/www/html/admin/app/api.js ``` ## NOTE: @@ -83,15 +82,15 @@ The 'upload' folder is for user uploaded files. DO NOT delete/move/overwrite the refer to https://httpd.apache.org/docs/2.4/install.html * Configure Apache2 -``` - $ sudo vi /etc/apache2/ports.conf +```bash + sudo vi /etc/apache2/ports.conf ``` Add a Listen ``` Listen 8001 ``` -``` -$ sudo vi /etc/apache2/sites-available/000-default.conf +```bash +sudo vi /etc/apache2/sites-available/000-default.conf ``` Add a new 'VirtualHost' as below ``` @@ -110,18 +109,18 @@ Add a new 'VirtualHost' as below ``` * Download myems-admin -``` -$ cd ~ -$ git clone https://github.com/MyEMS/myems.git +```bash +cd ~ +git clone https://github.com/MyEMS/myems.git ``` * Install myems-admin : If the server can not connect to the internet, please compress the myems/admin folder and upload it to the server and extract it to ~/myems/admin -``` -$ sudo cp -r ~/myems/admin /var/www/html/admin -$ sudo chmod 0755 -R /var/www/html/admin +```bash +sudo cp -r ~/myems/admin /var/www/html/admin +sudo chmod 0755 -R /var/www/html/admin ``` Check the config file and change it if necessary: -``` -$ sudo nano /var/www/html/admin/app/api.js +```bash +sudo nano /var/www/html/admin/app/api.js ``` \ No newline at end of file diff --git a/database/README.md b/database/README.md index 62387a69..ef44e6de 100644 --- a/database/README.md +++ b/database/README.md @@ -14,7 +14,7 @@ Providing database schema and scripts for MyEMS. ### Installation Execute the following scripts in MySQL commandline, or execute in other MySQL client tools such as MySQL Workbench, Navicat, DBaver, phpMyAdmin, etc. -``` +```bash mysql -u root -p < myems_billing_baseline_db.sql mysql -u root -p < myems_billing_db.sql mysql -u root -p < myems_energy_baseline_db.sql @@ -26,11 +26,11 @@ mysql -u root -p < myems_system_db.sql mysql -u root -p < myems_user_db.sql ``` To insert demo data execute the following scripts, -``` +```bash mysql -u root -p < demo/myems_system_db.sql ``` #### Change COLLATE for MySQL server before version 8.0 -``` +```bash sudo nano /etc/mysql/my.cnf ``` ``` diff --git a/myems-aggregation/README.md b/myems-aggregation/README.md index c3aebfe5..ae0c6262 100644 --- a/myems-aggregation/README.md +++ b/myems-aggregation/README.md @@ -1,7 +1,5 @@ ## MyEMS Aggregation Service 数据汇总服务 - - ### Introduction This service is a component of MyEMS and it aggregates normalized data up to multiple dimensions. @@ -10,50 +8,48 @@ This service is a component of MyEMS and it aggregates normalized data up to mul mysql.connector - - ### Installation Download and install MySQL Connector: -``` - $ cd ~/tools - $ wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz - $ tar xzf mysql-connector-python-8.0.20.tar.gz - $ cd ~/tools/mysql-connector-python-8.0.20 - $ sudo python3 setup.py install +```bash +cd ~/tools +wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz +tar xzf mysql-connector-python-8.0.20.tar.gz +cd ~/tools/mysql-connector-python-8.0.20 +sudo python3 setup.py install ``` Install myems-aggregation service: -``` - $ cd ~ - $ git clone https://github.com/MyEMS/myems.git - $ cd myems - $ sudo git checkout master (or the latest release tag) - $ sudo cp -R ~/myems/myems-aggregation /myems-aggregation +```bash +cd ~ +git clone https://github.com/MyEMS/myems.git +cd myems +sudo git checkout master (or the latest release tag) +sudo cp -R ~/myems/myems-aggregation /myems-aggregation ``` Edit config.py -``` - $ sudo nano /myems-aggregation/config.py +```bash +sudo nano /myems-aggregation/config.py ``` Setup systemd service: -``` - $ sudo cp myems-aggregation.service /lib/systemd/system/ +```bash +sudo cp myems-aggregation.service /lib/systemd/system/ ``` Enable the service: -``` - $ sudo systemctl enable myems-aggregation.service +```bash +sudo systemctl enable myems-aggregation.service ``` Start the service: -``` - $ sudo systemctl start myems-aggregation.service +```bash +sudo systemctl start myems-aggregation.service ``` Monitor the service: ```bash - $ sudo systemctl status myems-aggregation.service +sudo systemctl status myems-aggregation.service ``` View the log: ```bash - $ cat /myems-aggregation.log +cat /myems-aggregation.log ``` ### References diff --git a/myems-api/README.md b/myems-api/README.md index 6534163e..b483234a 100644 --- a/myems-api/README.md +++ b/myems-api/README.md @@ -185,7 +185,6 @@ View in Postman: import the file MyEMS.postman_collection.json with Postman [Reports](#Reports) - ### Contact * GET Contact by ID ```bash @@ -443,7 +442,6 @@ $ curl -i -X GET {{base_url}}/emailmessages/from/{startdate}/to/{enddate} $ curl -i -X DELETE {{base_url}}/emailmessages/{id} ``` - ### Email Server * GET an Email Server by ID @@ -479,7 +477,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"host":"smtp. $ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"host":"smtp.myems.io","port":25, "requires_authentication":true, "user_name":"myems" , "password":"!MyEMS1" , "from_addr":"myems@myems.io"}}' {{base_url}}/emailservers/{id} ``` - ### Energy Category * GET an Energy Category by ID @@ -515,7 +512,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"电", $ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"电","unit_of_measure":"kWh", "kgce":0.1329 , "kgco2e":0.9825}}' {{base_url}}/energycategories/{id} ``` - ### Energy Flow Diagram * GET an Energy Flow Diagram by ID ```bash @@ -578,7 +574,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"source_node_ $ curl -i -X DELETE {{base_url}}/energyflowdiagrams/{id}/links/{lid} ``` - ### Energy Item * GET an Energy Item by ID @@ -612,7 +607,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"空 $ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"动力用电","energy_category_id":1}}' {{base_url}}/energyitems/{id} ``` - ### Equipment * GET Equipment by ID ```bash @@ -849,7 +843,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_mete $ curl -i -X DELETE {{base_url}}/combinedequipments/{id}/virtualmeters/{mid} ``` - ### Gateway * GET Gateway by ID @@ -919,7 +912,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"serial_port" $ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"serial_port":"/dev/ttyS0","baud_rate":115200}}' {{base_url}}/gsmmodems/{id} ``` - ### Knowledge File * GET Knowledge File by ID @@ -987,7 +979,6 @@ $ curl -i -X GET {{base_url}}/menus/web $ curl -i -X GET {{base_url}}/menus/{id}/children ``` - ### Meter * GET Meter by ID @@ -1043,7 +1034,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"point_id":"3 $ curl -i -X DELETE {{base_url}}/meters/{id}/points/{pid} ``` - ### Notification NOTE: Login before call these APIs, and then update User-UUID and Token in Headers @@ -1208,7 +1198,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"Modbu $ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"ModbusPoint1", "data_source_id":1, "object_type": "ENERGY_VALUE", "units":"kWh", "low_limit":0, "high_limit":999999999, "is_trend":true, "is_virtual":false, "address":"{\"slave_id\":1, \"function_code\":3, \"offset\":1, \"number_of_registers\":2, \"data_format\":\"float\"}", "description":null}}' {{base_url}}/points/{id} ``` - ### Privilege * GET Privilege by ID ```bash @@ -1231,7 +1220,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"super $ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"superusers", "data":"{\"spaces\":[1, 3]}"}}' {{base_url}}/privileges/{id} ``` - ### Rule * GET Rule by ID @@ -1252,7 +1240,6 @@ Result in JSON | last_run_datetime | float | null, or the number of milliseconds since January 1, 1970, 00:00:00, universal time | | next_run_datetime | float | null, or the number of milliseconds since January 1, 1970, 00:00:00, universal time | - ```bash $ curl -i -X GET {{base_url}}/rules/{id} ``` @@ -1273,7 +1260,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"name":"Space $ curl -i -H "Content-Type: application/json" -X PUT -d '{"data":{"name":"Space Energy Consumption Over Limit", "fdd_code":"SPACE01", "category":"SPACE", "priority":"HIGH", "channel":"WEB", "expression":"{\"space_id\":1, \"high_limit\":1000.000}", "message_template":"%s截止到目前电耗%s,超标%s。", "is_enabled":true}}' {{base_url}}/rules/{id} ``` - ### Sensor * GET a Sensor by ID @@ -1579,7 +1565,6 @@ $ curl -i -X DELETE {{base_url}}/spaces/{id}/virtualmeters/{mid} $ curl -i -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: a6e52af82e5b4168ae03b1c5fd8fa31b2ab3a338" -X GET {{base_url}}/spaces/tree ``` - ### Store * GET Store by ID ```bash @@ -1876,7 +1861,6 @@ $ curl -i -H "Content-Type: application/json" -X POST -d '{"data":{"virtual_mete $ curl -i -X DELETE {{base_url}}/tenants/{id}/virtualmeters/{mid} ``` - ### Tenant Type * GET a Tenant Type by ID @@ -1938,7 +1922,6 @@ $ curl -i -X GET {{base_url}}/textmessages/from/{startdate}/to/{enddate} $ curl -i -X DELETE {{base_url}}/textmessages/{id} ``` - ### Timezone * GET a Timezone by ID ```bash @@ -1995,7 +1978,6 @@ $ curl -i -H "Content-Type: application/json" -H "User-UUID: 793f1bb4-6e25-4242- $ curl -i -H "Content-Type: application/json" -H "User-UUID: 793f1bb4-6e25-4242-8cdc-2f662b25484f" -H "Token: a6e52af82e5b4168ae03b1c5fd8fa31b2ab3a338" -X PUT -d '{"data":{"name":"johnson","password":"NewPassword1"}}' {{base_url}}/users/resetpassword ``` - ### Virtual Meter * GET a Virtual Meter by ID @@ -2103,274 +2085,274 @@ $ curl -i -X DELETE {{base_url}}/wechatmessages/{id} ### Reports * GET AdvancedReports -``` -$ curl -i -X GET {{base_url}}/reports/advancedreports?reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime} +```bash +curl -i -X GET {{base_url}}/reports/advancedreports?reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime} ``` * GET AdvancedReport by ID -``` -$ curl -i -X GET {{base_url}}/reports/advancedreports/{id} +```bash +curl -i -X GET {{base_url}}/reports/advancedreports/{id} ``` * DELETE AdvancedReport by ID -``` -$ curl -i -X GET {{base_url}}/reports/advancedreports/{id} +```bash +curl -i -X GET {{base_url}}/reports/advancedreports/{id} ``` * GET Combined Equipment Batch Analysis Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Combined Equipment Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentcost?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentcost?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Efficiency Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentefficiency?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentefficiency?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Energy Category Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentenergycategory?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentenergycategory?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Energy Item Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentenergyitem?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentenergyitem?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Income Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentincome?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentincome?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Load Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentload?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentload?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Output Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentoutput?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentoutput?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Saving Report -``` -$ curl -i -X GET {{base_url}}/reports/combinedequipmentsaving?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/combinedequipmentsaving?combinedequipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Combined Equipment Statistics Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentstatistics?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentstatistics?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Dashboard -``` -$ curl -i -X GET {{base_url}}/reports/dashboard?useruuid={useruuid}&periodtype={periodtype}&baseperiodstartdatetime={baseperiodstartdatetime}&baseperiodenddatetime={baseperiodenddatetime}&reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime} +```bash +curl -i -X GET {{base_url}}/reports/dashboard?useruuid={useruuid}&periodtype={periodtype}&baseperiodstartdatetime={baseperiodstartdatetime}&baseperiodenddatetime={baseperiodenddatetime}&reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime} ``` * GET Distribution System Report -``` -$ curl -i -X GET {{base_url}}/reports/distributionsystem?distributionsystemid=1 +```bash +curl -i -X GET {{base_url}}/reports/distributionsystem?distributionsystemid=1 ``` * GET Energy Flow Diagram Report -``` -$ curl -i -X GET {{base_url}}/reports/energyflowdiagram?energyflowdiagramid=1&reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime} +```bash +curl -i -X GET {{base_url}}/reports/energyflowdiagram?energyflowdiagramid=1&reportingperiodstartdatetime={reportingperiodstartdatetime}&reportingperiodenddatetime={reportingperiodenddatetime} ``` * GET Equipment Batch Analysis Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 +```bash +curl -i -X GET {{base_url}}/reports/equipmentbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Equipment Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentcost?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentcost?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Efficiency Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentefficiency?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentefficiency?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Energy Category Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentenergycategory?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentenergycategory?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Energy Item Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentenergyitem?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentenergyitem?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Income Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentincome?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentincome?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Load Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentload?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentload?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Output Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentoutput?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentoutput?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Saving Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentsaving?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentsaving?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Equipment Statistics Report -``` -$ curl -i -X GET {{base_url}}/reports/equipmentstatistics?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/equipmentstatistics?equipmentid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Meter Batch Analysis Report -``` -$ curl -i -X GET {{base_url}}/reports/meterbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 +```bash +curl -i -X GET {{base_url}}/reports/meterbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Meter Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/metercost?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/metercost?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Meter Energy Report -``` -$ curl -i -X GET {{base_url}}/reports/meterenergy?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/meterenergy?meterid=6&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Meter Realtime Report -``` -$ curl -i -X GET {{base_url}}/reports/meterrealtime?meterid=1 +```bash +curl -i -X GET {{base_url}}/reports/meterrealtime?meterid=1 ``` * GET Meter Submeters Balance Report -``` -$ curl -i -X GET {{base_url}}/reports/metersubmetersbalance?meterid=1&periodtype=daily&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/metersubmetersbalance?meterid=1&periodtype=daily&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Meter Trend Report -``` -$ curl -i -X GET {{base_url}}/reports/metertrend?meterid=6&reportingperiodstartdatetime=2020-09-10T00:00:00&reportingperiodenddatetime=2020-09-11T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/metertrend?meterid=6&reportingperiodstartdatetime=2020-09-10T00:00:00&reportingperiodenddatetime=2020-09-11T00:00:00 ``` * GET Meter Tracking Report -``` -$ curl -i -X GET {{base_url}}/reports/metertracking?spaceid=1 +```bash +curl -i -X GET {{base_url}}/reports/metertracking?spaceid=1 ``` * GET Offline Meter Energy Report -``` -$ curl -i -X GET {{base_url}}/reports/offlinemeterenergy?offlinemeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/offlinemeterenergy?offlinemeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Offline Meter Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/offlinemetercost?offlinemeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/offlinemetercost?offlinemeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Batch Analysis Report -``` -$ curl -i -X GET {{base_url}}/reports/shopfloorbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 +```bash +curl -i -X GET {{base_url}}/reports/shopfloorbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Shopfloor Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/shopfloorcost?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/shopfloorcost?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Energy Category Report -``` -$ curl -i -X GET {{base_url}}/reports/shopfloorenergycategory?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/shopfloorenergycategory?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Energy Item Report -``` -$ curl -i -X GET {{base_url}}/reports/shopfloorenergyitem?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/shopfloorenergyitem?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Load Report -``` -$ curl -i -X GET {{base_url}}/reports/shopfloorload?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/shopfloorload?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Saving Report -``` -$ curl -i -X GET {{base_url}}/reports/shopfloorsaving?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/shopfloorsaving?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Shopfloor Statistics Report -``` -$ curl -i -X GET {{base_url}}/reports/shopfloorstatistics?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/shopfloorstatistics?shopfloorid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/spacecost?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spacecost?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Efficiency Report -``` -$ curl -i -X GET {{base_url}}/reports/spaceefficiency?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spaceefficiency?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Energy Category Report -``` -$ curl -i -X GET {{base_url}}/reports/spaceenergycategory?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spaceenergycategory?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Energy Item Report -``` -$ curl -i -X GET {{base_url}}/reports/spaceenergyitem?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spaceenergyitem?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Income Report -``` -$ curl -i -X GET {{base_url}}/reports/spaceincome?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spaceincome?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Load Report -``` -$ curl -i -X GET {{base_url}}/reports/spaceload?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spaceload?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Output Report -``` -$ curl -i -X GET {{base_url}}/reports/spaceoutput?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spaceoutput?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Saving Report -``` -$ curl -i -X GET {{base_url}}/reports/spacesaving?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spacesaving?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Space Statistics Report -``` -$ curl -i -X GET {{base_url}}/reports/spacestatistics?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/spacestatistics?spaceid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Batch Analysis Report -``` -$ curl -i -X GET {{base_url}}/reports/storebatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 +```bash +curl -i -X GET {{base_url}}/reports/storebatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Store Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/storetcost?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/storetcost?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Energy Category Report -``` -$ curl -i -X GET {{base_url}}/reports/storeenergycategory?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/storeenergycategory?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Energy Item Report -``` -$ curl -i -X GET {{base_url}}/reports/storeenergyitem?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/storeenergyitem?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Load Report -``` -$ curl -i -X GET {{base_url}}/reports/storeload?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/storeload?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Saving Report -``` -$ curl -i -X GET {{base_url}}/reports/storesaving?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/storesaving?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Store Statistics Report -``` -$ curl -i -X GET {{base_url}}/reports/storestatistics?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/storestatistics?storeid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Batch Analysis Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 +```bash +curl -i -X GET {{base_url}}/reports/tenantbatch?spaceid=1&reportingperiodstartdatetime=2021-05-01T00:00:00&reportingperiodenddatetime=2021-05-20T11:41:09 ``` * GET Tenant Bill Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantbill?tenantid=1&reportingperiodstartdatetime=2020-10-01T00:00:00&reportingperiodenddatetime=2020-11-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/tenantbill?tenantid=1&reportingperiodstartdatetime=2020-10-01T00:00:00&reportingperiodenddatetime=2020-11-01T00:00:00 ``` * GET Tenant Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantcost?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/tenantcost?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Energy Category Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantenergycategory?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/tenantenergycategory?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Energy Item Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantenergyitem?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/tenantenergyitem?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Load Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantload?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/tenantload?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Saving Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantsaving?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/tenantsaving?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Tenant Statistics Report -``` -$ curl -i -X GET {{base_url}}/reports/tenantstatistics?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/tenantstatistics?tenantid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Virtual Meter Energy Report -``` -$ curl -i -X GET {{base_url}}/reports/virtualmeterenergy?virtualmeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/virtualmeterenergy?virtualmeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` * GET Virtual Meter Cost Report -``` -$ curl -i -X GET {{base_url}}/reports/virtualmetercost?virtualmeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 +```bash +curl -i -X GET {{base_url}}/reports/virtualmetercost?virtualmeterid=1&periodtype=daily&baseperiodstartdatetime=2020-08-01T00:00:00&baseperiodenddatetime=2020-09-01T00:00:00&reportingperiodstartdatetime=2020-09-01T00:00:00&reportingperiodenddatetime=2020-10-01T00:00:00 ``` diff --git a/myems-cleaning/README.md b/myems-cleaning/README.md index 928af5b8..0ac571ab 100644 --- a/myems-cleaning/README.md +++ b/myems-cleaning/README.md @@ -3,59 +3,56 @@ MyEMS Cleaning Service MyEMS 数据清洗服务 - ### Introduction This service is a component of MyEMS and it cleans the historical data. - ### Prerequisites mysql.connector - ### Installation Download and install MySQL Connector: -``` - $ cd ~/tools - $ wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz - $ tar xzf mysql-connector-python-8.0.20.tar.gz - $ cd ~/tools/mysql-connector-python-8.0.20 - $ sudo python3 setup.py install +```bash +cd ~/tools +wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz +tar xzf mysql-connector-python-8.0.20.tar.gz +cd ~/tools/mysql-connector-python-8.0.20 +sudo python3 setup.py install ``` Install myems-cleaning service ```bash - $ cd ~ - $ git clone https://github.com/MyEMS/myems.git - $ cd myems - $ sudo git checkout master (or the latest release tag) - $ sudo cp -R ~/myems/myems-cleaning /myems-cleaning +cd ~ +git clone https://github.com/MyEMS/myems.git +cd myems +sudo git checkout master (or the latest release tag) +sudo cp -R ~/myems/myems-cleaning /myems-cleaning ``` Open config file and edit database configuration ```bash - $ sudo nano /myems-cleaning/config.py +sudo nano /myems-cleaning/config.py ``` Setup systemd service: ```bash - $ sudo cp myems-cleaning.service /lib/systemd/system/ +sudo cp myems-cleaning.service /lib/systemd/system/ ``` Enable the service: ```bash - $ sudo systemctl enable myems-cleaning.service +sudo systemctl enable myems-cleaning.service ``` Start the service: ```bash - $ sudo systemctl start myems-cleaning.service +sudo systemctl start myems-cleaning.service ``` Monitor the service: ```bash - $ sudo systemctl status myems-cleaning.service +sudo systemctl status myems-cleaning.service ``` View the log: ```bash - $ cat /myems-cleaning.log +cat /myems-cleaning.log ``` ### References diff --git a/myems-modbus-tcp/README.md b/myems-modbus-tcp/README.md index 2d111d93..088e5c65 100644 --- a/myems-modbus-tcp/README.md +++ b/myems-modbus-tcp/README.md @@ -3,7 +3,6 @@ ### Introduction This service is a component of MyEMS to acquire data from Modbus TCP devices. - ### Prerequisites pyserial @@ -16,74 +15,71 @@ Schedule ### Installation Download and install MySQL Connector: -``` - $ cd ~/tools - $ wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz - $ tar xzf mysql-connector-python-8.0.20.tar.gz - $ cd ~/tools/mysql-connector-python-8.0.20 - $ sudo python3 setup.py install +```bash +cd ~/tools +wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz +tar xzf mysql-connector-python-8.0.20.tar.gz +cd ~/tools/mysql-connector-python-8.0.20 +python3 setup.py install ``` Download and install Schedule -``` - $ cd ~/tools - $ git clone https://github.com/dbader/schedule.git - $ cd ~/tools/schedule - $ sudo python3 setup.py install +```bash +cd ~/tools +git clone https://github.com/dbader/schedule.git +cd ~/tools/schedule +python3 setup.py install ``` Download and install modbus-tk -``` - $ cd ~/tools - $ git clone https://github.com/pyserial/pyserial.git - $ cd ~/tools/pyserial - $ sudo python3 setup.py install - $ git clone https://github.com/ljean/modbus-tk.git - $ cd ~/tools/modbus-tk - $ sudo python3 setup.py install - +```bash +cd ~/tools +git clone https://github.com/pyserial/pyserial.git +cd ~/tools/pyserial +python3 setup.py install +git clone https://github.com/ljean/modbus-tk.git +cd ~/tools/modbus-tk +python3 setup.py install ``` Install myems-modbus-tcp service -``` - $ cd ~ - $ git clone https://github.com/MyEMS/myems.git - $ cd myems - $ sudo git checkout master (or the latest release tag) - $ sudo cp -R ~/myems/myems-modbus-tcp /myems-modbus-tcp +```bash +cd ~ +git clone https://github.com/MyEMS/myems.git +cd myems +git checkout master (or the latest release tag) +cp -R ~/myems/myems-modbus-tcp /myems-modbus-tcp ``` Edit the config -``` - $ sudo nano /myems-modbus-tcp/config.py +```bash +nano /myems-modbus-tcp/config.py ``` Setup systemd service: ```bash - $ sudo cp myems-modbus-tcp.service /lib/systemd/system/ +cp myems-modbus-tcp.service /lib/systemd/system/ ``` Enable the service: ```bash - $ sudo systemctl enable myems-modbus-tcp.service +systemctl enable myems-modbus-tcp.service ``` Start the service: ```bash - $ sudo systemctl start myems-modbus-tcp.service +systemctl start myems-modbus-tcp.service ``` Monitor the service: ```bash - $ sudo systemctl status myems-modbus-tcp.service +systemctl status myems-modbus-tcp.service ``` View the log: ```bash - $ cat /myems-modbus-tcp.log +cat /myems-modbus-tcp.log ``` - - ### Add Data Sources and Points in MyEMS Admin NOTE: If you modified Modbus TCP datasources and points, please restart this service: -``` - $ sudo systemctl restart myems-modbus-tcp.service +```bash +systemctl restart myems-modbus-tcp.service ``` Input Data source protocol: @@ -106,11 +102,13 @@ Point address example: The slave ID #### function_code +``` 01 (0x01) Read Coils 02 (0x02) Read Discrete Inputs 03 (0x03) Read Holding Registers 04 (0x04) Read Input Registers 23 (0x17) Read/Write Multiple registers +``` #### offset The starting register address specified in the Request PDU @@ -155,7 +153,6 @@ This is not for little-endian and big-endian swapping, and use format for that. The option is effective when number_of_registers is ether 2(32bits) or 4(64bits), else it will be ignored. - ### References [1]. http://myems.io diff --git a/myems-normalization/README.md b/myems-normalization/README.md index 344d766b..12a40430 100644 --- a/myems-normalization/README.md +++ b/myems-normalization/README.md @@ -17,84 +17,91 @@ openpyxl ### Installation Download and install MySQL Connector: -``` - $ cd ~/tools - $ wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz - $ tar xzf mysql-connector-python-8.0.20.tar.gz - $ cd ~/tools/mysql-connector-python-8.0.20 - $ sudo python3 setup.py install +```bash +cd ~/tools +wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz +tar xzf mysql-connector-python-8.0.20.tar.gz +cd ~/tools/mysql-connector-python-8.0.20 +sudo python3 setup.py install ``` Download and install mpmath -``` - $ cd ~/tools - $ git clone https://github.com/fredrik-johansson/mpmath.git - $ cd ~/tools/mpmath - $ sudo python3 setup.py install +```bash +cd ~/tools +git clone https://github.com/fredrik-johansson/mpmath.git +cd ~/tools/mpmath +sudo python3 setup.py install ``` Download and install SymPy -``` - $ cd ~/tools - $ git clone https://github.com/sympy/sympy.git - $ cd ~/tools/sympy - $ sudo python3 setupegg.py develop +```bash +cd ~/tools +git clone https://github.com/sympy/sympy.git +cd ~/tools/sympy +sudo python3 setupegg.py develop ``` Download and install openpyxl +```bash +cd ~/tools +``` +Get the latest version of et_xmlfile from https://bitbucket.org/openpyxl/et_xmlfile/downloads/ +```bash +wget https://bitbucket.org/openpyxl/et_xmlfile/get/50973a6de49c.zip +7z x 50973a6de49c.zip && mv openpyxl-et_xmlfile-50973a6de49c et_xmlfile +``` +Get jdcal +```bash +git clone https://github.com/phn/jdcal.git ``` - $ cd ~/tools - Get the latest version of et_xmlfile from https://bitbucket.org/openpyxl/et_xmlfile/downloads/ - $ wget https://bitbucket.org/openpyxl/et_xmlfile/get/50973a6de49c.zip - $ 7z x 50973a6de49c.zip && mv openpyxl-et_xmlfile-50973a6de49c et_xmlfile +Get the latest version of openpyxl from https://bitbucket.org/openpyxl/openpyxl/downloads/ +```bash +wget https://bitbucket.org/openpyxl/openpyxl/get/8953233f5af2.zip +7z x 8953233f5af2.zip && mv openpyxl-openpyxl-8953233f5af2 openpyxl +``` - $ git clone https://github.com/phn/jdcal.git - - Get the latest version of openpyxl from https://bitbucket.org/openpyxl/openpyxl/downloads/ - $ wget https://bitbucket.org/openpyxl/openpyxl/get/8953233f5af2.zip - $ 7z x 8953233f5af2.zip && mv openpyxl-openpyxl-8953233f5af2 openpyxl - - $ cd ~/tools/et_xmlfile - $ sudo python3 setup.py install - $ cd ~/tools/jdcal - $ sudo python3 setup.py install - $ cd ~/tools/openpyxl - $ sudo python3 setup.py install +```bash +cd ~/tools/et_xmlfile +sudo python3 setup.py install +cd ~/tools/jdcal +sudo python3 setup.py install +cd ~/tools/openpyxl +sudo python3 setup.py install ``` Install myems-normalization service: ``` - $ cd ~ - $ git clone https://github.com/MyEMS/myems.git - $ cd myems - $ sudo git checkout master (or the latest release tag) - $ sudo cp -r ~/myems/myems-normalization /myems-normalization +cd ~ +git clone https://github.com/MyEMS/myems.git +cd myems +sudo git checkout master (or the latest release tag) +sudo cp -r ~/myems/myems-normalization /myems-normalization ``` Edit config.py ``` - $ sudo nano /myems-normalization/config.py +sudo nano /myems-normalization/config.py ``` Setup systemd service: ``` - $ sudo cp myems-normalization.service /lib/systemd/system/ +sudo cp myems-normalization.service /lib/systemd/system/ ``` Enable the service: ``` - $ sudo systemctl enable myems-normalization.service +sudo systemctl enable myems-normalization.service ``` Start the service: ``` - $ sudo systemctl start myems-normalization.service +sudo systemctl start myems-normalization.service ``` Monitor the service: ```bash - $ sudo systemctl status myems-normalization.service +sudo systemctl status myems-normalization.service ``` View the log: ```bash - $ cat /myems-normalization.log +cat /myems-normalization.log ``` ### References diff --git a/web/README.md b/web/README.md index dfedfc0f..ad00db13 100644 --- a/web/README.md +++ b/web/README.md @@ -16,28 +16,28 @@ This project is scaffolded using Create React App. Download Current Linux Binaries (x64) from https://nodejs.org/en/download/current/ Unzip the binary archive to /usr/local/bin/nodejs, -``` +```bash sudo mkdir -p /usr/local/lib/nodejs sudo tar -xJvf node-v1x.x.x-linux-x64.tar.xz -C /usr/local/lib/nodejs ``` Using sudo to symlink node, npm, and npx into /usr/bin/: -``` +```bash sudo ln -s /usr/local/lib/nodejs/node-v1x.x.x-linux-x64/bin/node /usr/bin/node ``` -``` +```bash sudo ln -s /usr/local/lib/nodejs/node-v1x.x.x-linux-x64/bin/npm /usr/bin/npm ``` -``` +```bash sudo ln -s /usr/local/lib/nodejs/node-v1x.x.x-linux-x64/bin/npx /usr/bin/npx ``` Test installation using -``` +```bash node -v ``` -``` +```bash npm version ``` -``` +```bash npx -v ``` @@ -65,8 +65,8 @@ You can run 'node server.js' to run the production build locally at http://local refer to http://nginx.org/en/docs/install.html * Configure NGINX -``` -$ sudo nano /etc/nginx/nginx.conf +```bash +sudo nano /etc/nginx/nginx.conf ``` In the 'http' section, add some directives: ``` @@ -103,34 +103,34 @@ Add a new 'server' section with direstives as below: } ``` Restart NGINX -``` -$ sudo systemctl restart nginx +```bash +sudo systemctl restart nginx ``` * Download myems: -``` - $ cd ~ - $ git clone https://github.com/MyEMS/myems.git +```bash +cd ~ +git clone https://github.com/MyEMS/myems.git ``` * Install myems-web : Check and change the config file if necessary: -``` - $ cd ~/myems/web - $ sudo nano src/config.js +```bash +cd ~/myems/web +sudo nano src/config.js ``` Build and Compress -``` - $ sudo npm run build - $ tar czvf myems-web.tar.gz build +```bash +sudo npm run build +tar czvf myems-web.tar.gz build ``` Install Upload the file myems-web.tar.gz to you web server. Note that the following path should be same as that was configured in nginx.conf. -``` - $ tar xzf myems-web.tar.gz - $ sudo rm -r /var/www/html/web - $ sudo mv build /var/www/html/web +```bash +tar xzf myems-web.tar.gz +sudo rm -r /var/www/html/web +sudo mv build /var/www/html/web ``` ## Option 2: Install Production Build on Apache2 Server @@ -139,15 +139,15 @@ $ sudo systemctl restart nginx refer to https://httpd.apache.org/docs/2.4/install.html * Configure Apache2 -``` - $ sudo vi /etc/apache2/ports.conf +```bash +sudo vi /etc/apache2/ports.conf ``` Add a Listen ``` Listen 80 ``` -``` - $ sudo vi /etc/apache2/sites-available/000-default.conf +```bash +sudo vi /etc/apache2/sites-available/000-default.conf ``` Add a new 'VirtualHost' as below ``` @@ -166,28 +166,28 @@ Add a new 'VirtualHost' as below ``` * Download myems: -``` - $ cd ~ - $ git clone https://github.com/MyEMS/myems.git +```bash +cd ~ +git clone https://github.com/MyEMS/myems.git ``` * Install myems-web : Check and change the config file if necessary: -``` - $ cd ~/myems/web - $ sudo nano src/config.js +```bash +cd ~/myems/web +sudo nano src/config.js ``` Build and Compress -``` - $ cd ~/myems/web/ - $ sudo npm run build - $ tar czvf myems-web.tar.gz build +```bash +cd ~/myems/web/ +sudo npm run build +tar czvf myems-web.tar.gz build ``` Install Upload the file myems-web.tar.gz to you web server. Note that the following path should be same as that was configured in 000-default.conf -``` - $ tar xzf myems-web.tar.gz - $ sudo rm -r /var/www/web - $ sudo mv build /var/www/web +```bash +tar xzf myems-web.tar.gz +sudo rm -r /var/www/web +sudo mv build /var/www/web ``` \ No newline at end of file