Skip to content
OBEGRÄNSAD LED

Messages

Messages scroll text, and optionally a small bar graph, across the display. They interrupt the active plugin, which continues when the message is done.

How messages are shown

  • Messages are queued on the device. Each one is shown once per minute, so the device needs network time (NTP).
  • While messages are queued, a small blinking pixel in the top left corner tells you that more is coming.
  • repeat controls how often a message comes back. It is shown once more than the value you set: repeat=0 shows it once, repeat=2 three times. repeat=-1 repeats it until you remove it.
  • A message with an id replaces an earlier message with the same id. Use this to update a value instead of queueing it again.

Parameters

ParameterTypeDefaultDescription
textstringText to scroll.
repeatint0Extra repetitions, -1 for infinite.
idint0Identifier for replacing and removing.
delayint50Scroll delay in ms. Values ≤ 0 become 50.
graphint[]Values for a bar graph shown after the text.
minyint0Lower bound of the graph.
maxyint15Upper bound of the graph. Must be ≥ miny. Over HTTP, 0 also means 15.

Over HTTP

# simple text
curl "http://<device-ip>/api/message?text=Hello"
 
# text with a graph, repeated 5 more times, with id 1
curl "http://<device-ip>/api/message?text=CO2&graph=4,6,8,12,9,7&miny=0&maxy=15&repeat=5&id=1"
 
# remove message 1
curl "http://<device-ip>/api/removemessage?id=1"

graph is a comma separated list. Invalid values or maxy lower than miny return 422 Unprocessable Entity.

Over MQTT

Publish plain text or a JSON object to <base>/message/set:

mosquitto_pub -h <broker> -t obegraensad/a1b2c3/message/set -m "Hello"
 
mosquitto_pub -h <broker> -t obegraensad/a1b2c3/message/set \
  -m '{"text":"Hi","repeat":2,"id":1,"delay":50,"graph":[1,5,9],"miny":0,"maxy":15}'
 
mosquitto_pub -h <broker> -t obegraensad/a1b2c3/message/remove -m "1"

In Home Assistant, the Message text entity sends plain text. See Home Assistant automations for an example with a graph.