# EmonPi Temperature Measurement

**URL:** <https://community.openenergymonitor.org/t/emonpi-temperature-measurement/6792>\
**Category:** emonPi\
**Tags:** ds18b20, temperature, emonpi\
**Created:** [10 March 2018 20:21 UTC](https://community.openenergymonitor.org/t/emonpi-temperature-measurement/6792 "2018-03-10T20:21:36Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [12 March 2018 16:35 UTC](https://community.openenergymonitor.org/t/emonpi-temperature-measurement/6792/15 "2018-03-12T16:35:21Z")

</div>

> [@pb66](#):
>
> In fact why don’t we just leave ourselves a little more wriggle room and just use even numbers
> 
> #define UNUSED\_TEMPERATURE 300  
> // this value (300C) is sent if no sensor has ever been detected  
> #define OUTOFRANGE\_TEMPERATURE 302  
> // this value (302C) is sent if the sensor reports \< -55C or \> +125C  
> #define BAD\_TEMPERATURE 304  
> // this value (304C) is sent if no sensor is present or the checksum is bad (corrupted data)  
> // NOTE: The sensor might report 85C if the temperature is retrieved but the sensor has not been commanded

Sure sounds good.

> [@pb66](#):
>
> We really should try and reach a decision on the rest soon rather than leaving it free-wheeling indefinitely again.

Decision made? Let’s use the above.

---

_[View the full topic](https://community.openenergymonitor.org/t/emonpi-temperature-measurement/6792)._
