💬 Temperature Sensor
-
Hi All, i'm also new here and into this. Like others i also ran into problems compiling this sketch, i tried al libraries mentioned in the posts in this thread, but no go. keep getting this error message:
In file included from C:\Users\Gebruiker\Desktop\My Sensors\MySensors-master\MySensorsArduinoExamples-master\examples\DallasTemperatureSensor\DallasTemperatureSensor.ino:37:0:
C:\Users\Gebruiker\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h: In function 'void loop()':
C:\Users\Gebruiker\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:252:13: error: 'int16_t DallasTemperature::millisToWaitForConversion(uint8_t)' is private
int16_t millisToWaitForConversion(uint8_t); ^DallasTemperatureSensor:85: error: within this context
int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
exit status 1within this context
Can someone help me with this problem? i have no clue at all and woud really like to build me a working sensor so i can hook it up to my Domoticz setup. thanks
hin this context
see solution above. Delete your dallas library and replace with the one above in the master zip file. That was the solution for me.
-
@bentrik the library is part of the MySensorsArduinoExamples, which can be downloaded at https://github.com/mysensors/MySensorsArduinoExamples/archive/master.zip
@mfalkvidd Thanks for the feedback, It got me a bit further.
I have a fresh Windows Arduino 1.6.12 install, and I have download the MySensors Library 2.0 through the Library manager, and I've found MySensors.h and MyConfig.h under \Documents\Arduino\libraries\MySensorsI'm able to compile and upload the RelayActuator but quite a few of the library files seem to be missing in 2.0. DallasTemperature seem to be one of them.-But I struggled with DallasTemperature and some others.
I copied all the whole MySensors-1.5.4.zip library files to to C:\Program Files (x86)\Arduino\libraries, and I managed to compile, but I got an error message saying Invalid version found: 1.04
Then I tried to only copy the DallasTemperature and OneWire folder, and I had no errors.-So I assume all library files the entire MySensors Examples catalouge are not ready in Libraries 2.0.
Anyways: The solution to get this sensor to work with Arduino 1.6.12, following the Download and API guide, adding MySensors 2.0 through the Library Manager, is to manually add:
\Arduino\libraries\DallasTemperature
\Arduino\libraries\OneWire\-from https://github.com/mysensors/MySensorsArduinoExamples/archive/master.zip
-And not adding the whole structure.Now I just have to find out how to make it speak to my serial gateway :satisfied:
-
I am getting the error:
DallasTemperatureSensor.ino: In function 'void loop()': DallasTemperatureSensor:93: error: 'getConfig' was not declared in this scope float temperature = static_cast<float>(static_cast<int>((getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;Does anyone have any suggestions?
-
I am getting the error:
DallasTemperatureSensor.ino: In function 'void loop()': DallasTemperatureSensor:93: error: 'getConfig' was not declared in this scope float temperature = static_cast<float>(static_cast<int>((getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;Does anyone have any suggestions?
-
@mfalkvidd That worked. Thanks.
-
Hello,
I'm a beginner in home automation and I'm trying MySensor for the first time. My acctual configaration is a Domoticz on a Raspberry Pi 2B and a RFLink GW with a NRF24L01 module to try to measure with a MySensor probe.
I've building a temperature sensor with a DS18B20 sensor on a Official Arduino nano board and I can not run the sensor correctly.
The arduino serial monitor show these:0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
3 TSM:INIT
4 TSF:WUR:MS=0
11 TSM:INIT:TSP OK
12 TSM:FPAR
15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
2022 !TSM:FPAR:NO REPLY
2024 TSM:FPAR
2026 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
4034 !TSM:FPAR:NO REPLY
4036 TSM:FPAR
4038 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
6046 !TSM:FPAR:NO REPLY
6048 TSM:FPAR
6050 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
8058 !TSM:FPAR:FAIL
8059 TSM:FAIL:CNT=1
8061 TSM:FAIL:PDTSomeone could help me?
-
Where should I put it? In arduino sensor code?
-
Ok , with Node ID, I have this:
0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
3 MCO:BGN:BFR
63 TSM:INIT
64 TSF:WUR:MS=0
71 TSM:INIT:TSP OK
73 TSM:INIT:STATID=2
75 TSF:SID:OK,ID=2
76 TSM:FPAR
113 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
2120 !TSM:FPAR:NO REPLY
2122 TSM:FPAR
2158 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
4166 !TSM:FPAR:NO REPLY
4168 TSM:FPAR
4204 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
6212 !TSM:FPAR:NO REPLY
6214 TSM:FPAR
6250 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
8258 !TSM:FPAR:FAIL
8259 TSM:FAIL:CNT=1 -
ok, but we are going off topic since now your problem seems to be the radios can't talk to each other, so if you take a look in troubleshooting section you will see others having this error that usually if bad wiring, missing capacitor on vcc of the nrf24, range/interference problem. How far are the 2 radio modules? Try putting them 2-3 meters apart.
-
Thanks, my radio modules are very close, they are on the same table for test. On of them may be damaged, I must receive others. I'm going in the troubleshooting section to avoid polluting this article.
Thanks for your help -
It's the same, I've even reversed the radio modules
-
I use USB pretty much all the time and never had any issue. I had many problems in the beginning with radio modules that had the black blob instead of the ic and once I got the new ones everything started to work. I'm still working on increasing the range, probably because they are clones and not good quality.
-
I use USB pretty much all the time and never had any issue. I had many problems in the beginning with radio modules that had the black blob instead of the ic and once I got the new ones everything started to work. I'm still working on increasing the range, probably because they are clones and not good quality.
-
Is it also possible to upload the example code to a Arduino Nano, and connect it via USB to a Windows PC with Domoticz?
Or will it only work with the radio modules (and extra gateway?)