Esphomelib - A comprehensive solution for using ESPs with Home Assistant


#105

Ok, I’ve found a method to cleanup old, inactive topics. Apologies if this is rudimentary.

From the Developer services in HA, call the mqtt.publish service and send a zero byte payload to the topic you want to clear. You can find a current list of topics from either espyamlhome logging or SSH into HA and type:

mosquitto_sub -v -t '#'

The JSON when clearing the topic from HA:

{
"topic":"homeassistant/binary_sensor/alarm_panel/box__siren_tamper/config",
"retain":"true"
}

Then restart HA. Hope this helps someone.

@OttoWinter, any chance we could have feature implemented into the addon to make this process easier?


#106

I am trying to do the first upload of a yaml file from a Raspberry to a NodeMCU via a USB cable and I am getting the following error:

Segmentation fault
*** [.pioenvs/livingroom/firmware.bin] Error 139

Any advice on resolving this will be appreciated.


#107

@talondnb hi friend can you post an example how to configure Ota? I cant sent the code…the esphomelib return always this error:

Host: teste.internal.local not found.


#108

Follow this post:


#109

@OttoWinter: thanks for your answer. You were right the problem was in the initial flashing stage, something wrong with the serial-USB device. Finally it got it at /dev/ttyUSB1 and it appears on the dashboard.

Then the compilation and the first firmware upload by USB apparentely works, great!!! but I can’t see the log. I’m using the dashboard and once the upload process finishes, it seems to call the Log option but something is wrong there because there is no answer. This is the upload log:

INFO [esphomeyaml.__main__] Successfully compiled program.
INFO [esphomeyaml.__main__] Uploading binary...
INFO [esphomeyaml.__main__] Running:  esptool.py --before default_reset --after hard_reset --chip esp8266 --port /dev/ttyUSB0 write_flash 0x0 sonoff_sirena1/sonoff_sirena1/.pioenvs/sonoff_sirena1/firmware.bin
esptool.py v2.3.1
Connecting....
Chip is ESP8266EX
Features: WiFi
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 330448 bytes to 230478...
Writing at 0x0001c000... (53 %)
Writing at 0x00020000... (60 %)
Wrote 330448 bytes (230478 compressed) at 0x00000000 in 21.1 seconds (effective 125.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
INFO [esphomeyaml.__main__] Successfully uploaded program.
INFO [esphomeyaml.__main__] Starting log output from /dev/ttyUSB0 with baud rate 115200

If I use the Show Logs option of the dashboard I get the same results:

INFO [esphomeyaml.config] Reading configuration...
INFO [esphomeyaml.__main__] Starting log output from /dev/ttyUSB0 with baud rate 115200

Then, if I plug the sonoff switch to 220AC, I can’t see anything. No ping, no new MQTT discovered device, anything.

Am I missing something sure, but i can’t see it!. Thanks in advance for your help.


#110

Hmm weird. I think there could be two reasons why it’s not showing any logs:

  • It’s still in flash mode. When you uploaded the firmware I suppose you had to first put it into flash mode by pressing some button while plugging it into USB. Try disconnecting+reconnecting the USB cable and then pressing the logs button.
  • All the initial log messages are already over when you press the show logs button. I guess the only option to work around this at this time is using a serial monitor on your computer (not hassIO). For example, you could connect the Sonoff device to your computer and use the serial monitor on the Arduino IDE to view the serial logs (set baud rate to 115200).

I’m away from my development machine for a few days so I can’t really help much more at this point (this is also why I’m not active on the GitHub issue tracker atm, sorry everybody!)


#111

how to configure two PCF8574 I/O Espander?

will this work?

pcf8574:

  • id: ‘pcf8574_hub1’
    address: 0x20
    pcf8575: False

  • id: ‘pcf8574_hub2’
    address: 0x21
    pcf8575: False

(sorry for the poor formatting)


#112

Hi, It’s working!!!
First option: it was in flash mode. I tried to disconnecting+reconnecting the USB cable, then go to the log button and the issue was there: some problem with the WiFi network. Then I change the WiFi and everything started working !!!

This is awesome , some minutes later I had two switches working in my Home assistant. Thanks a lot!


#113

i have the same problem have you found any solution

ERROR [esphomeyaml.espota] No response from the ESP


#114

That does not appear to be the same problem.


#115

@kem i solve my problem with that config:

wifi:
  ssid: 'xxxxxx'
  password: 'xxxxx'
  domain: .internal.local
  manual_ip:
    static_ip: 192.168.1.66
    gateway: 192.168.1.254
    subnet: 255.255.255.0

#116

thanks my friend


#117

Could someone help me get this awesomeness up and running on my Synology NAS as Docker Container?


#118

LGTM :+1:

@Tobse101 I don’t have a synology NAS and so do not know how to create docker containers in that ecosystem, but I am using esphomeyaml with docker myself. Maybe the docker command here can help? https://esphomelib.com/esphomeyaml/guides/getting_started_command_line.html#bonus-esphomeyaml-dashboard


#119

Synology uses Docker Hub to download containers. Just found your docker and currently downloading it. Thanks for the link! I´ll give it a try.

@OttoWinter It´s running. May I send you some screenshots for documentation or is there a way i can create a PR?


#120

Is anyone else having problems with Sonoff basic? Flashing and initial use work fine, but if you take the power for many minutes the Sonoff will not start/connect to the network anymore.

From the dhcp log on my router, I can`t even see that the device is getting any IP, (Have static IP on IoT devices) can I see the debug from Arduino og platform.io?

espurna is working fine on same device and I have multiple Wemos up and running EspHomelib


#121

[update] It seems to have cleared up, but I’m not sure why. Now to figure out why all, but the brightness are being picked up by mqtt discovery.

[update2] All good. Looks like it was discovered, but under a different name. Cleared it from the entity_registry and showed up fine after restart.

First try with one of these so I hope that it’s something simple.
I’m trying to setup the bruh multisensor, but I’m seeing this error popup in the logs.

[12:50:12][E][sensor.dht:151]: Checksum invalid: 1!=176
[12:50:12][W][sensor.dht:059]: Invalid readings! Please check your wiring (pull-up resistor, pin_ number) and consider manually specifying the DHT model using the model option. Error code: 0

I manually set the model to ASM2302 just in case. I changed out the wires and I confirmed that they’re in the right pins.


#122

@OttoWinter: are there any plans for python3 support in the near future?


#123

As soon as the build system that compiles the firmwares, platformio.org, is compatible with python 3


#124

Static IP didn’t work. I’m getting this with hassio addon:

Error loading shared library libstdc++.so.6: No such file or directory (needed by /root/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++)
Error relocating /root/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++: _obstack_memory_used: symbol not found
Error relocating /root/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++: _Znwj: symbol not found...

Here is my config:
esphomeyaml:
name: esp32_1
platform: ESP32
board: esp32dev

wifi:
ssid: ‘xxx’
password: ‘xxx’
domain: .internal.local
manual_ip:
static_ip: 192.168.1.67
gateway: 192.168.1.1
subnet: 255.255.255.0

mqtt:
broker: ‘192.168.1.112’
username: ‘xxx’
password: ‘xxx’

Enable logging

logger:

ota:
password: ‘xxx’

Any Ideas?