Skip to content

Commit

Permalink
Add MQTT switch support including HomeAssistant autodiscovery
Browse files Browse the repository at this point in the history
  • Loading branch information
DoomHammer committed Jun 6, 2024
1 parent 0958d2b commit f2fc630
Show file tree
Hide file tree
Showing 6 changed files with 365 additions and 100 deletions.
12 changes: 11 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
use_nix
#!/bin/bash

# This is a better (faster) alternative to the built-in Nix support
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi

# We only want to use Nix platformio if we aren't already in a platformio IDE
if [ "$TERM_PROGRAM" != "vscode" ]; then
use flake
fi
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05-small";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
};
in
with pkgs;
{
devShells.default = mkShell {
buildInputs = [
platformio
];
};
}
);
}
16 changes: 12 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
[env]
platform = espressif32@^5
framework = arduino
platform = espressif32@^6.7.0
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.17
monitor_speed = 115200
framework = arduino
lib_deps =
https://github.com/plapointe6/EspMQTTClient @ ^1.13.2
knolleary/PubSubClient@^2.8
bblanchon/ArduinoJson @ ^6.19.4
https://github.com/DoomHammer/Adafruit-GFX-Library#enable-utf-8
https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-DMA @ ^3.0.9
https://gitlab.com/doomhammerng/wifi-manager#rpi-picow
ropg/ezTime@^0.8.3
ayushsharma82/ElegantOTA@^3.1.1
build_flags =
-DELEGANTOTA_USE_ASYNC_WEBSERVER

[env:esp32]
board = esp32dev
board_build.filesystem = littlefs

[env:mhetesp32minikit]
board = mhetesp32minikit
board = mhetesp32minikit
board_build.filesystem = littlefs
Loading

0 comments on commit f2fc630

Please sign in to comment.