Skip to content

Commit

Permalink
restructured the firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
romses committed Jan 27, 2024
2 parents c18fc87 + 6e0d593 commit d09febd
Show file tree
Hide file tree
Showing 11 changed files with 2,802 additions and 2,296 deletions.
14 changes: 7 additions & 7 deletions docs/how_to_build.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ Um deinen eigenen Datenzwerg zu bauen, benötigst du folgende Teile:

| Menge | Teil | Funktion | Link |
| ----- | ---- | -------- | ---- |
| 1 | Wemos D1 Mini | MCU | [AliExpress](https://aliexpress.com/item/1005004967205772.html) |
| 1 | BME280 | Environment Sensor | [AliExpress](https://aliexpress.com/item/1005003676342598.html) |
| 1 | Wemos D1 Mini | MCU | [AliExpress](https://aliexpress.com/item/1005004967205772.html), [Reichelt elektronik](https://www.reichelt.de/d1-mini-kompatibles-esp8266-board-v2-0-d1-mini-p253978.html?&nbc=1) |
| 1 | BME280 | Environment Sensor | [AliExpress](https://aliexpress.com/item/1005003676342598.html), [Reichelt elektronik](https://www.reichelt.de/kombo-sensor-luftdruck-luftfeuchtigkeit-temp--bme-280-p159825.html?&nbc=1) |
| 1 | SGP30 | TVOC/eCO2 Sensor | [AliExpress](https://aliexpress.com/item/1005004680000599.html) |
| 1 | VEML6075 | UV Sensor | [AliExpress](https://aliexpress.com/item/1005004653958045.html) |
| 1 | ADS1115 | 4 Port ADC | [AliExpress](https://aliexpress.com/item/32817162654.html) |
| 1 | GY-MAX4466 | Sound sensor | [Amazon](https://www.amazon.de/dp/B07YDG3VZF) |
| 1 | VEML6075 | UV Sensor | [AliExpress](https://aliexpress.com/item/1005004653958045.html)|
| 1 | ADS1115 | 4 Port ADC | [AliExpress](https://aliexpress.com/item/32817162654.html), [Reichelt elektronik](https://www.reichelt.de/raspberry-a-d-wandler-ads1115-rpi-adc-1115-p316202.html?&nbc=1) |
| 1 | GY-MAX4466 | Sound sensor | [Amazon](https://www.amazon.de/dp/B07YDG3VZF), [Reichelt elektronik](https://www.reichelt.de/entwicklerboards-mikrofonverstaerker-max4466-debo-amp-mic-p235481.html?&nbc=1) |
| 3 | male 3-pin JST connectors + cables | Sensor & power connectors | [Amazon](https://www.amazon.de/gp/product/B08ZJ6JGB5) |
| 2 | male 4-pin JST connectors + cables | I2C connector | [Amazon](https://www.amazon.de/gp/product/B09LCRCTQG) |
| 2 | male 8-pin headers, male and female | ESP8266 connector | [Amazon](https://www.amazon.de/dp/B07DBY753C/) |
| 1 | male 10-pin header, male and female | ADS1115 connector | [Amazon](https://www.amazon.de/dp/B07DBY753C/) |
| 2 | male 8-pin headers, male and female | ESP8266 connector | [Amazon](https://www.amazon.de/dp/B07DBY753C/), [reichelt elektronik](https://www.reichelt.de/buchsenleiste-2-54mm-1x20-trennbar-vergoldet-fis-bl1-20-g-p283787.html?&trstct=vrt_pdn&nbc=1) |
| 1 | male 10-pin header, male and female | ADS1115 connector | [Amazon](https://www.amazon.de/dp/B07DBY753C/), [reichelt elektronik](https://www.reichelt.de/buchsenleiste-2-54mm-1x20-trennbar-vergoldet-fis-bl1-20-g-p283787.html?&trstct=vrt_pdn&nbc=1) |

Zusätzlich benötigst du einen Lötkolben, Lötzinn, Litze und Schrumpfschlauch.

Expand Down
32 changes: 19 additions & 13 deletions docs/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ description: "Der Datenzwerg ist ein Gartenzwerg mit einer Mission: Umweltdaten
Du kannst uns erreichen unter **DECT 3962 (DZOC)**.
Und falls du dich wunderst, wo sich welcher Datenzwerg befindet, hier eine kurze Übersicht. Ein Klick auf den Namen bringt dich zum jeweiligen Dashboard, ein Klick auf den Ort zur jeweiligen Kartenansicht:
Und falls du dich wunderst, wo sich welcher Datenzwerg befindet, hier eine kurze Übersicht. Ein Klick auf den Namen bringt dich zum jeweiligen Dashboard:
| Datenzwerg | Location | Status |
| ---------- | -------- | ------ |
| [Bashful](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Bashful&theme=dark) | - | Not yet deployed |
| [Dopey](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Dopey&theme=dark) | - | Not yet deployed |
| [Grumpy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Grumpy&theme=dark) | - | Not yet deployed |
| [Happy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Happy&theme=dark) | - | Not yet deployed |
| [Hefty](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Hefty&theme=dark) | - | Not yet deployed |
| [Moopsy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Moopsy&theme=dark) | - | Not yet deployed |
| [Name Me](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Nameme&theme=dark) | - | Not yet deployed |
| [Nerdy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Nerdy&theme=dark) | - | Not yet deployed |
| [Sleepy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sleepy&theme=dark) | - | Not yet deployed |
| [Sneezy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sneezy&theme=dark) | - | Not yet deployed |
| [Bashful](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Bashful&theme=dark) | NOC Helpdesk | Deployed |
| [Dopey](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Dopey&theme=dark) | DDOS Bar | Deployed |
| [Grumpy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Grumpy&theme=dark) | Hall Z | Deployed |
| [Happy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Happy&theme=dark) | Hall G | Deployed |
| [Hefty](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Hefty&theme=dark) | Jugend Assembly | Deployed |
| [Kinky](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Kinky&theme=dark) | Flower Assembly | Deployed |
| [Moopsy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Moopsy&theme=dark) | Lounge | Deployed |
| [Nerdy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Nerdy&theme=dark) | Telnet Assembly | Deployed |
| [Sleepy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sleepy&theme=dark) | POC | Deployed |
| [Sneezy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sneezy&theme=dark) | Hall E | Deployed |
-->

## Was ist der Datenzwerg?
Expand Down Expand Up @@ -128,6 +128,9 @@ Wir haben ChatGPT gebeten, den Datenzwerg für uns zu beschreiben[^2] und das is
2023-12-11
: Die Server-Infstruktur ist wieder am Start und die ersten Datenzwerge senden wieder Daten.

2023-12-26 - 2023-12-30
: Die Datenzwerge sind auf dem 37c3 im Einsatz.

## FAQ

### Was für Daten werden vom Datenzwerg aufgezeichnet?
Expand Down Expand Up @@ -164,15 +167,16 @@ Wir müssen die Zwerge in die direkte Sonne stellen, damit der UV Sensor messen

Jeder Datenzwerg sendet seine Daten an eine zentrale, selbst gehostete InfluxDB-Instanz. Die Daten werden dann mit Grafana visualisiert.

Einige dieser Visualisierungen sowie auch die Zugangsdaten um die Rohdaten selbst abzufragen, sowie Links zu Exports vergangener Veranstaltungen können [hier](./sensors) gefunden werden.
Einige dieser Visualisierungen sowie auch die Zugangsdaten um die Rohdaten selbst abzufragen, sowie Links zu Exports vergangener Veranstaltungen können [hier](./sensors/) gefunden werden.

### Wo finde ich den Sourcecode?

Alles kann in diesem GitHub-Repository gefunden werden: [romses/Datenzwerg](https://github.com/romses/Datenzwerg).

## Medienecho

Die Datenzwerge warden der Opener des Camp reviews 2023 [media.ccc.de](https://media.ccc.de/v/camp2023-57105-cccamp23_review)
- Die Datenzwerge waren der Opener des Camp reviews 2023 [media.ccc.de](https://media.ccc.de/v/camp2023-57105-cccamp23_review).
- romses und foosel waren zu Gast beim [Datenleben Podcast](https://www.datenleben.de/index.php/2023/10/14/dl043-perspektiven-auf-data-science/) und haben über die Datenzwerge gesprochen.

## Credits & Danksagung

Expand All @@ -182,5 +186,7 @@ Das Datenzwerg-Logo wurde von D.B. entworfen.

Das Datenzwerg-Modell basiert auf [diesem "Garden Gnome" Modell](https://www.printables.com/model/260908-garden-gnome) von [Sci3D](https://www.printables.com/@Sci3D), das unter CC-BY veröffentlicht ist. Unser Remix kann [hier](https://www.printables.com/model/534875-datenzwerg-enclosure) und natürlich auch [im GitHub Repository](https://github.com/romses/Datenzwerg/tree/main/models) gefunden werden.

Die SCD41 sensoren wurden gesponsort von [@dx@mastodon.social](https://chaos.social/@[email protected]).

[^1]: Ja, die letzten drei genannten Namen sind nicht canon, und einer von ihnen gehört sogar einem Schlumpf - na und, Chaos ftw!
[^2]: Prompt: 'Write me a text for a website that gives an overview of the "Datenzwerg". The Datenzwerg is a garden gnome that collects environmental data, and makes it publicly available. The Datenzwerg will be presented at the Chaos Communication Camp.'
33 changes: 19 additions & 14 deletions docs/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ description: "The Datenzwerg is a garden gnome with a mission: To collect enviro
You can reach us on **DECT 3962 (DZOC)**
And if you are wondering where each Datenzwerg is located, here's a quick overview. Clicking on the name will take you to the respective dashboard, clicking on the location to the respective map grid:
And if you are wondering where each Datenzwerg is located, here's a quick overview. Clicking on the name will take you to the respective dashboard:
| Datenzwerg | Location | Status |
| ---------- | -------- | ------ |
| [Bashful](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Bashful&theme=dark) | - | Not yet deployed |
| [Dopey](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Dopey&theme=dark) | - | Not yet deployed |
| [Grumpy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Grumpy&theme=dark) | - | Not yet deployed |
| [Happy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Happy&theme=dark) | - | Not yet deployed |
| [Hefty](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Hefty&theme=dark) | - | Not yet deployed |
| [Moopsy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Moopsy&theme=dark) | - | Not yet deployed |
| [Name Me](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Nameme&theme=dark) | - | Not yet deployed |
| [Nerdy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Nerdy&theme=dark) | - | Not yet deployed |
| [Sleepy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sleepy&theme=dark) | - | Not yet deployed |
| [Sneezy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sneezy&theme=dark) | - | Not yet deployed |
| [Bashful](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Bashful&theme=dark) | NOC Helpdesk | Deployed |
| [Dopey](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Dopey&theme=dark) | DDOS Bar | Deployed |
| [Grumpy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Grumpy&theme=dark) | Hall Z | Deployed |
| [Happy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Happy&theme=dark) | Hall G | Deployed |
| [Hefty](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Hefty&theme=dark) | Jugend Assembly | Deployed |
| [Kinky](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Kinky&theme=dark) | Flower Assembly | Deployed |
| [Moopsy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Moopsy&theme=dark) | Lounge | Deployed |
| [Nerdy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Nerdy&theme=dark) | Telnet Assembly | Deployed |
| [Sleepy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sleepy&theme=dark) | POC | Deployed |
| [Sneezy](https://grafana.datagnome.de/d/f17a6449-84ed-4733-b982-21c0d480c42a/overview?orgId=1&refresh=15m&var-zwerg=Sneezy&theme=dark) | Hall E | Deployed |
-->

## What is the Datenzwerg?
Expand Down Expand Up @@ -123,6 +123,9 @@ We asked ChatGPT to describe the Datenzwerg for us[^2] and this is what it came
2023-12-11
: The server infrastructure is back up an running and the first Datenzwerge are reporting data again.

2023-12-26 2023-12-30
: The Datenzwerge are deployed at 37c3.

## FAQ

### What kind of data does the Datenzwerg collect?
Expand Down Expand Up @@ -157,17 +160,18 @@ We need to put the gnomes into direct sunlight in order to be able to measure UV

### Where can I find the data?

Each camp Datenzwerg sends its data to a central self-hosted InfluxDB instance. The data is then visualized using Grafana.
Each Datenzwerg sends its data to a central self-hosted InfluxDB instance. The data is then visualized using Grafana.

Some of those visualisations as well as credentials for accessing the raw data and links to data exports from past events can be found [here](./sensors).
Some of those visualisations as well as credentials for accessing the raw data and links to data exports from past events can be found [here](./sensors/).

### Where can I find the source?

Everything can be found in this GitHub repository: [romses/Datenzwerg](https://github.com/romses/Datenzwerg).

## Media echo

The datagnomes were the opener at the #cccamp23 review [media.ccc.de](https://media.ccc.de/v/camp2023-57105-cccamp23_review)
- The datagnomes were the opener at the #cccamp23 review [media.ccc.de](https://media.ccc.de/v/camp2023-57105-cccamp23_review).
- romses and foosel were guests at the [Datenleben Podcast](https://www.datenleben.de/index.php/2023/10/14/dl043-perspektiven-auf-data-science/) and talked about the Datenzwerge (German).

## Credits & Thanks

Expand All @@ -177,6 +181,7 @@ The Datenzwerg logo was created by D.B.

The Datenzwerg model files are based on [this "Garden Gnome" model](https://www.printables.com/model/260908-garden-gnome) by [Sci3D](https://www.printables.com/@Sci3D), released under CC-BY. Our remix can be found [here](https://www.printables.com/model/534875-datenzwerg-enclosure) and of course also [in the GitHub repository](https://github.com/romses/Datenzwerg/tree/main/models).

The SCD41 sensors were sponsored by [@dx@mastodon.social](https://chaos.social/@[email protected]).

[^1]: Yes, the last three are not canon, and one of them even is a smurf - so what, chaos ftw!
[^2]: Prompt: 'Write me a text for a website that gives an overview of the "Datenzwerg". The Datenzwerg is a garden gnome that collects environmental data, and makes it publicly available. The Datenzwerg will be presented at the Chaos Communication Camp.'
2 changes: 1 addition & 1 deletion docs/sensors.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Wenn du an den Rohdaten interessiert bist, verbinde dich einfach auf unsere Infl

## Exporte vergangener Events

Du kannst den Datenexport von CCCamp23 [im Repo finden](https://github.com/romses/Datenzwerg/tree/main/exports/cccamp2023).
Du kannst den Datenexport von CCCamp23 [im Repo finden](https://github.com/romses/Datenzwerg/tree/main/exports/cccamp2023).
9 changes: 5 additions & 4 deletions firmware/datenzwerg.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
packages:
base: !include packages/base.yaml # base v1.0 sensor package
tvoc: !include packages/tvoc.yaml # TVOC sensor added in v1.1, incompatible to battery power
tvoc: !include packages/tvoc.yaml # TVOC/eCO2 sensor added in v1.1, incompatible to battery power
scd41: !include packages/scd41.yaml # SCD41 sensor as alternative to tvoc, incompatible to battery power
#deepsleep: !include packages/deepsleep.yaml # enable this on battery power
uptime: !include packages/uptime.yaml # disable this on battery power
mqtt: !include packages/mqtt.yaml
influxdb: !include packages/influxdb.yaml
homeassistant: !include packages/homeassistant.yaml

# these should not be enabled in production
ota: !include packages/ota.yaml
webserver: !include packages/webserver.yaml
# these should NOT be enabled in production
#ota: !include packages/ota.yaml
#webserver: !include packages/webserver.yaml
7 changes: 4 additions & 3 deletions firmware/packages/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ logger:

wifi:
networks:
- ssid: Camp2023-open
- ssid: 37c3-open
# - ssid: Camp2023-open
# - ssid: 37c3-open
- ssid: !secret wifi_ssid
password: !secret wifi_psk
- ssid: 37C3
eap:
username: 37C3
password: 37C3

- ssid: 37C3-open

mdns:
disabled: true

Expand Down
5 changes: 5 additions & 0 deletions firmware/packages/scd41.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sensor:
- platform: scd4x
co2:
name: "CO2"
update_interval: 6s # sensor only updates every 5s
2 changes: 2 additions & 0 deletions firmware/packages/tvoc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
substitutions:
eco2_baseline: "0x0000"
tvoc_baseline: "0x0000"
disable_eco2: "false"

sensor:
- platform: sgp30
eco2:
name: "eCO2"
id: eco2
accuracy_decimals: 2
internal: ${disable_eco2}
tvoc:
name: "TVOC"
id: tvoc
Expand Down
Loading

0 comments on commit d09febd

Please sign in to comment.