diff --git a/other/docs/add_user.md b/other/docs/add_user.md deleted file mode 100644 index df716d0e..00000000 --- a/other/docs/add_user.md +++ /dev/null @@ -1,8 +0,0 @@ -## Adding a new user -It's very easy to add another user besides `pi` to your system. - -```shell -# Create a user with a home directory, with some groups, with the primary group as solarthing -# Note that the -g solarthing part is optional and makes dealing with file permission easier -sudo useradd --create-home --groups dialout,tty,video,sudo -g solarthing NAME -``` diff --git a/other/docs/change_hostname.md b/other/docs/change_hostname.md deleted file mode 100644 index 000f1f28..00000000 --- a/other/docs/change_hostname.md +++ /dev/null @@ -1,10 +0,0 @@ -## Change Hostname - -Changing your hostname is very easy on a Raspberry Pi. - -First run this: -```shell -hostnamectl set-hostname YOUR_NAME -``` -Then edit `/etc/hosts` and add `127.0.0.1 YOUR_NAME` to it, -or just run the script in `/other/linux/set_hostname.sh` diff --git a/other/docs/chatbot_commands.md b/other/docs/chatbot_commands.md index 21b4e254..64b3222b 100644 --- a/other/docs/chatbot_commands.md +++ b/other/docs/chatbot_commands.md @@ -1,3 +1,5 @@ +NOTE: This documentation is outdated. It currently has no corresponding page on https://solarthing.readthedocs.io + ### Chatbot Commands WIP for the possibility of how a chatbot could work diff --git a/other/docs/database_choice.md b/other/docs/database_choice.md index 1ca92168..86a1ebed 100644 --- a/other/docs/database_choice.md +++ b/other/docs/database_choice.md @@ -1,3 +1,5 @@ +NOTE: This is outdated! See: https://solarthing.readthedocs.io/en/latest/about/database-and-display.html + # Database Choice Choosing a database may be difficult, but usually there's a good choice. diff --git a/other/docs/google_analytics.md b/other/docs/google_analytics.md deleted file mode 100644 index 3d9e4312..00000000 --- a/other/docs/google_analytics.md +++ /dev/null @@ -1,43 +0,0 @@ -# Google Analytics -SolarThing uses Google Analytics to get usage data from users and is **enabled by default**. - -It'd be awesome if you kept it enabled. It's nice for me to be able to see about how many people are using SolarThing -at a single point in time. I understand if you'd like to opt out. - -## Opt Out -To opt out, add `"analytics_enabled": false` to your `config/base.json` (with a comma afterwards if necessary). Once you opt out, no data will be sent to Google. - -To opt out, you can also set the `ANALYTICS_DISABLED` environment variable. (Run `export ANALYTICS_DISABLED=`). -NOTE: **This is temporary** unless you make sure this environment variable gets set before running SolarThing. (Only works in versions >= 2020.3.1) - -The status of Google Analytics should be sent as one of the first *log messages*. Such as: -`Google Analytics is disabled` or `Google Analytics is ENABLED`. - -## Frequency -The frequency is this: -* Once at start -* Once after data is first received -* One hour after the program started -* Every 20 hours - -## Collected Data -This data may include the following: -* The type of program running (mate, rover) -* The language and region of the user -* (Mate)The devices connected to the mate (FX, MX, FM) -* (Mate)The operational mode of FX devices -* (Rover)The model of the CC ex: "RNG-CTRL-RVRPG40" or "RCC20RVRE-G1", etc - -This data **cannot** be used to uniquely identify you or your system. The data is anonymous. - -## Resetting ID -To uniquely identify each SolarThing instance, a UUID is used and is stored. If you have this repository cloned, you should -see the file `.data/analytics_data.json` in one of the working directories located in [program](../../program). You can delete this file -to reset the ID and if Google Analytics is enabled, the next time you start SolarThing a new ID will be generated. - -There is no reason you should have to reset this, but it's there if you want to. - -### Policy for SolarThing to follow -Because SolarThing uses Google Analytics and its Measurement Protocol, it must follow [this policy](https://developers.google.com/analytics/devguides/collection/protocol/policy). -If you do not believe it follows this policy, please create an issue on [our issue page](https://github.com/wildmountainfarms/solarthing/issues). - diff --git a/other/docs/history.md b/other/docs/history.md index bd38ce89..28bbc160 100644 --- a/other/docs/history.md +++ b/other/docs/history.md @@ -1,3 +1,5 @@ +NOTE: This is outdated and this file will be deleted soon! See: https://solarthing.readthedocs.io/en/latest/misc/history.html + # History This program started in the summer of 2017. @@ -8,8 +10,8 @@ NOTE: This page should be moved to https://solarthing.readthedocs.io in the futu set up the database and [@retrodaredevil](https://github.com/retrodaredevil) did the rest. Eventually [@retrodaredevil](https://github.com/retrodaredevil) created an android app making it much more convenient than a website. -[@retrodaredevil](https://github.com/retrodaredevil) came up with the idea of the outhouse status when he walked all the way out to the outhouse only to find -that it was occupied! He walked all the way back inside, then went back out a few minutes later. He knew that something +[@retrodaredevil](https://github.com/retrodaredevil) came up with the idea of the outhouse status when she walked all the way out to the outhouse only to find +that it was occupied! She walked all the way back inside, then went back out a few minutes later. She knew that something had to be done about this first world problem. diff --git a/other/docs/quickstart.md b/other/docs/quickstart.md deleted file mode 100644 index da474f8c..00000000 --- a/other/docs/quickstart.md +++ /dev/null @@ -1,132 +0,0 @@ -NOTE! This is outdated! New documentation here: https://solarthing.readthedocs.io - -# Quickstart -Ready to get started? Run these commands: - -If you're using Windows to run SolarThing, check [this](windows_usage.md) out! - -If you have a Raspberry Pi and don't know what you're doing, click [here](./raspberry_pi_setup.md). - -Run this to quickly get setup (Linux Only): -```shell script -# This clones this repository in /opt, then creates a user and group named solarthing, then updates the ownership of the cloned repository -# This does NOT configure other random files on your system -curl https://raw.githubusercontent.com/wildmountainfarms/solarthing/master/other/linux/clone_install.sh | sudo bash -# If when testing the program, it helps to have permission to edit files owned by the solarthing group, and you will also want to be allowed to use serial ports -sudo usermod -a -G solarthing,dialout,tty,video $USER -``` - -It is also recommended to make sure your timezone is correct. To check the time on your system, run `date`. If it is incorrect and -you are using a Raspberry Pi, you can run `sudo raspi-config` to change it. - -If you don't have Java installed, [click here](installing_java.md). - -## Edit Configurations -Now SolarThing is installed, all you have to do is edit configurations in `/opt/solarthing/program//config`. - -NOTE: If you are monitoring a rover or tracer, they both use the request program, so you should use the request directory -```shell script -# Navigate to your program's directory -cd /opt/solarthing/program/ -``` -NOTE: In each program, paths are relative to their respective directory.
-For instance if you are running the `request` program, paths will be relative to [program/request](../../program/request). - -### Program Specific Configuration -You will have to adjust the configuration to your needs and based on the type of program you want to run. - -* [**Rover Quickstart**](quickstart_rover.md) - Monitors Renogy Rover and other supported products -* [**Mate Quickstart**](quickstart_mate.md) - Monitors Outback Mate1/2 devices -* [**Tracer Quickstart**](quickstart_tracer.md) - Monitors an EPEver Tracer -* [Request Quickstart](quickstart_request.md) - Upload temperature sensor data - -## Configuration Continued -Also learn about [analytics data we collect](./google_analytics.md). -Now you have started to configure your `base.json` file, decide what databases you want to use below. -Also, note that you can choose to use none of them if you just want to get data before going further. - -This quickstart will walk you through setting up CouchDB, but also note that InfluxDB is an option. -See also [database choice](database_choice.md). - -### CouchDB Setup -```shell script -cp ../../config_templates/databases/couchdb_template.json config/couchdb.json -# Edit it with your editor of choice -``` -Learn how to install and setup CouchDB [here](couchdb_setup.md). That will walk you though editing couchdb.json -and setting up CouchDB. - -Note that there are other databases to choose from, but unless you know what you're doing, go ahead and use CouchDB. - - -### Add databases to base configuration -You should have already begun to edit your base.json file. This continues the configuration. - -Edit `config/base.json` with your editor of choice -```json5 -{ - //... - "databases": [ - "config/couchdb.json" - ] -} -``` -Note you can also have multiple databases, and, if you're just testing, you don't need any databases! - -Note that if you decided to put them in the [program/config](../../program/config), your databases will look something like this: -```json5 -{ - //... - "databases": [ - "../config/couchdb.json", - "../config/influxdb.json", - "../config/latest.json" - ] -} -``` -Remember that you don't need multiple databases! You could even have no databases if you'd like! - -### Running for the first time -Once you have your configuration the way you want it, it's time for a test run. Run this command: -```shell script -# Using 'sudo' may be required depending on how you set it up -./run.sh -# If you do use sudo, I recommend using this: -sudo -u solarthing ./run.sh -``` -Note that you can also do this: -```shell script -./run.sh config/base.json # you can specify your base config if you want -``` - -If you got an error, you can look at this (hopefully) helpful [debug errors](debug_errors.md) page. - -### Running in the long run -If your Linux distro uses systemd, you can go [here](../systemd/README.md) to learn how to install the service. Then run these commands. -```shell script -sudo systemctl enable solarthing- # Run on boot -sudo systemctl start solarthing- # Start the service now -``` -**NOTE: Once you start the `solarthing-` service, you should NOT run `./run.sh` until you stop the service**. -You can stop the service like this: `sudo systemctl stop solarthing-` - - -Now SolarThing should be set up and running! - -To see if SolarThing crashed, run: `systemctl status solarthing-`. If you need to view the log files, -informational logs are by default in `/opt/solarthing/program//logs/log_info.log`. If you want to view -that log file live, you can run `tail -f /opt/solarthing/program//logs/log_info.log`. - -If any documentation is lacking (many parts are), feel free to open an issue at https://github.com/wildmountainfarms/solarthing/issues - ---- - ---- - -### Run Without systemd service -There are many platforms that don't have systemd: Mac, Windows, and plenty of different Linux Distros. - -Right now I am not officially supporting these other options, but SolarThing should run just fine -on them with some additional setup. If you want to suggest an additional platform to support, let us know -on [our issues page](https://github.com/wildmountainfarms/solarthing/issues). - diff --git a/other/docs/quickstart_automation.md b/other/docs/quickstart_automation.md deleted file mode 100644 index 6628875d..00000000 --- a/other/docs/quickstart_automation.md +++ /dev/null @@ -1,15 +0,0 @@ -# Quick start with Automation program -If you haven't already, [click here](quickstart.md) to view how to clone this repo and install the service. - -Once everything is installed, you're ready to edit the configs. You will cd to the `program/automation` directory. -``` -cd /opt/solarthing/program/automation -``` - -You should already have CouchDB set up. You can re-use its configuration file. It is recommended that CouchDB's -configuration file is put in [program/config](../../program/config), so other programs can use it. - -You can find an example `base.json` [here](../../config_templates/base/automation_generic_template.json). - -For the automation program, you will get to define your own action. Currently, there is little documentation on how -to do this, so if you were directed to this page from another, you can go back to configure your specific action. diff --git a/other/docs/quickstart_graphql.md b/other/docs/quickstart_graphql.md deleted file mode 100644 index 1b21c64a..00000000 --- a/other/docs/quickstart_graphql.md +++ /dev/null @@ -1,36 +0,0 @@ -NEW DOCUMENTATION HERE: https://solarthing.readthedocs.io/en/latest/data/graphql-grafana.html - -# GraphQL Quickstart -If you haven't already, [click here](quickstart.md) to view how to clone this repo and install the service. - -Note that you must have set up either the `mate`, `rover`, or `request` program for this to be useful. -This program is used to expose CouchDB as a GraphQL API, which is commonly used with Grafana and [the GraphQL Datasource](https://github.com/fifemon/graphql-datasource). - -Once everything is installed, you're ready to edit the configs. You will cd to the `program/mate` directory. -``` -cd /opt/solarthing/program/graphql -``` - -Now copy the `application.properties` to the config directory: -```shell script -cp ../../config_templates/server/application.properties config/ -``` - -Edit `application.properties`: -``` -solarthing.config.database=../config/couchdb/couchdb.json -``` -Make sure the path to your `couchdb.json` is correct. - -NOTE: Sometimes you may have put your `couchdb.json` in `program/rover/config`. If you did this, -that's perfectly fine, you just need to change the path slightly: -``` -solarthing.config.database=../rover/config/couchdb/couchdb.json -``` - - -### Run for the first time -Run `./run.sh`. - -### [Set up with Grafana](../grafana/grafana_datasource_setup.md) - diff --git a/other/docs/quickstart_mate.md b/other/docs/quickstart_mate.md deleted file mode 100644 index dd5c2470..00000000 --- a/other/docs/quickstart_mate.md +++ /dev/null @@ -1,60 +0,0 @@ -NEW DOCUMENTATION HERE: https://solarthing.readthedocs.io/en/latest/mate/config.html - -# Quick Start With Outback MATE -If you haven't already, [click here](quickstart.md) to view how to clone this repo and install the service. - -Connecting a RS232 DB9 to USB cable is very simple. Note that the Mate will draw some power from this cable, -so I recommend a powered USB hub. - -Once everything is installed, you're ready to edit the configs. You will cd to the `program/mate` directory. -``` -cd /opt/solarthing/program/mate -``` - -Copy some template config files ([default_linux_serial](../../config_templates/io/default_linux_serial.json) and [mate_template](../../config_templates/base/mate_template.json)) -``` -cp ../../config_templates/io/default_linux_serial.json config/ -cp ../../config_templates/base/mate_template.json config/base.json -``` -Edit `base.json` -```json5 -{ - //... - "io": "config/default_linux_serial.json", - "correct_check_sum": false -} -``` -The mate configuration has the unique property `correct_check_sum`. This makes it easy to change values in `virtual_mate.sh`. By using this, -we can change values quicker values without calculating the checksum ourselves and just have the program do it for us. -Obviously you don't want to use that when you are getting reliable data from a serial port. - -Advanced configuration: -```json5 -{ - //... - "fx_warning_ignore": { - "1": 0, - "2": 32 - }, - "fx_charge_settings": { - "rebulk_voltage": null, - "absorb_voltage": 29.2, - "absorb_time_hours": 1.5, - "float_voltage": 27.2, - "float_time_hours": 1.0, - "refloat_voltage": 25.0, - "equalize_voltage": 30.0, - "equalize_time_hours": 2.0 - } -} -``` -`fx_warning_ignore` is used for the "event" packets to ignore certain warnings. - -If you want to learn about commands, you can look at [commands](./commands.md). This is **optional** and should only be -looked at once everything else is working. - -### I want to test this without an Outback Mate! -You can run `solar/virtual_mate.sh | ./run.sh` - -### I'm ready to use this for real! -Once your configuration is how you want it, you can go back to the [quickstart](quickstart.md#configuration-continued) to enable and start the service. diff --git a/other/docs/quickstart_request.md b/other/docs/quickstart_request.md deleted file mode 100644 index 0ae06b8b..00000000 --- a/other/docs/quickstart_request.md +++ /dev/null @@ -1,44 +0,0 @@ -# Quick start with Request program -If you haven't already, [click here](quickstart.md) to view how to clone this repo and install the service. - -The request program can be used for uploading temperature sensor data and Raspberry Pi -CPU Temperature. - -This supports DS18B20 temperature sensors. - -Once everything is installed, you're ready to edit the configs. You will cd to the `program/mate` directory. -``` -cd /opt/solarthing/program/request -``` - -Copy the request template: -```shell script -cp ../../config_templates/base/request_template.json config/base.json -``` - -Now edit `config/base.json`. -```json -{ - "type": "request", - "source": "default", - "fragment": 3, - "unique": 30, - "databases": [ - "../config/couchdb.json" - ], - "request": [ - { - "type": "rpi-cpu-temp" - }, - { - "type": "w1-temperature", - "directory": "/sys/bus/w1/devices/28-000006470bec", - "data_id": 1 - } - ] -} -``` -The objects in the `request` field represent what values are uploaded. - -If you are monitoring a DS18B20 temperature sensor, you can change the `directory` field to point to -the correct device in `/sys/bus/w1/devices`. Also learn [how to set up a DS18B20 sensor](DS18B20_sensor_setup.md). diff --git a/other/docs/quickstart_rover.md b/other/docs/quickstart_rover.md deleted file mode 100644 index d5090640..00000000 --- a/other/docs/quickstart_rover.md +++ /dev/null @@ -1,64 +0,0 @@ -NEW DOCUMENTATION HERE: https://solarthing.readthedocs.io/en/latest/rover/config.html - -# Quick Start Renogy Charge Controller or other SRNE (re)branded charge controllers -* If you haven't already, [click here](quickstart.md) to view how to clone this repo and install the service. -* If you don't have a cable to connect to your device, [click here](../solar/README.md#connecting-to-renogy-rover) -* Looking for legacy (pre SolarThing 2021.5.0) documentation? [Click here](./legacy_rover.md). -* If you don't have a Rover and you see the term "rover", that's OK. This will still work with your -charge controller as long as your charge controller uses the same protocol as the Rover. Whenever you see Rover, -you can think "Rover and compatible devices". -* You're going to notice that the configuration of this is very similar to the [request quickstart](./quickstart_request.md). -That's because this actually uses the request program. You may notice that there is a `program/rover` directory. That directory -is no longer used and can be ignored. - ---- - -Once everything is installed, you're ready to edit the configs. You will `cd` to the `program/request` directory. -``` -cd /opt/solarthing/program/request -``` -If you are already using the request directory, click [here](./custom_directories.md). - -Copy some template config files ([default_linux_serial](../../config_templates/io/default_linux_serial.json) and [rover_template](../../config_templates/base/rover_request_template.json)) -``` -# sudo should not be required unless permissions were not set up correctly (add yourself to the solarthing group) -cp ../../config_templates/io/default_linux_serial.json config/ -cp ../../config_templates/base/rover_request_template.json config/base.json -``` - -Now edit `config/base.json` -* Most rovers have a default modbus address of 1, hence the `"1"` present in the template configuration. However, -this is not always the case for newer Rover models, especially if a BT module has been plugged into them. You will -likely have to use the `rover-setup` program to scan - * rover-setup will be deprecated soon, and there will need to be a new feature for this -* Make sure you change the `"io"` property to correctly point to the io JSON file you want to use. Remember paths -are relative to `program/request`, so `config/io.json` would point to `program/request/config/io.json`. - - -### I'm ready to use this for real! -Once your configuration is how you want it, you can go back to the [quickstart](quickstart.md#configuration-continued) to enable and start the service. - -### I'm not ready to test this on my Rover yet -That's OK! If you want to get some "dummy" data into your database of choice, you can use a different -IO configuration. [Go here](./rover_dummy.md) for more info. - -### I want to test this on my Rover without a database! -See [Rover Setup Info](rover_setup_info.md) for information on how to use the `rover-setup` program. -This is a good option if you want to interact with your Rover live. - ---- - -### Setting voltage values of the User battery type -If you want to set values of the user battery type, this cannot be completely done from SolarThing. -You have to manually go to your Rover and set it to the User battery type. SolarThing can set the battery type of -your Rover, but if you set it to User through SolarThing, the values will be locked. - -#### \ isn't working on my Rover! -Yes, I hear you. When I first started trying to configure certain things on my Rover, it just straight up didn't work. -Here's an incomplete list of things I was unable to do: -* Settings certain values that are supposed to be writable -* Getting (accurate) special power control values - * These values didn't really seem correct (maybe they only work on certain charge controllers or only when the battery type is lithium) - -Note that a lot of the more advanced features are untested. They exist in SolarThing because they were in the -Rover's Modbus protocol document. diff --git a/other/docs/windows_usage.md b/other/docs/windows_usage.md deleted file mode 100644 index 7323d9aa..00000000 --- a/other/docs/windows_usage.md +++ /dev/null @@ -1,11 +0,0 @@ -# Windows Usage -SolarThing works on Windows, but there's some configuration that you will have to figure out -for yourself. - -You will notice in the documentation on here you constantly run `*.sh` files. Windows does not natively support -running `*.sh` files. However, you may be able to get away with running them using Git Bash, which -you likely have installed if you installed Git at https://gitforwindows.org. - -If you are able to get Git Bash working on windows, you can leave out the `sudo` on all the commands, as it will have no effect. - -Note that SolarThing is not tested on Windows. If you have issues, please report them on [our issues page](https://github.com/wildmountainfarms/solarthing/issues). diff --git a/other/misc/grafana_redirect.html b/other/misc/grafana_redirect.html deleted file mode 100644 index 4a929ecf..00000000 --- a/other/misc/grafana_redirect.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/other/misc/pvoutput_embedded.html b/other/misc/pvoutput_embedded.html deleted file mode 100644 index 2518fbdf..00000000 --- a/other/misc/pvoutput_embedded.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/other/misc/pvoutput_redirect.html b/other/misc/pvoutput_redirect.html deleted file mode 100644 index 59cc3c5c..00000000 --- a/other/misc/pvoutput_redirect.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/other/misc/ssh-forward.service b/other/misc/ssh-forward.service deleted file mode 100644 index 2c462f7b..00000000 --- a/other/misc/ssh-forward.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Keeps an ssh tunnel open to the desired SSH server - -[Service] -TimeoutStartSec=1 -ExecStart=/opt/ssh-forward/ssh-forward.sh -Restart=always -RestartSec=5 -# https://stackoverflow.com/a/50332245/5434860 - 43200 makes it restart every 12 hours -RuntimeMaxSec=43200 - -[Install] -WantedBy=multi-user.target diff --git a/other/misc/ssh-forward.sh b/other/misc/ssh-forward.sh deleted file mode 100644 index aa44f08e..00000000 --- a/other/misc/ssh-forward.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env sh -echo Starting -# -i specifies the key -# 9022 is the open port on the remote machine that can already be used to ssh to -# 9023 is the port on the remote machine to open -# 22 is the open port on the local machine that will be forwarded -# -4 Force iPv4 https://www.linuxquestions.org/questions/linux-networking-3/problem-with-ssh-local-port-forwarding-timeout-transmission-daemon-4175681713/ -# -n Makes sure nothing is read from stdin (No password prompts) -# The ServerAlive configuration makes sure the connection stays alive -# "ping localhost -i 20" makes that the command being run in an attempt to keep the connection open -ssh -4 -g -n -i /opt/ssh-forward/id_rsa -o "ServerAliveInterval 15" -o "ServerAliveCountMax 2" -o "GatewayPorts yes" -R 9023:*:22 -p 9022 lavender@your_url "ping localhost -i 20" -# Note, you may want to change localhost to 192.168.X.X if it's not working -# Note, in your sshd_config, you may want to add "UseDNS no" - https://serverfault.com/a/1028903 -# We could also look into using autossh instead -echo Failed diff --git a/other/solar/our_system.md b/other/solar/our_system.md index c7f5e0c4..1da82533 100644 --- a/other/solar/our_system.md +++ b/other/solar/our_system.md @@ -1,3 +1,5 @@ +NOTE: This is outdated! See: https://solarthing.readthedocs.io/en/latest/misc/wildmountainfarms/system.html + ## Our System This file just has some values for Wild Mountain Farms solar panel system so I don't forget them.