ESP8266 MAX7219 LED 8x8 Matrix MQTT Clock. Works with MQTT JSON and Home Assistant
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4e0ab72 Sep 21, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github 🔨 add probot settings Sep 21, 2018
.vscode Initial commit May 12, 2018
lib Initial commit May 12, 2018
src Add button support May 31, 2018
.clang-format Initial commit May 12, 2018
.gitignore Initial commit May 12, 2018
.gitlab-ci.yml Gitlab CI Integration Jun 8, 2018
.travis.yml Initial commit May 12, 2018
LICENSE.md 🔨 add probot settings Sep 21, 2018
README.md Change switch to json light May 28, 2018
platformio.ini Fix deprecated option May 28, 2018

README.md

ESP8266 LED Matrix MQTT Sign Build Status

ESP8266 LED Matrix MQTT Sign

Example Hardware Setup

Software Setup

  • Using Atom or VS Code, install Platform IO

  • Once setup, install the esp8266 embedded platform

  • Build the project (Ctrl+Alt+B) and check for any errors

    If the build produces an error referencing dependencies, You will need to manually install these libraries:

Due to an issue with defining the max MQTT packet size in the main file, you will have to manually increase the size in the following step. (If someone knows a workaround for this, please let me know or make a pull request)

  • Inside the created hidden directory, find .piolibdeps\PubSubClient\PubSubClient_ID89\src\PubSubClient.h and change the line that states something like #define MQTT_MAX_PACKET_SIZE 128 to #define MQTT_MAX_PACKET_SIZE 512
  • Upload to your board of choice (Ctrl+Alt+U). This project was created specifically for the NodeMCU but can be configured to work with another WiFi board with some tinkering.

Example Home Assistant Configuration

light:
  - platform: mqtt_json
    name: "Matrix Clock"
    state_topic: "display/matrix001"
    command_topic: "display/matrix001/set"
    qos: 1

input_number:
  matrix_clock_speed:
    name: 'Matrix Clock Scroll Speed'
    mode: slider
    initial: 40
    min: 10
    max: 100
    step: 10

automation:
  - action:
      - alias: Set Matrix Clock Speed
        service: mqtt.publish
        data_template:
          topic: display/matrix001/set
          payload: '{"speed":{{ trigger.to_state.state | int }}}'
    alias: Matrix Clock Speed
    trigger:
      - platform: state
        entity_id: input_number.matrix_clock_speed

Sample MQTT Payload

Switch on with speed of 40, BST and a HASS temperature sensor

{
   "state": "ON",
   "speed": 40,
   "timeOffset": 1,
   "states": [
      {
         "state": "sensor.dht22_01_temperature",
         "measurement": "C"
      }
   ]
}

Switch Off

{
   "state": "OFF"
}