se-bastiaan / esphome-simplebus2

Component that allows you to run alternative ESPHome based firmware on your Simplebus2 MQTT Bridge.
GNU General Public License v3.0
5 stars 1 forks source link

calibration setup #2

Open LaurensdeGraaff opened 2 months ago

LaurensdeGraaff commented 2 months ago

I bought the hardware from Elektroarzt, flashed esphome, but can't get it to work. I do not have a oscilloscope to measure/monitor the input.

I tried some different combination or reading the voltage over ADC. In the end I do get some information from the log, but no message is being decoded. Also; there is a giant delay (~60s) between pressing the doorbell and the messages on the screen.

[20:35:32][D][simplebus2:153]: Preamble - 17912 [20:35:32][D][simplebus2:173]: 1 - 6540 [20:35:32][D][simplebus2:147]: Resetting preamble - 212111 [20:35:32][D][simplebus2:153]: Preamble - 17580 [20:35:32][D][simplebus2:153]: Preamble - 17689 [20:35:32][D][simplebus2:147]: Resetting preamble - 27052 [20:35:32][D][simplebus2:153]: Preamble - 17661 [20:35:32][D][simplebus2:147]: Resetting preamble - 212522 [20:35:32][D][simplebus2:153]: Preamble - 17587 [20:35:32][D][simplebus2:153]: Preamble - 17681 [20:35:32][D][simplebus2:153]: Preamble - 17611 [20:35:32][D][simplebus2:164]: 0 - 2635 [20:35:32][D][simplebus2:164]: 0 - 3169 [20:35:32][D][simplebus2:173]: 1 - 5752 [20:35:32][D][simplebus2:164]: 0 - 3133 [20:35:32][D][simplebus2:173]: 1 - 5598 [20:35:33][D][simplebus2:147]: Resetting preamble - 206579 [20:35:33][D][simplebus2:153]: Preamble - 17856

Do you have any idea/advice how to get the correct gain and voltage_level?

se-bastiaan commented 2 months ago

Have you been able to use any working values with the original firmware?

LaurensdeGraaff commented 2 months ago

I flashed esphome before ever booting the original firmware (I should have tested, oops) so I haven't tested that. I can't get the original firmware build so I was hoping to fix it within esphome

se-bastiaan commented 2 months ago

The values should theoretically be the same as for the original firmware since the interrupt processing works the same, but when looking at your logs in more detail you don't even seem to get anything messages at all.

I've just reverted to the original firmware myself since my doorbell ceases to work (specifically my apartment unit) when I connected the bridge running esphome. I suspect it may be using too much power since it runs at full CPU speed.

LaurensdeGraaff commented 2 months ago

I can't get a working compile environment set up, do you happen to have the bin file for the original firmware? The bin in the original project bootloops my device.

You can underclock the CPU by doing

esphome:
  name: ${devicename}
  friendly_name: ${friendly_name}
  build_path: build/doorbell
  platformio_options:
    board_build.f_cpu: 80000000L 

I haven't tested above, will try later/when I have time.

se-bastiaan commented 2 months ago

The bin in the repo doesn't work for me when flashed with esptool either, so it's probably the flashing that's going wrong. Maybe the software mentioned here works.

I'd already found the platformio options indeed, but decided it would be best to re-establish that my gain/voltage values are correct.