-
Notifications
You must be signed in to change notification settings - Fork 277
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
DHT Temperature and Humidity plus Heat Index (feels like temperature) - using official Adafruit Library #35
base: master
Are you sure you want to change the base?
Conversation
can anyone help me to get it published? |
#define DHTPOWERPIN 8 | ||
|
||
|
||
// Sleep time between sensor updates (in milliseconds) to add to sensor delay (read from sensor data; tipically: 1s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: typically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to correct it.
thank you
present(CHILD_ID_HUM, S_HUM); | ||
present(CHILD_ID_TEMP, S_TEMP); | ||
|
||
present(CHILD_ID_HUM, S_HUM, "Umidity"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "Humidity"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same answer than before:
I'm going to correct it.
thank you
|
||
MyMessage msgHum(CHILD_ID_HUM, V_HUM); | ||
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); | ||
DHT dht; | ||
MyMessage msgTempHI(CHILD_ID_TEMP_HI, V_TEMP); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a better name would be "msgHeatIndex", CHILD_ID_HEATINDEX, SENSOR_HEATINDEX_OFFSET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate your suggestion.
I'm going to change it
can I "accept" your revision editing file here (by browser in github) or I have to upload a new release by same process I used one year ago? thanks in advance. have a nice year |
You're welcome. |
Thanks to both of you. Sorry for not giving feedback earlier. As mentioned in #22 we would like to keep the dht example as simple as possible. A lot of code might scare people who are new to MySensors, and the dht sensor is (unfortunately) often one of the first sensors people try. Maybe we should have one "bare minimum" example and one more advanced? For many of the other third party libraries, we've copied the entire libraryinto this repo. The idea (I think) is to make sure we provide a version that is guaranteed to be compatible with this sketch, and save the user from the hassle of having to download the upstream library. This strategy hasn't worked that well though. A lot of people install the upstream version anyway, which leads to problems (warning due to multiple installations, compilation errors when the interfeces have changed, etc). I am not sure how to handle third part libraries in a good way. Maybe the sketch should include a comment on what people should search for in the Arduino IDE Library manager (library name) and which version(s) the sketch has been tested with? |
This is to large and complex sketch for newbie to overwrite DHT humidity sensor one, Mikael Falkvidd said and I agree. So I suggest to upload it as a different, more sophisticated example; indeed it could be incorrect to consider it as a simple Humidity sensor...
…ditySensor/TempHumFeel-DHT.ino
@mfalkvidd |
Sounds good. I think the right method is to do git rebase -i, remove all unnecessary commits and then git push —force. See if you can do that. Otherwise I’ll try to do it as soon as I’m close to a computer. |
@mfalkvidd Thanks for your efforts and gentleness... and sorry for my poor english.. |
No worries, I'll try to do it tomorrow. |
Sorry, I am unable to figure out how to do git rebase -i on someone else's fork. |
What is the status of this pull request? To my opinion, copying external libraries into this repo, for the sake of being sure that the sketch will be 'working', is not a very good idea. Breaking changes in updated libraries could be easily detected by including the build of the sketches into the nightly builds of Jenkins (I thought have been reading that MySensors was using Jenkins to build?) I think also that people starting with MySensors, do have already experience with using Arduino's and the Arduino Editor with his libraries manager. @mfalkvidd, we communicated already about this same issue for the Distance Sensor example. This example is using an old NewPing library version... Just my two cents opinion :-) |
@cnerone, I analysed your sketch and I think there are some logical mistakes. First, the comments are not correct :-)
Something I don't find logic is that there is a SENSOR_HEATINDEX_OFFSET offset. |
You are right,
I apologize...
…On April 26, 2020 4:23:22 PM GMT+02:00, ericvb ***@***.***> wrote:
@cnerone, I analysed your sketch and I think there are some logical
mistakes.
You are providing the possibility to give offsets
`#define SENSOR_HUM_OFFSET 0 // used for temperature data and
heat index computation`
`#define SENSOR_TEMP_OFFSET 0 // used for humidity data`
`#define SENSOR_HEATINDEX_OFFSET 0 // used for heat index data`
First, the comments are not correct :-)
Second, in the calculation method
`float computeHeatIndex(float temperature, float percentHumidity) {`
` float hi;`
` temperature = temperature + SENSOR_TEMP_OFFSET; //include
TEMP_OFFSET in HeatIndex computation too`
` temperature = 1.8*temperature+32; //convertion to *F`
` hi = 0.5 * (temperature + 61.0 + ((temperature - 68.0) * 1.2) +
(percentHumidity * 0.094));`
- the temperature is getting his offset
- the percentHumidity is not getting his offset: is this correct?
Something I don't find logic is that there is a SENSOR_HEATINDEX_OFFSET
offset.
This value is computed, it is not a hardware reading with an error
range of accuracy, so it must not have a offset in my opinion.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#35 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Dependencies@ericvb yes dependencies are immensely troublesome. Many of the MySensors examples do not need any external libraries. Those generally work quite well. For example sketches that need other libraries, we've tried to make it easy for new users by verifying sketches against known versions on the libraries, and making that version of the libraries available in this repo. This method is not without troubles, but is so far the least troublesome way we've tried. I have no experience with Jenkins, but I guess someone knowledgeable could spend the time required to "teach" Jenkins to compile with latest upstream version of the various libraries. I am not sure how much cost running additional builds would add, but it might be possible. I guess we'd also need some sort of build trigger (daily?) to check if the external libraries have been updated? (I think the MySensors builds only are run when new commits are made to the MySensors repository, but I am not sure.) Doing a compile check will be insufficient though. What will happen if Jenkins detects a breakage? Who has the time, knowledge and hardware to troubleshoot and find a solution? Until such a solution is found and released, how do we inform users which library version they should use (and describe how to install that particular version)? What if something breaks, but that break is not detected by a build? How do we communicate build result information in a way that will reach inexperienced users? If a breakage is detected and MySensors is updated, how do we inform people that they need to update their sketches and libraries (and how to do it)? Most users will be annoyed, confused and/or frustrated when their sketches, that previously worked fine, no longer compile, or when they compile and upload file but fail at runtime. Dependencies is a mess. Sometimes I think we should just delete all examples that rely on external libraries. They've caused so much problems for so many people. But that would mean we'd be missing a lot of popular sensors (like the DHT) as well as a lot of good sensors. I don't have any solutions unfortunately, but maybe we can work together to find something that is an improvement on what we have today. |
temperature and humidity have to be computed using offset in heatindex calculation.
SENSOR_HEATINDEX_OFFSET has sense because everyone has a different feeling. it depends on wearing too..
cheers
…On April 26, 2020 4:23:22 PM GMT+02:00, ericvb ***@***.***> wrote:
@cnerone, I analysed your sketch and I think there are some logical
mistakes.
You are providing the possibility to give offsets
`#define SENSOR_HUM_OFFSET 0 // used for temperature data and
heat index computation`
`#define SENSOR_TEMP_OFFSET 0 // used for humidity data`
`#define SENSOR_HEATINDEX_OFFSET 0 // used for heat index data`
First, the comments are not correct :-)
Second, in the calculation method
`float computeHeatIndex(float temperature, float percentHumidity) {`
` float hi;`
` temperature = temperature + SENSOR_TEMP_OFFSET; //include
TEMP_OFFSET in HeatIndex computation too`
` temperature = 1.8*temperature+32; //convertion to *F`
` hi = 0.5 * (temperature + 61.0 + ((temperature - 68.0) * 1.2) +
(percentHumidity * 0.094));`
- the temperature is getting his offset
- the percentHumidity is not getting his offset: is this correct?
Something I don't find logic is that there is a SENSOR_HEATINDEX_OFFSET
offset.
This value is computed, it is not a hardware reading with an error
range of accuracy, so it must not have a offset in my opinion.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#35 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
@cnerone , that is indeed true. Maybe putting the reason as comment? It explains the 'why' for the readers/users :-) |
Hi @mfalkvidd
But there are some gotcha's
<> will search the libs on the IDE default places This latest point makes it already easier for a beginner to compile the mysensors examples using specific external libraries. The Arduino Web Editor has also the metadata file sketch.json where you can include the used libraries with their version tag. I understand your concern for maintaining the examples. All these points are constructively said to help to do even better. :-) |
I rewrote this example,
it runs good and it uses Adafruit official DHTU libraries; furthermore I included Heat Index computation(based on DHT adafruit library) so this examples supply 3 sensors data (humidity, temperature, heat index)