Can't get esphome ultrasonic++ working

Hi
I’m setting up a nodemcu with ultrasonic sensor and some switches for lights control (via solid state relays).
Configuring seems to be ok. OTA update works fine.
I’m using the built-in mosquitto integration, hassio 90.1. Discovery is enabled
When I’m starting up, I get this:
INFO Reading configuration…
INFO Starting log output from 192.168.10.45 using esphomelib API
INFO Connecting to 192.168.10.45:6053 (192.168.10.45)
WARNING Couldn’t connect to API (Error connecting to 192.168.10.45: [Errno 111] Connection refused). Trying to reconnect in 1 seconds
INFO Connecting to 192.168.10.45:6053 (192.168.10.45)
WARNING Couldn’t connect to API (Error connecting to 192.168.10.45: [Errno 111] Connection refused). Trying to reconnect in 2 seconds
INFO Connecting to 192.168.10.45:6053 (192.168.10.45)
: :
over and over again.
The switches don’t show up anywhere either.
The controller1 switches between online and offline quite often in the esphome dashboard.
The IP is correct (static), and I can ping it.

Help, please? Where can I start looking?
Helge

The config is like this:
esphomeyaml:
name: controller1
platform: ESP8266
board: nodemcuv2
wifi:
ssid: ‘XXX’
password: ‘xxxxx’
manual_ip:
static_ip: 192.168.10.45
gateway: 192.168.10.1
subnet: 255.255.255.0
mqtt:
broker: 192.168.10.40
logger:
api:
ota:
switch:

  • platform: gpio
    pin: D5
    name: “Switch1”
  • platform: gpio
    pin: D6
    name: “Switch2”
    sensor:
  • platform: ultrasonic
    trigger_pin: D1
    echo_pin: D2
    name: controller1
    update_interval: 0.5s
    filters:
    • filter_nan:
    • unique:
    • delta: 0.01

Hi, suggest you look into this : https://esphome.io/index.html Fantastic work by @OttoWinter !

I got my ESP8266 to work with 3 ultrasonics using this method. Start with “Getting started with Hass.io add-on”

My config, if it helps is pasted below

esphome:
  name: mcu2
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: "mywifi"
  password: "mypassword"

# Enable logging
logger:

# Enable Home Assistant API
api:
 password: "xxx"

ota:
  password: "xxx"

sensor:
  - platform: ultrasonic
    trigger_pin: D1
    echo_pin: D2
    name: "Salt Sensor"
    update_interval: 5s
    filters:
      - filter_out: nan
      - lambda: return (1-x)/1*100;
  - platform: ultrasonic
    trigger_pin: D7
    echo_pin: D8
    name: "Tank 1"
    update_interval: 5s
    filters:
      - filter_out: nan
      - lambda: return (3-x)/3*100;
  - platform: ultrasonic
    trigger_pin: D5
    echo_pin: D6
    name: "Tank 2"
    update_interval: 5s
    filters:
      - filter_out: nan
      - lambda: return (3-x)/3*100;

Solved it! I had copied an old config file that used mqtt, but this one shouldn’t. Removed mqtt section, and it works :slight_smile: