If you’re having problems with flashing over USB, you can always download the firmware using the COMPILE button and flash the firmware using esphomeflasher.
How can I install the latest beta? or is that beta going to be released as the main version soon?
Today I was wondering if it would be possible to build a sound sensor using esphomelib. A little research pointed to the KY-038 module which should do the job. There’s no support (yet? ) to this module on esphomelib but it should be possible to read the analog output of this sensor using ADC, right?
I had this idea of using it to auto-adjust sound levels of different Home Theather inputs (i.e. cable tv vs netflix, etc), perhaps even be able to create some sort of tv ad detector as they are usually louder than the usual. Did anyone built something like this before?
Well I consider this module already supported since you can just use the adc sensor. This is more of a docs issue, so a cookbook entry for the KY-038 would be welcome (similar to TEMT600 entry). See https://github.com/OttoWinter/esphomeyaml/issues/244
I have not heard of someone using it for home theater lights before, but if you do get it to work, please do share your setup
OK so after several days of trial and defeat I’m here for some help.
I have followed the set up and have flashed a nodemcu with what I think is a reed switch sensor. I have mqtt.fx reporting every state change but home assistant doesn’t have the information just unavailable.
Home Assistant has no connection to tge mqtt broker
Home Assistant can’t read the frontdoor/status topic or that topic doesn’t contain online
Try disabling mqtt discovery in the esphomeyaml config (by putting discovery: false in the config) and running the “clean mqtt” script in the esphomeyaml dashboard (in the overflow menu behind the three dots).
I believe your issue is that the binary sensor you have manually in your Hass config is not showing up as the discovery payload also creates it. Then also make sure to restart HA and seeing if the entity is there using the entity panel.
[18:57:16][D][sensor.adc:073]: 'Sound Sensor #1': Got voltage=0.06V
[18:57:16][D][sensor.mqtt:093]: 'Sound Sensor #1': Pushing out value 0.057753 with 2 decimals of accuracy
[18:57:17][D][sensor.adc:073]: 'Sound Sensor #1': Got voltage=0.05V
[18:57:17][D][sensor.mqtt:093]: 'Sound Sensor #1': Pushing out value 0.054261 with 2 decimals of accuracy
The problem is that even if I put it in front of speaker, the values are still erratic and doesn’t seem to relate to the volume of the sound. Unfortunately the documentation of the KY-038 is almost non-existent and it seems that most people uses only the digital pin output to detect clapping sounds. Perhaps I should try another kind of sensor.
@OttoWinter Did anything change with latest HA release with respect to MQTT? My Garage Door sensors stopped working. I use nodemcu with esphomelib and reed switch for garage open vs close. It was working fine and now the state publish MQTT message is not being picked up by HA. I can see the nodemcu publishing this message using MQTT Lens but HA is not picking up.
I see one bug, but seems to be fixed in latest release to which i have already upgraded.
Hi all,
is it possible with esphomelib to manually set the value of a sensor? (a rotary encoder in this case)
I need the sensor to have a min and a max value.
I’ve tried something like this but it doesn’t work
Hi @OttoWinter , I have successfully created a NodeMCU relay controller using this add-on but when I tried to create a LED strip controller it isn’t being detected in HA. Any ideas what I can do to get the light to show up as an entity? (MQTT discovery was set to ‘on’ when I first set it up, hence the NodeMCU entities are detected, so I know that works)
I dont know what to try to get this second device detected by HA. Using Fing on my phone I can confirm that it is connecting to my wifi with the correct IP address
@infiniteloop Your solution is close, but there’s one issue. The assignment operation there doesn’t do anything since the state isn’t published. However, this is a thing sensor filters should solve anyway, not automations:
@sparkydave Try power cycling the ESP a couple of times. It seems like HA discovery doesn’t like to work that in well in recent releases. Or try with the edge esphomeyaml version.
damn, I could have figured it out.
thank you so much.
However I get an error when compiling:
Compiling .pioenvs/lr_dimmer/src/main.cpp.o
src/main.cpp: In lambda function:
src/main.cpp:105:16: error: inconsistent types 'double' and 'float' deduced for lambda return type
return x;
^
src/main.cpp:105: confused by earlier errors, bailing out
*** [.pioenvs/lr_dimmer/src/main.cpp.o] Error 1
EDIT:
solved this way
- lambda: |-
if (int(x) < 0) return 0;
if (int(x) > 254) return 254;
return int(x);
however it doesn’t behave as I would expect.
For example if I manually turn the encoder up to 254 and continue turning, it keep sending 254 (as in the code) but the “real value” of x keep incrementing and is stored somewhere(?). Because if then I turn the encoder the other way it doesn’t start to decrease immediately but only after that it has reached the value of 254.
Anyway I think I’m fine for the moment.
I think I’ve rebooted the ESP about 30 times, rebooted the HA server a heap of times and still no luck. Is the edge version of esphomeyaml expected to fix this or is there something else I’m missing here to get it to work? Thanks
I like esphomelib very much, for me it is more convenient as tasmota and espurna. But there is one (but not little) feature i would like to see in esphomelib.
hi @OttoWinter I have tried flashing my ESP using the edge version of the HassIO add-on but it is still not working. What I see on the logger in ESPhomeflasher is:
Connecting to MQTT…
MQTT Dissconneted: TCP disconnected
So I dont know why the ESP wont connect to my MQTT server (the HassIO mosquito addon). My other ESP is happily connected to the same MQTT server with identical settings. Any other ideas I can try?