Temperature Humdity sensor JSON Commands

I also wanted to note something since I have personally reset a bunch of these after the last time we have talked and took notes on the sensors code flashing.

The sensors on the older 1.05 update range of lights all vary greatly. The most common three that I have encountered since I started taking notes are a solid green light, the normal flashing green light but not actually communicating, and the flashing two red lights. All were fixed with a power cycle and then updated to 1.06. You can actually fix the first two green variation by remotely power cycling these ones. The two flashing red lights always require a power cycle.

The sensors that have failed on 1.06 only display one type of flashing code. The flashing two red lights like the video I have previously sent. When resetting most of these, I have unplugged the power from the wall outlet to ensure that I can confirm it is not actually a probe issue by not jostling anything internally on the sensors. This always rectifies the issue. I’ve also taken extra precaution on some of these to tighten the probe as tight as possible with my hands, and the issue always seems to happen.

@Bhaskar

So we seem to have resolved some of the issues with the sensor by auto rebooting on interval. This solves the issue of the sensor dropping the MQTT connection. I’m marking that as resolved for now.

However I believe there were actually two issues. The first is the device loosing MQTT connection, and the second is the SHT sensor is becoming unresponsive after a period of time. I have some of these sensors at home that run 24/7(monitoring my deep freeze) and have not seen this issue. I think the only way to solve this is going to be giving the ESP the ability to power cycle the SHT when it becomes unresponsive. The two red LED flash @tanner has described is the firmware signaling it cannot communicate to the SHT. A reboot of the ESP does not solve this so I have to assume it is the SHT itself becoming unresponsive. Thoughts?

Should we think about reducing the I2C clock speed to 20Khz? Not Sure what the default speed is on the I2C library.

@TravisE_NCD_Technica does temp humidity sensor starts to respond after power cycle or physical reset?

After a physical power cycle it responds again. But a reboot of the ESP does not resolve the issue.

SHT has a soft reset command.

We can give that a shot. What is the command?

4.9 here?:

Reset via General call:

void Sensor::softReset(){
  Wire.beginTransmission(address);
  Wire.write(0x00);
  Wire.write(0x06);
  Wire.endTransmission();
  delay(100);
}

yea. i don’t see any reason why it would get suck but i will recommend resetting before every read and wait 2 sec and then read data

So I check the status of the write command for success and the length of bytes returned during a read. If either of those fail I will issue a soft reset delay(2000), and attempt again. I might also increment a counter for diagnostic purposes every time this is attempted, so we can see how often it is happening. Might be useful information to have.

@tanner

I just added firmware version 1.0.7 here:

This firmware will attempt a soft reset of the Temperature/Humidity sensor if communication fails. I also added reset_attempts to the sensor data object so we can track if it is running and how often.

Please give this a try and let me know what you find.

Thank you,
Travis Elliott

Wow you guys are great! I have 3 that never last more than a couple days that will be the first to get this update. Day is almost over here though, so I will go out and deploy these updates first thing Monday morning. I’ll report back if I run into any issues.
Seriously, thank you so much again and I’ll let you know how those problematic sensors are after a couple days on the newest firmware.

No problem @tanner let us know how it goes. There are a couple of other levers we can pull if that does not resolve the issue.

Thank you,
Travis

Unfortunately, I deployed three this morning and one is already having issues. I’ll go out tomorrow morning and see what the status code it is currently reporting. I should have been historizing the reset counter, but I was not so when it got lost, I lost the reset counter. I added historization on them now so I should be able to tell in the future.

Update on this morning, two are having issues already. I went to check on one of them and it was displaying the two red codes again. Reset counter is at one as seen in the picture below.

The third sensor is still working, but from the time I originally wrote this message an hour ago, the reset counter has incremented from zero to one. It is still currently transmitting though. I’m not sure if it needs more time to fail or if it’s just the fact that this one is in a cooler environment than the other two.

Hi Tanner,

I’ll work on another fix in the firmware to see where that gets us. In the mean time keep an eye on the unit that is still functioning and see if it’s reset counter increases or if it goes offline. I’m unfortunately a bit in the dark as far as implementing a fix as I don’t have a unit here I can replicate the failure on. I have to rely on your feedback.

Thank you Tanner,
Travis

Ok, before I implement the next possible fix I did find a bug where the device would only attempt a soft reset once. I fixed that and uploaded a new version here:

Can you give 1.0.8 a shot and let me know? Maybe flash the device that went offline?

Thank you for your patience on this,
Travis Elliott

Sure, those two sensors have been swapped out with another two that are now on the 1.08. I’m historizing everything along with the network traffic so we should have more insight if anything goes awry overnight.

It seems like that update worked somewhat. It did create some odd bugs with interpretation of the temperature. Here’s the results from the 1.08 update. This sensor normally won’t survive more than a couple hours, a day at most.

Overnight chart:

Edit:
Wow it seems like it’s doing a lot of resets. Is the counter supposed to reset back to 0 and count back up again?
It has reset itself and from the times shown in the screen shot it is now showing 172 (and climbing):

The other sensor that is normally a problem is showing zero resets and is still going strong!