Ulanzi TC001 + Awtrix2 + Home Assistant

Recently, I’ve seen the Ulanzi TC001 pop up on Mastodon with a number of tinkerers, getting things like MQTT and Awtrix set up with it. I’m big on making things do more than they were originally intended to, so I picked one up to play with and it’s been really solid.

I’ve managed to get Node-Red flows from Home Assistant to push POSTs to an Awtrix2 server running in Docker. I can use it for live notifications with custom icons, etc. Really handy for JIT info, as the thing is low power and the pixels are very clear with sharp colors.

At $50, it’s 25% the price of the LaMetric Time. There are some drawbacks with the Awtrix Server timeclock slowing down and getting as far as 2 hrs off [oh well, it entertains me], as well animations stop at random points some time.

#Example Node-Red Flow Export:

[{"id":"2fe50c459578291a","type":"group","z":"871233b38722741b","name":"pixel clock","style":{"label":true},"nodes":["c75493398725b2ee","5bb26b64c042bf18","dd49611c786bb738","e7425f11d56d7117","66e1a537e469dc43","ab9baa24ef2b976e"],"x":614,"y":2999,"w":792,"h":162},{"id":"c75493398725b2ee","type":"ical-upcoming","z":"871233b38722741b","g":"2fe50c459578291a","confignode":"e329b75d1ab066c3","timeout":"","timeoutUnits":"hours","cron":"0 6 * * *","name":"gcal 10d","offsettype":"","offset":"","offsetUnitstype":"","offsetUnits":"","eventtypes":"events","eventtypestype":"eventtypes","calendar":"","calendartype":"str","triggertype":"trigger","trigger":"always","timezone":"America/Los_Angeles","timezonetype":"timezone","dateformat":"{ \"timeStyle\": \"short\", \"dateStyle\": \"short\" }","dateformattype":"json","language":"en","languagetype":"language","filterProperty":"summary","filterPropertytype":"filterProperty","filterOperator":"between","filterOperatortype":"filterOperator","filtertype":"str","filter2type":"str","filter2":"","filter":"","checkall":false,"endpreview":"","endpreviewUnits":"","previewtype":"num","preview":"10","previewUnitstype":"previewUnits","previewUnits":"days","pastviewtype":"num","pastview":"0","pastviewUnits":"days","pastviewUnitstype":"pastviewUnits","x":780,"y":3120,"wires":[["66e1a537e469dc43"]]},{"id":"5bb26b64c042bf18","type":"debug","z":"871233b38722741b","g":"2fe50c459578291a","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"out","targetType":"msg","statusVal":"","statusType":"auto","x":1090,"y":3060,"wires":[]},{"id":"dd49611c786bb738","type":"inject","z":"871233b38722741b","g":"2fe50c459578291a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":720,"y":3040,"wires":[["c75493398725b2ee"]]},{"id":"e7425f11d56d7117","type":"http request","z":"871233b38722741b","g":"2fe50c459578291a","name":"customapp","method":"use","ret":"txt","paytoqs":"body","url":"http://AWTRIX_IP:7000/api/v3/customapp","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-Type","valueType":"other","valueValue":"application/json"}],"credentials":{"user":"","password":""},"x":1110,"y":3120,"wires":[["ab9baa24ef2b976e"]]},{"id":"66e1a537e469dc43","type":"function","z":"871233b38722741b","g":"2fe50c459578291a","name":"id: 1","func":"var summaries_arr = [];\nvar summaries_str = \"\";\nif (msg.payload == \"\") {\n    summaries_str = \"Time to find something to keep you busy ;P\";\n} else {\n    for (const cal_obj of msg.payload) {\n        var date_str = cal_obj.date.substring(0, cal_obj.date.indexOf(\",\"));\n        date_str = date_str.substring(0, date_str.lastIndexOf(\"/23\"));\n        let event = [date_str, cal_obj.summary];\n        summaries_arr.push(event);\n    }\n    const out_arr = summaries_arr.reduce((acc, [key, value]) => {\n        acc[key] = acc[key] ? [...acc[key], value] : [value];\n        return acc;\n    }, {});\n    summaries_arr = [];\n    for (const [key, value] of Object.entries(out_arr)) {\n        summaries_arr.push(key + \"] \" + value.toString().replace(\",\",\", \"));\n    }\n    summaries_str = summaries_arr.join(\" || \");\n}\n\nmsg = {};\nmsg.headers = {};\nmsg.out = summaries_str;\nmsg.headers = {};\nmsg.method = \"POST\";\nmsg.url = \"http://AWTRIX_IP:7000/api/v3/customapp\";\nmsg.headers[\"content-type\"] = \"application/json\";\nmsg.payload = {\n    \"ID\": 1,\n    \"text\": summaries_str,\n    \"color\": [255, 255, 255],\n    \"icon\": 1740\n};\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":3120,"wires":[["e7425f11d56d7117","5bb26b64c042bf18"]]},{"id":"ab9baa24ef2b976e","type":"debug","z":"871233b38722741b","g":"2fe50c459578291a","name":"statusCode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"statusCode","targetType":"msg","statusVal":"","statusType":"auto","x":1290,"y":3060,"wires":[]},{"id":"e329b75d1ab066c3","type":"ical-config","url":"","caldav":"","caltype":"ical","name":"","replacedates":false,"usecache":false,"username":"","password":"","calendar":"","pastWeeks":"0","futureWeeks":"4","credentials":{}}]
Mike Vinci
Mike Vinci
Senior Platform Engineer (CI/CD)

My specialization is R&D for CI/CD platforms and Cloud Infrastructure support.