Closed flixlix closed 6 months ago
I was able to fix the above mentioned issue by entering the following:
python -m espefuse --port [MY_PORT] summary
This fix was shown here
But now I don't know how to get back the original firmware (or should I use the yaml and sh files in this repo?)
Very interesting error tbo. There is always a way to unbrick device. I still have to document that somewhere (short gpio pin 9 with ground or metal part on the esp32, casing, during boot)
you can reinstall using the script in this repo
Try using the website button at the bottom (use chrome) or
Clone the repo in linux env or so, and install using the script: production_installer.sh or upload using the button: muino-water-meter-esp32.bin
I make use of ESPHome, but I will try later this evening this weird issue. Maybe someone of Home-assistant or ESPHome users knows the issue.
I understand you want quick help, so if you want I can help you debugging in discord too with live chat
BTW insane slow shipping to Germany, to the USA it was in 6 days being received XD
Hey there Martijn! Thank you so much for the quick response and the very helpful support! I will try to use the script in the website and report back later how it turned out :)
I heard from close sources of the ESPHome devs that today tomorrow they will rollout an update that is very important that actually fixes your issue
Ooh that sounds promising!
Just tried uploading using the button at the bottom of your page but unfortunately it's stuck in "Preparing installation"... The console shows this, in case it helps:
Uploading from this live demo is no issue.
Anyways, I'll wait for the next version and see if the issue gets fixed with the upload :)
I will look at it later sorry for the inconvenience it causes. My watermeter stopped working after the last update, so there actual some vague issues in ESPHome that are out of my control.
I fixed the website. The esphome repo with the template doesn't work anymore.
@flixlix can you try uploading by website again? Please remove all previous created watermeters in home-assist under esphome and under devices->esphome
Thanks for your support. I was able to flash the board with a clean install and connect it to the network. Unfortunately the issue persists, that the board does not connect to my wifi when powered by a usb cable plugged in to a power socket adapter. If that helps debug the issue, the board does connect to wifi when I open the logs and have it connected through usb on my laptop. Also, the board seems to be rebooting when connected to normal power, because the led turns off and back on after a few seconds
I already spammed one of the ESPHome devs, but they are not very helpfull. I will try to use a different board type maybe that helps not sure, though.. I created again a new issue about it with esphome. I saw yours too! Thankyou for that maybe that helps!
I've edited the ESPHome code to look like this:
esphome:
name: test-device
friendly_name: test-device
includes:
- my_custom_component.h
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "********************************"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Test-Device Fallback Hotspot"
password: "************"
captive_portal:
web_server:
port: 80
sensor:
- platform: custom
lambda: |-
auto my_custom = new MyCustomSensor();
App.register_component(my_custom);
return {my_custom->water_liter_sensor, my_custom->sensa, my_custom->sensb, my_custom->sensc};
sensors:
- name: "water_liter_sensor"
unit_of_measurement: L
state_class: total_increasing
device_class: water
accuracy_decimals: 2
- name: "sensa"
accuracy_decimals: 2
- name: "sensb"
accuracy_decimals: 2
- name: "sensc"
accuracy_decimals: 2
and the top of the component to look like this:
#define SENS_A 2
#define SENS_B 3
#define SENS_C 4
#define LED 7
#define LIGHT_SEN_ENABLE 6
This now fixes the issue, that it doesn't come online when powered externally (presumably because I changed the board type).
Although I didn't mount the sensor yet, the light is on and there are some random measurements going off (which I think is good).
Something that is still weird is that the logs are filled with this:
Time | level | Tag | Message
-- | -- | -- | --
01:04:08 | [D] | [api:102] | Accepted 192.168.68.100
01:04:08 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:08 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:13 | [D] | [api:102] | Accepted 192.168.68.100
01:04:13 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:13 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:18 | [D] | [api:102] | Accepted 192.168.68.100
01:04:18 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:18 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:23 | [D] | [api:102] | Accepted 192.168.68.100
01:04:24 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:24 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:29 | [D] | [api:102] | Accepted 192.168.68.100
01:04:29 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:29 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:34 | [D] | [api:102] | Accepted 192.168.68.100
01:04:34 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:34 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:39 | [D] | [api:102] | Accepted 192.168.68.100
01:04:39 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:39 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:44 | [D] | [api:102] | Accepted 192.168.68.100
01:04:44 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:44 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:50 | [D] | [api:102] | Accepted 192.168.68.100
01:04:50 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:50 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:55 | [D] | [api:102] | Accepted 192.168.68.100
01:04:55 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:04:55 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:04:59 | [D] | [api:102] | Accepted 192.168.68.100
01:04:59 | [W] | [api.connection:097] | 192.168.68.100: Reading failed: BAD_INDICATOR errno=11
01:05:00 | [D] | [api:102] | Accepted 192.168.68.100
01:05:00 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:05:00 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:05:05 | [D] | [api:102] | Accepted 192.168.68.100
01:05:05 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:05:05 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:05:10 | [D] | [api:102] | Accepted 192.168.68.100
01:05:10 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:05:11 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:05:16 | [D] | [api:102] | Accepted 192.168.68.100
01:05:16 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:05:16 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:05:21 | [D] | [api:102] | Accepted 192.168.68.100
01:05:21 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:05:21 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
01:05:26 | [D] | [api:102] | Accepted 192.168.68.100
01:05:26 | [D] | [api.connection:1031] | Home Assistant 2023.9.1 (192.168.68.100): Connected successfully
01:05:26 | [D] | [api.connection:171] | Home Assistant 2023.9.1 (192.168.68.100) requested disconnected
I'm not sure if this is something to be worried about...
This 0xfffff is solved right?
btw you have to make sure previous watermeters are removed both under devices and esphome env
some issue in home assistant integration with esphome I heard
created in develop branch some pin defines for that board
Great, thank you for the support!
Not sure if I should open a new issue for this, but I have the following situation:
The sensor is currently installed (with zipties because my water meter does not have any holes for them). I placed the circle outline over the spinning wheel in a way that I can still read the meter.
All sensors are reporting some values, but the water liter sensor is giving me odd values.
Is the value not supposed to be always rising? (accumulated water usage?) The two spikes are correct(in a sense that there was more water being consumed, the values are too low), but the "standby" water usage is definitely 0, not 0.37
This is what it should look like. This example has a reset of the wifi in it too. This up and down movement means/could mean the lichtsensors are nog correctly being positioned.
Have you tried / Can you verify that the pins I posted work with the new esp esp32-c3-devkitm-1
board type?
see master branch, will check it, but first have to solve my server that broke down (sata connection, doesn't respond)
I think your pinout is wrong? Please see dev branch if that works! (currently raid setup still repairing estimated ~2days needed) /``` /GPIO
// mapping to match other feathers and also in order
Could you give an update on your sensor. I hope this week I can make some time for it
BTW we are working on a implementation of Matter, I dislike the stability of ESPHome
I updated the code with the pins you provided:
#define D4 27
#define D5 14
// mapping to match other feathers and also in order
#define A0 26
#define A1 25
#define A2 34
#define A3 39
#define SENS_A A0
#define SENS_B A1
#define SENS_C A2
#define LED D5
#define LIGHT_SEN_ENABLE D4
and the led doesn't light up anymore and the board became offline, it was working with the pins I provided but the values were off.
BTW we are working on a implementation of Matter, I dislike the stability of ESPHome
That's interesting, because I have about 35 devices using ESPHome and have had 0 stability issues
SO the moment you connect with serial usb it works right?
No, unfortunately that still doesn't make it available. Seems like with the pins you suggested it doesn't even boot... Where did you get the pin numbers from? I used the pinout schematic for the previous esp platform "seed..."
I will have a look tonight, I think its a simple config thingy but couldn't do any testing with it because of my server that broke down fysically. Give update tonight
I will double check it soon, but here is the layout of the scheme
Please do the following:
logger:
level: NONE
With which code? The code in your dev branch or this code I provided?
define SENS_A 2
define SENS_B 3
define SENS_C 4
define LED 7
define LIGHT_SEN_ENABLE 6
Is it currently working in your end?
Thank you for helping me finding this issue! Yes you are correct, see dev branch: watermeter_pinout
I am not sure why the led pin is not turning on. Going to look at it soon. I need to focus on the datasheet because I am not sure what the pin numbers should be at this moment. Maybe log the pin numbers from seeduino :p
Thank you for the board, got it yesterday! I am experiencing issues somewhat similar to those above. Before I write up a proper report, some quick questions to move this forward:
logger: level: NONE
Currently, I am using Arduino as my backbone for the project. I am going to remove that and only use yaml based implementation or esp lib only. There is an issue with Arduino and expressive librabry, if you want to use logging. Basically, after you restart and you do not open the serial port, the ESP crashing because of a watchdog that turns on.
@flixlix how is your sensor now?
UPD: moved to separate issue. TLDR: ESPHome adoption bricks device. Meter can communicate with HA but is sending suspicious data. Requesting build via docker that developer has tested for consistent performance. ESP integration not needed on my end.
In short, after ESPHome adoption (which includes reupload of config through EH and a build on the EH end) the board bricked with the LED stopping to glow. I managed to get the board up with the docker dev build command from your readme, updating the yaml config with info relevant to my wifi. Board now talks to HA.
The problem is the sensors are consistently reporting an errant minor .2 to .3 value when the meter water wheel is absolutely not moving. The graph should at the least be expected to include 150l use within 5 minutes once a day, on average, with filling of a water container. So 150 liter peak consumption is missing from the graph.
I have experimented with several repositioning over the analog wheel and taping over to exclude errant reflections. My meter, a retired German analog model, has the wheel on the other side of the ones used in your image examples. As far as I can tell, the circle marking on the board is directly over the analog wheel in my physical install.
I would appreciate if you could provide instructions or a flashable binary that you find works as expected. All I need is a means to communicate with HA, bypassing ESPHome adoption is perfectly fine.
I will have a look into this issue soon. Please create a new ticket for this, it's a different matter. In the meantime, we will build some tools that
I close this issue because it now is in issue #16
Hey there! First of all I would like to thank you for the effort with this board :) I bought one and it arrived yesterday. Today I tried setting it up but unfortunately was unsuccessful...
Problem/Motivation
Expected behavior
Actual behavior
Steps to reproduce
Proposed changes