In search of DIY multi sensor that doesn't require MQTT

So, I’ve been looking for DIY multi sensors (temp, motion, light, humidity, etc.) and while I like the BRUH sensor I don’t want to run MQTT to make it work. Currently I’m using zwave and ethernet devices exclusively. I looked through the sensors list and I don’t see anything that meets these requirements.

I did notice you can do a TCP sensor and a custom payload. Using this could someone build a custom wifi sensor that allows query via TCP thus not requiring MQTT at all?

Or, is their a device I’m not thinking of that already works like this?

Thoughts?

Take a look at aREST sensors. There is an Arduino aREST library that does what you are looking for. However, I went down that road initially and ended up switching to MQTT in the end.

Thanks I’ll check that out. What didn’t you like about the REST sensors that made you switch to MQTT? I like the idea of just adding a sensor component and having it work and I’d like to think that’s possible. Maybe it’s wishful thinking.

I think the issue I ran into was having multiple sensors on one board and the request would time out. Also, with aREST Home Assistant is polling so the updates aren’t as quick ~1 second verses up to 60 seconds with polling. Plus, with MQTT you have the benefit of all the working being done already, or at least for most sensors someone on here has most likely made an Arduino sketch using MQTT already for your exact needs.

That makes sense. I guess I was hoping to find a component as easy as the Yeelights, where you just add them to wifi, add a config yaml entry and it just works. I need to decide if it’s worth saving $15 per sensor and having another service to support or just getting a zwave one and saving myself the configuration headaches. Thanks for the info!

Make an ESP8266 sensor using the ESPhomeYAML API. It’s a core HA component and super easy to set up. Look up ESP in the HA docs

This looks promising. Do you know of a DIY sensor an arduino noob could build that utilizes this?

Follow the link to the ESPhome site. There is a massive list of sensors and their Configs. You will be up and running in no time. They are all the standard Arduino based items that can be bought for a few dollars

Ok, this is really cool. Thanks. I’m guessing I’ll still run into the issue w1ll1am23 mentioned though, that polling will be slower than using MQTT right? Is that the only downside?

Why? It should be as fast as your wifi will allow. These are a direct API linked item in HA. I use one for my irrigation controller and it’s basically instant

Ok cool. I just assumed HA would poll them at some interval like how the TCP component works. Well this is a game changer. Thanks for the info!

besides esphomeyaml you could look at mysensors.org
its also in ha integrated and you can create a network of sensors that only use 1 wifi port.
they have tons of examples how to build them including all code.

I just did 3 BRUH multisensors using nodemcu’s and Esphomeyaml. The code is a lot simpler than using arduino . Here is what I used on one of the sensors:

esphomeyaml:
  name: ms3
  platform: ESP8266
  board: nodemcuv2
  
wifi:
  ssid: !secret ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.0.8
    gateway: 192.168.0.1
    subnet: 255.255.255.0
    dns1: 192.168.0.1
    dns2: 192.168.0.1

# Enable logging
logger:
  level: WARN

# Enable Home Assistant API
api:
 
ota:

mqtt:
  broker: 192.168.0.5
  port: 1883
  username: !secret username
  password: !secret password
  
web_server:
  port: 80
  
sensor:
  - platform: dht
    model: AM2302
    pin: D7
    temperature:
      name: "bedroom temperature"
#      unit_of_measurement: "°C"
    humidity:
      name: "bedroom humidity"
#      unit_of_measurement: "%"
     
  - platform: wifi_signal
    name: "Bedroom Wifi Signal"
    update_interval: 180s
    
  - platform: adc
    pin: VCC
    name: "VCC Voltage"
    
  - platform: uptime
    name: "bedroom sensor uptime" 
    
binary_sensor:
  - platform: gpio
    pin: D5
    name: "bedroom motion"
    device_class: motion

output:
  - platform: esp8266_pwm
    pin: D1
    id: redgpio
  - platform: esp8266_pwm
    pin: D2
    id: greengpio
  - platform: esp8266_pwm
    pin: D3
    id: bluegpio

light:
  - platform: rgb
    name: "bedroom rgb led"
    red: redgpio
    green: greengpio
    blue: bluegpio

I’ve still got it using mqtt, but it isn’t needed. Once you got the multisensor sensor running just go to Integrations, and set it up there.

Screenshot%20from%202019-02-14%2013-07-43

Cool. thanks for the tips. I ordered one esp unit and I’m looking forward to trying it. I can 3D print any enclosures I want, so that’s nice. :slight_smile:

@digiblur made a video about setting a multisensor up using esphome.

1 Like

Thanks, I’ll check this out!