PietteTech_DHT causing SOS 14 flashes on v1.2.1-rc.3

Just got the same issue after updating my Argon to V1.3.0-rc-1 from V1.1.0

Hi there, I’ve been brought to this thread by a similar issue on my Photon.
I’m using the PietteTech_DHT library on a suite of Particle boards including Photons, Xenons and an Electron. The Photon in question just updated from 1.1.0 to 1.2.1

I have this issue on a Photon, is there a code fix that solves this issue ?

You could try the proposed workaround in this PR

I’m still waiting whether Particle is providing a detachInterrupt() variant that can be called from an ISR before considering an update to the library really.

1 Like

The workaround worked for me. Thanks.

I believe I have now also experienced this “Panic, 14” issue with several Photons in my network, using this Piettetech_DHT library.

This is how it is in one sketch:

void ReadTempHum()  {
    dhtTemperature = DHT.getCelsius();
    dhtHumidity = DHT.getHumidity();
    dhtDewpoint = DHT.getDewPoint();
    DHT.acquireAndWait(2000);
}

Or in another sketch:

void ReadTempHum() {
  int result = DHT.acquireAndWait(1000);
  ROOMTemp2 = DHT.getCelsius();
  ROOMHumi = DHT.getHumidity();
  ROOMTdf = DHT.getDewPoint();
  n++;
}

None of these work!

It started after upgrading them to Device OS v. 1.4.2 (From v. 1.0.1)

Could this library be updated to work with the latest OS or is there any other idea to make this work again?

I also saw this thread , also about this library, but it’s not clear what the options for me are now…

This is a really disturbing problem for my whole home automation system as all Photons in use are going to be affected whenever I may decide to update user software on them …

As I don’t see any progress on the underlying issue - despite it beeing considered a bug in the device OS - I may have to (begrudgingly) incorporate the workaround provided in the link pull-request by rgiese although I won’t be able to test for any adverse side-effects.

1 Like

Yes, I understand that this is not the most logical way to act, but I would be grateful to be able to test it!

Suggestion: Maybe we should clearly identify that library as a (temporary?) variation by giving it another name: “Piettetech_DHT-No-Panic” … :wink:

I’ll rather not create an entirely new library name but rather use compiler directives to conditionally apply the workaround depending on device OS version.

1 Like

For me any fix will be great Andy, thanks!
:ok_hand:

1 Like

I have now published v0.0.11v0.0.12 of the library - this should fix the SOS+14 issue.
Can you please give it a try and report back?

1 Like

OK thanks!

I looked for your modified version and found this version. Is this correct?

I have flashed my application (which worked fine for 3 years) with this new version using Particle Dev:
The Photon runs without red panic flashes now.
But, the values of temperature and humidity remain at “-5” all the time now…

It looks indeed like these changes have negative side-effects…
I will do a few more tests tonight.

Hey Andy, I found your latest version PietteTech_DHT (0.0.11) also in the Web-IDE now and the results when I use it to flash my sketches from there are the same, unfortunately…
Here is a simple example of what I used a long time.

:worried:

I feared this might happen - I guess I will have to cobble together a test rig but I can’t promise any time frame.
For the time being you may need to stick with 1.2.0 or before.

1 Like

I studied earlier how I could roll-back to an earlier version OS but i’m afraid of “bricking” my controllers when I read some stories…
Can you recommend me a simple and safe way Andy?

Photons shouldn’t be too problematic rolling back (1.1.1 - I couldn’t find an official 1.2.0 release).
Just download the system binaries part1 & part2 from here and apply then via DFU Mode

particle flash --usb tinker -v
particle flash --usb photon-system-part2@1.1.1.bin -v
particle flash --usb photon-system-part1@1.1.1.bin -v
1 Like

OK, another challenge:

  • I have installed the CLI and DFU software for OS-X, then downloaded and unzipped the three files.
  • Then I put my Photon in DFU mode and run the tinker flash command:
particle flash --usb tinker -v
  • That flashed OK.
  • Then I run the next command:
particle flash -usb photon-system-part2@1.1.1.bin -v
  • A red error message appeared in the console: "Unknown arguments ‘u, s, b’ "
  • I modified the line with two hyphens instead and launched it…
particle flash --usb photon-system-part2@1.1.1.bin -v
  • Now a different red error message appeared in the console:
    “Error writing firmware: file does not exist and no known app found.”

So, I assume I should put the downloaded files in a specific location…

Of course, you either need to run the command from the location where you unzipped the file to or you need to provide the full path to the command.
I thought that would be obvious - how would CLI know where to find the file?

1 Like

Yes, of course, I was also wondering... :slightly_smiling_face:
I looked up the documentation and found no description of how to do that.
I'm only 65 and still trying to learn...

I unzipped the files in the "Downloads" folder, so that was open...

Did you cd into your Downloads folder in the terminal you were running the command from?
Alternatively you can run the command like this

particle flash --usb /yourPathToTheFile/filename.bin -v

That would be a matter for the docs of your host computer's OS.
File handling is foremost dictated by the OS and any application running on that OS should/would adhere to that.

e.g. in Windows the command above would be written slightly different

particle flash --usb C:\yourPathToTheFile\filename.bin -v
1 Like