diff --git a/dist/roverd-linux-amd64 b/dist/roverd-linux-amd64 index f566e273..90ac5c06 100755 Binary files a/dist/roverd-linux-amd64 and b/dist/roverd-linux-amd64 differ diff --git a/dist/roverd-linux-arm64 b/dist/roverd-linux-arm64 index 53fa020a..8db97f2c 100755 Binary files a/dist/roverd-linux-arm64 and b/dist/roverd-linux-arm64 differ diff --git a/dist/roverd-linux-armv6 b/dist/roverd-linux-armv6 index 2b63ada1..1708c90f 100755 Binary files a/dist/roverd-linux-armv6 and b/dist/roverd-linux-armv6 differ diff --git a/dist/roverd-linux-armv7 b/dist/roverd-linux-armv7 index 6969efe5..7b797089 100755 Binary files a/dist/roverd-linux-armv7 and b/dist/roverd-linux-armv7 differ diff --git a/docs/rover-media-profiles.md b/docs/rover-media-profiles.md index f5981e2e..1f98a4c7 100644 --- a/docs/rover-media-profiles.md +++ b/docs/rover-media-profiles.md @@ -13,22 +13,17 @@ Enabled profiles run setup serially, then stream independently. Setup failure st ## Command variables -Variables are supplied through the environment. Quote expansions normally, for example `"$ROVER_VIDEO_DEVICE"`. +Variables are supplied through the environment. Quote expansions normally, for example `"$ROVER_AUDIO_INPUT_DEVICE"`. | Variables | Meaning | | --- | --- | | `ROVER_NAME`, `ROVER_SERVER_HOST` | Identity and server hostname | | `ROVER_PROFILE_DIR`, `ROVER_REPO_DIR` | Persistent working directory and checkout | -| `ROVER_VIDEO_DEVICE`, `ROVER_VIDEO_INPUT_FORMAT` | Camera input | -| `ROVER_VIDEO_WIDTH`, `ROVER_VIDEO_HEIGHT`, `ROVER_VIDEO_FPS`, `ROVER_VIDEO_BITRATE` | Camera/encoder settings | -| `ROVER_VIDEO_INVERTED`, `ROVER_VIDEO_SENSOR_MODE` | Orientation and optional rpicam mode | | `ROVER_VIDEO_PUBLISH_URL`, `ROVER_AUDIO_PUBLISH_URL`, `ROVER_AUDIO_PLAYBACK_URL` | Complete derived RTSP URLs | | `ROVER_AUDIO_INPUT_DEVICE`, `ROVER_AUDIO_OUTPUT_DEVICE` | Generated logical ALSA microphone and forwarded-audio routes | -| `ROVER_AUDIO_SAMPLE_RATE`, `ROVER_AUDIO_CHANNELS`, `ROVER_AUDIO_BITRATE` | Microphone encoding settings | -| `ROVER_AUDIO_NORMALIZE`, `ROVER_AUDIO_NORMALIZE_FILTER` | Forwarded-audio normalization | -Fleet Management supports one custom profile per category, saved at `/etc/roverd/profiles/.yaml`. Saving a custom profile restarts roverd; choose it in the streamer's configuration to use it. +Fleet Management supports one custom profile per category, saved at `/etc/roverd/profiles/.yaml`. The selected setup/run commands are visible. Copy to custom lets you edit them; Save and use custom saves the configuration and selects the custom command in one restart. Camera and encoder options belong in these commands, not generic config fields. ## Audio constraints diff --git a/rover/profiles/audioCapture.yaml b/rover/profiles/audioCapture.yaml index 030b2932..d19ef2b8 100644 --- a/rover/profiles/audioCapture.yaml +++ b/rover/profiles/audioCapture.yaml @@ -6,7 +6,15 @@ apt-get update && apt-get install -y ffmpeg alsa-utils fi run: | - exec ffmpeg -nostdin -f alsa -ar "$ROVER_AUDIO_SAMPLE_RATE" -ac "$ROVER_AUDIO_CHANNELS" -i "$ROVER_AUDIO_INPUT_DEVICE" -c:a libopus -b:a "$ROVER_AUDIO_BITRATE" -f rtsp -rtsp_transport tcp "$ROVER_AUDIO_PUBLISH_URL" + sample_rate=48000 + channels=2 + bitrate=510000 + arecord -D "$ROVER_AUDIO_INPUT_DEVICE" -f S32_LE -c "$channels" -r "$sample_rate" -B 16384 -F 1024 -q -t raw | + ffmpeg -nostdin -hide_banner -loglevel warning -fflags nobuffer \ + -rtbufsize 0 -thread_queue_size 4096 -f s32le -ar "$sample_rate" -ac "$channels" -i pipe:0 \ + -af "volume=20dB" -c:a libopus -b:a "$bitrate" -ar:a "$sample_rate" -ac:a "$channels" \ + -application audio -frame_duration 20 -compression_level 0 \ + -flush_packets 1 -muxdelay 0 -muxpreload 0 -f rtsp -rtsp_transport tcp "$ROVER_AUDIO_PUBLISH_URL" - id: aiy name: Google AIY Voice HAT microphone description: HAT capture with S32_LE input, 20 dB microphone boost, and low-latency Opus settings. Reboot once after first enabling its hardware. @@ -34,15 +42,12 @@ apt-get update && apt-get install -y ffmpeg alsa-utils fi run: | - # Preserve the HAT capture format, gain, and low-cost Opus settings. - arecord -D "$ROVER_AUDIO_INPUT_DEVICE" -f S32_LE \ - -c "$ROVER_AUDIO_CHANNELS" -r "$ROVER_AUDIO_SAMPLE_RATE" \ - -B "${AUDIO_ALSA_BUFFER_BYTES:-16384}" -F "${AUDIO_ALSA_PERIOD_BYTES:-1024}" -q -t raw | + sample_rate=48000 + channels=2 + bitrate=510000 + arecord -D "$ROVER_AUDIO_INPUT_DEVICE" -f S32_LE -c "$channels" -r "$sample_rate" -B 16384 -F 1024 -q -t raw | ffmpeg -nostdin -hide_banner -loglevel warning -fflags nobuffer \ - -rtbufsize 0 -thread_queue_size 4096 -f s32le \ - -ar "$ROVER_AUDIO_SAMPLE_RATE" -ac "$ROVER_AUDIO_CHANNELS" -i pipe:0 \ - -af "volume=20dB" -c:a libopus -b:a "$ROVER_AUDIO_BITRATE" \ - -ar:a "$ROVER_AUDIO_SAMPLE_RATE" -ac:a "$ROVER_AUDIO_CHANNELS" \ + -rtbufsize 0 -thread_queue_size 4096 -f s32le -ar "$sample_rate" -ac "$channels" -i pipe:0 \ + -af "volume=20dB" -c:a libopus -b:a "$bitrate" -ar:a "$sample_rate" -ac:a "$channels" \ -application audio -frame_duration 20 -compression_level 0 \ - -flush_packets 1 -muxdelay 0 -muxpreload 0 \ - -f rtsp -rtsp_transport tcp "$ROVER_AUDIO_PUBLISH_URL" + -flush_packets 1 -muxdelay 0 -muxpreload 0 -f rtsp -rtsp_transport tcp "$ROVER_AUDIO_PUBLISH_URL" diff --git a/rover/profiles/audioPlayback.yaml b/rover/profiles/audioPlayback.yaml index 02934fdc..2551ba17 100644 --- a/rover/profiles/audioPlayback.yaml +++ b/rover/profiles/audioPlayback.yaml @@ -6,9 +6,14 @@ apt-get update && apt-get install -y ffmpeg alsa-utils fi run: | + normalize=true + normalize_filter='dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled' filters=() - if [ "$ROVER_AUDIO_NORMALIZE" = true ]; then filters=(-af "$ROVER_AUDIO_NORMALIZE_FILTER"); fi - exec ffmpeg -nostdin -rtsp_transport tcp -i "$ROVER_AUDIO_PLAYBACK_URL" -vn "${filters[@]}" -f alsa "$ROVER_AUDIO_OUTPUT_DEVICE" + if [ "$normalize" = true ]; then filters=(-af "$normalize_filter"); fi + ffmpeg -nostdin -hide_banner -loglevel warning -fflags nobuffer -flags low_delay \ + -analyzeduration 200k -probesize 32k -rtsp_transport tcp -i "$ROVER_AUDIO_PLAYBACK_URL" \ + -vn "${filters[@]}" -ac 1 -ar 16000 -f s16le pipe:1 | + aplay -q -D "$ROVER_AUDIO_OUTPUT_DEVICE" -t raw -f S16_LE -r 16000 -c 1 - id: aiy name: Google AIY Voice HAT speaker description: HAT playback with low-latency decoding and 16 kHz mono output through the configured audio route. Reboot once after initial setup. @@ -36,11 +41,11 @@ apt-get update && apt-get install -y ffmpeg alsa-utils fi run: | + normalize=true + normalize_filter='dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled' filters=() - if [ "$ROVER_AUDIO_NORMALIZE" = true ]; then filters=(-af "$ROVER_AUDIO_NORMALIZE_FILTER"); fi - # Decode to the same explicit HAT playback format as the previous listener. + if [ "$normalize" = true ]; then filters=(-af "$normalize_filter"); fi ffmpeg -nostdin -hide_banner -loglevel warning -fflags nobuffer -flags low_delay \ - -analyzeduration 200k -probesize 32k -rtsp_transport tcp \ - -i "$ROVER_AUDIO_PLAYBACK_URL" -vn "${filters[@]}" \ - -ac 1 -ar 16000 -f s16le pipe:1 | + -analyzeduration 200k -probesize 32k -rtsp_transport tcp -i "$ROVER_AUDIO_PLAYBACK_URL" \ + -vn "${filters[@]}" -ac 1 -ar 16000 -f s16le pipe:1 | aplay -q -D "$ROVER_AUDIO_OUTPUT_DEVICE" -t raw -f S16_LE -r 16000 -c 1 diff --git a/rover/profiles/video.yaml b/rover/profiles/video.yaml index 66bbbea6..a906dbda 100644 --- a/rover/profiles/video.yaml +++ b/rover/profiles/video.yaml @@ -4,9 +4,24 @@ setup: | command -v ffmpeg >/dev/null || { apt-get update && apt-get install -y ffmpeg; } run: | + device=/dev/video0 + input_format=mjpeg + width=640 + height=480 + fps=30 + bitrate=2000000 + inverted=false + input_options=() + if [ -n "$input_format" ]; then input_options=(-input_format "$input_format"); fi filters=() - if [ "$ROVER_VIDEO_INVERTED" = true ]; then filters=(-vf hflip,vflip); fi - exec ffmpeg -nostdin -f v4l2 -input_format "$ROVER_VIDEO_INPUT_FORMAT" -video_size "${ROVER_VIDEO_WIDTH}x${ROVER_VIDEO_HEIGHT}" -framerate "$ROVER_VIDEO_FPS" -i "$ROVER_VIDEO_DEVICE" "${filters[@]}" -an -c:v libx264 -preset ultrafast -tune zerolatency -pix_fmt yuv420p -b:v "$ROVER_VIDEO_BITRATE" -f rtsp -rtsp_transport tcp "$ROVER_VIDEO_PUBLISH_URL" + if [ "$inverted" = true ]; then filters=(-vf "transpose=2,transpose=2"); fi + exec ffmpeg -nostdin -hide_banner -loglevel warning -fflags nobuffer -flags low_delay \ + -thread_queue_size 4096 -f v4l2 "${input_options[@]}" -framerate "$fps" \ + -video_size "${width}x${height}" -i "$device" "${filters[@]}" -an \ + -c:v libx264 -preset veryfast -tune zerolatency -profile:v baseline -pix_fmt yuv420p \ + -b:v "$bitrate" -maxrate "$bitrate" -bufsize "$((bitrate / 2))" \ + -g "$fps" -keyint_min "$fps" -sc_threshold 0 -flush_packets 1 -muxdelay 0 -muxpreload 0 \ + -f rtsp -rtsp_transport tcp "$ROVER_VIDEO_PUBLISH_URL" - id: rpicam name: Raspberry Pi CSI camera description: rpicam/libcamera H.264 output, republished through ffmpeg. @@ -17,14 +32,20 @@ apt-get install -y rpicam-apps fi run: | + width=640 + height=480 + fps=30 + bitrate=2000000 + inverted=true + sensor_mode=1296:972 camera=$(command -v rpicam-vid || command -v libcamera-vid) options=() - if [ "$ROVER_VIDEO_INVERTED" = true ]; then options+=(--rotation 180); fi - if [ -n "$ROVER_VIDEO_SENSOR_MODE" ]; then options+=(--mode "$ROVER_VIDEO_SENSOR_MODE"); fi + if [ "$inverted" = true ]; then options+=(--rotation 180); fi + if [ -n "$sensor_mode" ]; then options+=(--mode "$sensor_mode"); fi # Preserve the previous Pi publisher's camera tuning and packet timing. "$camera" --inline --timeout 0 "${options[@]}" \ - --width "$ROVER_VIDEO_WIDTH" --height "$ROVER_VIDEO_HEIGHT" \ - --framerate "$ROVER_VIDEO_FPS" --bitrate "$ROVER_VIDEO_BITRATE" \ + --width "$width" --height "$height" \ + --framerate "$fps" --bitrate "$bitrate" \ --codec h264 --intra 120 --profile baseline --denoise auto --nopreview \ --metering centre --ev 0.1 --awb auto --saturation 0.6 --brightness 0 --output - | ffmpeg -nostdin -hide_banner -loglevel warning -fflags nobuffer \ diff --git a/rover/roverd/config.go b/rover/roverd/config.go index 7d317398..7c3d21b4 100644 --- a/rover/roverd/config.go +++ b/rover/roverd/config.go @@ -91,15 +91,7 @@ type VideoMediaConfig struct { Enabled bool `json:"enabled"` // PublishURL is derived during validation. It remains in rover metadata for server-side // consumers through MediaMetadata, but is never persisted in configuration. - PublishURL string `json:"-"` - Device string `json:"device"` - InputFormat string `json:"inputFormat"` - Width int `json:"width"` - Height int `json:"height"` - FPS int `json:"fps"` - Bitrate int `json:"bitrate"` - Inverted bool `json:"inverted"` - SensorMode string `json:"sensorMode"` + PublishURL string `json:"-"` } type AudioCaptureConfig struct { @@ -110,10 +102,6 @@ type AudioCaptureConfig struct { Enabled bool `json:"enabled"` // PublishURL follows the same derived-only contract as the video path. PublishURL string `json:"-"` - - SampleRate int `json:"sampleRate"` - Channels int `json:"channels"` - Bitrate int `json:"bitrate"` } type AudioPlaybackConfig struct { @@ -125,9 +113,6 @@ type AudioPlaybackConfig struct { Enabled bool `json:"enabled"` // ForwardURL is derived because the server and rover must agree on the exact -fwd path. ForwardURL string `json:"-"` - - Normalize bool `json:"normalize"` - NormalizeFilter string `json:"normalizeFilter"` } type CameraServoConfig struct { @@ -261,35 +246,10 @@ func DefaultConfig() Config { }, MaxWheelMMs: 500, Media: MediaConfig{ - RTSPPort: 8554, - - Video: VideoMediaConfig{ - Profile: "v4l2", - Enabled: true, - Device: "/dev/video0", InputFormat: "mjpeg", - - Width: 640, - Height: 480, - FPS: 30, - Bitrate: 2000000, - Inverted: false, - SensorMode: "", - }, - AudioCapture: AudioCaptureConfig{ - Profile: "alsa", - Enabled: true, - - SampleRate: 48000, - Channels: 2, - Bitrate: 510000, - }, - AudioPlayback: AudioPlaybackConfig{ - Profile: "alsa", - Enabled: true, - - Normalize: true, - NormalizeFilter: "dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled", - }, + RTSPPort: 8554, + Video: VideoMediaConfig{Profile: "v4l2", Enabled: true}, + AudioCapture: AudioCaptureConfig{Profile: "alsa", Enabled: true}, + AudioPlayback: AudioPlaybackConfig{Profile: "alsa", Enabled: true}, }, Audio: AudioConfig{ InputDevice: "hw:0,0", OutputDevice: "hw:0,0", MixerCard: "0", OutputSampleRate: 48000, OutputChannels: 2, @@ -488,26 +448,6 @@ func validateMediaConfig(cfg *MediaConfig, serverURL string, roverName string) e } func validateVideoMediaConfig(cfg *VideoMediaConfig, serverURL string, roverName string, rtspPort int) error { - // V4L2 input formats are consumed by ffmpeg as lowercase names such as - // mjpeg or yuyv422. Normalizing here keeps the publisher script simple and - // makes hand-edited Debian laptop configs less sensitive to capitalization. - cfg.InputFormat = strings.ToLower(strings.TrimSpace(cfg.InputFormat)) - if cfg.Width <= 0 { - cfg.Width = 640 - } - if cfg.Height <= 0 { - cfg.Height = 480 - } - if cfg.FPS <= 0 { - cfg.FPS = 30 - } - if cfg.Bitrate <= 0 { - cfg.Bitrate = 2000000 - } - /* - Always derive this endpoint. Older rover configs can contain an explicit SRT publishUrl; - honoring it after a binary update would silently leave that rover on the old transport. - */ derived, err := derivePublishURL(serverURL, roverName, rtspPort) if err != nil { return fmt.Errorf("derive publishUrl: %w", err) @@ -517,15 +457,6 @@ func validateVideoMediaConfig(cfg *VideoMediaConfig, serverURL string, roverName } func validateAudioCaptureConfig(cfg *AudioCaptureConfig, serverURL string, roverName string, rtspPort int) error { - if cfg.SampleRate <= 0 { - cfg.SampleRate = 48000 - } - if cfg.Channels <= 0 { - cfg.Channels = 2 - } - if cfg.Bitrate <= 0 { - cfg.Bitrate = 510000 - } derived, err := derivePublishURL(serverURL, roverName+"-audio", rtspPort) if err != nil { return fmt.Errorf("derive publishUrl: %w", err) @@ -535,9 +466,6 @@ func validateAudioCaptureConfig(cfg *AudioCaptureConfig, serverURL string, rover } func validateAudioPlaybackConfig(cfg *AudioPlaybackConfig, serverURL string, roverName string, rtspPort int) error { - if cfg.NormalizeFilter == "" { - cfg.NormalizeFilter = "dynaudnorm=f=75:g=15:m=10:p=0.9,alimiter=limit=0.85:level=disabled" - } derived, err := deriveReadURL(serverURL, roverName+"-fwd", rtspPort) if err != nil { return fmt.Errorf("derive forwardUrl: %w", err) diff --git a/rover/roverd/management.go b/rover/roverd/management.go index 2c206d83..2a29cb39 100644 --- a/rover/roverd/management.go +++ b/rover/roverd/management.go @@ -153,9 +153,22 @@ func (m *ManagementClient) execute(ctx context.Context, command managementComman if command.Profile == nil { return nil, fmt.Errorf("profile required") } + var config *Config + if len(command.Config) > 0 { + var err error + config, err = DecodeConfig(command.Config) + if err != nil { + return nil, err + } + } if err := SaveCustomProfile(command.Category, *command.Profile); err != nil { return nil, err } + if config != nil { + if err := SaveConfig(m.configPath, config); err != nil { + return nil, err + } + } m.stopping = true if m.runtime != nil { _ = m.runtime.PrepareShutdown() diff --git a/rover/roverd/media_supervisor.go b/rover/roverd/media_supervisor.go index b9c34396..d824a39f 100644 --- a/rover/roverd/media_supervisor.go +++ b/rover/roverd/media_supervisor.go @@ -8,7 +8,6 @@ import ( "os" "os/exec" "path/filepath" - "strconv" "sync" "syscall" "time" @@ -176,15 +175,8 @@ func (m *MediaSupervisor) environment(dir string) []string { host, _ := url.Parse(cfg.ServerURL) values := map[string]string{ "ROVER_NAME": cfg.Name, "ROVER_SERVER_HOST": host.Hostname(), "ROVER_PROFILE_DIR": dir, "ROVER_REPO_DIR": m.repo, - "ROVER_VIDEO_DEVICE": cfg.Media.Video.Device, "ROVER_VIDEO_INPUT_FORMAT": cfg.Media.Video.InputFormat, - "ROVER_VIDEO_WIDTH": strconv.Itoa(cfg.Media.Video.Width), "ROVER_VIDEO_HEIGHT": strconv.Itoa(cfg.Media.Video.Height), - "ROVER_VIDEO_FPS": strconv.Itoa(cfg.Media.Video.FPS), "ROVER_VIDEO_BITRATE": strconv.Itoa(cfg.Media.Video.Bitrate), - "ROVER_VIDEO_INVERTED": strconv.FormatBool(cfg.Media.Video.Inverted), "ROVER_VIDEO_SENSOR_MODE": cfg.Media.Video.SensorMode, "ROVER_VIDEO_PUBLISH_URL": cfg.Media.Video.PublishURL, "ROVER_AUDIO_PUBLISH_URL": cfg.Media.AudioCapture.PublishURL, "ROVER_AUDIO_PLAYBACK_URL": cfg.Media.AudioPlayback.ForwardURL, "ROVER_AUDIO_INPUT_DEVICE": "rover_capture", "ROVER_AUDIO_OUTPUT_DEVICE": "rover_forward", - "ROVER_AUDIO_SAMPLE_RATE": strconv.Itoa(cfg.Media.AudioCapture.SampleRate), "ROVER_AUDIO_CHANNELS": strconv.Itoa(cfg.Media.AudioCapture.Channels), - "ROVER_AUDIO_BITRATE": strconv.Itoa(cfg.Media.AudioCapture.Bitrate), "ROVER_AUDIO_NORMALIZE": strconv.FormatBool(cfg.Media.AudioPlayback.Normalize), - "ROVER_AUDIO_NORMALIZE_FILTER": cfg.Media.AudioPlayback.NormalizeFilter, } env := os.Environ() for key, value := range values { diff --git a/server/src/services/roverManagementService/index.js b/server/src/services/roverManagementService/index.js index a79929de..e2135a9f 100644 --- a/server/src/services/roverManagementService/index.js +++ b/server/src/services/roverManagementService/index.js @@ -188,8 +188,8 @@ io.on('connection', (socket) => { })); return { results }; }); - bind('roverManagement:saveProfile', async ({ roverId, category, profile }) => { - const { id, result } = request(roverId, { type: 'profile.set', category, profile }); + bind('roverManagement:saveProfile', async ({ roverId, category, profile, config }) => { + const { id, result } = request(roverId, { type: 'profile.set', category, profile, config }); await result; return { id }; }); diff --git a/webui/src/admin/components/RoverConfigurationEditor.jsx b/webui/src/admin/components/RoverConfigurationEditor.jsx index cec4acf2..7b0e233f 100644 --- a/webui/src/admin/components/RoverConfigurationEditor.jsx +++ b/webui/src/admin/components/RoverConfigurationEditor.jsx @@ -51,23 +51,25 @@ function RoverForm({ socket, record, online }) { {record.updateStatus &&

Update: {record.updateStatus.state} — {record.updateStatus.message}

}

{message}

{results.length > 0 && } - } renderObjectFooter={(path) => path.length === 2 && path[0] === 'media' && record.profiles?.[path[1]] ? : null} /> + draft={draft} /> : null} /> ; } -function MediaProfiles({ socket, record, online, category, configDirty }) { +function MediaProfiles({ socket, record, online, category, draft }) { const outputRef = useRef(null); const output = record.mediaOutput?.[category] || ''; useEffect(() => { const element = outputRef.current; if (element) element.scrollTop = element.scrollHeight; }, [output]); + const selected = record.profiles?.[category]?.find((entry) => entry.id === draft.media[category].profile); + const [editing, setEditing] = useState(false); const [profile, setProfile] = useState({ id: 'custom', name: '', description: '', setup: '', run: '' }); const [message, setMessage] = useState(''); const [busy, setBusy] = useState(false); @@ -78,27 +80,34 @@ function MediaProfiles({ socket, record, online, category, configDirty }) { async function save() { setBusy(true); try { - await request(socket, 'roverManagement:saveProfile', { roverId: record.roverId, category, profile }); - setMessage('Custom profile saved. Rover is restarting. Select custom in the media settings to use it.'); + await request(socket, 'roverManagement:saveProfile', { roverId: record.roverId, category, profile, config: { ...draft, media: { ...draft.media, [category]: { ...draft.media[category], profile: 'custom' } } } }); + setMessage('Custom profile saved and selected. Rover is restarting.'); } catch (error) { setMessage(error.message); } finally { setBusy(false); } } return
- {(record.profiles?.[category] || []).map((entry) =>

{entry.name}: {entry.description}

)} +

{selected?.description || 'Selected profile is unavailable.'}

+ {selected && <> +