ESP S3-Box-3 Screen

I have voice assistant successfully running on my new box-3. I am wondering if there is a better way to use the screen. In the ideal, I’d love to be able to add 4 buttons (actions) that trigger scripts on my HA instance. But even a clock when it’s not actively listening would be more interesting than the at-rest icon. Any ideas how to make this happen?

1 Like

It is programmed in esphome.io

Thanks – unf my programming skills are non existent.

I’ve tried to borrow some YAML code from here: ESP Home and ESP32 S3 Box? - #22 by jaswalters

These are the changes I made to the local version of the package.

font:
  - file:
      type: gfonts
      family: Figtree
      weight: 300
      italic: true
    glyphs: ${allowed_characters}
    id: font_request
    size: 15
  - file:
...
  - file: "gfonts://Roboto"
    id: font_time
    size: 60
    glyphs: "0123456789:"
  - file: "gfonts://Roboto"
    id: font_date
    size: 30

time:
  - platform: homeassistant
    id: time_ha
    timezone: America/New_York

display:
...
    pages:
      - id: idle_page
        lambda: |-
          it.fill(Color(255, 255, 255));
          it.strftime(160, 85, id(font_time), Color::BLACK, TextAlign::CENTER, "%H:%M:%S", id(time_ha).now());
          it.strftime(160, 170, id(font_date), Color::BLACK, TextAlign::CENTER, "%d.%m.%Y", id(time_ha).now());

but when it compiles, I get this error:

/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: missing --end-group; added as last command line option
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/esp32-s3-box-3-05a8c4/src/esphome/components/api/api_connection.o:(.literal._ZN7esphome3api13APIConnection20on_get_time_responseERKNS0_15GetTimeResponseE+0x0): undefined reference to `esphome::homeassistant::global_homeassistant_time'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/esp32-s3-box-3-05a8c4/src/esphome/components/api/api_connection.o:(.literal._ZN7esphome3api13APIConnection20on_get_time_responseERKNS0_15GetTimeResponseE+0x4): undefined reference to `esphome::time::RealTimeClock::synchronize_epoch_(unsigned int)'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/esp32-s3-box-3-05a8c4/src/esphome/components/api/api_connection.o: in function `esphome::homeassistant::HomeassistantTime::set_epoch_time(unsigned int)':
/data/build/esp32-s3-box-3-05a8c4/src/esphome/components/homeassistant/time/homeassistant_time.h:15: undefined reference to `esphome::time::RealTimeClock::synchronize_epoch_(unsigned int)'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/esp32-s3-box-3-05a8c4/src/main.o:(.literal._Z5setupv+0x1fc): undefined reference to `vtable for esphome::homeassistant::HomeassistantTime'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/esp32-s3-box-3-05a8c4/src/main.o:(.literal._Z5setupv+0x5cc): undefined reference to `esphome::time::RealTimeClock::RealTimeClock()'
/data/cache/platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pioenvs/esp32-s3-box-3-05a8c4/src/main.o: in function `setup()':
/data/build/esp32-s3-box-3-05a8c4/src/main.cpp:1070: undefined reference to `esphome::time::RealTimeClock::RealTimeClock()'
collect2: error: ld returned 1 exit status
*** [.pioenvs/esp32-s3-box-3-05a8c4/firmware.elf] Error 1

Any help or insight appreciated…

@bcukier, I ran into the same error after adding “time:” to my code. Running a “Clean Build Files” function, a couple of times, cleared up the issue.

1 Like

I’m interested to do something similar. I have an ESPHome device with an OLED Screen that displays sensor data, I’d like to get the code from this device integrated with the Box 3 Voice Assistant so I can see sensor data on the Box 3 while it is in ‘wait’ mode. I am a real newbie to git hub but I have managed to fork the package into my own github. For now, I have made no changes to the code but when I try to install the package from my Github (github://ritehaus/firmware/wake-word-voice-assistant/esp32-s3-box-3.yaml@main) it fails. As soon as I revert to installing the package from the esphome github (github://esphome/firmware/wake-word-voice-assistant/esp32-s3-box-3.yaml@main) it installs fine,
This is the output I get when I try to install from my github:

INFO ESPHome 2024.5.5
INFO Reading configuration /config/esphome/esp32-s3-box-3-5a9544.yaml...
INFO Updating https://github.com/esphome/esphome.git@pull/5230/head
WARNING GPIO0 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Updating https://github.com/jesserockz/esp32-s3-box-3-board.git@main
INFO Updating https://github.com/espressif/[email protected]
INFO Updating submodules (components/esp-sr, components/esp-adf-libs) for https://github.com/espressif/[email protected]
Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 33, in <module>
    sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 1065, in main
    return run_esphome(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 1052, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 479, in command_run
    exit_code = write_cpp(config)
                ^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 193, in write_cpp
    return write_cpp_file()
           ^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 211, in write_cpp_file
    writer.write_cpp(code_s)
  File "/esphome/esphome/writer.py", line 344, in write_cpp
    copy_src_tree()
  File "/esphome/esphome/writer.py", line 297, in copy_src_tree
    copy_files()
  File "/esphome/esphome/components/esp32/__init__.py", line 697, in copy_files
    shutil.copytree(
  File "/usr/lib/python3.11/shutil.py", line 561, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/shutil.py", line 515, in _copytree
    raise Error(errors)
shutil.Error: [('/data/idf_components/b0ad5728/components/esp-sr/docs/myapp/lib64', '/data/build/esp32-s3-box-3-5a9544/components/esp-sr/docs/myapp/lib64', "[Errno 17] File exists: 'lib' -> '/data/build/esp32-s3-box-3-5a9544/components/esp-sr/docs/myapp/lib64'"), ('/data/idf_components/b0ad5728/components/esp-sr/docs/myapp/bin/python', '/data/build/esp32-s3-box-3-5a9544/components/esp-sr/docs/myapp/bin/python', "[Errno 17] File exists: 'python3' -> '/data/build/esp32-s3-box-3-5a9544/components/esp-sr/docs/myapp/bin/python'"), ('/data/idf_components/b0ad5728/components/esp-sr/docs/myapp/bin/python3', '/data/build/esp32-s3-box-3-5a9544/components/esp-sr/docs/myapp/bin/python3', "[Errno 17] File exists: '/usr/bin/python3' -> '/data/build/esp32-s3-box-3-5a9544/components/esp-sr/docs/myapp/bin/python3'")]

None of this means anything to me! Does it make sense to you? Any help or ideas are welcome.

I’m just replying so I can follow this. I’d love to have a clock display on the idle screen. Would be a great little bedside clock that turns the screen on with room presence but off during sleep mode.

This repository has the code that combines the voice assistant with a clock and other HA functionality. It is awesome:

With only a small bit of modification, I ported my alarm clock functionality from HA to the box3:

More info is here: