ESPHome binding for the Native API

Part 1

I finally installed this. The result however, is not what I had hoped. Because it’s a gas fireplace, it was difficult (and turned out impossible) to put the sensor in the flames. It’s now a bit below the flames. The registered temperature rises too slowly (only after a few minutes), keeps on rising if I turn the fire out, and drops too slowly. Too bad, but for now it is what it is.

Or is this ‘gradient’ you speak of some kind of magical solution to this problem? :slight_smile:

Part 2
But I also wanted a room temperature sensor. And the MAX6675 has an accuracy of 2 °C or something like that. Fine for in a fire, but not to gauge the room temperature.

As per usual, the search for a Wifi sensor didn’t get me much… Maybe the Shelly H&T Gen3…? Updates only every 5 minutes is a bit underwhelming though…

I don’t have ZigBee or Z-wave or any of that, and if I understand correctly, Shellies can’t be used as a Bluetooth gateway (at least not if they’re already a gateway for Shelly BLE devices - the Javascript script turns off that feature).

So… Could someone suggest me a good room temperature sensor (i.e. accurate and regularly updatable) which I could hook up to an ESP32?

As always, many thanks :blush:

BME280
here’s one on amazon

1 Like

And that chip is all I need (apart from the ESP32, of course)? There’s no ‘wire’ with the sensor at the and, such as with the MAX6675?

I keep mine in the exhaust pipe before it enters the chimney. But you migth not have that either?

It’s impossible to get the sensor there, unfortunately.

Nothing is impossible. You just lack imagination! XD (it’s a joke, please don’t get mad!)

1 Like


that is an ESP8266 but you get the idea hot, ground,SCL and SCA
temperature, humidity and atmospheric pressure
and that amazon ad is for 4 of them, they are $4 - $5 ea.

Kidding aside, you’re actually right. A longer wire and - the most painful part - starting over could likely yield satisfactory results.

Let’s say I wanted to use this PT1000 sensor (for the fireplace), how would that connect to an ESP32? Is that with MAX31865 (as Google search results suggest), or are there other options?

In any case, the execution of this plan wouldn’t be for soon. I need to regroup mentally first :stuck_out_tongue:

No doubt a silly question, but do these pins just slide in the chip and “click”? Or is there soldering involved?

Honestly it depends on what you buy.
You have esps without pins, with pins, and the same for the sensors. If you search long enough you’ll find what you need

yes

No.


I assume you’re responding to my possible plan of replacing the sensor in the fireplace?

Do I understand correctly that that “wire” is connected directly to the ESP32? There’s no “chip in the middle” needed?

(@Andrew_Rowe responded to my question about ESPHome binding for the Native API - #283 by Andrew_Rowe, about a room temperature sensor.)

Now I’m a little bit confused… if you just want to measure the air temperature I’d go with the bme280 instead of a probe.
The pt1000 can be directly interfaced with the esp, but you lose some (fairly a lot) granularity and precision. It depends on how much precision you actually want. But these appear to be 2 euros in AliExpress:
max31865

And their main focus is precisely to improve that loss of precision.

Understandably so. I’m walking two paths here. :slight_smile:

In the fireplace
I want to measure the temperature in the fireplace in a way that quickly reflects big temperature changes. Using these measurements, I hope to enable openHAB to determine whether the fire is on or out. Precision is not a big issue, but the sensor needs to be hung/put somewhere where it warms up enough very quickly when the fire is burning, and cools down enough very quickly when the fire is out. So here the PT1000, with then (maybe?) a MAX31865, if I understand the suggestions.

Room temperature
I want a precise and regularly updating sensor to measure the room temperature. I want to be able to use it as a thermostat: if the room temperature drops below a certain temperature, or exceeds a certain other temperature, the fireplace should be put on or out, respectively. So here the BME280, if I understand the suggestions.

In any case, I don’t want to do any soldering. :slight_smile:

Many thanks for clarifying! Then I can help :slight_smile:

For the fireplace: use the max thinggiemajig, great feedback and already other users have them, and interface it with the pt1000. I’m certain you’ll find more expensive versions that already come with pins pre soldered for you (which is also what I usually look for) then all you need is jumper wires to connect everything.

LEGO for adults!

For the ambient temperature:
Would you like to have a screen too? I’ve recently converted the xiaomi BLE temperature and humidity sensor to zigbee. It has a screen, looks decent enough, reports fairly often and it’s quite accurate. Very cheap too!

Looks something like this:

1 Like

Thanks :slight_smile:

A screen isn’t necessary, but I don’t have gateways for Zigbee, Z-wave or the likes. I do have a Shelly Plus Plug S, but I use it as a gateway for Shelly BLE devices, using the Shelly binding. And that means some Javascript script turns off any Bluetooth gateway possibilities (if there even were to begin with) - if I understand that correctly. So even a Bluetooth device wouldn’t be an option. (Unless maybe if I use one of these devices only as gateway for non-Shelly Bluetooth devices… Just thought of that now, and I’m not 100 % you can use it that way…)

That’s why I think WiFi is the best way forward. Or maybe I could invest in a gateway…? Do you have any suggestions there?

(If I were to go ahead with the BME280, maybe this one is a candidate: https://www.amazon.com.be/-/nl/BME280-barometrische-drukdetectiemodule-weervooruitgang-IoT-projecten/dp/B07NYXVVXQ/?)

well I guess you could use a proto board and dupont cables


you have to get chips with pins though

1 Like

Since a few hours, strange things happen…

This:

esphome:
  name: haard-eetkamer
[...]
switch:
  - platform: template
    name: winter_OFF
    id: winter_OFF
    turn_on_action:
      - then:
        - switch.turn_on: IN3
        - delay: 8s
        - switch.turn_off: IN3
        - switch.template.publish:
            id: winter_OFF
            state: OFF

… used to declare OFF. But now it doesn’t anymore:

openhab> log:display | grep -i haard_eetkamer_winter_OFF
21:56:13.458 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'haard_eetkamer_winter_OFF' received command ON

However! The item is turned off…:

var status = items.getItem("haard_eetkamer_winter_OFF").state
console.log("haard_eetkamer_winter_OFF = "+status)

Results in:

22:04:41.776 [INFO ] [enhab.automation.script.ui.scratchpad] - haard_eetkamer_winter_OFF = OFF

Strange, but not too harmful, you would think. However, a rule triggered by said item being turned OFF now doesn’t get triggered.

Does anyone have any idea what the cause of this strange behavior might be?

Posted this in the hardware side but if anyone else is interested :smiley: