DIY 8x32 RGB status display: "Awtrix"

Salut Yves,
thats a limitation from the awtrix-developer, you can drive two or more displays but all with the same content. To display different content on each display you need one awtrix-server per display. This is mainly because the “brain” is in the server. german forum

There is a similar aproach named pixelt there it is easier to drive multiple independent displays.

I only made the “bridge” between HA and the display-software. So i can’t change the overall design.

If you are french, i am desperatly looking forward to visit france again. Corona sucks.

Thanks for making the add-on :+1:
Just installed it and now working on getting some nice stuff on the display. Works great so far.

Can you share the python script you mentioned? The link is not going to the correct forum page anymore.

Edit: I see your notify component on your Github page → awtrix_component/custom_components/awtrix at master · lubeda/awtrix_component · GitHub
Will have a look at that. Guess that replaces the earlier mentioned script?

Very cool. I have a separate pi running at the moment. Using your add-on is a cool feature. I try it today

Are you still using it? Looks like the forum has certificate problems for me. Can not access it.

Is there any documentation to use your add-on and component?

Well, i like awtrix very much for its functionality. But the software design is a little to much hobby-style. There a some things implemented “funny”. But i use it very much.

I run this server https://github.com/lubeda/repository/tree/master/awtrix-beta-server and to show data from HA i use this script (python_scripts/awtrix_notify.py):

if work.get("repeat",0) == 0 :
   work["repeat"]=3

if work.get("name","") == "" :
   work["name"]="homeassistant"

if work.get("moveIcon","") == "" :
   work["moveIcon"]=True

work["repeatIcon"]=True
hass.services.call('mqtt', 'publish', { "topic": "awtrix/notify", "payload":str(work) }, False)

This is a sample action in an automation:

data:
  icon: 374
  force: true
  name: phone_ring
  data: >-
    {{
    states.sensor.fritz_box_6490_cable_lgi_call_monitor_phone.attributes.from_name
    }} ({{
    states.sensor.fritz_box_6490_cable_lgi_call_monitor_phone.attributes.from
    }})
service: python_script.awtrix_notify

Thanks for sharing the script.
Is awtrix-beta-server from your repository the preferred one to use? Currently using awtrix-server.

I have added this under light: to turn the Awtrix on and off. Would like to add the brightness as well but for that the MQTT topics of Awtrix are working a bit strange, so I will leave that for now.

- platform: mqtt
  schema: template
  name: Awtrix Board
  unique_id: e1dc4744-160c-433c-91fe-ff514b7b9276
  command_topic: "awtrix/basics"
  state_topic: "awtrix/PowerState"
  command_on_template: '{"power": true}'
  command_off_template: '{"power": false}'
  state_template: "{{ 'on' if value == 'true' else 'off' }}"
  retain: true

I tried to install the beta but it is not: “This add-on is not compatible with the processor of your device or the operating system you have installed on your device.”

Which one do I need?

Yes, i only use the beta version and my python_script will only work with the beta server.

I assume you are not using an x86 as plattform.
I “only” have a PC to test. There were some issues with the openjdk11-jre.apk on a raspberry so i had to disable the raspberry platform for this addon.

Sorry, i can’t see a solution for your need.

Ok thank you

For those of us, who own two Awtrixes and want to feed them independent:

You can take a look at my python script Github .

You need two awtrix hosts and have to user two different mqtt topics to differentiate the both displays.

I have built 2 AWTRIX, one big size and one midi. Here are my findings so far:

  1. You have to use separate AWTRIX host for each matrix you have. In theory, you can connect 2 awtrix matrixes to a single host, it sorta works. But if you have LDR on each, then the brightness changes every time an update comes from the matrix; so the brightness jumps… So what i did is to use docker instance of the host to another machine. I haven’t tested to use more than one docker container on the same host; you have to change the ports. You can change the port 7000 but as i see it also uses 7001 and a UDP port; so basically i haven’t tried it yet. I would be mnore than happy id someone can share their findings about this.

  2. You can use 2 different methods of information to AWTRIX:
    a. Instant info: REST or MQTT command to set for instant feedback; like brightness, on/off, instant notification etc. You can find this info on AWTRIX api pages. Just a simple example on mqtt:

  - data_template:
      topic: awtrix_big/basics 
      payload: "{\"power\": false}"
    service: mqtt.publish

The problem with this is that you have to send info every time; even if the info doesn’t change, otherwise the info will show up only once.

b. Using customapp for permanent info: Here you have to install “Customapp” from the AWTRIX appstore. When you go to “My Apps” page on AWTRIX web page and press the “Sort apps” icon, you can see the ID number of the customapp. If you need to send more than one type of info; you can “Clone” the customapp and have more than one instance. Please note that each clone will have a different ID. Make note of these IDs and use it to send info according to the example below:

- alias: AWTRIX Temperature
  description: Send Outside Temperature to Matrix
  trigger:
  - entity_id: sensor.calisma_odasi_sensor
    platform: state
  condition: 
    - condition: template
      value_template: "{{ (trigger.from_state.state | float - trigger.to_state.state | float) | abs >= 0.1 }} "
  action:
  - data_template:
      topic: awtrix_big/customapp 
      payload: "{\"ID\": 2, \"text\": \"{{ states(\"sensor.calisma_odasi_sensor\")}}\", \"icon\":233}"
    service: mqtt.publish

You can update and send the changed value anytime. But the difference of using customapp instead of mqtt or restful notification is that, the info you send will remain to show in app cycles. You can still use “repeat” but it still is not very efficient.

So in summary, if i use config, power, basic info and one time notifications (like doorbell etc) i use mqtt/restful message, but if the notifşcation is permanent like air temperature or any other useful information to be existing in the app loop, i use customapp.

1 Like

The awtrix project is still useable but the maintainer changed a lot on his webpage, so some links to his pages does not work.

For this and other reasons i started an esphome based display. Which is working for me (i use my old awtrix hardware with it!!)

Here is the link to more informations about the display i use now.

1 Like

Hi ho,
I’m not able to get this working. I hope someone of you can help here.
I run the standard awtrix-server (on raspy) with 3 customapps. The publishing works in principle using my FHEM automation.
Here in HA I prepared the following automation:

- id: '1666509988278'
  alias: MQTT Publish Pegel Regenspeicher
  description: ''
  trigger:
  - platform: state
    entity_id:
    - sensor.pegel_regenspeicher_2
  condition:
  - condition: template
    value_template: '"{{ (trigger.from_state.state | float - trigger.to_state.state
      | float) | abs >= 0.1 }} "'
  action:
  - data_template:
      topic: awtrix/customapp
      payload: "{\"ID\": 5, \"text\": Pegel \"{{ states(\"sensor.pegel_regenspeicher_2\")}}\" cm, \"icon\":420}"
    service: mqtt.publish

In AWTRIX Server I see the following error message:

 -->  18:32:14      MQTT-Client: Error while parsing JSON, is it a valid JSON? Received Message: 
{"ID": 5, "text": Pott "15" C, "icon":233}

Any idea how to format the “payload”?

Thanks in advance!
//Erik

The " needs to be the first and the last character of a text

Try this:

payload: "{\"ID\": 5, \"text\": \"Pegel {{ states(\"sensor.pegel_regenspeicher_2\")}} cm\", \"icon\":420}"

By the way, I don’t use the awtrix software anymore, take a look here: ESPHOMEMATRIX

It integrates more easy with home assistant.

Good Morning,
this don’t changes the result unfortunately:

- id: '1666509988278'
  alias: MQTT Publish Pegel Regenspeicher
  description: ''
  trigger:
  - platform: state
    entity_id:
    - sensor.pegel_regenspeicher_2
  condition:
  - condition: template
    value_template: '"{{ (trigger.from_state.state | float - trigger.to_state.state
      | float) | abs >= 0.1 }} "'
  action:
  - data_template:
      topic: awtrix/customapp
      payload: "{\"ID\": 5, \"text\": \"Pegel {{ states(\"sensor.pegel_regenspeicher_2\")}} cm\", \"icon\":420}"
    service: mqtt.publish

error message in AWTRIX remains the same ;-(

 -->  06:43:49      MQTT-Client: Error while parsing JSON, is it a valid JSON? Received Message: 
{"ID": 5, "text": Pegel "120" cm, "icon":420}

I changed “data_template” to “data” because I read "data_templated is deprecated.
This didn’t helped too…

Is there any way to force HA to format this as JSON?

Best regards
Erik

There is still a problem with the escaped “Anführungszeichen”.
A valid json would look like this: {“ID”: 5, “text”: “Pegel 120 cm”, “icon”:420}

You have to test your template in the developer tools template-section until it works.

my next guess is:

{"ID": 5, "text": "Pegel {{ states("sensor.pegel_regenspeicher_2")}} cm", "icon":420}

But i don`t know…

Hi Lubeda,
I finally managed it. Try and error with the awtrix-server :wink:
Here is the config which works and can be copied to automations.yaml.

  id: xxxxxxxxxx
  alias: MQTT Publish Pegel Zisterne
  description: ''
  trigger:
  - platform: state
    entity_id:
    - sensor.pegel_zisterne_3
  condition:
  - condition: template
    value_template: 'value_template: "{{ (trigger.from_state.state | float - trigger.to_state.state
      | float) | abs >= 0.1 }} "'
  action:
  - data:
      topic: awtrix/customapp
      payload: '{"id":2, "data":"Pegel Zisterne {{ states("sensor.pegel_zisterne_3")}}
        cm", "icon":1238}'
    service: mqtt.publish
  mode: single

Thanks for the tipp with the template section at developer tools - that’s what I didn’t know.
Best regards
Erik

Hi, thanks for posting this info. It’s been a challenge finding documentation on CustomApps. I totally missed the fact that we have to download an accessory install (“Customapp”) I’m going to check that out now. I’m currently trying to figure out what the CUSTOMAPPS folder is for and what exact settings can be sent to custom apps vs all apps through the /settings topic. How /where did you learn about about all this? I’m impressed! I can’t find this info on GitHub or the new Awtrix 3 page. lol

Hey @mames13,

You can find the details of AWTRIX 2 on this page. However, the new AWTRIX 3 is much easier and i am also using this one now. Also, for AWTRIX 3, you do not need a server component or any other accessory install like customapp anymore…