ESPHome binding for the Native API [4.0.0.0;6.0.0.0)

There are some shortcomings to the light support, but your configuration should at least give you a channel where you can control the color;

There should probably be more than 1 (plus the -effects channel), but I’ve only got a simple 24 led ring to test with.

I noticed this fork that has more advanced light support, but I do not know the status of it nor whether the author is present in this forum;

Thanks, that fork does look promising. I’ll give it a try and see how well it works for me and report back.

Does anyone have experience with a soil moisture sensor, like this: Soil moisture sensor, moisture detector and plant moisture measuring device with corrosion-resistant probe for automatic irrigation system compatible with Arduino and Raspbery Pi?

Not this one, but I have a handful of these GitHub - rbaron/b-parasite: 🌱💧 An open source DIY soil moisture sensor that works well. Plus you get light, air humidity and temperature in addition to soil moisture. A bit more DIY than your previous fireplace project though :smiling_face:

OH integration:
I’ve added some bluetooth support in the Esphome binding to proxy bluetooth traffic (see separate branch) as well as a new BTHome binding BTHome Binding [4.0.0.0;6.0.0.0) to parse the bparasite messages. Shelly BLU devices use the same protocol and are also supported.

Speaking of which… I still have to implement it physically. But I now wonder how hot it gets under the fireplace (I’m going to test this with a temperature measuring device). How hot is too hot?

And how would I be able to shield everything? I saw something like this: https://www.amazon.com.be/gp/aw/d/B00UN69CAK/ref=ox_sc_act_image_1?smid=A3Q3FYJVX702M2&psc=1

@seime does the binding autodiscover devices that use ports other than 6053?

Not in front of my computer, but I do not think ip port has any role in mdns discovery.

All I know is that when I burn wood my fireplace reaches up to 500 degrees celcius in the exhaust smoke measured, probably touching the flame.

I now realize this doesn’t use ESP. Or can an ESP32 be used as ‘Arduino’ and still connect to openHAB somehow?

Edit: I see ‘arduino’ in the yaml I posted before…, so maybe there is a way to make this work? Again, I’m over my head :slight_smile:

(It’s for outdoor use, so even if I were brave and able enough, your suggested DIY project doesn’t seem suitable…)

The sensor provides an analoge output (a simple voltage) which you can connect to one of the adc pins on the Esp.

Google Esphome adc and you will find a suitable example config.

Esphome is built on the Arduino framework for esps, but will soon change the default to esp-idf (you can configure Esphome to use either).

When I try to find suitable sensors or actuators I check first what is supported by Esphome official or by a third party. For analoge components most will work fine, but if the voltage on the signal is above 3v you might need to use 2 resistors to create a voltage divider so the measured Voltage is within the supported range on the Esp.

I just moved all my ESP32’s from native arduino to ESPhome, ESPhome has a Binding in OH and arduino needs something like MQTT, works fine, but I think ESPhome is the easier route. Also lots of examples, my last one is a Higrow soil moister sensor in ESPHome, need to look at powerconsumption when in deepsleep, this was way too high in native arduino.

Upon further reading, this - with some kind of case - is maybe the better fit after all. But with which device do you ‘catch’ the Bluetooth signals?

Your Esphome device. Google Esphome bluetooth tracker

I have added a climate device. In OpenHAB I am only seeing 2 channels enumerated. Are climate devices fully supported? Or do I have an error in my climate device setup?

I use a panasonic climate device and it shows with all channels I would have expected like target, current, mode, fan, swing,..

I have 5 aircons on 2 different Esphome aircon components, all working great.

Feel free to send me debug Level logs starting from before you enable the device.

Also pless send the Esphome config as it makes it possible to reproduce.

Brg

The YAML file on ESPHome determines which parameters are measured, the ESPHome Binding picks them up when they’re there.

I am working on expanding a python library that uses the ESPHome protocol - GitHub - peterkeen/aioesphomeserver: Python implementation of ESPHome native API server

Does anyone have experience with a KY-037?

I didn’t get it to work for now…

I tried with this yaml code:

sensor:
  - platform: adc
    pin: GPIO32
    name: "Rookmelder tuinhuis"
    update_interval: 250ms
binary_sensor:
  - platform: gpio
    pin: GPIO33
    name: "Sound level"
    filters:
      - delayed_off: 1s

The analog output is constant, there’s no change in voltage, whether I make noise or not. The digital output works:

[18:05:20][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:20][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:20][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:20][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:20][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:21][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:21][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:21][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:21][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:22][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:22][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:22][D][binary_sensor:036]: 'Sound level': Sending state ON
[18:05:22][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:22][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:23][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:23][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:23][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:24][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:24][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:24][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:24][D][binary_sensor:036]: 'Sound level': Sending state OFF
[18:05:24][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:24][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:25][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:25][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:25][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:25][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:26][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:26][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy
[18:05:26][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 4095.00000 V with 2 decimals of accuracy

Does anyone have any idea what the issue is? This guy (https://www.youtube.com/watch?v=ySSpbg1OWGU) got it to work… I don’t have any Arduino knowledge, but he must get some raw data, which I should be getting as well?


Earlier, I noticed some unexpected changes, but I later realized they probably were the result of turning the screw of the potentiometer:

There’s no change in voltage, whether I make noise or not. Weirdly, I first saw this:

[14:06:25][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10600 V with 2 decimals of accuracy
[14:06:26][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10700 V with 2 decimals of accuracy
[14:06:27][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10700 V with 2 decimals of accuracy
[14:06:28][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10700 V with 2 decimals of accuracy
[14:06:29][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10800 V with 2 decimals of accuracy
[14:06:30][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10700 V with 2 decimals of accuracy
[14:06:31][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10800 V with 2 decimals of accuracy
[14:06:32][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10600 V with 2 decimals of accuracy
[14:06:33][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.10700 V with 2 decimals of accuracy

At one moment, I accidentally stepped on the device. :roll_eyes: No idea whether it was related, but I later noticed this output:

[14:49:48][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.82800 V with 2 decimals of accuracy
[14:49:49][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 1.04500 V with 2 decimals of accuracy
[14:49:50][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 1.04500 V with 2 decimals of accuracy
[14:49:51][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 1.04500 V with 2 decimals of accuracy
[14:49:52][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 1.04500 V with 2 decimals of accuracy

I plugged in another KY-037 unit (I bought a pack of 5), and now this is the output:

[17:43:06][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14700 V with 2 decimals of accuracy
[17:43:11][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14700 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14400 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14700 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14700 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14600 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14500 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14700 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14700 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.14700 V with 2 decimals of accuracy
[17:43:13][D][sensor:094]: 'Rookmelder tuinhuis': Sending state 0.15000 V with 2 decimals of accuracy

In all three cases, I had silent moments, and moments of continuing noise…

I’m following you up on this on the 19th with 5 Bosch 6000i :slight_smile: