EmonPi not reading DS18b20 connected to the RJ45 port

I have had a EmonPi for a long time, just sitting in a drawer.

Yestorday i decided to bring it to work and hooked it all up and it worked like a charm.

Today i tried the PULSE COUNTER and it worked perfect, got 160 pulses from the strobe app in my iPhone.

I also tried to hook up the Dallas sensors (DS18b20). I have tried about 4 different pcs. and none of them will work.

I have checked the cable and its good, i have checked the power and the sensor is getting 4.8v from the EmonPi.

The signal is hooked to pin number 4 on the EmonPi. And i tested the cable for continuity.

However, even after multiple reboots, the sensor readings will not show up in the EmonCMS.

Does it need some special configuration or should it be only plug and play? Right now there is no readings at all.

Im very thankful for any input here as i would like to hook up 4 temperature meters into my ventilation system for taking out readings.

EDIT: Will i need to use resistor between positive lead and signal in order for this to work, or is this built in to the EmonPi?


Did you reboot the Raspberry Pi and leave power on, or power down? A temperature sensor is only enabled if it is detected when the Atmel 328P inside the emonPi restarts, and that is quite independent of the RPi. It is not strictly speaking “Plug & Play”. So if you did not power down the emonPi and then power up again, try that.

The pull-up resistor is already present, no external one is normally necessary.

Hi man!

Thanks, that did the Job!

I just soldered 4pcs together now and will see if that works to.

Will the EmonPi remember what sensor goes where, and keep track of that if it powers off?

Also i connected the 9V AC-AC adapter, and got it working after some reboots.

However it shows 250v, and my multimeter tool shows 233Volts or something like that. Does it always need calibration or is it defective?


Yes, provided that all the sensors are present and functioning every time it powers up. But if one is missing or fails to respond, then they will move about. The solution to that involves reprogramming the Atmel 328P inside the emonPi, and that’s somewhat difficult. If you really want to know how the order is determined, it’s in “Learn”.

The voltage error (+7.3%) is a little more than we normally expect (assuming of course that your meter is accurate), but I don’t think it means anything is defective. If you are using the Euro a.c. adapter, that accounts for 3.45% of the error, as that requires a different calibration to the UK adapter.

There should be a button to open emonhub.conf in your web browser window. In there, you’ll find a section for your emonPi (it is Node 5) and you can edit the number in “scales = …”.
The section of file should look like this:

    nodename = emonpi
        names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulsecount
        datacodes = h, h, h, h, h, h, h, h, h, h, L
        scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
        units = W,W,W,V,C,C,C,C,C,C,p

so the scales line might end up reading something like this (assuming that 0.932 gives you the correct voltage - you might need to tweak the powers further and separately to make those correct too):
scales = 0.932,0.932,0.932,0.00932,0.1,0.1, 0.1,0.1,0.1,0.1,1

(Note, the voltage is used to calculate power before it gets to emonhub, so the powers will be 7.3% high plus their own calibration errors.)

For anybody noticing that line - I probably should have written: “Almost all of the sensors attached to an emon sensor node (emonPi, emonTx, emonTH) need to be present at power-up, else they will be ignored.”

Thanks that clears up some of my questions.

I have now added the AC-AC, the CT clips, the emonTH, the pulse counter and 4pcs of DS18B20.

Works like a charm.

The hard reboot solves lots of stuff :wink:

Thanks guys!