Skip to content
Stephan Mühl edited this page Sep 7, 2022 · 24 revisions

Receive Buttonstates

SmartPusher publish the button states via MQTT to following topics:
[prefix]/button[x]/click
[prefix]/button[x]/double_click
[prefix]/button[x]/long_click
[prefix]/button[x]/push (only in pushmode)

while [prefix] is "SmartPusher" by default and [x] represents the number of the pressed button (1-8)

Control LEDs

If you set the LED Mode to extern youre able to control the LED state of each button by yourself. Topic
[prefix]/button[x]/state
Payload 0 = Off
1 = On
2 = Breathe

Brightness

You can set the brightness of your smartpusher. This will control the OLED and button leds.
Topic
[prefix]/brightness
Payload Number from 0-255. 0 will turn off the oled and button leds.

Render Text

Youre able to send a text to the OLED display to show a response from your Smarthome
Topic
[prefix]/message
Payload
The text you want to render

The Message will scroll vertically if it not fit

Render Image

You can render your own image on the SmartPusher OLED

create a 128x64 image in your favorite photo editor like Photoshop, GIMP, Paint etc. and save it as a .png file. e.g. test.png

Download the png2bin converter and copy your png file to the same directory. open a terminal and use it like
png2bin [source-PNG] [destination-bin]
e.g.
png2bin test.png test.bin

open a webbrowser and navigate to [SmartPusher-IP]/files
Then upload your .bin file to the SmartPusher flash memory

Without a reboot you can show the image by publish to the image topic.
Topic
[prefix]/image
Payload
name of the bin file without extension (e.g. test)

Clone this wiki locally