diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 974b2f7e..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,274 +0,0 @@ -name: Build - -on: - merge_group: - types: - - checks_requested - - pull_request: - branches: - - main - - push: - branches: - - main - - workflow_dispatch: - -permissions: - contents: read - -jobs: - frekvens-basic: - name: IKEA Frekvens LED multi-use light - basic - needs: obegransad-basic - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: 24 - - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install -r .github/platformio/requirements.txt - - - run: | - cat < .env - EXTENSION_BUTTON='true' - EXTENSION_MICROPHONE='true' - EXTENSION_OTA='true' - EXTENSION_WEBAPP='true' - EXTENSION_WEBSOCKET='true' - HOSTNAME='frekvens' - IKEA_FREKVENS='true' - MODE_ARROW='true' - MODE_BLINDS='true' - MODE_EQUALIZER='true' - MODE_JAGGEDWAVEFORM='true' - MODE_RING='true' - MODE_SMOOTHWAVEFORM='true' - NAME='Frekvens' - EOL - - - run: | - cat < firmware/include/config/secrets.h - #pragma once - #define PIN_CS 1 - #define PIN_MIC 2 - #define PIN_MOSI 3 - #define PIN_OE 4 - #define PIN_SCLK 5 - #define PIN_SW1 6 - #define PIN_SW2 7 - #define WIFI_KEY "redacted" - #define WIFI_SSID "redacted" - EOL - - - run: pio run - - frekvens-extensive: - name: IKEA Frekvens LED multi-use light - extensive - needs: [frekvens-basic, obegransad-basic] - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: 24 - - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install -r .github/platformio/requirements.txt - - - run: | - cat < .env - EXTENSION_ALEXA='true' - EXTENSION_BUTTON='true' - EXTENSION_HEAP='true' - EXTENSION_HOMEASSISTANT='true' - EXTENSION_INFRARED='true' - EXTENSION_MESSAGE='true' - EXTENSION_MICROPHONE='true' - EXTENSION_MQTT='true' - EXTENSION_PHOTOCELL='true' - EXTENSION_PLAYLIST='true' - EXTENSION_RESTFUL='true' - EXTENSION_RTC='true' - EXTENSION_SERVERSENTEVENTS='true' - EXTENSION_SIGNAL='true' - EXTENSION_WEBAPP='true' - EXTENSION_WEBSOCKET='true' - FONT_BRAILLE='true' - HOSTNAME='frekvens' - IKEA_FREKVENS='true' - IKEA_OBEGRANSAD='false' - MODE_ANIMATION='true' - MODE_ARROW='true' - MODE_ARTNET='true' - MODE_BINARYCLOCK='true' - MODE_BINARYEPOCH='true' - MODE_BLINDS='true' - MODE_BLINK='true' - MODE_BOLDCLOCK='true' - MODE_BREAKOUTCLOCK='true' - MODE_BRIGHT='true' - MODE_CIRCLE='true' - MODE_COUNTDOWN='true' - MODE_DISTRIBUTEDDISPLAYPROTOCOL='true' - MODE_DRAW='true' - MODE_E131='true' - MODE_EQUALIZER='true' - MODE_FIREWORK='true' - MODE_FLIES='true' - MODE_GAMEOFLIFE='true' - MODE_GAMEOFLIFECLOCK='true' - MODE_GLITTER='true' - MODE_GOOGLEWEATHER='true' - MODE_HOMEASSISTANTWEATHER='true' - MODE_HOMETHERMOMETER='true' - MODE_JAGGEDWAVEFORM='true' - MODE_LARGETICKINGCLOCK='true' - MODE_LEAFFALL='true' - MODE_LINES='true' - MODE_METABALLS='true' - MODE_NOISE='true' - MODE_OPENMETEO='true' - MODE_OPENWEATHER='true' - MODE_PINGPONG='true' - MODE_PINGPONGCLOCK='true' - MODE_PIXELSEQUENCE='true' - MODE_RAIN='true' - MODE_RING='true' - MODE_SCAN='true' - MODE_SMALLCLOCK='true' - MODE_SMALLTICKINGCLOCK='true' - MODE_SMOOTHWAVEFORM='true' - MODE_SNAKE='true' - MODE_SNAKECLOCK='true' - MODE_STARS='true' - MODE_TICKER='true' - MODE_WAVEFORM='true' - MODE_WORLDWEATHERONLINE='true' - MODE_WTTRIN='true' - MODE_YR='true' - NAME='Frekvens' - OTA_KEY='secret' - TIME_ZONE='Etc/Universal' - EOL - - - run: | - cat < firmware/include/config/secrets.h - #pragma once - #define FRAME_RATE 60 - #define GOOGLEWEATHER_KEY "redacted" - #define HOMEASSISTANT_ENTITY "weather.forecast_home" - #define HOMEASSISTANT_HOST "homeassistant.local" - #define HOMEASSISTANT_KEY "redacted" - #define HOMEASSISTANT_PORT 8123 - #define LATITUDE "0.000" - #define LOCATION "redacted" - #define LONGITUDE "0.000" - #define MQTT_HOST "mqtt.local" - #define MQTT_PORT 1883 - #define MQTT_USER "redacted" - #define MQTT_KEY "redacted" - #define OPENMETEO_KEY "redacted" - #define OPENWEATHER_KEY "redacted" - #define PIN_CS 1 - #define PIN_INT 2 - #define PIN_IR 3 - #define PIN_LDR 4 - #define PIN_MIC 5 - #define PIN_MOSI 6 - #define PIN_OE 7 - #define PIN_SCL 8 - #define PIN_SCLK 9 - #define PIN_SDA 10 - #define PIN_SW1 11 - #define PIN_SW2 12 - #define RTC_DS3232 - #define TEMPERATURE_KELVIN true - #define WIFI_COUNTRY "01" - #define WIFI_KEY "redacted" - #define WIFI_SSID "redacted" - #define WORLDWEATHERONLINE_KEY "redacted" - EOL - - - run: pio run - - frekvens-spotlight: - name: IKEA Frekvens LED spotlight - ESPHome - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: | - cat < extra/IKEA-Frekvens-LED-spotlight/secrets.yaml - api_key: "redacted" - ota_password: "redacted" - wifi_password: "redacted" - wifi_ssid: "redacted" - EOL - - - uses: esphome/build-action@f93bda46d83c761cd25bbfdf350cfe508a0a39d5 # v7.1.0 - with: - yaml-file: extra/IKEA-Frekvens-LED-spotlight/esphome.yaml - - obegransad-basic: - name: IKEA Obegränsad LED wall lamp - basic - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: 24 - - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install -r .github/platformio/requirements.txt - - - run: | - cat < .env - EXTENSION_BUTTON='true' - EXTENSION_OTA='true' - EXTENSION_WEBAPP='true' - EXTENSION_WEBSOCKET='true' - HOSTNAME='obegransad' - IKEA_OBEGRANSAD='true' - MODE_BRIGHT='true' - MODE_CIRCLE='true' - MODE_LINES='true' - MODE_NOISE='true' - MODE_RAIN='true' - MODE_SCAN='true' - MODE_STARS='true' - NAME='Obegränsad' - EOL - - - run: | - cat < firmware/include/config/secrets.h - #pragma once - #define PIN_CS 1 - #define PIN_MOSI 2 - #define PIN_OE 3 - #define PIN_SCLK 4 - #define PIN_SW2 5 - #define WIFI_KEY "redacted" - #define WIFI_SSID "redacted" - EOL - - - run: pio run diff --git a/.github/workflows/dependabot-pio.yml b/.github/workflows/dependabot-pio.yml deleted file mode 100644 index 5f74adf7..00000000 --- a/.github/workflows/dependabot-pio.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: PlatformIO Dependabot - -on: - schedule: - - cron: '0 6 * * 1' - - workflow_dispatch: - -permissions: - contents: write - pull-requests: write - -jobs: - dependabot: - runs-on: ubuntu-latest - name: PlatformIO Dependabot - steps: - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - uses: JanPetterMG/platformio_dependabot@d52a00e84a5eac4e52b90ed3b26647496544fae8 # python313 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml new file mode 100644 index 00000000..ed70a793 --- /dev/null +++ b/.github/workflows/generate.yml @@ -0,0 +1,165 @@ +name: Generate + +on: + merge_group: + types: + - checks_requested + + pull_request: + branches: + - main + + push: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + +jobs: + font: + name: DejaVuSans font + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - python-version: 3.11 + - python-version: 3.14 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: extra/Python/requirements.txt + + - name: Set up Frekvens extra + run: pip install -r extra/Python/requirements.txt + + - name: Font generator + run: python extra/Python/FontGenerator.py -i DejaVuSans --size 8 + + - name: File existence + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + fail: true + files: DejaVuSansFont.cpp, DejaVuSansFont.h + + mode-dynamic: + name: Dynamic mode + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - python-version: 3.11 + - python-version: 3.14 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Generate mode + run: | + cat < Animation.csv + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 + 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + EOL + + python extra/Python/ModeGenerator.py -i Animation.csv + + - name: File existence + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + fail: true + files: AnimationMode.cpp, AnimationMode.h + + mode-static: + name: Static mode + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - python-version: 3.11 + - python-version: 3.14 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Generate mode + run: | + cat < Drawing.csv + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 + 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + EOL + + python extra/Python/ModeGenerator.py -i Drawing.csv + + - name: File existence + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + fail: true + files: DrawingMode.cpp, DrawingMode.h diff --git a/.github/workflows/ikea-frekvens-led-multi-use-light.yml b/.github/workflows/ikea-frekvens-led-multi-use-light.yml new file mode 100644 index 00000000..7b6717f9 --- /dev/null +++ b/.github/workflows/ikea-frekvens-led-multi-use-light.yml @@ -0,0 +1,482 @@ +name: IKEA Frekvens LED multi-use light + +on: + merge_group: + types: + - checks_requested + + pull_request: + branches: + - main + + push: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + +jobs: + platformio: + name: PlatformIO variable extract + runs-on: ubuntu-latest + outputs: + environments: ${{ steps.print.outputs.environments }} + version: ${{ steps.print.outputs.version }} + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: 3.13 + cache: pip + cache-dependency-path: .github/platformio/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: PlatformIO extract + id: print + run: | + echo "environments=$(pio project config --json-output | jq -c '[.[] | .[0] | select(startswith("env:")) | sub("^env:"; "")]')" >> "$GITHUB_OUTPUT" + echo "version=$(pio --version | awk '{print $NF}')" >> "$GITHUB_OUTPUT" + + default: + name: Default build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - node-version: 20 + python-version: 3.11 + + - node-version: 25 + python-version: 3.13 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: ${{ matrix.toolchain.node-version }} + cache: npm + cache-dependency-path: webapp/package-lock.json + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + run: | + echo "IKEA_FREKVENS='true'" >> .env + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define PIN_CS 1 + #define PIN_MOSI 2 + #define PIN_OE 3 + #define PIN_SCLK 4 + #define PIN_SW1 5 + #define PIN_SW2 6 + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + EOL + + pio run -e ${{ matrix.environment }} + + minimal: + name: Minimal build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - python-version: 3.11 + - python-version: 3.13 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + run: | + cat <<'EOL' > .env + EXTENSION_BUTTON='true' + HOSTNAME='frekvens' + IKEA_FREKVENS='true' + MODE_ARROW='true' + MODE_BLINDS='true' + MODE_EQUALIZER='true' + MODE_JAGGEDWAVEFORM='true' + MODE_RING='true' + MODE_SMOOTHWAVEFORM='true' + NAME='Frekvens' + EOL + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define PIN_CS 1 + #define PIN_MOSI 2 + #define PIN_OE 3 + #define PIN_SCLK 4 + #define PIN_SW1 5 + #define PIN_SW2 6 + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + EOL + + pio run -e ${{ matrix.environment }} + + typical: + name: Typical build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - node-version: 20 + python-version: 3.11 + + - node-version: 25 + python-version: 3.13 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: ${{ matrix.toolchain.node-version }} + cache: npm + cache-dependency-path: webapp/package-lock.json + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + run: | + cat <<'EOL' > .env + EXTENSION_ALEXA='true' + EXTENSION_BUTTON='true' + EXTENSION_HEAP='true' + EXTENSION_MESSAGE='true' + EXTENSION_MICROPHONE='true' + EXTENSION_OTA='true' + EXTENSION_PLAYLIST='true' + EXTENSION_RESTFUL='true' + EXTENSION_SERVERSENTEVENTS='true' + EXTENSION_SIGNAL='true' + EXTENSION_WEBAPP='true' + EXTENSION_WEBSOCKET='true' + FONT_BRAILLE='true' + HOSTNAME='frekvens' + IKEA_FREKVENS='true' + MODE_ANIMATION='true' + MODE_ARROW='true' + MODE_ARTNET='true' + MODE_BINARYCLOCK='true' + MODE_BINARYEPOCH='true' + MODE_BLINDS='true' + MODE_BLINK='true' + MODE_BOLDCLOCK='true' + MODE_BREAKOUTCLOCK='true' + MODE_BRIGHT='true' + MODE_CIRCLE='true' + MODE_COUNTDOWN='true' + MODE_DISTRIBUTEDDISPLAYPROTOCOL='true' + MODE_DRAW='true' + MODE_E131='true' + MODE_EQUALIZER='true' + MODE_FIREWORK='true' + MODE_FLIES='true' + MODE_GAMEOFLIFE='true' + MODE_GAMEOFLIFECLOCK='true' + MODE_GLITTER='true' + MODE_HOMETHERMOMETER='true' + MODE_JAGGEDWAVEFORM='true' + MODE_LARGETICKINGCLOCK='true' + MODE_LEAFFALL='true' + MODE_LINES='true' + MODE_METABALLS='true' + MODE_NOISE='true' + MODE_OPENMETEO='true' + MODE_PINGPONG='true' + MODE_PINGPONGCLOCK='true' + MODE_PIXELSEQUENCE='true' + MODE_RAIN='true' + MODE_RING='true' + MODE_SCAN='true' + MODE_SMALLCLOCK='true' + MODE_SMALLTICKINGCLOCK='true' + MODE_SMOOTHWAVEFORM='true' + MODE_SNAKE='true' + MODE_SNAKECLOCK='true' + MODE_STARS='true' + MODE_TICKER='true' + MODE_WAVEFORM='true' + MODE_WTTRIN='true' + MODE_YR='true' + NAME='Frekvens' + EOL + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define LATITUDE "0.000" + #define LOCATION "redacted" + #define LONGITUDE "0.000" + #define PIN_CS 1 + #define PIN_MIC 2 + #define PIN_MOSI 3 + #define PIN_OE 4 + #define PIN_SCLK 5 + #define PIN_SW1 6 + #define PIN_SW2 7 + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + EOL + + pio run -e ${{ matrix.environment }} + + extensive: + name: Extensive build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - node-version: 20 + python-version: 3.11 + + - node-version: 25 + python-version: 3.13 + + exclude: + - environment: adafruit_qtpy_esp32s2 + - environment: adafruit_qtpy_esp32s3_n4r2 + - environment: esp32-c3-devkitm-1 + - environment: esp32-c5-devkitc-1 + - environment: esp32-c6-devkitm-1 + - environment: esp32dev + - environment: lolin_d32 + - environment: lolin_d32_pro + - environment: lolin_s3_mini + - environment: seeed_xiao_esp32c3 + - environment: seeed_xiao_esp32c6 + - environment: wemos_d1_mini32 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: ${{ matrix.toolchain.node-version }} + cache: npm + cache-dependency-path: webapp/package-lock.json + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + run: | + cat <<'EOL' > .env + EXTENSION_ALEXA='true' + EXTENSION_BUTTON='true' + EXTENSION_HEAP='true' + EXTENSION_HOMEASSISTANT='true' + EXTENSION_INFRARED='true' + EXTENSION_MESSAGE='true' + EXTENSION_MICROPHONE='true' + EXTENSION_MQTT='true' + EXTENSION_OTA='true' + EXTENSION_PHOTOCELL='true' + EXTENSION_PLAYLIST='true' + EXTENSION_RESTFUL='true' + EXTENSION_RTC='true' + EXTENSION_SERVERSENTEVENTS='true' + EXTENSION_SIGNAL='true' + EXTENSION_WEBAPP='true' + EXTENSION_WEBSOCKET='true' + FONT_BRAILLE='true' + HOSTNAME='frekvens' + IKEA_FREKVENS='true' + MODE_ANIMATION='true' + MODE_ARROW='true' + MODE_ARTNET='true' + MODE_BINARYCLOCK='true' + MODE_BINARYEPOCH='true' + MODE_BLINDS='true' + MODE_BLINK='true' + MODE_BOLDCLOCK='true' + MODE_BREAKOUTCLOCK='true' + MODE_BRIGHT='true' + MODE_CIRCLE='true' + MODE_COUNTDOWN='true' + MODE_DISTRIBUTEDDISPLAYPROTOCOL='true' + MODE_DRAW='true' + MODE_E131='true' + MODE_EQUALIZER='true' + MODE_FIREWORK='true' + MODE_FLIES='true' + MODE_GAMEOFLIFE='true' + MODE_GAMEOFLIFECLOCK='true' + MODE_GLITTER='true' + MODE_GOOGLEWEATHER='true' + MODE_HOMEASSISTANTWEATHER='true' + MODE_HOMETHERMOMETER='true' + MODE_JAGGEDWAVEFORM='true' + MODE_LARGETICKINGCLOCK='true' + MODE_LEAFFALL='true' + MODE_LINES='true' + MODE_METABALLS='true' + MODE_NOISE='true' + MODE_OPENMETEO='true' + MODE_OPENWEATHER='true' + MODE_PINGPONG='true' + MODE_PINGPONGCLOCK='true' + MODE_PIXELSEQUENCE='true' + MODE_RAIN='true' + MODE_RING='true' + MODE_SCAN='true' + MODE_SMALLCLOCK='true' + MODE_SMALLTICKINGCLOCK='true' + MODE_SMOOTHWAVEFORM='true' + MODE_SNAKE='true' + MODE_SNAKECLOCK='true' + MODE_STARS='true' + MODE_TICKER='true' + MODE_WAVEFORM='true' + MODE_WORLDWEATHERONLINE='true' + MODE_WTTRIN='true' + MODE_YR='true' + NAME='Frekvens' + OTA_KEY='redacted' + TIME_ZONE='Etc/Universal' + EOL + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define FRAME_RATE 60 + #define GOOGLEWEATHER_KEY "redacted" + #define HOMEASSISTANT_ENTITY "weather.forecast_home" + #define HOMEASSISTANT_HOST "homeassistant.local" + #define HOMEASSISTANT_KEY "redacted" + #define HOMEASSISTANT_PORT 8123 + #define LATITUDE "0.000" + #define LOCATION "redacted" + #define LONGITUDE "0.000" + #define MQTT_HOST "mqtt.local" + #define MQTT_PORT 1883 + #define MQTT_USER "redacted" + #define MQTT_KEY "redacted" + #define OPENMETEO_KEY "redacted" + #define OPENWEATHER_KEY "redacted" + #define PIN_CS 1 + #define PIN_INT 2 + #define PIN_IR 3 + #define PIN_LDR 4 + #define PIN_MIC 5 + #define PIN_MOSI 6 + #define PIN_OE 7 + #define PIN_SCL 8 + #define PIN_SCLK 9 + #define PIN_SDA 10 + #define PIN_SW1 11 + #define PIN_SW2 12 + #define RTC_DS3232 + #define TEMPERATURE_CELSIUS true + #define WIFI_COUNTRY "01" + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + #define WORLDWEATHERONLINE_KEY "redacted" + EOL + + pio run -e ${{ matrix.environment }} diff --git a/.github/workflows/ikea-frekvens-led-spotlight.yml b/.github/workflows/ikea-frekvens-led-spotlight.yml new file mode 100644 index 00000000..010ce82f --- /dev/null +++ b/.github/workflows/ikea-frekvens-led-spotlight.yml @@ -0,0 +1,65 @@ +name: IKEA Frekvens LED spotlight + +on: + merge_group: + types: + - checks_requested + + pull_request: + branches: + - main + + push: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + +jobs: + esphome: + name: ESPHome minimum version extract + runs-on: ubuntu-latest + outputs: + min_version: ${{ steps.print.outputs.min_version }} + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Extract ESPHome minimum version + id: print + run: | + echo "min_version=$(grep " min_version:" "extra/IKEA-Frekvens-LED-spotlight/esphome.yaml" | cut -d '"' -f 2)" >> "$GITHUB_OUTPUT" + + ikea-frekvens-led-spotlight: + name: ESPHome build + needs: esphome + runs-on: ubuntu-latest + + strategy: + matrix: + esphome-version: + - ${{ needs.esphome.outputs.min_version }} + - latest + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up ESPHome secrets.yaml + run: | + cat < extra/IKEA-Frekvens-LED-spotlight/secrets.yaml + api_key: "redacted" + ota_password: "redacted" + wifi_password: "redacted" + wifi_ssid: "redacted" + EOL + + - name: ESPHome build + uses: esphome/build-action@f93bda46d83c761cd25bbfdf350cfe508a0a39d5 # v7.1.0 + with: + version: ${{ matrix.esphome-version }} + yaml-file: extra/IKEA-Frekvens-LED-spotlight/esphome.yaml diff --git a/.github/workflows/ikea-obegransad-led-wall-lamp.yml b/.github/workflows/ikea-obegransad-led-wall-lamp.yml new file mode 100644 index 00000000..5ee5a929 --- /dev/null +++ b/.github/workflows/ikea-obegransad-led-wall-lamp.yml @@ -0,0 +1,476 @@ +name: IKEA Obegränsad LED wall lamp + +on: + merge_group: + types: + - checks_requested + + pull_request: + branches: + - main + + push: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + +jobs: + platformio: + name: PlatformIO variable extract + runs-on: ubuntu-latest + outputs: + environments: ${{ steps.print.outputs.environments }} + version: ${{ steps.print.outputs.version }} + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: 3.13 + cache: pip + cache-dependency-path: .github/platformio/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: PlatformIO extract + id: print + run: | + echo "environments=$(pio project config --json-output | jq -c '[.[] | .[0] | select(startswith("env:")) | sub("^env:"; "")]')" >> "$GITHUB_OUTPUT" + echo "version=$(pio --version | awk '{print $NF}')" >> "$GITHUB_OUTPUT" + + default: + name: Default build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - node-version: 20 + python-version: 3.11 + + - node-version: 25 + python-version: 3.13 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: ${{ matrix.toolchain.node-version }} + cache: npm + cache-dependency-path: webapp/package-lock.json + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + run: | + echo "IKEA_OBEGRANSAD='true'" >> .env + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define PIN_CS 1 + #define PIN_MOSI 2 + #define PIN_OE 3 + #define PIN_SCLK 4 + #define PIN_SW2 5 + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + EOL + + pio run -e ${{ matrix.environment }} + + minimal: + name: Minimal build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - python-version: 3.11 + - python-version: 3.13 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + run: | + cat <<'EOL' > .env + EXTENSION_BUTTON='true' + HOSTNAME='obegransad' + IKEA_OBEGRANSAD='true' + MODE_CIRCLE='true' + MODE_LINES='true' + MODE_NOISE='true' + MODE_RAIN='true' + MODE_SCAN='true' + MODE_STARS='true' + NAME='Obegränsad' + EOL + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define PIN_CS 1 + #define PIN_MOSI 2 + #define PIN_OE 3 + #define PIN_SCLK 4 + #define PIN_SW2 5 + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + EOL + + pio run -e ${{ matrix.environment }} + + typical: + name: Typical build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - node-version: 20 + python-version: 3.11 + + - node-version: 25 + python-version: 3.13 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: ${{ matrix.toolchain.node-version }} + cache: npm + cache-dependency-path: webapp/package-lock.json + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + run: | + cat <<'EOL' > .env + EXTENSION_ALEXA='true' + EXTENSION_BUTTON='true' + EXTENSION_HEAP='true' + EXTENSION_MESSAGE='true' + EXTENSION_OTA='true' + EXTENSION_PLAYLIST='true' + EXTENSION_RESTFUL='true' + EXTENSION_SERVERSENTEVENTS='true' + EXTENSION_SIGNAL='true' + EXTENSION_WEBAPP='true' + EXTENSION_WEBSOCKET='true' + FONT_BRAILLE='true' + HOSTNAME='obegransad' + IKEA_OBEGRANSAD='true' + MODE_ANIMATION='true' + MODE_ARROW='true' + MODE_ARTNET='true' + MODE_BINARYCLOCK='true' + MODE_BINARYEPOCH='true' + MODE_BLINDS='true' + MODE_BLINK='true' + MODE_BOLDCLOCK='true' + MODE_BREAKOUTCLOCK='true' + MODE_BRIGHT='true' + MODE_CIRCLE='true' + MODE_COUNTDOWN='true' + MODE_DISTRIBUTEDDISPLAYPROTOCOL='true' + MODE_DRAW='true' + MODE_E131='true' + MODE_EQUALIZER='true' + MODE_FIREWORK='true' + MODE_FLIES='true' + MODE_GAMEOFLIFE='true' + MODE_GAMEOFLIFECLOCK='true' + MODE_GLITTER='true' + MODE_HOMETHERMOMETER='true' + MODE_JAGGEDWAVEFORM='true' + MODE_LARGETICKINGCLOCK='true' + MODE_LEAFFALL='true' + MODE_LINES='true' + MODE_METABALLS='true' + MODE_NOISE='true' + MODE_OPENMETEO='true' + MODE_PINGPONG='true' + MODE_PINGPONGCLOCK='true' + MODE_PIXELSEQUENCE='true' + MODE_RAIN='true' + MODE_RING='true' + MODE_SCAN='true' + MODE_SMALLCLOCK='true' + MODE_SMALLTICKINGCLOCK='true' + MODE_SMOOTHWAVEFORM='true' + MODE_SNAKE='true' + MODE_SNAKECLOCK='true' + MODE_STARS='true' + MODE_TICKER='true' + MODE_WAVEFORM='true' + MODE_WTTRIN='true' + MODE_YR='true' + NAME='Obegränsad' + EOL + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define LATITUDE "0.000" + #define LOCATION "redacted" + #define LONGITUDE "0.000" + #define PIN_CS 1 + #define PIN_MOSI 2 + #define PIN_OE 3 + #define PIN_SCLK 4 + #define PIN_SW2 5 + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + EOL + + pio run -e ${{ matrix.environment }} + + extensive: + name: Extensive build + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + environment: ${{ fromJson(needs.platformio.outputs.environments) }} + toolchain: + - node-version: 20 + python-version: 3.11 + + - node-version: 25 + python-version: 3.13 + + exclude: + - environment: adafruit_qtpy_esp32s2 + - environment: adafruit_qtpy_esp32s3_n4r2 + - environment: esp32-c3-devkitm-1 + - environment: esp32-c5-devkitc-1 + - environment: esp32-c6-devkitm-1 + - environment: esp32dev + - environment: lolin_d32 + - environment: lolin_d32_pro + - environment: lolin_s3_mini + - environment: seeed_xiao_esp32c3 + - environment: seeed_xiao_esp32c6 + - environment: wemos_d1_mini32 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: ${{ matrix.toolchain.node-version }} + cache: npm + cache-dependency-path: webapp/package-lock.json + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build' + run: | + cat <<'EOL' > .env + EXTENSION_ALEXA='true' + EXTENSION_BUTTON='true' + EXTENSION_HEAP='true' + EXTENSION_HOMEASSISTANT='true' + EXTENSION_INFRARED='true' + EXTENSION_MESSAGE='true' + EXTENSION_MICROPHONE='true' + EXTENSION_MQTT='true' + EXTENSION_OTA='true' + EXTENSION_PHOTOCELL='true' + EXTENSION_PLAYLIST='true' + EXTENSION_RESTFUL='true' + EXTENSION_RTC='true' + EXTENSION_SERVERSENTEVENTS='true' + EXTENSION_SIGNAL='true' + EXTENSION_WEBAPP='true' + EXTENSION_WEBSOCKET='true' + FONT_BRAILLE='true' + HOSTNAME='obegransad' + IKEA_OBEGRANSAD='true' + MODE_ANIMATION='true' + MODE_ARROW='true' + MODE_ARTNET='true' + MODE_BINARYCLOCK='true' + MODE_BINARYEPOCH='true' + MODE_BLINDS='true' + MODE_BLINK='true' + MODE_BOLDCLOCK='true' + MODE_BREAKOUTCLOCK='true' + MODE_BRIGHT='true' + MODE_CIRCLE='true' + MODE_COUNTDOWN='true' + MODE_DISTRIBUTEDDISPLAYPROTOCOL='true' + MODE_DRAW='true' + MODE_E131='true' + MODE_EQUALIZER='true' + MODE_FIREWORK='true' + MODE_FLIES='true' + MODE_GAMEOFLIFE='true' + MODE_GAMEOFLIFECLOCK='true' + MODE_GLITTER='true' + MODE_GOOGLEWEATHER='true' + MODE_HOMEASSISTANTWEATHER='true' + MODE_HOMETHERMOMETER='true' + MODE_JAGGEDWAVEFORM='true' + MODE_LARGETICKINGCLOCK='true' + MODE_LEAFFALL='true' + MODE_LINES='true' + MODE_METABALLS='true' + MODE_NOISE='true' + MODE_OPENMETEO='true' + MODE_OPENWEATHER='true' + MODE_PINGPONG='true' + MODE_PINGPONGCLOCK='true' + MODE_PIXELSEQUENCE='true' + MODE_RAIN='true' + MODE_RING='true' + MODE_SCAN='true' + MODE_SMALLCLOCK='true' + MODE_SMALLTICKINGCLOCK='true' + MODE_SMOOTHWAVEFORM='true' + MODE_SNAKE='true' + MODE_SNAKECLOCK='true' + MODE_STARS='true' + MODE_TICKER='true' + MODE_WAVEFORM='true' + MODE_WORLDWEATHERONLINE='true' + MODE_WTTRIN='true' + MODE_YR='true' + NAME='Obegränsad' + OTA_KEY='redacted' + TIME_ZONE='Etc/Universal' + EOL + + cat <<'EOL' > firmware/include/config/secrets.h + #pragma once + #define FRAME_RATE 60 + #define GOOGLEWEATHER_KEY "redacted" + #define HOMEASSISTANT_ENTITY "weather.forecast_home" + #define HOMEASSISTANT_HOST "homeassistant.local" + #define HOMEASSISTANT_KEY "redacted" + #define HOMEASSISTANT_PORT 8123 + #define LATITUDE "0.000" + #define LOCATION "redacted" + #define LONGITUDE "0.000" + #define MQTT_HOST "mqtt.local" + #define MQTT_PORT 1883 + #define MQTT_USER "redacted" + #define MQTT_KEY "redacted" + #define OPENMETEO_KEY "redacted" + #define OPENWEATHER_KEY "redacted" + #define PIN_CS 1 + #define PIN_INT 2 + #define PIN_IR 3 + #define PIN_LDR 4 + #define PIN_MIC 5 + #define PIN_MOSI 6 + #define PIN_OE 7 + #define PIN_SCL 8 + #define PIN_SCLK 9 + #define PIN_SDA 10 + #define PIN_SW2 11 + #define RTC_DS3231 + #define TEMPERATURE_FAHRENHEIT true + #define WIFI_COUNTRY "01" + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + #define WORLDWEATHERONLINE_KEY "redacted" + EOL + + pio run -e ${{ matrix.environment }} diff --git a/.github/workflows/miscellaneous.yml b/.github/workflows/miscellaneous.yml new file mode 100644 index 00000000..c4fd03aa --- /dev/null +++ b/.github/workflows/miscellaneous.yml @@ -0,0 +1,225 @@ +name: Miscellaneous + +on: + merge_group: + types: + - checks_requested + + pull_request: + branches: + - main + + push: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + +jobs: + platformio: + name: PlatformIO version extract + runs-on: ubuntu-latest + outputs: + environments: ${{ steps.print.outputs.environments }} + version: ${{ steps.print.outputs.version }} + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: 3.13 + cache: pip + cache-dependency-path: .github/platformio/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: PlatformIO extract + id: print + run: echo "version=$(pio --version | awk '{print $NF}')" >> "$GITHUB_OUTPUT" + + animation-splitter: + name: Animation splitter + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - python-version: 3.11 + - python-version: 3.14 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: tools/pyproject.toml + + - name: Set up Frekvens tools + run: pip install tools/ + + - name: Animation splitter + run: | + cat < Animation.csv + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 + 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + EOL + + python -m frekvens.AnimationSplitter -i Animation.csv + + - name: File existence + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + fail: true + files: Animation-1.csv, Animation-2.csv + + home-thermometer-demo: + name: Home thermometer demo + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - python-version: 3.11 + - python-version: 3.14 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: tools/pyproject.toml + + - name: Set up Frekvens tools + run: pip install tools/ + + - name: Home thermometer demo + run: python -m frekvens.HomeThermometerDemo --host localhost --indoor=22 --outdoor=8 2>&1 | grep "httpx.ConnectError" + + x509_crt_bundle: + name: x509 certificate bundle + needs: platformio + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - python-version: 3.11 + - python-version: 3.13 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: | + .github/platformio/requirements.txt + scripts/requirements.txt + + - name: Set up PlatformIO + run: pip install -r .github/platformio/requirements.txt + + - name: Set up Cache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 + with: + key: platformio-cache-${{ runner.os }}-${{ runner.arch }}-${{ needs.platformio.outputs.version }}-${{ hashFiles('platformio.ini') }} + path: | + .platformio/.cache/downloads + .platformio/.cache/http + + - name: PlatformIO build + continue-on-error: true + run: | + cat < .env + HOSTNAME='frekvens' + IKEA_FREKVENS='true' + MODE_GOOGLEWEATHER='true' + MODE_OPENMETEO='true' + MODE_OPENWEATHER='true' + MODE_WORLDWEATHERONLINE='true' + MODE_WTTRIN='true' + MODE_YR='true' + NAME='Frekvens' + EOL + + cat < firmware/include/config/secrets.h + #pragma once + #define GOOGLEWEATHER_KEY "redacted" + #define LATITUDE "0.000" + #define LONGITUDE "0.000" + #define OPENWEATHER_KEY "redacted" + #define PIN_CS 1 + #define PIN_MOSI 2 + #define PIN_OE 3 + #define PIN_SCLK 4 + #define WIFI_KEY "redacted" + #define WIFI_SSID "redacted" + #define WORLDWEATHERONLINE_KEY "redacted" + EOL + + pio run -e esp32dev + + - name: File existence + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + fail: true + files: firmware/certs/bundle/ca_roots.pem, firmware/embed/x509_crt_bundle.bin + + - name: Set up ESP-IDF + run: | + git clone -b release/v5.5 --filter=blob:none --sparse https://github.com/espressif/esp-idf.git && \ + cd esp-idf && \ + git sparse-checkout add components/mbedtls/esp_crt_bundle + + - name: Certificate bundle + run: | + python esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py --i firmware/certs/bundle && \ + cmp x509_crt_bundle firmware/embed/x509_crt_bundle.bin diff --git a/.github/workflows/platformio.yml b/.github/workflows/platformio.yml new file mode 100644 index 00000000..ae64db39 --- /dev/null +++ b/.github/workflows/platformio.yml @@ -0,0 +1,24 @@ +name: PlatformIO + +on: + schedule: + - cron: '0 6 * * 1' + + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + name: Dependabot + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: PlatformIO dependabot + uses: peterus/platformio_dependabot@ee459e446a090c4894b1354a3b85bc064797fd2b # v1.2.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 2cc4bb36..79772889 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,8 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 + - name: Stale + uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 with: stale-issue-message: No recent activity has been detected on this issue. It's now marked as stale and may be closed soon if no further updates are made. days-before-issue-stale: 60 diff --git a/.github/workflows/stream.yml b/.github/workflows/stream.yml new file mode 100644 index 00000000..bf1ce9f3 --- /dev/null +++ b/.github/workflows/stream.yml @@ -0,0 +1,138 @@ +name: Stream + +on: + merge_group: + types: + - checks_requested + + pull_request: + branches: + - main + + push: + branches: + - main + + workflow_dispatch: + +permissions: + contents: read + +jobs: + animation: + name: Animation + runs-on: ubuntu-latest + + strategy: + matrix: + module: + - ArtNetStreamer + - DistributedDisplayProtocolStreamer + - E131Streamer + toolchain: + - python-version: 3.11 + - python-version: 3.14 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: tools/pyproject.toml + + - name: Set up Frekvens tools + run: pip install tools/ + + - name: Frekvens stream + run: | + cat < Animation.csv + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 + 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + EOL + + python -m frekvens.${{ matrix.module }} --host localhost -i Animation.csv 2>&1 | grep "httpx.ConnectError" + + drawing: + name: Drawing + runs-on: ubuntu-latest + + strategy: + matrix: + module: + - ArtNetStreamer + - DistributedDisplayProtocolStreamer + - E131Streamer + toolchain: + - python-version: 3.11 + - python-version: 3.14 + + steps: + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.toolchain.python-version }} + cache: pip + cache-dependency-path: tools/pyproject.toml + + - name: Set up Frekvens tools + run: pip install tools/ + + - name: Frekvens stream + run: | + cat < Drawing.csv + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 + 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 + 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 + 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + EOL + + python -m frekvens.${{ matrix.module }} --host localhost -i Drawing.csv 2>&1 | grep "httpx.ConnectError" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 245bccf8..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,547 +0,0 @@ -name: Tests - -on: - merge_group: - types: - - checks_requested - - pull_request: - branches: - - main - - push: - branches: - - main - - workflow_dispatch: - -permissions: - contents: read - -jobs: - animation-splitter: - name: Animation splitter - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install tools/ - - - run: | - cat < Animation.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: python -m frekvens.AnimationSplitter --input Animation.csv - - - uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 - with: - fail: true - files: Animation-1.csv, Animation-2.csv - - art-net-streamer: - name: Art-Net streamer - needs: distributed-display-protocol-streamer - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install tools/ - - - run: | - cat < Animation.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: | - set +e - OUTPUT=$(python -m frekvens.ArtNetStreamer --host localhost --input Animation.csv 2>&1) - STATUS=$? - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q "httpx.ConnectError"; then - echo "Expected ConnectError occurred." - exit 0 - fi - echo "Unexpected error or no error." - exit $STATUS - - - run: | - cat < Drawing.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: | - set +e - OUTPUT=$(python -m frekvens.ArtNetStreamer --host localhost --input Drawing.csv 2>&1) - STATUS=$? - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q "httpx.ConnectError"; then - echo "Expected ConnectError occurred." - exit 0 - fi - echo "Unexpected error or no error." - exit $STATUS - - distributed-display-protocol-streamer: - name: Distributed Display Protocol streamer - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install tools/ - - - run: | - cat < Animation.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: | - set +e - OUTPUT=$(python -m frekvens.DistributedDisplayProtocolStreamer --host localhost --input Animation.csv 2>&1) - STATUS=$? - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q "httpx.ConnectError"; then - echo "Expected ConnectError occurred." - exit 0 - fi - echo "Unexpected error or no error." - exit $STATUS - - - run: | - cat < Drawing.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: | - set +e - OUTPUT=$(python -m frekvens.DistributedDisplayProtocolStreamer --host localhost --input Drawing.csv 2>&1) - STATUS=$? - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q "httpx.ConnectError"; then - echo "Expected ConnectError occurred." - exit 0 - fi - echo "Unexpected error or no error." - exit $STATUS - - e131-streamer: - name: E1.31 streamer - needs: art-net-streamer - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install tools/ - - - run: | - cat < Animation.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: | - set +e - OUTPUT=$(python -m frekvens.E131Streamer --host localhost --input Animation.csv 2>&1) - STATUS=$? - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q "httpx.ConnectError"; then - echo "Expected ConnectError occurred." - exit 0 - fi - echo "Unexpected error or no error." - exit $STATUS - - - run: | - cat < Drawing.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: | - set +e - OUTPUT=$(python -m frekvens.E131Streamer --host localhost --input Drawing.csv 2>&1) - STATUS=$? - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q "httpx.ConnectError"; then - echo "Expected ConnectError occurred." - exit 0 - fi - echo "Unexpected error or no error." - exit $STATUS - - font-generator: - name: Font generator - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install -r extra/Python/requirements.txt - - - run: python extra/Python/FontGenerator.py --input DejaVuSans --size 8 - - - uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 - with: - fail: true - files: DejaVuSansFont.cpp, DejaVuSansFont.h - - home-thermometer-demo: - name: Home thermometer demo - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install tools/ - - - run: | - set +e - OUTPUT=$(python -m frekvens.HomeThermometerDemo --host localhost --indoor=22 --outdoor=8 2>&1) - STATUS=$? - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q "httpx.ConnectError"; then - echo "Expected ConnectError occurred." - exit 0 - fi - echo "Unexpected error or no error." - exit $STATUS - - mode-generator-animation: - name: Mode generator - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: | - cat < Animation.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: python extra/Python/ModeGenerator.py --input Animation.csv - - - uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 - with: - fail: true - files: AnimationMode.cpp, AnimationMode.h - - - run: | - cat < Drawing.csv - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,255,0,0,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,0,0,0,0,0,0,255,0,0,0 - 0,0,0,255,255,255,0,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,0,0,0,0 - 0,0,0,255,0,0,255,0,0,255,0,0,255,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,255,255,0,0,0,0,255,255,0,0,0,0 - 0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - EOL - - - run: python extra/Python/ModeGenerator.py --input Drawing.csv - - - uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 - with: - fail: true - files: DrawingMode.cpp, DrawingMode.h - - x509_crt_bundle: - name: x509 certificate bundle - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: 3.13 - - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - - run: pip install -r .github/platformio/requirements.txt - - - run: | - cat < .env - HOSTNAME='frekvens' - IKEA_FREKVENS='true' - MODE_GOOGLEWEATHER='true' - MODE_OPENMETEO='true' - MODE_OPENWEATHER='true' - MODE_WORLDWEATHERONLINE='true' - MODE_WTTRIN='true' - MODE_YR='true' - NAME='Frekvens' - EOL - - - run: | - cat < firmware/include/config/secrets.h - #pragma once - #define GOOGLEWEATHER_KEY "redacted" - #define LATITUDE "0.000" - #define LONGITUDE "0.000" - #define OPENWEATHER_KEY "redacted" - #define PIN_CS 1 - #define PIN_MOSI 2 - #define PIN_OE 3 - #define PIN_SCLK 4 - #define WIFI_KEY "redacted" - #define WIFI_SSID "redacted" - #define WORLDWEATHERONLINE_KEY "redacted" - EOL - - - run: pio run --environment esp32dev - continue-on-error: true - - - uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 - with: - fail: true - files: firmware/certs/bundle/ca_roots.pem, firmware/embed/x509_crt_bundle.bin - - - run: | - git clone --branch release/v5.5 --filter=blob:none --sparse https://github.com/espressif/esp-idf.git - cd esp-idf - git sparse-checkout add components/mbedtls/esp_crt_bundle - - - run: | - python esp-idf/components/mbedtls/esp_crt_bundle/gen_crt_bundle.py --input firmware/certs/bundle - if cmp x509_crt_bundle firmware/embed/x509_crt_bundle.bin; then - echo "Root CA bundles identical." - exit 0 - fi - echo "Unexpected error or file mismatch." - exit 1 diff --git a/.github/workflows/wiki.yml b/.github/workflows/wiki.yml index 410e27e0..c20b6c4e 100644 --- a/.github/workflows/wiki.yml +++ b/.github/workflows/wiki.yml @@ -15,8 +15,10 @@ jobs: wiki: runs-on: ubuntu-latest steps: - - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + - name: Set up Frekvens + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 - - uses: Andrew-Chen-Wang/github-wiki-action@6448478bd55f1f3f752c93af8ac03207eccc3213 # v5.0.3 + - name: Wiki + uses: Andrew-Chen-Wang/github-wiki-action@6448478bd55f1f3f752c93af8ac03207eccc3213 # v5.0.3 with: path: docs/wiki