I connect a MLX90614 Sensor but it shows only -999 degree object temp but for the ambient temp it shows the right temp.
I tried serveral sensors and serveral node mcu boards but the issue is the same. I compiled the 6.6 version and the new 6.7 release.
FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED
Backlog Template; Module; GPIO:13:53:30 RSL: empfangenes topic /Backlog, Datengr枚脽e 22, Daten Template; Module; GPIO
13:53:30 RSL: Gruppe 0, Index 1, Befehl BACKLOG, Daten Template; Module; GPIO
13:53:30 SRC: Backlog
13:53:30 RSL: empfangenes topic /Template, Datengr枚脽e 0, Daten
13:53:30 RSL: Gruppe 0, Index 1, Befehl TEMPLATE, Daten
13:53:30 MQT: stat/nodemcu_v2/RESULT = {"NAME":"Generic","GPIO":[255,255,255,255,255,255,255,255,255,255,255,255,255],"FLAG":15,"BASE":18}
13:53:31 SRC: Backlog
13:53:31 RSL: empfangenes topic /Module, Datengr枚脽e 0, Daten
13:53:31 RSL: Gruppe 0, Index 1, Befehl MODULE, Daten
13:53:31 MQT: stat/nodemcu_v2/RESULT = {"Module":"18 (Generic)"}
13:53:31 SRC: Backlog
13:53:31 RSL: empfangenes topic /GPIO, Datengr枚脽e 0, Daten
13:53:31 RSL: Gruppe 0, Index 1, Befehl GPIO, Daten
13:53:31 MQT: stat/nodemcu_v2/RESULT = {"GPIO0":"5 (I2C SCL)","GPIO1":"0 (None)","GPIO2":"6 (I2C SDA)","GPIO3":"0 (None)","GPIO4":"0 (None)","GPIO5":"0 (None)","GPIO12":"0 (None)","GPIO13":"0 (None)","GPIO14":"0 (None)","GPIO15":"0 (None)","GPIO16":"0 (None)"}
```
```
Status 0:```
weblog 4 _for more debug information)_```
Help to get the sensor to work.
Hi, you are using Tasmota 6.6.0 that is quite old and core 2.5.2 that it is known to be buggy.
Please, update to latest Tasmota with core pre2.6.0. Thanks.
Hi, I posted the outputs from Version 6.6 thats true but I wrote I tried it with Version 6.7 also.
Today I tried Dev Version 7.0 but the result is the same object temp keeps at -999.0
Hi, I tested my MLX90614 sensors with the adafruit library MLX60914, they works fine so I can rule out a hardware issue.
@gemu2015
Please, can you take a look at this?
i have only one mlx90614 but it works fine.
the code is pretty small and the only code difference is that adafruit ignores the error bit which causes the -999 reading in Tasmota.
i don't see what should cause the error bit to be set.
i2c address conflict ??
you may simply remove the error check
the error bit is in the MSB of the raw data
uint16_t uval=read_irtmp(1);
if (uval&0x8000) {
// error bit set
// obj_temp=-999;
uval&=0x7fff;
obj_temp=((float)uval*0.02)-273.15;
} else {
obj_temp=((float)uval*0.02)-273.15;
}
@Failx92
Hi, any news on this?
@Failx92
Hi, when you have time, please tell us if this fix solved your issue. Thanks
Hello Again, sorry for late reply I was busy.
No sorry it don't work after I changed the code to the comment from gemu2015 it show all the time 382.2 degree.
Regards
Failx92
@Failx92
that's what i expected. the error bit is set.
did you ensure that there is no i2c address conflict?
MPR121 and CCS811 must be undefined because they use the same address.
i personally #undefine all unused sensors and features to save space and avoid conflicts.
@gemu2015
how do I do that?
MPR121 and CCS811 are undefined by default I changed nothing at this point, I only defined mlx90614
What is the output of command I2cscan?
What is the output of command I2cDriver?
Hello,
11:11:22 CMD: i2cscan
11:11:22 RSL: stat/nodemcu_v2.7.0/RESULT = {"I2CScan":"Device(s) found at 0x5a"}
11:11:40 CMD: i2cDriver
11:11:40 RSL: stat/nodemcu_v2.7.0/RESULT = {"I2CDriver":"7,8,9,10,11,15,20,32"}
@arendst
i can confirm that mlx90614 is broken on the last dev version. (just compiled default setup)
my fork is still at 6.7.0 and works.
i am short of time and right now can't check what's changed between 6.7.0 and current.
only couple of calls used ???
I'll have a look but cannot test as I don't have a MLX90614 device.
@arendst
ok reverified with 6.7.0 and my user config disabled and mlx fails also!
there must be an interference with another driver.
sorry i must leave now
@Failx92
here are my undefines in case you want to try.
//#undef USE_COUNTER
@arendst
by disabling all other i2c sensors and selectively enabling i found SEVERAL dependencies.
(i only testest those by default enabled i2c drivers)
the mlx driver is extremely easy and i don't see why it shouldn't work and what causes the interferences
probably we should be able to disable drivers by command
Disable/enable i2c drivers using command i2cdriver is available now using I2CDEVICES.md
@gemu2015 I tried the disabling but it dont work for me, the sensor isn't recognized but with i2cscan I see the device at 0x5a.
I used the 7.0 dev version and activate the BMP and DS18x20
I'm busy this week, my next tries are on the weekend.
@arendst
a nice, i missed that because i was busy with other things.
still no idea what's going wrong here
@Failx92
so you simply compile with mlx enabled
and then disable one i2c driver after the other until it works.
at least disable these two
i2cdriver10 0
i2cdriver20 0
@Failx92
Hi, any news on this? Could you test with latest version and @gemu2015's suggestions?
@Failx92
Hi, any news on this? Could you test with latest version and @gemu2015's suggestions?
@Failx92
Hi, any news on this? Could you test with latest version and @gemu2015's suggestions?
Hello,
Sorry for my late reply,
I try the latest version tomorrow.
Okay, joining the party now :)
I can confirm that:
at least disable these two
i2cdriver10 0
i2cdriver20 0

This is a self compiled firmware with build target "tasmota" and uncommenting #define USE_MLX90614.
I will try to dig a little bit.
This is more complex, than I expected.
The sensor normally needs this special restart message after transmission, but at the moment it happily reads without this, which is unexpected for me. (I already turned the reading routine upside-down for testing).
I need more time for this, as (virtually) all driver combinations must be checked. Even then it might result in coincidence.
@Failx92
Are you able to compile and test this?
https://github.com/arendst/Tasmota/pull/7022
Fix merged.
@Failx92
Please, can you test latest codebase and confirm if your issue is solved? Thanks
Hello,
issue is solved. Thanks.
Just for Info:
I tried today e self compiled version 9.0.0.2 with
"platformio run -e tasmota-sensors " and enabled MLX90614
I got -999 OBJ Temp.
with
i2cdriver10 0
i2cdriver20 0
I Got a correct Reading.
Edit:
Sorry shortly thereafter -999 Reading reapeared
{"I2CDriver":"3,4,5,7,8,9,!10,11,12,13,14,15,16,17,18,!20,24,29,32,36,41,42,44,46,47,48"}
I compiled new "platformio run -e tasmota "
and expliced ennabled the i2c driver i wanted it worked.
this ist now i2cdriver:
{"I2CDriver":"3,4,5,7,11,15,32,47,48"}
so there must be some issues left.