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

DS18B20.ino causes compilation error in arduino IDE #294

Closed
xoseperez opened this issue Nov 28, 2017 · 19 comments
Closed

DS18B20.ino causes compilation error in arduino IDE #294

xoseperez opened this issue Nov 28, 2017 · 19 comments

Comments

@xoseperez
Copy link
Owner

Originally reported by: Marco de Gier (Bitbucket: DiGierre, GitHub: Unknown)


ds18b20 line 89 contains 'isConversionComplete'. This causes a compilation error in arduino IDE "class 'DallasTemperature' has no member named 'isConversionComplete'.

This happens with all available versions of DallasTemperature in the library manager (3.7.6, 3.7.5, 3.7.2). It also seems strange to me as I found that this seems an old issue from 2013 "isConversionComplete is not implemented" (milesburton/Arduino-Temperature-Control-Library#12)

I had the same issue in espurna 1.7.1 (it was the main reason for upgrading to the latest but no luck on this issue).

The workaround is to update/OTA the DS18b20 .bin from the espurna bitbucket. That works fine.

@xoseperez
Copy link
Owner Author

The isConversionComplete method was added on May 2016.

@xoseperez
Copy link
Owner Author

Original comment by Marco de Gier (Bitbucket: DiGierre, GitHub: Unknown):


I see. It seems DallasTemperature is actually 3.7.7 on github but Arduino IDE (1.8.5 on W10) only goes as far as 3.7.6 and that one does not have isConversionComplete. I installed 3.7.7 and with that one it compiles ok. Advise to put this in the wiki instructions (unless this is something weird in my installation but the library updting seems to work ok)

@xoseperez
Copy link
Owner Author

Yes, good idea. Will do it.

@xoseperez
Copy link
Owner Author

Original comment by blue (Bitbucket: bluexp, GitHub: bluexp):


Is DHT currently working? cause I can't make it work using latest DallasTemperature (3.7.7). In webui I get "NOT CONNECTED" and in serial log I get "[DHT] Error: -2"

@xoseperez
Copy link
Owner Author

xoseperez commented Dec 20, 2017

Original comment by Andreas L. (Bitbucket: andreaslink, GitHub: andreaslink-de):


I have the exact same behaviour as @bluexp and also having DallasTemperature v3.7.7 installed, but I use an DS18B20. I do not get any temperature value, I also replaced the DS18B20 already with another one, but same behaviour. So probably, it's worth creating a new thread? My version is directly from GIT-version showing 1.10.1 and I compiled with Arduino IDE on my own.

@xoseperez
Copy link
Owner Author

@bluexp DHT and Dallas are different sensors. You should enable and use DHT settings in sensors.h

@xoseperez
Copy link
Owner Author

xoseperez commented Dec 21, 2017

@andreaslink-de Try enabling the DS18B20_PULLUP setting.

@xoseperez
Copy link
Owner Author

xoseperez commented Dec 21, 2017

Original comment by Andreas L. (Bitbucket: andreaslink, GitHub: andreaslink-de):


Is it really necessary to activate the PullUp (BTW, where do I activate it?) as I have soldered a 4,7k between GPIO14 and 3,3V on my SonOff Basic. So I would assume, this would be Ok, too? Anyway, for the future I know now, I can save this and will activate internal PullUp (I have another one on an older espurna v 1.9.5 with resistor and same DS18B20 running since weeks).SonOff_Basic_DS18B20_2017-12-21.jpg

@xoseperez
Copy link
Owner Author

xoseperez commented Dec 21, 2017

Original comment by Andreas L. (Bitbucket: andreaslink, GitHub: andreaslink-de):


Ok, found PullUp in sensors.h, but doesn't this already mean, internal pullup is activated by default?

espurna_DS18B20_PullUp.png

Can't get it going anyway :-S.

@xoseperez
Copy link
Owner Author

xoseperez commented Dec 21, 2017

Original comment by Andreas L. (Bitbucket: andreaslink, GitHub: andreaslink-de):


And just to complete this, this is my current botton setup in "config/arduino.h":

#!arduino
//--------------------------------------------------------------------------------
// Features (values below are non-default values)
//--------------------------------------------------------------------------------

#define ALEXA_SUPPORT          1
#define ANALOG_SUPPORT         0
#define COUNTER_SUPPORT        0
#define DEBUG_SERIAL_SUPPORT   1
#define DEBUG_TELNET_SUPPORT   0
#define DEBUG_UDP_SUPPORT      0
#define DHT_SUPPORT            0
#define DOMOTICZ_SUPPORT       0
#define DS18B20_SUPPORT        1
#define HOMEASSISTANT_SUPPORT  0
#define I2C_SUPPORT            0
#define INFLUXDB_SUPPORT       0
#define IR_SUPPORT             0
#define LLMNR_SUPPORT          0  // Only with Arduino Core 2.4.0
#define MDNS_SUPPORT           0
#define NOFUSS_SUPPORT         0  // Only with Arduino Core 2.4.0
#define NTP_SUPPORT            1
#define RF_SUPPORT             0
#define SPIFFS_SUPPORT         0
#define TELNET_SUPPORT         0
#define TERMINAL_SUPPORT       0
//#define WEB_SUPPORT            0

@xoseperez
Copy link
Owner Author

Hi
Maybe you could test the "sensors" branch where i'm doing a complete refactor of all sensors and adding new ones. You can enable DALLAS_SUPPORT there I try it...

@xoseperez
Copy link
Owner Author

Original comment by blue (Bitbucket: bluexp, GitHub: bluexp):


I've already did that, here is my sensor config:

#!arduino

// DHTXX temperature/humidity sensor
// Enable support by passing DHT_SUPPORT=1 build flag
//--------------------------------------------------------------------------------

#ifndef DHT_SUPPORT
#define DHT_SUPPORT                 1
#endif

#ifndef DHT_PIN
#define DHT_PIN                     5
#endif

#ifndef DHT_TYPE
#define DHT_TYPE                    DHT11
#endif

#ifndef DHT_PULLUP
#define DHT_PULLUP                  0
#endif

#ifndef DHT_UPDATE_INTERVAL
#define DHT_UPDATE_INTERVAL         60000
#endif

#define DHT_TEMPERATURE_TOPIC       "temperature"
#define DHT_HUMIDITY_TOPIC          "humidity"

#define HUMIDITY_NORMAL             0
#define HUMIDITY_COMFORTABLE        1
#define HUMIDITY_DRY                2
#define HUMIDITY_WET                3

As I have pull up in my circuit I didn't set pull up in sensor.h

@xoseperez
Copy link
Owner Author

These are the configuration settings for a DHT sensor, not a DALLAS one. You should enable DALLAS_SUPPORT.

@xoseperez
Copy link
Owner Author

Any update on this?

@xoseperez
Copy link
Owner Author

xoseperez commented Dec 27, 2017

Original comment by Andreas L. (Bitbucket: andreaslink, GitHub: andreaslink-de):


Sorry, pure X-Mas business at home, did not had any time to test the branch yet.

@xoseperez
Copy link
Owner Author

Original comment by blue (Bitbucket: bluexp, GitHub: bluexp):


I have no problem with DS18B20 and its working, But I can't make my dht11 working.

@xoseperez
Copy link
Owner Author

Tested it with a DHT11 I had and it is a timing issue. Please check latest commit in dev branch and edit the new sensors.h file to enable DHT_SUPPORT and configure it:

#ifndef DHT_SUPPORT
#define DHT_SUPPORT                     1
#endif

#ifndef DHT_PIN
#define DHT_PIN                         5
#endif

#ifndef DHT_TYPE
#define DHT_TYPE                        DHT_CHIP_DHT11
#endif

@xoseperez
Copy link
Owner Author

Released with 1.11.2

@xoseperez
Copy link
Owner Author

Removing milestone: 1.11.2 (automated comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant