emonTH2 multiple temperature probes

I sincerely apologise for being inappropriate, Robert. Safety is not something I take lightly.

Hi Robert,
I use a emonthv2 and I would to have 4 ds18b20 sensor.
I read night and day, many and many thread and I never found how to put the address of ds18b20 in my sketch. I use the sketch emonTH_DHT22_DS18B20_RFM69CW_Pulse.ino.


Please, can you tell me how I must write the address of ds18b20 in my sketch?
Thanks you so much for your answer.
Laurent

Welcome back!

Is this the sketch you are using:

If it is, although you can connect and it will read 4 sensors, it will not send the data!

It looks to me that a better starting point would be

even though it is for the emonTH V1.5.

Will you be using the JeeLib radio protocol (which we no longer use for new systems) or the Low Power Labs protocol? If your system is 7 years old, you will certainly be using JeeLib – unless you have updated everything. If you say which, I can look to see what changes will be necessary to convert it to run on the emonTH2 hardware.

Thanks for your answer.
I try the sketch but no way.
I saw this :
Sans titre
and no data in Emonhub.
when I use the next sketch, data appear directly in Emonhub.
I put sensor address like this in sketch :


No difference.
I don’t understand.

Perhaps @glyn.hudson or @TrystanLea can give an answer.

I think, I’m not the only one who want to have more than one ds18b20 with his Emonthv2.

Wait and see.

:wink:

I do not understand what you have done.

WHICH sketch? This one: emonTH_DS18B20_in_DHT22_socket.ino ?

You will only get data in emonHub when you have a Node definition in emonhub.conf which matches exactly the format of the data sent by the emonTH.

Also, did you read this:

It sends only the temperature of the first sensor it detects, no more.

I do not expect this sketch emonTH_V1_5_DHT22_multiple_DS18B20.ino to work on an emonTH2. It must be changed because some pin numbers are different.

I use this sketch :
emonTH_DHT22_DS18B20_RFM69CW_Pulse.ino
I read all you send in last post.
I try to understand all but my English is poor but I try.
How can I know what his the exact Node definition in emonhub.conf which matches exactly the format of the data sent by the emonTH.
Thanks for your time.

In summary, I could never read multiple ds18B20 with an emonthv2?

I go forward.
I tried this sketch (emonth2 v4.1.7) and I have this ouput in serial port (I think it’s serial output) :

I define the node in emonhub. conf like it’s wrote in emonth2-2.ino but nothing in log of emonhub.
Whay do you think about that?
Thanks.

It should just be a case of changing #define EXTERNAL_TEMP_SENSORS 1 to however many sensors you want.

You’ll also need to change the emonhub node decoder, at the top of the sketch there’s an example for 4x temp sensors:

    [[23]]
        nodename = emonth2_23
        [[[rx]]]
            names = temperature, external temperature1, external temperature2, external temperature3, external temperature4, humidity, battery, pulsecount
            datacodes = h, h, h, h, h, h, h, L
            scales = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1.0
            units = C, C, C, C, C, %, V, p    

Thanks for your answer.
It works almost well now.
In Emonhub.conf, I deleted the “s” in datacodes.
DHT22 sensor doesn’t work and the LED stay ON.
Any idea?
Thank you so much.