python3包从STALL WIFFI接口设备。
wiffi的Python项目详细描述
威菲
从STALL WIFFI到接口设备的python3包。在
安装
pip3安装wiffi
配置WIFFI设备
- 将“CCU-IP地址myCCUIP”设置为家庭助理的IP地址。在
- 使用参数“send_JSON”将JSON电报的端口设置为配置的服务器端口。在
使用
classWiffiIntegrationApi:def__init__(self,hass,config_entry):self._server=WiffiTcpServer(8189,self)asyncdef__call__(self,device,metrics):# device is of type WiffiDeviceprint(f"mac address = {device.mac_address}")formetricinmetrics:# metric is of type WiffiMetricprint(f"value = {metric.value}{metric.unit_of_measurement")
- 项目
标签: