-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when flashing initial .yaml to Wemos D1 mini #25
Comments
Could be that you are compiling for the wrong board type. |
I actually just found the issue, I had some extra text in the code somehow, see below:
|
Ok, well I was able to successfully flash it but it now stays offline. I've tried changing the WiFi info but no luck. Below is the config:
|
I'm not sure if the other format and info such as "bssid" and whatever else is needed or not but I changed it to the following format and it goes online now. wifi: |
Sorry, one more thing, I tried exposing the raw sensor to home assistant by changing True to False but I am not seeing the sensor anywhere in home assistant. Do you know where I should see it? |
It should be listed in: |
Thank you again for replying, but that's where I was looking, it's just not there. I've changed it to "False", saved and flashed it and tried restarting HA but it still doesn't show up. I of course could be doing something else wrong :) I've also noticed when trying to read the ESPHome logs, I'm not getting anything except for what you can see in the attached image. |
Hmm, indeed I also cannot see it. Seems like something changed on the ESPHome side since this definitely worked at some point. I have updated the configuration to include a diagnostic sensor that will show the initial raw sensor value of the HX711 chip. This value will only update a single time when the ESP boots up. If you want to get a new value while the ESP is still on you can trigger an update using the "manual tare" button action. Otherwise simply reboot the ESP to get a new value. See #27 Let me know if that helps. |
Okay so, I wasn't able to get the smart_scale_hx711_value_raw sensor to show up, so I just created another one (shown below) and had it return the raw value. After that, the new sensor showed up and I was able to get everything working correctly now. Hopefully it was the correct return value I was looking for, it does seem to work good now so I am assuming it was. Thanks again for your help.
|
Lol, I didn't see your reply until after sending my last one. Thank you for looking into it and I will add the new sensor you created and if I have any issues, I will try what you said. |
@ryknow27 No worries 😄 I would recommend to use the solution I created in #27 or at least to remove the sensor you created after you have finished the calibration, since updating this sensor every 0.2 seconds will cause a lot of network traffic that is not necessary and might even cause problems for other devices on the network. Good to hear you found a solution and that it works well 🤓 |
@markusressel Sorry to bother you again but do you know if the lovelace card still works? I've tried installing it a few time but I keep getting "Custom element doesn't exist: multiple-entity-row." I have installed per the instructions for the card but haven't had any luck. I was about to bring up an issue on that github but thought I would ask here first. |
I am still using it, so I would assume it does. I have it installed years ago though. |
Should have asked earlier as well but would you mind sharing how/where you created the entity for Markus's weight? |
"input_number.weight_markus" is a custom "input number" entity defined through the home assistant configuration yaml. See: https://www.home-assistant.io/integrations/input_number/ The value of this input number is updated through an automation that looks for the scale value to be above a certain threshold for a certain amount of time (3 seconds or something like that). With this setup I can step on the scale at any time, wait a couple of seconds and my current weight will be saved in the history of this entity.
|
Regarding the error: multiple entity row requires both a main entity definition as well as a list of entities to show next to it. You seem to be missing thr main entity (the one shown on the right end, which will also dictate the behavior of the card). |
Thank you, I'll look into that! |
I am closing this, since the original issue is fixed. Feel free to open another issue if anything comes up. |
I am fairly new when it comes to ESPHome. I have been using a bed scale that I flashed using arduino but it hasn't been very reliable and I wanted to try it with ESPHome. I changed the info in the .yaml that I know but, I guess I don't know what else to change. Below is the errors I get. Any help I can get would be greatly appreciated.
`INFO ESPHome 2024.5.0
INFO Reading configuration /config/esphome/bed-scale.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing smartscale (board: d1_mini; framework: arduino; platform: platformio/espressif8266@4.2.1)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
Compiling .pioenvs/smartscale/src/main.cpp.o
Compiling .pioenvs/smartscale/lib67b/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling .pioenvs/smartscale/lib67b/ESP8266WiFi/ESP8266WiFiAP.cpp.o
src/main.cpp:37:36: error: 'floatGPIO' was not declared in this scope
37 | globals::RestoringGlobalsComponent auto_tare_difference;
| ^~~~~~~~~
src/main.cpp:37:45: error: template argument 1 is invalid
37 | globals::RestoringGlobalsComponent auto_tare_difference;
| ^
/config/esphome/bed-scale.yaml: In function 'void setup()':
/config/esphome/bed-scale.yaml:146:65: error: 'floatGPIO' was not declared in this scope
146 | name: "Smart Scale HX711 Value"
| ^
/config/esphome/bed-scale.yaml:146:74: error: template argument 1 is invalid
146 | name: "Smart Scale HX711 Value"
| ^
/config/esphome/bed-scale.yaml:147:25: error: request for member 'set_component_source' in ' auto_tare_difference', which is of non-class type 'int'
147 | internal: False
| ^
/config/esphome/bed-scale.yaml:149:25: error: request for member 'set_name_hash' in ' auto_tare_difference', which is of non-class type 'int'
149 | # apply auto_tare difference
| ^~~~~~~~~~
/config/esphome/bed-scale.yaml: In lambda function:
/config/esphome/bed-scale.yaml:61:29: error: request for member 'value' in '* auto_tare_difference', which is of non-class type 'int'
61 | id(auto_tare_difference) = id(initial_zero) - id(smart_scale_hx711_value_raw).state;
| ^~~~~
/config/esphome/bed-scale.yaml: In lambda function:
/config/esphome/bed-scale.yaml:91:36: error: request for member 'value' in '* auto_tare_difference', which is of non-class type 'int'
91 | return id(auto_tare_difference);
| ^~~
/config/esphome/bed-scale.yaml: In lambda function:
/config/esphome/bed-scale.yaml:132:98: error: request for member 'value' in '* auto_tare_difference', which is of non-class type 'int'
132 | - lambda: 'return id(smart_scale_hx711_value_raw).state < (id(initial_zero) - id(auto_tare_difference));'
| ^~~~~
/config/esphome/bed-scale.yaml: In lambda function:
/config/esphome/bed-scale.yaml:136:29: error: request for member 'value' in '* auto_tare_difference', which is of non-class type 'int'
136 | id(auto_tare_difference) += 10;
| ^~~~~
/config/esphome/bed-scale.yaml: In lambda function:
/config/esphome/bed-scale.yaml:140:29: error: request for member 'value' in '* auto_tare_difference', which is of non-class type 'int'
140 | id(auto_tare_difference) -= 10;
| ^~~~~
/config/esphome/bed-scale.yaml: In lambda function:
/config/esphome/bed-scale.yaml:150:40: error: request for member 'value' in '* auto_tare_difference', which is of non-class type 'int'
150 | - lambda: 'return x + id(auto_tare_difference);'
| ^~~~~
In file included from src/esphome/components/api/api_connection.h:7,
from src/esphome.h:3,
from src/main.cpp:3:
src/esphome/core/application.h: In instantiation of 'C* esphome::Application::register_component(C*) [with C = int]':
/config/esphome/bed-scale.yaml:148:46: required from here
src/esphome/core/application.h:183:50: error: static assertion failed: Only Component subclasses can be registered
183 | static_assert(std::is_base_of<Component, C>::value, "Only Component subclasses can be registered");
| ^~~~~
Compiling .pioenvs/smartscale/lib67b/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
*** [.pioenvs/smartscale/src/main.cpp.o] Error 1
========================== [FAILED] Took 3.62 seconds ==========================
`
The text was updated successfully, but these errors were encountered: