Meaning of channel MQTT topic component

My climate module generates the following MQTT topics:

2020-10-27 09:50:56.65 node/climate-monitor:1/hygrometer/0:4/relative-humidity 56.7
2020-10-27 09:53:31.46 node/climate-monitor:1/lux-meter/0:0/illuminance 42.1
2020-10-27 09:56:55.53 node/climate-monitor:1/thermometer/0:0/temperature 17.18
2020-10-27 10:00:13.42 node/climate-monitor:1/barometer/0:0/pressure 95160.25
2020-10-27 10:36:04.44 node/climate-monitor:1/battery/-/voltage 3.19

I was wondering: what’s the meaning of the channel component? The value does not seem to be related to the hardware architecture, since the barometer and lux sensors get the same channel, but they are different I2C devices.

thanks
-Jan

Hello,
the first number is the i2c interface can be 0 or 1,
but the second number indicates whether it is the default or alternate address, plus which version of the sensor it is.

Its also here for historic/compatibility reasons. Today we would design that bit differently. Where the value doesn’t come from I2C we use the - symbol.
Default and alternate addresses comes from this table https://developers.hardwario.com/hardware/i-c-address-space

Get it now. Thank you both!

1 Like