Files

166 lines
4.4 KiB
TypeScript
Raw Permalink Normal View History

2026-01-09 07:14:39 +00:00
/**
* @push.rocks/devicemanager
* A comprehensive device manager for discovering and communicating with network devices
* Supports: Scanners, Printers, SNMP devices, UPS, DLNA, Sonos, AirPlay, Chromecast
2026-01-09 07:14:39 +00:00
*/
2026-01-09 06:00:42 +00:00
// ============================================================================
// Core Device Manager
// ============================================================================
2026-01-09 07:14:39 +00:00
export {
DeviceManager,
MdnsDiscovery,
NetworkScanner,
SsdpDiscovery,
2026-01-09 07:14:39 +00:00
SERVICE_TYPES,
SSDP_SERVICE_TYPES,
2026-01-09 07:14:39 +00:00
} from './devicemanager.classes.devicemanager.js';
// ============================================================================
// Universal Device & Features
// ============================================================================
2026-01-09 07:14:39 +00:00
export { UniversalDevice, type IUniversalDeviceInfo, type IDeviceCreateOptions } from './device/device.classes.device.js';
export {
Feature,
ScanFeature,
PrintFeature,
PlaybackFeature,
VolumeFeature,
PowerFeature,
SnmpFeature,
// Smart home features
SwitchFeature,
SensorFeature,
LightFeature,
CoverFeature,
LockFeature,
FanFeature,
ClimateFeature,
CameraFeature,
type TDeviceReference,
type IScanFeatureOptions,
type IPrintFeatureOptions,
type IPlaybackFeatureOptions,
type IVolumeFeatureOptions,
type IVolumeController,
type IPowerFeatureOptions,
type ISnmpFeatureOptions,
type ISwitchFeatureOptions,
type ISensorFeatureOptions,
type ILightFeatureOptions,
type ICoverFeatureOptions,
type ILockFeatureOptions,
type IFanFeatureOptions,
type IClimateFeatureOptions,
type ICameraFeatureOptions,
} from './features/index.js';
// ============================================================================
// Device Factories
// ============================================================================
export {
createScanner,
createPrinter,
createSnmpDevice,
createUpsDevice,
createSpeaker,
createDlnaRenderer,
// Smart home factories
createSmartSwitch,
createSmartSensor,
createSmartLight,
createSmartCover,
createSmartLock,
createSmartFan,
createSmartClimate,
createSmartCamera,
type IScannerDiscoveryInfo,
type IPrinterDiscoveryInfo,
type ISnmpDiscoveryInfo,
type IUpsDiscoveryInfo,
type ISpeakerDiscoveryInfo,
type IDlnaRendererDiscoveryInfo,
type ISmartSwitchDiscoveryInfo,
type ISmartSensorDiscoveryInfo,
type ISmartLightDiscoveryInfo,
type ISmartCoverDiscoveryInfo,
type ISmartLockDiscoveryInfo,
type ISmartFanDiscoveryInfo,
type ISmartClimateDiscoveryInfo,
type ISmartCameraDiscoveryInfo,
} from './factories/index.js';
// ============================================================================
// Protocol Implementations
// ============================================================================
export {
EsclProtocol,
SaneProtocol,
IppProtocol,
SnmpProtocol,
SNMP_OIDS,
NutProtocol,
NUT_COMMANDS,
NUT_VARIABLES,
UpnpSoapClient,
UPNP_SERVICE_TYPES,
UPNP_DEVICE_TYPES,
UpsSnmpHandler,
UPS_SNMP_OIDS,
// Home Assistant protocol
HomeAssistantProtocol,
type ISnmpOptions,
type ISnmpVarbind,
type TSnmpValueType,
type TNutStatusFlag,
type INutUpsInfo,
type INutVariable,
type TDlnaTransportState,
type TDlnaTransportStatus,
type IDlnaPositionInfo,
type IDlnaTransportInfo,
type IDlnaMediaInfo,
type IDlnaContentItem,
type IDlnaBrowseResult,
type TUpsBatteryStatus,
type TUpsOutputSource,
type TUpsTestResult,
type IUpsSnmpStatus,
} from './protocols/index.js';
// Home Assistant Discovery
export { HomeAssistantDiscovery, HA_SERVICE_TYPE } from './discovery/discovery.classes.homeassistant.js';
// ============================================================================
2026-01-09 07:14:39 +00:00
// Helpers
// ============================================================================
2026-01-09 07:14:39 +00:00
export { withRetry, createRetryable, defaultRetryOptions } from './helpers/helpers.retry.js';
export {
isValidIp,
ipToNumber,
numberToIp,
ipRangeToIps,
cidrToIps,
getLocalSubnet,
countIpsInCidr,
} from './helpers/helpers.iprange.js';
// ============================================================================
// All Interfaces and Types
// ============================================================================
export * from './interfaces/index.js';
// SSDP types
export type {
ISsdpDevice,
ISsdpDeviceDescription,
ISsdpService,
ISsdpIcon,
} from './discovery/discovery.classes.ssdp.js';