esphome / esphome-core

🚨 No longer used 🚨 - The C++ framework behind ESPHome
https://esphome.io/
GNU General Public License v3.0
547 stars 115 forks source link

dev branch: error: 'class esphomelib::WiFiComponent' has no member named 'set_sta' #331

Closed DavidDeSloovere closed 5 years ago

DavidDeSloovere commented 5 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.): hassio

ESP (ESP32/ESP8266/Board/Sonoff): esp8266 wemos d1 mini

Affected component: wifi

Description of problem: Compile with DEV branch (esphomelib_version: dev) not working with wifi settings.

Problem-relevant YAML-configuration entries:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.0.71
    gateway: 192.168.0.1
    subnet: 255.255.255.0

Traceback (if applicable):

Compiling .pioenvs/wemos_bandit_scrappy/lib4d9/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
src/main.cpp: In function 'void setup()':
src/main.cpp:14:19: error: 'class esphomelib::WiFiComponent' has no member named 'set_sta'
_wificomponent->set_sta(::WiFiAp{
^
src/main.cpp:14:27: error: '::WiFiAp' has not been declared
_wificomponent->set_sta(::WiFiAp{
^
*** [.pioenvs/wemos_bandit_scrappy/src/main.cpp.o] Error 1

Additional information: Also tried commenting out manual_ip block, but that does't seem to matter.

brainexe commented 5 years ago

same error for me on ESP32:

homeyaml:
  platform: espressif32
  board: esp32doit-devkit-v1
  esphomelib_version: dev 

wifi:
  ssid: !secret wifi_sid
  password: !secret wifi_password
Compiling .pioenvs/wohnzimmer/liba6f/WiFi/WiFiMulti.cpp.o
src/main.cpp: In function 'void setup()':
src/main.cpp:14:19: error: 'class esphomelib::WiFiComponent' has no member named 'set_sta'
_wificomponent->set_sta(::WiFiAp{
^
src/main.cpp:14:27: error: '::WiFiAp' has not been declared
_wificomponent->set_sta(::WiFiAp{
^
src/main.cpp:31:30: warning: statement has no effect [-Wunused-value]
_application_makedhtsensor.dht;
^
*** [.pioenvs/wohnzimmer/src/main.cpp.o] Error 1
=
emwap commented 5 years ago

I think you need the dev branch of both esphomelib and esphomeyaml together.

Maybe reinstalling esphomeyaml triggered or updated something, but it solved the issue for me.

brandond commented 5 years ago

Yeah, if you're using esphomelib_version: dev you should probably install esphomeyaml from git as well, otherwise odds are good that esphomeyaml is going to generate code that doesn't compile against the newer version of esphomelib.

pip install --upgrade git+https://github.com/OttoWinter/esphomeyaml

DavidDeSloovere commented 5 years ago

Great. I'm using the esphomeyaml-edge hassio addon now instead of esphomeyaml-beta and it works.

I was mislead by the naming. Neither edge or beta of the addon align with dev from the lib. So I thought beta and dev would be a good match. It's not. Edge and dev are the correct ones.

Just figured out it's in the docs. https://esphomelib.com/esphomeyaml/guides/faq.html?highlight=edge#how-do-i-use-the-latest-bleeding-edge-version

@OttoWinter maybe something to keep tabs on, if more people make the incorrect assumption, changing the description of the 3 different addon versions might help.