commit c573b95984d1c0f18f61fb90681f7b4caad0994e Author: MassiveBox Date: Sat Feb 25 23:04:11 2023 +0100 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2d6de3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +# Dependencies +/node_modules + +# Production +/build + +# Generated files +.docusaurus +.cache-loader + +# Misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/ecodash-website.iml b/.idea/ecodash-website.iml new file mode 100644 index 0000000..0c8867d --- /dev/null +++ b/.idea/ecodash-website.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..baa69c0 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/docs/ezodash.md b/docs/ezodash.md new file mode 100644 index 0000000..a00dad2 --- /dev/null +++ b/docs/ezodash.md @@ -0,0 +1,15 @@ +--- +unlisted: true +--- + +# 🍀 EZoDash - EcoDash simplified + +EcoDash has the great strength of being widely compatible, but that comes at the cost of forcing our users to spend more time configurating their setup. It also forces users to use a compatibility layer - HomeAssistant - which standardizes the different home plugs into one simple language that EcoDash can understand. Running it represents a significant overhead for admins who are only using it for EcoDash - especially the ones running less capable devices. + +Since most potential users of EcoDash don't have a smart plug and are already running Linux on their homeserver, we've thought of creating a much lighter compatibility layer for EcoDash which works with only a single type of smart plugs - one which is usually very cheap and completely cloud-free. + +We've opted for Zigbee-compatible plugs such as [this one](https://www.aliexpress.com/item/1005002344798281.html). A smart plug and the [USB stick](https://www.aliexpress.com/w/wholesale-zigbee-usb-dongle.html) which is required to read and send data to it will cost only about ~€15. + +EZoDash will be a component of EcoDash, not a separate project. EcoDash will still be compatible with HomeAssistant in order to support all different smart plug types. + +EZoDash will be released before v1.0. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..72350d1 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,28 @@ +--- +sidebar_position: 0 +--- + +# 📖 Introduction + +Empower your end users with EcoDash - the accessible and user-friendly power usage monitoring tool. Our public dashboard provides clear and concise information about server energy consumption, with easy-to-understand comparisons that make energy usage tangible. By using EcoDash, you can increase transparency and accountability around energy consumption, and help drive sustainable practices in your organization. + +## F.A.Q. + +### How does it work? + +Since most consumer-grade hardware isn't equipped with internal energy consumption sensors, we've opted to make EcoDash work with external sensors - smart energy monitoring plugs. + +EcoDash reads data trough an external component - HomeAssistant (default) or [EZoDash](/docs/ezodash) (coming soon) - and logs it into its database. + +### Who is it for? + +EcoDash is for everyone with a homeserver who wants to be completely trasparent towards their users about how much their server consumes. You can think of it like an uptime status page - while it's not strictly necessary, it can help your users see that they're trusting a reliable and environmentally-conscious person or organization. + +### What devices are compatible? + +Since EcoDash currently uses HomeAssistant as its intermediary to talk with smart plugs, it supports all the devices supported by HomeAssistant. + +There is no official list of supported plugs. [This](https://www.hadevices.com/category/power) is a starting point, but it doesn't include non-US plugs and Zigbee devices. + +EcoDash's main developer is using [this](https://www.aliexpress.com/item/1005002344798281.html) Zigbee plug and [this](https://www.aliexpress.com/item/1005003606832844.html) gateway. + diff --git a/docs/install/_category_.json b/docs/install/_category_.json new file mode 100644 index 0000000..b97039b --- /dev/null +++ b/docs/install/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "⬇️ Install", + "position": 2, + "link": { + "type": "generated-index", + "description": "Here's how to install EcoDash on different platforms. Choose yours from the list below. Docker is the recommended one, as it's platform-independent.", + "slug": "/install", + } +} diff --git a/docs/install/docker.md b/docs/install/docker.md new file mode 100644 index 0000000..381d8cd --- /dev/null +++ b/docs/install/docker.md @@ -0,0 +1,46 @@ +# 🐳 Docker + +Docker is the recommended deployment method for EcoDash. It allows to run on different architectures and operating systems without hassle. + +Pre-built Docker containers are offered for Linux on ARM and x86_64. If you're not on a supported architecture or operating system, please check the [Building the container](https://gitea.massivebox.net/ecodash/ecodash/src/branch/master/BUILD.md) guide. + +## With Docker command-line + +``` +docker run -v /absolute_path_to/config.json:/app/config.json -v /absolute_path_to/database.db:/app/database.db --name ecodash -p 8080:80 gitea.massivebox.net/massivebox/ecodash +``` + +This will open the container on port 8080. Replace "8080" in the command with whatever number you want to open that specific port. + +## With Docker Compose + +Create a file `docker-compose.yml` with the following content: + +``` +version: '3' +services: + ecodash: + container_name: ecodash + image: gitea.massivebox.net/massivebox/ecodash + ports: + - '8080:80' + volumes: + - ./config.json:/app/config.json + - ./database.db:/app/database.db + restart: always +``` + +Run the container with + +``` +docker compose up -d +``` + +This will open the container on port 8080. Replace "8080" in the file with whatever number you want to open that specific port. + +## Get notified about new releases + +Since EcoDash doesn't have any way to notify admins of new releases, you're encouraged to add our repository's feed into your RSS reader: https://gitea.massivebox.net/ecodash/ecodash.rss + + + diff --git a/docs/install/linux.md b/docs/install/linux.md new file mode 100644 index 0000000..120a14e --- /dev/null +++ b/docs/install/linux.md @@ -0,0 +1,59 @@ +# 🐧 Linux + +Pre-built binaries are available for Linux systems with x86_64 and ARM architecture. They should work on any distribution, but haven't been tested on all. Please open an issue if problems arise. + +If you're not on a supported architecture, please check the [Building on Linux](https://gitea.massivebox.net/ecodash/ecodash/src/branch/master/BUILD.md) guide. +The [docker image](/docs/install/Docker) is recommended over running from binaries. + +## Download + +1. Grab the appropriate ZIP from the [latest release page](https://gitea.massivebox.net/ecodash/ecodash/releases/latest). Make sure to select the right file for your architecture: + `wget LINK_TO_APPROPRIATE_FILE` +2. Extract the contents. This will create a folder named `ecodash` in the current directory, which will contain the binary, the configuration, the database and HTML templates folder: + `unzip FILE_NAME` +3. To start the container, first enter the `ecodash` directory: + `cd ecodash` + Then run it. This will expose EcoDash on port 80 by default: + `./ecodash` + If you want to run on any other port, use an environment variable like this: + `env PORT=8080 ./ecodash` + +## Set up auto-restart + +You might want your EcoDash server to restart automatically in the event of system reboots, programming bugs or configuration saves. This tutorial only covers distributions with systemd. + +1. Create a file at `/etc/systemd/system/ecodash.service` with this content: + ``` + [Unit] + Description=EcoDash + After=network.target + StartLimitIntervalSec=0 + + [Service] + Type=simple + Restart=always + User=USER + ExecStart=EXTRACTION_PATH/ecodash/ecodash + + [Install] + WantedBy=multi-user.target + ``` + + Make sure to replace USER with your username and EXTRACTION_PATH with the path where you performed the `wget` earlier. + +2. Test if it works: + `systemctl start ecodash` + +3. If it does (you don't see any error) you can set the OS to automatically start it after reboots with this: + `systemctl enable ecodash` + +## Get notified about new releases + +Since EcoDash doesn't have any way to notify admins of new releases, you're encouraged to add our repository's feed into your RSS reader: https://gitea.massivebox.net/ecodash/ecodash.rss + +## Moving on + +Now that EcoDash is installed, you can proceed to the Setup. + + + diff --git a/docs/install/windows.md b/docs/install/windows.md new file mode 100644 index 0000000..297a310 --- /dev/null +++ b/docs/install/windows.md @@ -0,0 +1,3 @@ +# 🪟 Windows + +Pre-built binaries or Docker images are not yet offered for Windows. You are encouraged to use WSL or [build yourself](https://gitea.massivebox.net/ecodash/ecodash/src/branch/master/BUILD.md) the Docker container for Windows. Support for this operating system and related documentation will come in future releases. diff --git a/docs/roadmap.md b/docs/roadmap.md new file mode 100644 index 0000000..efc4b53 --- /dev/null +++ b/docs/roadmap.md @@ -0,0 +1,27 @@ +--- +sidebar_position: 1 +--- + +# 🛣 Roadmap + +You can monitor our progress here: + +