I’m pretty newto home assistant for around a month and have been playing with some esp8266’s and esp32 for around a week. I have spent a couple of days experimenting with ESP32’s ( IZOKEE Development Board for ESP32 2.4 GHz Dual Core WLAN WiFi + Bluetooth 2-in-1 Microcontroller with CP2102 Chip for Arduino (3pcs)), adafruit neopizels, dht22, and Xiaomi LYWSDCGQ BLE Sensor.
First issue: More than half the time I try to compile, esphome says process terminated, and home assistant reboots. I am running home assistant in a vm in unraid, I started with this image: hassos_ova-4.12.qcow2, it has been updated to 0.114.4 and I have cpu 6/7 and thread 14/15 from a threadripper 1900X pinned to the vm. Initial memory is 1024MB, max is 2048.
When I do get past compiling, I am able to get something to work, provided that thing is only one something, and I spent a whole day and a half trying to get dht-22 to work, then figured out that I needed the beta version of esphome to get past a bug. I’m pretty much just playing around, but trying to figure out what I will ultimately use, which is why I purchased 2 Xiaomi sensors, and 2 dht-22’s. I have a “working” nodemcu set up for both of those sensor types, but it is only getting the dht-22 values, here is the last part of the yaml from that:
esp32_ble_tracker:
sensor:
- platform: xiaomi_lywsdcgq
mac_address: redacted
temperature:
name: "Upstairs Temperature"
humidity:
name: "Upstairs Humidity"
battery_level:
name: "Upstairs Battery Level"
- platform: dht
pin: GPIO27
model: DHT22
temperature:
name: "OfficeN Temperature"
humidity:
name: "OfficeN Humidity"
update_interval: 60s
time:
- platform: homeassistant
on_time:
- seconds: 0
minutes: 0
hours: 2
days_of_week: MON-SUN
then:
- switch.toggle: restart_switch
switch:
- platform: restart
name: "Auto Restart"
id: restart_switch
I have another unit that I am trying to set up an led on, and another xiami sensor, and it doesn’t seem to get past trying to connect to wifi.
[13:57:48]ets Jun 8 2016 00:22:57
[13:57:48]
[13:57:48]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[13:57:48]configsip: 0, SPIWP:0xee
[13:57:48]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:57:48]mode:DIO, clock div:2
[13:57:48]load:0x3fff0018,len:4
[13:57:48]load:0x3fff001c,len:1044
[13:57:48]load:0x40078000,len:8896
[13:57:48]load:0x40080400,len:5828
[13:57:48]entry 0x400806ac
[13:57:49][I][logger:166]: Log initialized
[13:57:49][C][ota:366]: There have been 5 suspected unsuccessful boot attempts.
[13:57:49][I][app:029]: Running through setup()…
[13:57:49][C][light:097]: Setting up light ‘NeoPixel Light’…
[13:57:49][D][light:264]: ‘NeoPixel Light’ Setting:
[13:57:49][D][light:277]: Brightness: 100%
[13:57:49][D][light:286]: Red=100%, Green=100%, Blue=100%
[13:57:49][D][light:289]: White Value: 0%
[13:57:50][D][esp32_ble_tracker:148]: Starting scan…
[13:57:50][C][wifi:033]: Setting up WiFi…
[13:57:50][D][wifi:324]: Starting scan…
yaml:
esp32_ble_tracker:
sensor:
- platform: xiaomi_lywsdcgq
mac_address: redacted2
temperature:
name: "DeansOffice Temperature"
humidity:
name: "DeansOffice Humidity"
battery_level:
name: "DeansOffice Battery Level"
light:
- platform: neopixelbus
pin: GPIO14
num_leds: 1
type: RGB
name: "NeoPixel Light"
time:
- platform: homeassistant
on_time:
- seconds: 0
minutes: 0
hours: 2
days_of_week: MON-SUN
then:
- switch.toggle: restart_switch
switch:
- platform: restart
name: "Auto Restart"
id: restart_switch
I must be doing something wrong, or a number of things, probably something fundamental that I don’t understand. There must be something wrong with my VM as well, but it isn’t obvious to me what. I moved the storage off of my unraid array and on to cache, and that hugely improved home assistant boot times. I would like to move to a NUC, but have no funds for it currently. Help with any of this would be greatly appreciated.