Sendspin time message timeouts and bad stuttering / no audio

A few weeks ago I built a Sendspin player based on this design: [GitHub - RealDeco/SendspinZero: Sendspin Audio Receiver for your Stereo/Amplifier · GitHub] and was very happy with it - it just worked. Very well!

Yesterday, while playing, it started stuttering with big breaks in the audio. Some fault finding led me to look at the ESPHome logs, which contained entries like this:

INFO ESPHome 2026.4.3 INFO Reading configuration /config/esphome/sendspin-lounge.yaml... INFO Starting log output from 192.168.x.x using esphome API INFO Successfully resolved sendspin-lounge @ 192.168.x.x in 0.000s INFO Successfully connected to sendspin-lounge @ 192.168.0.42 in 0.651s INFO Successful handshake with sendspin-lounge @ 192.168.0.42 in 0.668s [08:32:05.264][W][sendspin.time_burst:044]: Time message 1/8 timed out [08:32:06.299][W][sendspin.time_burst:044]: Time message 2/8 timed out [08:32:07.259][W][sendspin.time_burst:044]: Time message 3/8 timed out [08:32:08.342][W][sendspin.time_burst:044]: Time message 4/8 timed out [08:32:09.328][W][sendspin.time_burst:044]: Time message 5/8 timed out [08:32:10.353][W][sendspin.time_burst:044]: Time message 6/8 timed out [08:32:10.811][W][sendspin.protocol:086][httpd]: Mismatched time message history, discarding measurement [08:32:10.811] [W][sendspin.protocol:086][httpd]: Mismatched time message history, discarding measurement [08:32:11.512] [W][sendspin.time_burst:044]: Time message 7/8 timed out [08:32:12.349] [W][sendspin.time_burst:044]: Time message 8/8 timed out [08:32:12.389] [W][sendspin.protocol:086][httpd]: Mismatched time message history, discarding measurement [08:32:12.389] [W][sendspin.protocol:086][httpd]: Mismatched time message history, discarding measurement [08:32:14.549] [W][sendspin.protocol:086][httpd]: Mismatched time message history, discarding measurement [08:32:15.223] [W][sendspin.protocol:086][httpd]: Mismatched time message history, discarding measurement [08:32:16.712] [W][sendspin.protocol:086][httpd]: Mismatched time message history, discarding measurement

That was with Music Assistant 2.8.6 and I have since downgraded to 2.8.5 (which worked well) but the problem persisted so I upgraded to 2.8.6 again.

I have also rebuilt the ESPHome device, including clean build but, again, that didn’t help.

This is on HAOS running on a desktop PC:

  • Core 2026.4.4
  • Supervisor 2026.04.0
  • Operating System 17.2
  • Frontend 20260325.8

Does anyone have any ideas what could be causing this, diagnostic actions and, ideally, corrective actions please?

First thing to understand is this is still in beta and changing a lot.

That being said if you are using @RealDeco code it should be working. What version of esphome are you using?

If you have modified the code at all post it here. Also the code was changed 2 weeks ago so you may want to check the external components in the code.

Thanks, @Arh - I understand that it is beta but what threw me was that it developed the problem suddenly, while playing, after working unchanged for a few weeks.

This (Sendspin) is a really exciting development and the work of @RealDeco is brilliant so please don’t interpret any of this as criticism.

The actual yaml follows - I have added a few sections but all these were after the problems started and made no difference. I also changed the LED brightness but, again, after the problem started.

I’m now on ESPHome 2026.4.3 - when this started I was on 2026.4.1 and went direct to 2026.4.3 in an attempt to address the issue.

I’m using the Toslink version.

# See https://github.com/RealDeco/SendspinZero/tree/main

## SendspinZero for Analog + Digital Coax and Toslink versions WITHOUT display. Edit the settings below.
substitutions:
  name: sendspin-lounge
  friendly_name: "Sendspin: Lounge"

## SETTINGS ######################################################################################################################################

  # Startup sound, options are: Home_Connected or Home_Connected_Male
  startup_sound_file: Home_Connected

  # your home assistant weather entity, in most cases the same.
  ha_weather_entity: weather.forecast_home

packages: # uncomment the one you use (analog for normal jack, digital for coax or toslink spdif)

#  hw: #ANALOG
#    url: https://github.com/RealDeco/SendspinZero.git
#    ref: main
#    refresh: 0s
#    files:
#      - analog_speaker_config.yaml

  hw: #DIGITAL
    url: https://github.com/RealDeco/SendspinZero.git
    ref: main
    refresh: 0s
    files:
      - digital_speaker_config.yaml

##################################################################################################################################################

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  min_version: 2026.1.0
  name_add_mac_suffix: false
  on_boot:
    priority: -100
    then:
      - script.execute: led_red

esp32:
  variant: esp32s3
  framework:
    type: esp-idf

logger:
  level: warn

api:
  on_client_connected:
    - lambda: |-
        if (!id(boot_sound_played)) {
          id(boot_sound_played) = true;
          if (id(startup_sound_switch).state) {
            id(play_sound)->execute(true, std::string("ready_sound"));
          }
        }

ota:
  - platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    password: !secret wifi_password


psram:
  mode: quad
  speed: 80MHz

captive_portal:

external_components:
  - source:
      # https://github.com/esphome/esphome/pull/14933
      type: git
      url: https://github.com/kahrendt/esphome
      ref: 890e33f99af2c2ea15dc74c3ec4cf32d25203526
    components: [const, media_source, sendspin, generic_image]
  - source:
      # https://github.com/esphome/esphome/pull/12429
      type: git
      url: https://github.com/esphome/esphome
      ref: ff8ce89556748509d7ee8724e12d9d43d3c8c1e8
    refresh: 0s
    components: [http_request]

# I tried adding this - it made no difference.
#network:
#  enable_high_performance: false 

# I added the next two after the problems started
text_sensor:
  - platform: wifi_info
    ip_address:
      name: "${friendly_name} IP Address"
      icon: mdi:ip-network
    
sensor:
  - platform: wifi_signal
    name: "${friendly_name} WiFi Signal"
    update_interval: 60s    
    


sendspin:
  id: sendspin_hub
  task_stack_in_psram: false

http_request:
  buffer_size_rx: 2048  # Reduces CPU load when streaming audio

audio_file:
  - id: ready_sound
    file: https://github.com/RealDeco/xiaozhi-esphome/raw/main/sounds/${startup_sound_file}.flac

media_source:
  - platform: audio_file
    id: audio_file_announcement_source
  - platform: http_request
    id: http_announcement_source
    buffer_size: 250000
  - platform: http_request
    id: http_media_source
    buffer_size: 500000
  - platform: sendspin
    id: sendspin_media_source

media_player:
  - platform: sendspin
    id: sendspin_group_media_player
    name: Sendspin Group Media Player

  - platform: speaker_source
    id: external_media_player
    name: Media Player

    announcement_pipeline:
      format: FLAC
      num_channels: 1
      sample_rate: ${media_sample_rate}
      speaker: announcement_resampling_speaker
      sources:
        - audio_file_announcement_source
        - http_announcement_source

    media_pipeline:
      format: FLAC
      num_channels: 2
      sample_rate: ${media_sample_rate}
      speaker: media_resampling_speaker
      sources:
        - http_media_source
        - sendspin_media_source
    volume_increment: 0.05
    volume_min: 0.4
    volume_max: 0.9

    on_state:
      then:
        - lambda: |-
            using media_player::MediaPlayerState;
            auto state = id(external_media_player).state;
            if (
              state == MediaPlayerState::MEDIA_PLAYER_STATE_PLAYING ||
              state == MediaPlayerState::MEDIA_PLAYER_STATE_ANNOUNCING
            ) {
              id(led_green).execute();
            } else {
              id(led_red).execute();
            }

script:
  - id: play_sound
    parameters:
      priority: bool
      sound_file: string
    then:
      - if:
          condition:
            lambda: return priority;
          then:
            - media_player.stop:
                id: external_media_player
                announcement: true
      - lambda: |-
          if ((id(external_media_player).state != media_player::MediaPlayerState::MEDIA_PLAYER_STATE_ANNOUNCING) || priority) {
            id(external_media_player)
              ->make_call()
              .set_media_url("audio-file://" + sound_file)
              .set_announcement(true)
              .perform();
          }

  - id: led_red
    then:
      - light.turn_on:
          id: led
          red: 100%
          green: 0%
          blue: 0%
          brightness: 40%

  - id: led_green
    then:
      - light.turn_on:
          id: led
          red: 0%
          green: 100%
          blue: 0%
          brightness: 40%

switch:
  - platform: template
    id: startup_sound_switch
    name: Startup sound
    icon: "mdi:card-text-outline"
    entity_category: config
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
# Added this to restart the ESPHome device remotely
  - platform: restart
    name: "${friendly_name} Restart"
    
globals:
  - id: boot_sound_played
    type: bool
    restore_value: no
    initial_value: "false"
  - id: boot_announce_active
    type: bool
    restore_value: no
    initial_value: "false"

light:
  - platform: esp32_rmt_led_strip
    id: led
    name: LED light
    disabled_by_default: false
    entity_category: config
    pin: GPIO21
    default_transition_length: 0s
    chipset: WS2812
    num_leds: 1
    rgb_order: grb
    effects:
      - pulse:
          name: "Slow Pulse"
          transition_length: 250ms
          update_interval: 250ms
          min_brightness: 50%
          max_brightness: 100%
      - pulse:
          name: "Fast Pulse"
          transition_length: 100ms
          update_interval: 100ms
          min_brightness: 50%
          max_brightness: 100%

Well don’t see anything wrong there. Maybe its a physical thing? How are the parts connected?

I have not played with Toslink so really have little experience of that.

Thanks for checking the yaml.

The Toslink is connected exactly as per the diagram on @RealDeco Github GitHub - RealDeco/SendspinZero: Sendspin Audio Receiver for your Stereo/Amplifier · GitHub - GPIO4 to the Toslink is the only connection, apart from power.

I will explore moving the device in case there is WiFi interference but the distance is only about 2m so I think that unlikely.

Thanks again for your help and suggestions!

I didn’t mean which pin it was connected to, I meant is it soldered rather than jumper cables etc, and are the joints all good.

But wifi could be an issues especially if using a zero board as they don’t have great antennas.

Ah, apologies! Yes, fully soldered.

Update:

I couldn’t find anything wrong with my network and the WAP is now within 1 metre and the ESP32 reports a decent signal strength (-45dbm) but I was still getting random issues and the logs were showing random failures.

I became convinced that the cheap ESP32-S3 Zero board I used was faulty but decided to try something I use on ESP32-C3 Zero boards. I reduced the network power using the output_power argument:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    password: !secret wifi_password
  output_power: 8.5

So far, so good - I’ll run it for a few hours to check but I’m hopeful this will help.

Good thinking, the C3 uses the same antenna as the zero, as far as I know and it seems to fix the c3’s :slight_smile:

I use that power setting on one of my home made voice boxes using an s3 n16r8 as its the only way to get it to connect, no idea why the others built the same are fine.

Well, that seems to have been the issue. About 8 hours solid playing music and no sign of any issues or log messages.

Weird how the problem suddenly manifested with no changes but this certainly seems to have helped.

I know it’s still in the beta phase, but is it already possible to use sendspin on an ESP32-S3-WROOM-1 (N8R2) with ESPHome version 2026.5.0-dev20260503? My ultimate goal is to connect active speakers via S/PDIF to the ESP and play my music library (MP3 and FLAC files) through Music Assistant.
Here ist my yaml which doesnt work, but maybe someone can give me a hint:

esphome:
  name: streamer1
  friendly_name: streamer1
  # PSRAM wird für flüssiges Audio-Streaming dringend empfohlen (N8R2 Modell)
  platformio_options:
    board_build.arduino.memory_type: qio_opi
    board_build.f_flash: 80000000L


esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: arduino


# Enable logging
logger:
  level: DEBUG


# Enable Home Assistant API
api:


ota:
  - platform: esphome
    password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

wifi:
  networks:
  - ssid: !secret wifi_ssid1
    password: !secret wifi_password1
  - ssid: !secret wifi_ssid2
    password: !secret wifi_password2

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Streamer1 Fallback Hotspot"
    password: "xxxxxxxxxxxx"

captive_portal:


# Aktivierung des PSRAM (N8R2 hat 2MB Quad-PSRAM)
psram:
  mode: octal

# I2S Audio Konfiguration (Anpassung der Pins je nach DAC)
i2s_audio:
  - id: i2s_bus
    i2s_bclk_pin: GPIO5
    i2s_lrclk_pin: GPIO6

# Lautsprecher-Plattform
speaker:
  - platform: i2s_audio
    id: mysendspin_speaker
    dac_type: external
    i2s_audio_id: i2s_bus
    i2s_dout_pin: GPIO02

audio:
  codecs:
    flac:
      buffer_memory: internal
    opus:
      state_memory: internal
      pseudostack:
        threadsafe: false

sendspin:
  id: mysendspin_hub

media_source:
  - platform: sendspin
    id: mysendspin_media_source
    decode_memory: internal

media_player:
  - platform: speaker_source
    id: mysendspin_player
    name: mysendspin Player
    media_pipeline:
      speaker: mysendspin_speaker
      sources:
        - mysendspin_media_source

There are errors shown in the logfile but I do not understand the reason for these error:

[14:25:54.058][C][logger:219]: Logger:
[14:25:54.058][C][logger:219]:   Max Level: DEBUG
[14:25:54.058][C][logger:219]:   Initial Level: DEBUG
[14:25:54.058][C][logger:226]:   Log Baud Rate: 115200
[14:25:54.058][C][logger:226]:   Hardware UART: USB_SERIAL_JTAG
[14:25:54.062][C][logger:235]:   Task Log Buffer Size: 768 bytes
[14:25:54.081][C][psram:016]: PSRAM:
[14:25:54.110][C][psram:019]:   Available: NO
[14:25:54.139][C][i2s_audio.speaker:048]: Speaker:
[14:25:54.139][C][i2s_audio.speaker:048]:   Pin: 2
[14:25:54.139][C][i2s_audio.speaker:048]:   Buffer duration: 500
[14:25:54.162][C][i2s_audio.speaker:054]:   Timeout: 500 ms
[14:25:54.162][C][i2s_audio.speaker.std:036]:   Communication format: std
[14:25:54.162][C][sendspin.hub:062]: Sendspin Hub:
[14:25:54.162][C][sendspin.hub:062]:   Client ID: 98:88:E0:90:33:98
[14:25:54.162][C][sendspin.hub:062]:   Task stack in PSRAM: NO
[14:25:54.175][E][component:224]:   sendspin is marked FAILED: unspecified
[14:25:54.220][C][speaker_source_media_player:053]: Speaker Source Media Player:
[14:25:54.220][C][speaker_source_media_player:053]:   Volume Increment: 0.05
[14:25:54.220][C][speaker_source_media_player:053]:   Volume Min: 0.00
[14:25:54.220][C][speaker_source_media_player:053]:   Volume Max: 1.00
[14:25:54.221][C][sendspin.media_source:031]: Sendspin Media Source: static_delay_adjustable=NO
[14:25:54.221][E][component:224]:   sendspin.media_source is marked FAILED: unspecified
[14:25:54.250][C][captive_portal:134]: Captive Portal:
[14:25:54.280][C][wifi:1526]: WiFi:

Best regars
Jarny

That board should work, well I know it does with a max98357.

Your psram should be quad not octal I believe. Your framework is going to have to be esp idf. You are going to need the external components as well.

I have no idea about S/PDIF stuff with it but I know a man who does.

RealDeco · GitHub.

Have a look at his sendspin zero stuff

Thanks for the feedback. I switched to the esp-idf framework and the errors have disappeared - great tip. I also corrected the psram mode to quad.
So far, the configuration is starting without any errors in the log. I didn’t need the external components after all it seems the Sendspin source code has already been merged into the dev branch. I am using Esphome builder (dev) plugin.
I can see the player in Music Assistant now.
Next, I’ll check if there is a spdif signal on GPIO2, and then I connect my active speakers using the appropriate terminating resistor.
Thanks a lot for the support!
Jarny