# SCS Poltrone
Home Assistant **custom integration** for SCS Poltrone BLE reclining sofas
(devices that show up as `ECBLE…` and are controlled by the Poltrone Android app).
**Versioning:** releases use Semantic Versioning `x.y.z` (see [CHANGELOG.md](CHANGELOG.md) and GitHub Releases).
Local control only — no cloud. Works with:
- A Bluetooth adapter on the Home Assistant host, **or**
- An **ESPHome Bluetooth Proxy** with **active connections** enabled
## Features
| Control | Entity | Notes |
|---------|--------|--------|
| All open / close | Cover | Hold-style: open/close starts motion, stop ends it |
| Footrest | Cover | Up / down + stop |
| Headrest | Cover | Open / close + stop |
| Lumbar | Cover | Open / close + stop |
| Massage | Select | Off / 1 / 2 / 3 |
| Heat | Select | Off / 1 / 2 / 3 |
| Memory 1 / 2 | Button | Recalls a position stored **on the chair** |
| RGB / LED | Light | Linked accessory first, then primary fallback |
## Multiple chairs
Each sofa is a **separate** config entry keyed by its **primary** Bluetooth MAC.
1. Add **SCS Poltrone** once per chair
2. When prompted, give it a friendly name (e.g. `Living Room`, `Sofa Left`)
3. Each chair appears as its own device with its own covers / selects / memory buttons
### Linked accessory MAC (RGB / extras)
Some chairs expose a second ECBLE radio for lighting / extras (different MAC, same product family).
1. Open the chair entry → **Configure**
2. Set **Linked accessory MAC** (pick from discovery or paste, e.g. `DC:32:62:51:3A:25`)
3. Motors / massage / heat / memory stay on the primary MAC; **RGB tries the linked MAC first**, then falls back to the primary
4. Both radios appear as **one** Home Assistant device
Do not add the accessory MAC as its own integration entry — link it on the chair instead.
Target a specific chair by using that device’s entities
(for example `button.living_room_memory_1`, `light.living_room_rgb`).
## Requirements
- Home Assistant 2024.1+
- [Bluetooth](https://www.home-assistant.io/integrations/bluetooth/) integration
- A path that can open **GATT connections**:
- Local adapter, or
- ESPHome Bluetooth Proxy with active connections (`active: true`)
> Advertisement-only / passive scanners are **not** enough — this sofa needs a real GATT write.
While Home Assistant is connected, the Poltrone phone app usually cannot control the sofa (and the reverse). Disconnect one before using the other.
## Install (HACS)
1. HACS → Integrations → ⋮ → **Custom repositories**
2. Add `https://github.com/richx83-ux/scs-poltrone` as category **Integration**
3. Install **SCS Poltrone**
4. Restart Home Assistant
5. Settings → Devices & services → **Add integration** → **SCS Poltrone**
## Manual install
Copy `custom_components/scs_poltrone` into your HA `custom_components` folder, restart, then add the integration from the UI.
## Setup
1. Make sure Bluetooth (and any proxy) is working in HA
2. Put the sofa in range and ensure the phone app is **disconnected**
3. Add **SCS Poltrone** — pick a discovered `ECBLE*` device (or enter the MAC), then set a friendly name
4. Repeat for each additional chair
## Protocol notes
GATT write characteristic `6e403588-b5a3-f393-e0a9-e50e24dcca9e`
8-byte frame: `[seq][type][ctrl_lo][ctrl_hi][param×4]`
Reverse-engineered from Poltrone app traffic and validated on-device.
Memory recall codes: `554` (Memory 1), `552` (Memory 2).
RGB (accessory): set `4162`, apply `4163`, follow-up `4133` — param `(rgb24 << 8) | brightness`.
## Quality scale
This is a **custom** (community) integration — not part of Home Assistant Core.
It aims for Bronze-style practices: UI config flow, docs, and basic tests.
## License
MIT