Skip to content
Snippets Groups Projects
Commit 62603c7f authored by kr69sugu's avatar kr69sugu
Browse files

edit readme/gitignore

parent 00df0c29
Branches
Tags
No related merge requests found
skyglow.log skyglow.log
moon?* moon?*
README.html
...@@ -13,8 +13,26 @@ Python program written for the ecoLux project in the ecoTron to periodically set ...@@ -13,8 +13,26 @@ Python program written for the ecoLux project in the ecoTron to periodically set
This was tested and run on a Raspberry Pi connected via DMX to the LED's in the ecounits. This was tested and run on a Raspberry Pi connected via DMX to the LED's in the ecounits.
OLA (Open Light Architecture Framework) is used to write to the DMX-Bus. OLA (Open Light Architecture Framework) is used to write to the DMX-Bus.
##Usage##
```console
skyglow.py
```
will look for a file called **moon** in its directory, to extract the intensities of the moon for the current time. Alternatively you can also pass a file as an argument.
```console
skyglow.py /path/to/moon/file
```
If everything worked, a line should be added to skyglow.log:
```
#date moon[mlx] moon[dmx] lightpollution[mlx]
2020-07-21 15:00:00 0.05 11 [15, 54, 4, 19, 0, 1, 5, 0, 40, 12, 123, 123]
```
The indices of the list containing the lightpollution valus refer to the number of the ecounits.
##Setup##
##Building OLA## ###Building OLA###
In order to get a recent version with python support we need to build OLA. In order to get a recent version with python support we need to build OLA.
See [this](https://www.openlighting.org/ola/tutorials/ola-on-raspberry-pi/) and [this](https://www.openlighting.org/ola/linuxinstall/#Debian_Ubuntu) for details. See [this](https://www.openlighting.org/ola/tutorials/ola-on-raspberry-pi/) and [this](https://www.openlighting.org/ola/linuxinstall/#Debian_Ubuntu) for details.
...@@ -44,32 +62,14 @@ Run the daemon: ...@@ -44,32 +62,14 @@ Run the daemon:
```console ```console
olad olad
``` ```
###new moonfile###
##Usage##
It will look for a file called **moon** in its directory, to read the intensities of the moon.
```console
skyglow.py
```
Alternatively you can pass a different file as an argument.
```console
skyglow.py /path/to/moon/file
```
If you acquire a new moonfile, make sure to replace all occurrences of **24:00** to **00:00**. If you acquire a new moonfile, make sure to replace all occurrences of **24:00** to **00:00**.
Otherwise python will throw an error. Otherwise python will throw an error.
```console ```console
sed -i 's/24:00/00:00/g' moonfile sed -i 's/24:00/00:00/g' moonfile
``` ```
###cron###
If everything worked, a line should be added to skyglow.log: Set up a cronjob to check for new values every minute. Run
```
#date moon[mlx] moon[dmx] lightpollution[mlx]
2020-07-21 15:00:00 0.05 11 [15, 54, 4, 19, 0, 1, 5, 0, 40, 12, 123, 123]
```
The indices of the list containing the lightpollution valus refer to the number of the ecounits.
Now set up a cronjob to check for new values every minute. Run
``` ```
crontab -e crontab -e
``` ```
...@@ -82,4 +82,4 @@ and insert ...@@ -82,4 +82,4 @@ and insert
Check the `skyglow.log` to see if it gets updated every minute. Check the `skyglow.log` to see if it gets updated every minute.
``` ```
watch -n1 tail skyglow.log watch -n1 tail skyglow.log
``` ```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment