fix(release): add npm registries to release config and expand documentation for UniversalDevice architecture and smart-home features

This commit is contained in:
2026-01-12 09:13:22 +00:00
parent 3377053ef4
commit 1cc8c48315
5 changed files with 127 additions and 36 deletions

View File

@@ -468,6 +468,8 @@ type TFeatureType =
### Custom Device Creation
Use the factory functions for creating devices with specific features:
```typescript
import { createScanner, createPrinter, createSpeaker } from '@ecobridge.xyz/devicemanager';
@@ -487,8 +489,7 @@ const printer = createPrinter({
name: 'Office Printer',
address: '192.168.1.51',
port: 631,
ippPath: '/ipp/print',
txtRecords: {},
txtRecords: { rp: '/ipp/print' },
});
// Create a Sonos speaker
@@ -498,7 +499,37 @@ const speaker = createSpeaker({
address: '192.168.1.52',
port: 1400,
protocol: 'sonos',
txtRecords: {},
});
```
### Smart Home Factory Functions
```typescript
import {
createSmartLight,
createSmartSwitch,
createSmartSensor,
createSmartClimate,
createSmartCover,
createSmartLock,
createSmartFan,
createSmartCamera,
} from '@ecobridge.xyz/devicemanager';
// Create devices with Home Assistant integration
const light = createSmartLight({
id: 'living-room-light',
name: 'Living Room Light',
address: 'homeassistant.local',
port: 8123,
entityId: 'light.living_room',
protocol: 'home-assistant',
protocolClient: haClient, // Your HomeAssistantProtocol instance
capabilities: {
supportsBrightness: true,
supportsColorTemp: true,
supportsRgb: true,
},
});
```
@@ -563,7 +594,7 @@ const maybePrint = device.getFeature<PrintFeature>('print'); // undefined
## 🙏 Credits
Built with love using:
Built with ❤️ using:
- [bonjour-service](https://github.com/onlxltd/bonjour-service) - mDNS discovery
- [node-ssdp](https://github.com/diversario/node-ssdp) - SSDP/UPnP discovery
- [net-snmp](https://github.com/markabrahams/node-net-snmp) - SNMP protocol