Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Oct 20, 2024
1 parent 9ff62ee commit 5c92afb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
5 changes: 3 additions & 2 deletions developer-guide/20-User interface/04-adding-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can add custom charts to the UI. Below is an example of adding a chart that
![custom chart of CO2 reading](/img/developer-guide/custom_chart.png)

### Step 1
Create a yaml file with the following fields, and place it in `/home/pioreactor/.pioreactor/plugins/ui/contrib/charts`. (Plugins can put the yaml file under `ui/contrib/charts` in there project folder - it will be added upon installation.)
Create a yaml file with the following fields, and place it in `/home/pioreactor/.pioreactor/plugins/ui/contrib/charts/`. (Plugins can put the yaml file under `ui/contrib/charts` in there project folder - it will be added upon installation.)

- `chart_key`: a unique identifier for the chart being added, string.
- `data_source`: the SQL table to read historical data from. The data source must have a `timestamp`, `pioreactor_unit`, and `experiment` column, along with a numeric column to plot (see below), string.
Expand All @@ -21,6 +21,7 @@ Create a yaml file with the following fields, and place it in `/home/pioreactor/
- `interpolation`: (Optional) the interpolation to use between points, default is `stepAfter`, string.
- `y_axis_domain`: (Optional) specify a starting y-axis domain. Must be an array, like `[0.0, 0.5]`.
- `y_transformation`: (Optional) an inline JS function to transform the y data. Default is the identity function, string.
- `down_sample`: (Optional) A boolean to down-sample the data points from the server or not.

See examples of yaml files [here](https://github.com/Pioreactor/pioreactorui/tree/master/contrib/charts) and [here](https://forum.pioreactor.com/t/creating-stirring-rpm-and-pwm-duty-cycle-charts-on-the-ui/339).

Expand Down Expand Up @@ -48,6 +49,6 @@ co2_readings=1
tail /var/log/pioreactor.log
```
The last few lines should tell you about if a field is missing, a wrong type, etc.
- There is a 30sec cache, so it may take up to 30sec to see new changes in the UI.
- There is a 30 second cache, so it may take up to 30 second to see new changes in the UI.


20 changes: 12 additions & 8 deletions user-guide/30-Advanced/02-networking/06-local-access-point.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Pioreactor comes with the ability to create its own local access point, whic


:::info
The built-in local access point is meant for small clusters of Pioreactors, and it's range and stability is limited. If you want a proper local access point, we suggest purchasing an inexpensive wifi router and using that (the router does not need to be connected to the internet - it will still create a wifi network you can connect Pioreactors to regardless).
The built-in local access point is meant for small clusters of Pioreactors, and it's range and stability is limited. If you want a proper local access point, we suggest purchasing an inexpensive Wifi router and using that, or a Wifi USB device (the router does not need to be connected to the internet - it will still create a wireless network you can connect Pioreactors to regardless).
:::


Expand Down Expand Up @@ -57,7 +57,7 @@ Without access to the internet, the Pioreactor will have the wrong internal time
### Connecting more Pioreactors to your local access point

:::info
Raspberry Pi 3B and Raspberry Pi Zero W have trouble connecting to these local access points. Follow instructions [here](https://github.com/Pioreactor/pioreactor/blob/992d986881f3a3504a08b781a494b1a6e3b5a0e3/CHANGELOG.md?plain=1#L110C11-L121).
Raspberry Pi 3B (not B+) and Raspberry Pi Zero W (not Zero 2) have trouble connecting to these local access points. Follow instructions [here](https://github.com/Pioreactor/pioreactor/blob/992d986881f3a3504a08b781a494b1a6e3b5a0e3/CHANGELOG.md?plain=1#L110C11-L121).
:::


Expand All @@ -69,7 +69,7 @@ This network may not be connected to the internet, so you won't be able to upgra

## Adding internet access to your local access point

If you are hosting the local access point on a Raspberry Pi that has an ethernet port (B models), you can plug this into a router that has access to the internet to provide internet to your entire cluster.
If you are hosting the local access point on a Raspberry Pi that has an ethernet port (B models, or via a usb-ethernet gadget), you can plug this into a router that has access to the internet to provide internet to your entire cluster.


![Using the Pioreactor to create a local access point, and the is connected to a router](/img/user-guide/lap_with_internet.png)
Expand All @@ -78,11 +78,14 @@ If you are hosting the local access point on a Raspberry Pi that has an ethernet
## Turning off a local access point

After SSH-ing into your Pioreactor, simply delete the `local_access_point` file in the `/boot/firmware/` directory, and reboot.
```
sudo rm /boot/firmware/local_access_point
```


## Changing SSID name or password for your local access point

In the `config.ini`, the SSID and password are editable under the section `local_access_point`. This requires a power-cycle to take effect.
In the `config.ini`, the SSID and password are editable under the section `local_access_point`. This requires a power-cycle to take effect, and any other workers in the cluster will need to be updated.


## Troubleshooting
Expand All @@ -105,13 +108,14 @@ Try `http://<your_leaders_hostname>.local`. Still not working? Try `http://10.42

### I can't connect a worker to my local access point

- confirm that you are using the right wifi name and password in the Imager (default `pioreactor` and `raspberry`)
- The maximum number of access point clients (Pioreactors and computers) that can be connected to a local access point on a Pioreactor is ~4-8. There is a possibility to add more, see [issue here](https://github.com/Pioreactor/pioreactor/issues/442).
- confirm that you are using the right wifi name and password in the Imager (default `pioreactor` and `raspberry`), and the hostname is correct and unique.
- The maximum number of access point clients (Pioreactors and computers) that can be connected to a local access point on a Pioreactor is ~4-8. See question below.

### I'm pretty sure I'm at the limit of ~4-8 clients on my access point - what can I do?

- You can purchase an inexpensive wifi router and use that as the access point. Note that you don't need to connect this router to the internet - it will operate a network regardless.
- You can purchase an inexpensive wifi router and use that as the access point. Note that you don't need to connect this router to the internet - it will operate a wireless network regardless.
- You can purchase a Wifi USB stick to improve the number clients and range of your local-access-point. For example, the Alfa AWUS036AC (take note to confirm your Raspberry Pi can has the correct USB connection). To check if the device is active, use `nmcli device` and look for a `wlan1` (which represents the USB stick). To move the local access point to this USB stick, use
```
sudo nmcli connection modify PioreactorAP ifname wlan1
```
```
- Another possible option is purely software based: There is a possibility to add more, see [issue here](https://github.com/Pioreactor/pioreactor/issues/442).
12 changes: 9 additions & 3 deletions user-guide/30-Advanced/02-networking/10-networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ sudo nmcli con up PioreactorAP
If have a second wifi device with interface `wlan1`, you can change the interface of the local access point using:

```
sudo nmcli connection modify PioreactorAP ifname wlan1
sudo nmcli con modify PioreactorAP ifname wlan1
sudo nmcli con up PioreactorAP
```

Expand All @@ -96,7 +96,11 @@ broker=leader.local

To change the web UI port from the default of `80`, following these instructions:

1. SSH into your leader Pioreactor.
:::note
This will change the web server port for all leaders and workers. There is currently not a way to have different ports on different Pioreactors. See [this issue](https://github.com/Pioreactor/pioreactor/issues/526).
:::

1. SSH into each Pioreactor in your cluster, leader and workers.
2. We'll edit the lighttpd configuration first:
```
sudo nano /etc/lighttpd/lighttpd.conf
Expand All @@ -110,7 +114,9 @@ To change the web UI port from the default of `80`, following these instructions
```
You should be able to access the web UI only on http://`leader name`:`new port`, for example: http://leader.local:8080

4. In your configuration, under the `[ui]` section, change the `port` option from `80` to your new port value. Save. You may need to restart your cluster for this new port to propagate to all machines correctly.
4. In your configuration, under the `[ui]` section, change the `port` option from `80` to your new port value. Save. You may need to restart your cluster for this new port to propagate to all Pioreactors correctly.




## Connecting to eduroam
Expand Down

0 comments on commit 5c92afb

Please sign in to comment.