Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading From Arduino Library Manager Library Is Placed In INCOMPATIBLE Folder #8

Closed
MrYsLab opened this issue May 24, 2021 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@MrYsLab
Copy link

MrYsLab commented May 24, 2021

On both Windows and Ubuntu Linux the screen shot below shows where the library is loaded.
Screenshot from 2021-05-24 12-11-23

@RobTillaart
Copy link
Owner

Thanks for pointing out,
Will check what is missing. assume requirements have changed as this lib has been available for ages.

@RobTillaart RobTillaart self-assigned this May 24, 2021
@RobTillaart RobTillaart added the bug Something isn't working label May 24, 2021
@RobTillaart
Copy link
Owner

My recent developments for DHT are all in the dhtnew library. The core acquisition is quite identical.

@MrYsLab
Copy link
Author

MrYsLab commented May 24, 2021

I have used dhtnew in the past and, in fact, ported it to be included in one of my libraries. The library is an updated version of Firmata. This has worked rather nicely for DHT11's and DHT22's. I wanted to get rid of my port and just include your library so that users would always have easy access to the latest and greatest. However when running the examples in the latest dhtnew, the DHT11's always return an error (I think it is a timeout error). The DHT22's do work but occasionally timeout. I know the sensors are good. If I run the examples from dhtstable, the DHT11s and DHT22s both work consistently without error.
If you have any ideas about what might be going on, that would be great, but I am perfectly fine with including dhtstable. The application I am running has 2 DHT11's and 2 DHT22's connected to an Uno, and all four are continuously monitored. The Uno is powered via USB.

@RobTillaart
Copy link
Owner

Dhtnew could indeed be more time critical in timing.
Several issues (esp32 often) were time related.

Will dive into dhtstable this week.

Thanks for the feedback so far

@RobTillaart
Copy link
Owner

I checked with arduino-lint and got some errors which explains the INCOMPATIBLE flag.

Linting library in DHTstable/
Rule LS008 result: fail
WARNING: No header file found matching library name (DHTStable.h). Best practices are for primary header filename to match library name.
Rule LP017 result: fail
ERROR: Library name DHTStable is in use by a library in the Library Manager index. Each library must have a unique name value. If your library is already in the index, use the "--library-manager update" flag.
Rule LP045 result: fail
WARNING: Architecture alias(es) in library.properties architectures field: atmelavr. Please also specify the true Arduino architectures compatibilities of the library. See https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format

Finished linting project. Results:
Warning count: 2
Error count: 1
Rules passed: false

-------------------

Linting sketch in DHTstable\examples\dht11_test

Finished linting project. Results:
Warning count: 0
Error count: 0
Rules passed: true

-------------------

Linting sketch in DHTstable\examples\dht12_test

Finished linting project. Results:
Warning count: 0
Error count: 0
Rules passed: true

-------------------

Linting sketch in DHTstable\examples\dht22_test

Finished linting project. Results:
Warning count: 0
Error count: 0
Rules passed: true

-------------------

Finished linting projects. Results:
Warning count: 2
Error count: 1
Rules passed: false

I will update the library and rename the filenames so it complies to the arduino-lint check.

Version will be updated to 1.0.0

@RobTillaart
Copy link
Owner

RobTillaart commented May 26, 2021

Can you please check if the develop branch works for you?
Please note that both filenames and class name has changed!

Arduino-lint is happy now, and all tests are OK.

./arduino-lint.exe --library-manager update DHTstable/
Linting library in DHTstable/

Finished linting project. Results:
Warning count: 0
Error count: 0
Rules passed: true

-------------------

Linting sketch in DHTstable\examples\dht11_test

Finished linting project. Results:
Warning count: 0
Error count: 0
Rules passed: true

-------------------

Linting sketch in DHTstable\examples\dht12_test

Finished linting project. Results:
Warning count: 0
Error count: 0
Rules passed: true

-------------------

Linting sketch in DHTstable\examples\dht22_test

Finished linting project. Results:
Warning count: 0
Error count: 0
Rules passed: true

-------------------

Finished linting projects. Results:
Warning count: 0
Error count: 0
Rules passed: true

@RobTillaart
Copy link
Owner

I keep the issue open as I still not understand why it was never INCOMPATIBLE for me.
Currently running IDE 1.8.13 so there is a small difference (as you have 1.8.15)

@MrYsLab
Copy link
Author

MrYsLab commented May 26, 2021

NP. FYI, I just installed 0.2.9 on Windows using 1.8.15 and also get INCOMPATIBLE. I also tried removing my Arduino directory (the one that holds the libraries) on my Linux box and tried installing 0.2.9 using 1.8.13 and it also generates INCOMPATIBLE. Hope this may offer some insight.

@MrYsLab
Copy link
Author

MrYsLab commented May 27, 2021

Some additional information. I also found 3 other libraries that were added to INCOMPATIBLE:

Adafruit Zero DMA library
Adafruit Zero PDM library
ESP32Servo

I ran the lining too on Adafruit Zero DMA, and here is the output:

arduino-lint --library-manager update ./Adafruit_ZeroDMA
Linting library in ./Adafruit_ZeroDMA
Rule LS008 result: fail
WARNING: No header file found matching library name (Adafruit_Zero_DMA_Library.h). Best practices are for primary header filename to match library name.
Rule LP010 result: fail
WARNING: library.properties name value Adafruit Zero DMA Library is longer than the recommended length of 16 characters.
Rule LP015 result: fail
WARNING: library.properties name Adafruit Zero DMA Library contains spaces. Although supported, best practices is to not use spaces.
Rule LP016 result: fail
WARNING: Library name Adafruit Zero DMA Library contains "library". This is superfluous.
Rule LP036 result: fail
WARNING: The library.properties paragraph field repeats the sentence field. These are displayed together, so redundancy is not needed.

I also ran the tool on the current master branch of DHTstable, and here are the results:

arduino-lint --library-manager update ./DHTstable
Linting library in ./DHTstable
Rule LS008 result: fail
WARNING: No header file found matching library name (DHTStable.h). Best practices are for primary header filename to match library name.
Rule LP045 result: fail
WARNING: Architecture alias(es) in the library.properties architectures field: atmelavr. Please also specify the true Arduino architectures compatibilities of the library. See https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format

The develop branch shows no errors or warnings.

I thought this would be a useful exercise in case I ever run into something similar.

Again, thanks for letting me know about the liniting tool.

Hopefully this helps to shed some light on the problem.

@RobTillaart
Copy link
Owner

Thanks!
However as the two are warnings, it should not be labelled incompatible imho.

I noticed that

  1. changing the ARCHITECTURE field is not enough to make it compatible.
  2. the lib is incompatible in the "examples" menu but not in the "include library" menu

Will start adding arduino-lint workflow to all my github repo's today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants