emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

Update 2015-12-02: I have updated the description based on input pb66 as it did transmit the voltage.

Hi,

I have just received an emonTH with DHT22 (Temperature & Humidity) sensor (order #10434)

I have a raspberry pi with 433Mhz receiver running emonhub that is correctly receiving the data from the emon TX (which I bought some time ago).

The problem is that it is not receiving correct data from the emon TH.  I have activated DEBUG for the emonhub on my raspberry pi and it logs the following information every 60 sec:

015-12-02 00:25:59,889 DEBUG emonCMS acknowledged receipt with 'ok' from http://emoncms.org
2015-12-02 00:26:01,971 DEBUG 31 NEW FRAME : 1449012361.97  23 0 0 0 0 0 0 26 0 1 0 0 0
2015-12-02 00:26:01,976 DEBUG 31 Timestamp : 1449012361.97
2015-12-02 00:26:01,979 DEBUG 31      Node : 23
2015-12-02 00:26:01,983 DEBUG 31    Values : [0, 0, 0, 26, 1, 0]
2015-12-02 00:26:02,005 DEBUG 31 Append to 'emonCMS' buffer => time: 1449012361.97, data: [23, 0, 0, 0, 26, 1, 0], ref: 31
2015-12-02 00:26:02,109 INFO emonCMS sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1449012361.97,23,0,0,0,26,1,0]]&sentat=1449012362

So it is receiving every minute the following 6 values: [0, 0, 0, 26, 1, 0] for Node 23.  Which doesn't look like correct values for temperature, humidity (pb66 explained me that the 26 stands for 2.6 Volt).

Note also that the Packing slip for Order #10434 mentions "RF Node ID (unique per 19 (defaut) network):" but the actual Node ID is 23.

FYI I did remove the battery of the emonTH to assure that no data is logged anymore for Node ID 23 which indeed was the case.  So this proved that the emonTH had node ID = 23.

How can I fix this ?

All help is much appreciated
Jan.

PS the Nodes are configured as follows in my emonhub.cfg on the raspberry pi

#######################################################################
#######################          Nodes          #######################
#######################################################################
[nodes]

# List of nodes by node ID
# 'datacode' is default for node and 'datacodes' are per value data codes.
# if both are present 'datacode' is ignored in favour of 'datacodes'
[[10]]
        datacode = h
#       datacodes = l, h, h, h,
[[23]]
        datacode = h

 

 

 

 

 

 

pb66's picture

Re: emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

try

datacodes = h,h,h,h,L

I believe the payload is temp1(on-board), temp2(external), humidity, battery and then pulse count which is a unsigned long, so your last 2 values are actually one and the fourth is 2.6v. Do you have a dht22 fitted ?

Paul

jvda's picture

Re: emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

Hi Paul,

Thanks for the extremely fast response.

I have changed the emonhub.conf as you have specified into

#######################################################################
[nodes]

# List of nodes by node ID
# 'datacode' is default for node and 'datacodes' are per value data codes.
# if both are present 'datacode' is ignored in favour of 'datacodes'
[[10]]
        datacode = h
#       datacodes = l, h, h, h,
[[23]]
        datacodes = h,h,h,h,L

But this didn't make a difference.

FYI the emonhub log file now logged the following in DEBUG mode:

2015-12-02 10:53:38,663 DEBUG emonCMS acknowledged receipt with 'ok' from http://emoncms.org
2015-12-02 10:53:48,317 DEBUG 53 NEW FRAME : 1449050028.32  23 0 0 0 0 0 0 26 0 1 0 0 0
2015-12-02 10:53:48,323 DEBUG 53 Timestamp : 1449050028.32
2015-12-02 10:53:48,327 DEBUG 53      Node : 23
2015-12-02 10:53:48,329 DEBUG 53    Values : [0, 0, 0, 26, 1]
2015-12-02 10:53:48,335 DEBUG 53 Append to 'emonCMS' buffer => time: 1449050028.32, data: [23, 0, 0, 0, 26, 1], ref: 53
2015-12-02 10:53:48,439 INFO emonCMS sending: http://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1449050028.32,23,0,0,0,26,1]]&sentat=1449050028

I also opened the emonTH and the dht22 sensor (with text: "AOSONG AM2 302 and SN: 15100BE30) is present.

So it looks like the dht22 sensor is not working or its data is not read by emonTH.

Any suggestion how to fix this ?

many thanks

Jan.

 

 

Robert Wall's picture

Re: emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

The only thing left to check - is the sensor inserted the right way round? Look at http://shop.openenergymonitor.com/emonth-433mhz-temperature-humidity-node/ but beware, two versions appear in the pictures. I think yours will be like the one with the green batteries in.

If that's OK (and you've taken the batteries out to reboot it) and it still isn't responding, then I think it is time to email the shop (support@openenergymonitor.zendesk.com), and refer to this thread.

jvda's picture

Re: emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

Thanks Robert,

I have checked it and the sensor is inserted the right way round (= like is shown on image 3  of page http://shop.openenergymonitor.com/emonth-433mhz-temperature-humidity-node/).  

As suggested I have sent email to the shop.

kr Jan.

jvda's picture

Re: emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

Hi,

  1. I am still wondering if the problem could not be caused by the wrong arduino sketch being installed on my emonTH node.

    Note also that according the order information it should have RF Node ID = 19 (default) while the one I have received is having Node ID = 23.
     

  2. I just found some very recent information on page http://openenergymonitor.org/emon/node/3223 under section "Pre-installed Firmware". Based on my Node ID I would conclude that my emonTH is shipped with firmware V2.6 and that section also says "that an update is needed of the the emonPi / emonBase node decoder".  So could it be that as I didn't update this on my raspberry pi that I am having this problem ?

kr

Jan.

 

Robert Wall's picture

Re: emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

1. I thought that was a possible problem - hence the suggestion to email the shop. What you have is consistent with the sketch being "emonTH_DHT22_DS18B20_RFM69CW_Pulse.ino"

2. As far as I know, Paul's changes should have done this. The above sketch sends:

101	typedef struct {        // RFM12B RF payload datastructure
102	  int temp;
103	  int temp_external;
104	  int humidity;    
105	  int battery;
106	  unsigned long pulsecount;     	                                      
107	} Payload;
108	Payload emonth;

And what Paul wrote fits that exactly.

Now the sketch tests for the presence of a DHT22 and DS18B20s at startup. So if you have a DHT22 and it is responding, it should send values, otherwise it will send zeros. If NO sensors are detected, it will flash the LED 20 times, then sleep forever. But it is not doing that, it seems to be sending a battery voltage of 26 ( = 2.6 V) and a pulse count of 1, but although it must be detecting, it cannot read the DHT22.
I guess you don't have the external sensor fitted.

pb66's picture

Re: emonTH with DHT22 doesn't transmit temperature and humidity values every 60 sec.

Further to Roberts points, the fact you are getting values, albeit zeros does suggest the issue is at the emonTH end not emonhub/emoncms. The change I suggested has had the expected result of correcting the 5 values to 4 values. 

The comments you refer to about having to update the emonpi/emonbase are a little missleading and would only apply to emonpi's and emonbase's running the emon-pi variant of emonhub and the nodes module as the declaration of every node is mandatory hence the addition of pulse counting and the change of node id demands an update, judging by your previous posts showing your emonhub.conf, I believe you are using "original" emonhub so would not apply.

Have you had a response from the shop? the order no is of no help to us on the forum but I do wonder when your order was dispatched as there seems to be a "fix" to that firmware regarding the pin assignments and wonder if it could have been affected. 

https://github.com/openenergymonitor/emonTH/commit/638efac027da3047971e65aac82685063bed5a40

​It's fairly unlikely, but unless the dht is faulty it is probally the best guess at this point.

Paul

Comment viewing options

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