Closed Failx92 closed 4 years ago
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.
A few years later, running into a similar issue with OBJ temp -999 while the AMB temp is working. I am trying it with the latest tasmota release (13.2.0). Can`t get older versions to work properly yet in gitpod otherwise I would have tried 6.7.0 as that sounded like it worked in the past.
My I2Cscan does find the device; {"I2CScan":"Device(s) found at 0x5a"} My I2Cdriver usually only shows this; {"I2CDriver":"7,32"}
Does anybody have a version that still works with the MLX90614?
**quote NickyNL
A few years later, running into a similar issue with OBJ temp -999 while the AMB temp is working. I am trying it with the latest tasmota release (13.2.0). Can`t get older versions to work properly yet in gitpod otherwise I would have tried 6.7.0 as that sounded like it worked in the past.
My I2Cscan does find the device; {"I2CScan":"Device(s) found at 0x5a"} My I2Cdriver usually only shows this; {"I2CDriver":"7,32"}
Does anybody have a version that still works with the MLX90614?** @ESP32 it Work:
@ESP8266 12E I got also -999 and CRC errors. The only workarroud was to use the old Method to readout the MLX90614 . This should work without CRC .
I changed something back into the xsns_46_MLX90614.ino void MLX90614_Every_Second(void) void MLX90614_Every_Second(void) { //mlx90614.i2c_buf = I2cRead24(I2_ADR_IRT, MLX90614_TOBJ1); //Enable <---------- mlx90614.value = MLX90614_read16(I2_ADR_IRT, MLX90614_TOBJ1); //Disable <------- if (mlx90614.value & 0x8000) { mlx90614.obj_temp = -999; } else { mlx90614.obj_temp = ((float)mlx90614.value 0.02f) - 273.15f; } //mlx90614.i2c_buf = I2cRead24(I2_ADR_IRT,MLX90614_TA); //enable <--------- mlx90614.value = MLX90614_read16(I2_ADR_IRT, MLX90614_TA); //Disable <-------- if (mlx90614.value & 0x8000) { mlx90614.amb_temp = -999; } else { mlx90614.amb_temp = ((float)mlx90614.value 0.02f) - 273.15f; } }
Till now there are still bugs inside. The console shows many sensor timeouts and the Thermostat driver do not detect the sensor values at the moment. "Current Temperature = 0°C" I would create an IR-Thermostat but no luck. With BMP180 and DS18B20 it work.
I don't know why it work for him:
quote from Christian Baars "Finally found my sensor and tested it with ESP8266 and ESP32-C3. Both work with the current driver for me too.
@Solar320 I fear you have a non-optimal hardware setup, as you see the check of a potential error condition - sadly revealing an error. If you leave out the CRC check (like in the old Tasmota driver or Adafruits library example), then everything seems to work, but in fact it does not. Even consistent wrong values that look plausible are wrong.
@ Christian Baars OK, I found mysterious things. I am now relativ sure that your code has nothing to do with this CRC errors.
Today I tested again this ESP8266-12E without or with very few CRC errors. I do not change something, I only restart this device. Also I saw that this Obj Temp was jumping up and down 3 Kelvin alle the time. (Sensor was not moved and was directed away from me.)
The Oszilloskop do not bring any news, the voltage spikes at 3,3v were arround +-10mV Then I Tested an ESP8266-MOD, again with only +-10mV at 3,3V. But the big difference is that the ObjTemp and AMBTemp are stable now, no jumping arround and only <1K difference between the two values. (Same Sensor, same cableconnectors!) I will make an test over night to confirm this. May be an bug of this ESP 12E Modul.........
BUG DESCRIPTION
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.
REQUESTED INFORMATION
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)"}
[x] Provide the output of this command:
Status 0
:[ ] Provide the output of the Console log output when you experience your issue; if applicable: (Please use
weblog 4
for more debug information)EXPECTED BEHAVIOUR
Help to get the sensor to work.