Incorrect temperature from emonTH

I ordered a emonTH and 433mhz receiver for my raspberry pi from the official OpenEnergyMoniter store.

I chose a emonTH with a DS18B20 sensor only.

Unfortunately the sensor seems "stuck" and is only reporting a reading of 85 (presumbably this value is not scaled, but regardless it is wrong).

Here is some logging output:

----log output----

2015-06-22 18:40:45,502 DEBUG    RFM2Pi     29 NEW FRAME : OK 19 82 3 0 0 0 0 31 0 (-27)
2015-06-22 18:40:45,513 DEBUG    RFM2Pi     29 Timestamp : 1434955245.5
2015-06-22 18:40:45,516 DEBUG    RFM2Pi     29 From Node : 19
2015-06-22 18:40:45,518 DEBUG    RFM2Pi     29    Values : [85, 0, 0, 3.1]
2015-06-22 18:40:45,520 DEBUG    RFM2Pi     29      RSSI : -27
2015-06-22 18:40:45,524 INFO     RFM2Pi     Publishing: emonhub/rx/19/values 85,0,0,3.1
2015-06-22 18:40:45,529 DEBUG    RFM2Pi     29 adding frame to buffer => [1434955245, 19, 85, 0, 0, 3.1, -27]
2015-06-22 18:40:45,532 DEBUG    RFM2Pi     29 Sent to channel' : ToEmonCMS
2015-06-22 18:40:46,178 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 166 85 216 76 255 181 191 173 53 97 110 51 250 74 108 36 212 63 189 219 114 (-101)
2015-06-22 18:40:46,818 INFO     emoncmsorg sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1434955245,19,85,0,0,3.1,-27]]&sentat=1434955246
2015-06-22 18:40:46,903 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 15 174 131 99 132 6 3 169 39 188 176 72 156 1 51 97 40 3 126 169 98 (-96)
2015-06-22 18:40:47,605 DEBUG    emoncmsorg acknowledged receipt with 'ok' from http://emoncms.org
2015-06-22 18:40:49,131 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 186 104 165 206 57 144 174 145 222 (-96)
2015-06-22 18:40:49,457 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 191 249 95 212 189 57 144 147 252 184 236 66 173 229 60 0 213 152 26 93 28 (-98)
2015-06-22 18:40:52,024 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 25 24 137 250 227 101 61 23 185 71 29 204 88 64 136 149 188 176 233 150 42 (-98)
2015-06-22 18:40:55,295 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 138 7 147 219 167 231 132 244 41 232 94 95 171 153 255 102 136 152 124 43 118 (-96)
2015-06-22 18:40:58,855 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 152 59 169 96 180 152 146 61 185 122 246 203 54 230 212 202 143 227 248 159 199 (-98)
2015-06-22 18:40:59,781 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 15 13 56 163 219 76 41 240 22 48 40 21 112 34 133 0 177 32 87 124 2 (-99)
2015-06-22 18:41:00,809 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 47 59 183 25 95 35 165 130 244 55 54 198 171 216 158 165 184 59 52 203 194 (-98)
2015-06-22 18:41:07,280 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 52 237 71 237 42 152 117 142 20 47 24 68 37 56 203 201 78 122 47 133 208 (-98)
2015-06-22 18:41:09,331 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 168 251 129 36 202 232 20 20 12 25 56 0 22 68 4 159 211 216 28 185 9 (-96)
2015-06-22 18:41:14,871 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 197 208 20 142 35 152 21 10 216 208 27 14 244 183 238 214 75 99 8 5 90 (-97)
2015-06-22 18:41:16,859 INFO     emoncmsorg sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1434955276
2015-06-22 18:41:16,944 DEBUG    RFM2Pi     Discarding RX frame 'unreliable content'? 0 31 40 119 169 29 133 145 68 23 40 152 114 60 21 93 87 23 15 69 37 (-98)

---- end log output----

The temperature is 19.0 degrees Celsius and has varied througout today by a couple of degrees as I turned up the heating, but the emonTH has only reported 85.0.

What can I do to fix this?

 

 

 

nzpaul's picture

Re: Incorrect temperature from emonTH

just FYI, I am running a rpi b+ and running Rasbian Wheezy with Emonhub software.

TrystanLea's picture

Re: Incorrect temperature from emonTH

Hello @nzpaul, 85 or -127 is the value reported if there is an error with the sensor or connection. Are you using the sensor on the board or the external encapsulated temperature sensor?

nzpaul's picture

Re: Incorrect temperature from emonTH

I have not made any changes to it. I just added a two AA batteries. I looks like it has a DS18B20 soldered onto the board (I ordered it with only a DS18B20).

I have attached the photo of what my board looks like.

pb66's picture

Re: Incorrect temperature from emonTH

Did you get these devices recently? Assuming you did I guess you have a emonTH v1.5 rather than a v1.4? and from the log output I'm also guessing it's a rfm69pi (or rfm2pi with rfm69 fitted) due to the number of faint packets received, Further more I'm guessing you are using the "emonpi" variant of emonhub but I cannot tell if that was purchased on a SDcard from the shop, included as part of a downloaded image or installed from scratch.

Can you show us any node 19 "emonTH" settings in emonhub.conf?

The default of

[[19]]
        nodename = emonTH_1
        firmware = emonTH_DHT22_DS18B20.ino
        hardware = emonTH_(Node_ID_Switch_DIP1:OFF_DIP2:OFF)
        [[[rx]]]
                names = temperature, external temperature, humidity, battery
                datacode = h
                scales = 0.1,0.1,0.1,0.1
                units = C,C,%,V

should convert the values "82 3" from "19 82 3 0 0 0 0 31 0" (node id is 19 and the remaining 10 are 5 integers in byte pairs) to 850 and the scaling of 0.1 results in 85.0 so it would appear the values are not being correctly sent from the emonTH.

Are you running stock firmware? Do you have a FTDI usb programmer? If so you could check the serial output as described at the end of the emonTH page in "Appendix B: Debug Mode / Serial output:"

I believe the value of 85 can suggest an open circuit so you should also check the temperature sensor is fitted?

In this v1.4 image the black 3 legged sensor is located bottom left above the mounting hole

and in this v1.5 image it's the just above the right-hand end 2 terminals of the green connector block

In both situations the sensors flat side should be closest to the PCB edge.

Paul

[EDIT - Started writing this before anyone posted and got interupted by phone call - sorry !! :-) ]

 

nzpaul's picture

Re: Incorrect temperature from emonTH

@pb66 

I have the new version judging by the photos. I purchased it last week. I took it out of the case and it looks like it is version 1.5.2.

I plugged in a FTDI programmer and this is the debug output I got:

11
emonTH - Firmware V1.5.1
OpenEnergyMonitor.org
RFM69CW Init> 
Node: 19 Freq: 433Mhz Network: 210
Read fail - Unable to find DHT22 Sensor..trying agin
Read fail - Unable to find DHT22 Sensor for 2nd time..giving up
Detected 1 DS18B20
DS18B20 Temperature: 85.00C, Battery voltage: 3.00V
DS18B20 Temperature: 85.00C, Battery voltage: 3.10V

 

I am running the emonhub software I installed from github. The reciever is the RFM69Pi 433Mhz Raspberry Pi Base Station Receiver Board. I have another off-the-shelf consumer 433mhz weather station, so that might explain the other traffic on the band.

I am just running the default conf file (with my API key added). This is what it says for Node 19:

 

[[19]]
    nodename = emonTH_1
    firmware = emonTH_DHT22_DS18B20.ino
    hardware = emonTH_(Node_ID_Switch_DIP1:OFF_DIP2:OFF)
    [[[rx]]]
       names = temperature, external temperature, humidity, battery
       datacode = h
       scales = 0.1,0.1,0.1,0.1
       units = C,C,%,V

 

 

nzpaul's picture

Re: Incorrect temperature from emonTH

I found an old DHT22 clone I had lying around. I plugged it in and this is the output I get:

 

11
emonTH - Firmware V1.5.1
OpenEnergyMonitor.org
RFM69CW Init> 
Node: 19 Freq: 433Mhz Network: 210
Detected DHT22 temp & humidity sesnor
Detected 1 DS18B20
DS18B20 and DHT22 found, assuming DS18B20 is external sensor
DS18B20 Temperature: 85.00C, DHT22 Temperature: 15.70C, DHT22 Humidity: 63.70%, Battery voltage: 3.10V

 

I assume the DS18B20 they gave me was a dud.

pb66's picture

Re: Incorrect temperature from emonTH

I would say that is strong probability but it is probably equally possible a firmware glitch is the cause, I don't think the DS18B20 only is a frequent choice so cannot be 100% sure of the characteristics of that part of the firmware, but the sensor is being recognized so must be responding, yes it may have an internal error but it may not be being read correctly or even powered up in time for it's periodical reading.

Hopefully someone with more familiarity of that function will step in or I will explore later if I get chance.

Paul

nzpaul's picture

Re: Incorrect temperature from emonTH

Can I reflash the firmware? where can I find it online?

TrystanLea's picture

Re: Incorrect temperature from emonTH

nzpaul, I think it probably is a dud DS18B20 although it is unusual. Do the soldering connections on the DS18B20 look ok? We will send out another to you today.

nzpaul's picture

Re: Incorrect temperature from emonTH

@TrystanLea 

I checked the soldering, it looks ok to me. 

Thanks! Can I paypal you the cost of a DHT22 sensor and you put that in the envolope with it? I might as well play around with that as well (the DHT clone I am using with it now for testing is definitely not calibrated correctly)

My order number is #9192

nzpaul's picture

Re: Incorrect temperature from emonTH

@TrystanLea  I sent an email to the order support email address.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.