TM1637 Display on NR

Anyone did something with the cheap TM1637Display display?
I can find arduino libs but nothing working for linux/node red
would love to use it without a arduino if possible

thanks!

Any progress on this? Old thread?

I wrote my own custom node to drive the 4 cell 7 segment display driven by a TM1637 controlller. I plan to publish it on github in due course.

1 Like

I'm currently using python to drive my TM1637-based display. Did you publish your Node RED node?

Actually it is still on my todo list to finish it, I was waiting until had more experience writing in JavaScript before I called it done. It is definitely not forgotten just not the next item. The python solution works well, and after I added a bit of MQTT support, pretty much painless to use with NR. I am finding that smaller hardware controllers really don't handle NR well. My Pi model 1, 2 and Pi Zeros tend to get bogged down running full NR. Likely because I have some rather demanding flows running. Pi 3 and of course Pi devices make using NR simplistic, but I don't have many of the newer Pi 4s and Pi 3s.

To solve this, I wrote a Node Red Listener service in python, that basically responds to MQTT requests. I use a configuration file to handle to details of what each request needs... such as calling a specific callback function for the given MQTT requet for example. It is a bit like how Tasmota handles smart devices, I just set up the entry in the configuration file, write the specific callback, and the NR listener handles that MQTT request from that point on.

Going this route has two benefits, I can run it on resource limited devices, such as the older Pi devices, where NR is a bit top heavy for said device. And I am reusing the rather extensive existing python scripting I already have for various sensors, controllers, etc. As much as I love doing things in straight NR, if you will, at times it makes sense to drive my existing python code rather than recreate the wheel in NR.

Yes. You are right. By now I put together a Python script with MQTT support based on this module. It works nicely and I can switch brightness and display mode via MQTT.

1 Like

The real trick is driving the i2c (or SPI, whatever your device uses) to get the timing right. In my case, the issue is that NR does not consistently send the data with the correct timing 100% of the time when I drive the IC by NR is as raw a method as possible. This is not a NR issue, if is a multiple variable factor issue, number of flows, make and model of controller, i.e. Pi, etc.

Using python works ok and seems consistent, but a C application would be even better. I have even considered using an ESP8266 or Arduino to actually drive the display, thus the NR communication variance (timing) is isolated from the direct data transmit to the TM1637 IC.