tca9548 i2c multiplexer

184 views
Skip to first unread message

Mark Traverse

unread,
Apr 6, 2021, 6:08:59 PM4/6/21
to TasmotaUsers
Has anyone worked out how to use the tca9548 i2c multiplexer with tazmo?
It presents on its own i2c address and allows switching clock and data across 8 separate i2c buses. Simply send a 'select bus' command to its i2c address before sending data to the devices i2c address.
This is useful where you need to switch across multiple devices with the same i2c address such as OLED displays.
What I want to do is have a line of say 6 OLED displays that I can select before transmitting display data. I have done this successfully in python on rpi before but a tasmota version of this would be soo cool.
I cant find any device support in tasmota so my question is...is there any way to send data to an i2caddress in a generic way, say using a rule or other tasmota command?

sfromis

unread,
Apr 6, 2021, 7:01:47 PM4/6/21
to TasmotaUsers
I2C multiplexers are not supported by Tasmota. One reason for this is that devices need to be detected at boot time, meaning that some scheme you may want to switch to another bus would be broken from the start. Another reason is that many drivers keep track of config/state data per device, which would break in case of the bus being switched. 

In principle, it would of course be possible to significantly change Tasmota to actively support cycling through many busses, and also support multiple of the same device on the same address, but that's not a likely thing to be done. 

If you want to talk natively to I2C devices from Tasmota, the new feature of the Berry scripting language for Tasmota on ESP32 does support coding device drivers in this easy-to-access language. I'm just playing with coding a device driver for an otherwise unsupported sensor. Nothing would stop you from using this to control a multiplexer, but do not just expect other drivers to work seamlessly with that. With Tasmota32, you can also to some extent have two I2C busses active on dedicated gpio pins, including support from Berry.


Reply all
Reply to author
Forward
0 new messages