Pythonaire
Pythonaire
under /etc/cron.d/ you will find all cronjobs
two ways: 1) permanent polling the device (i think, not a good idea), described as "service callback" (@Acessory.run_at_interval(3)). 2) let the device inform HAP-Python about state change. See the http.py...
`HttpBridge('HTTP Bridge', ('', 51111))` --> call a Python class. Didn't find a class "HttpBridge". Do you mean the class "Bridge"?
Ok sorry, i see. The "HttpBridge" handover `@type address: tuple(str, int)`(init line 135) , but str is blank ... is that right? More straightforward might be using of "request" and...
no, its not polling. The external device has a definition, then it should send data. In your case, it could be a alarm. The incoming data will triggered by an...
this works so fare: #!/usr/bin/env python3 import logging, signal from pyhap.accessory import Accessory from HttpAccessory import HttpBridge, HttpBridgeHandler from pyhap.accessory_driver import AccessoryDriver from Actors import HTTPSwitch logging.basicConfig(level=logging.INFO, format="[%(module)s] %(message)s") def...
Hm, i think not. You will need a lot of python functions and libs, they're not implemented in micropython.
example adding optional batteryLevel characteristic to a humidity sensor service: serv_hum = self.add_preload_service('HumiditySensor', chars=['CurrentRelativeHumidity']) serv_batt = self.add_preload_service('BatteryService', chars=['BatteryLevel','StatusLowBattery']) self.hum_char = serv_hum.configure_char('CurrentRelativeHumidity') self.battlevel_char = serv_batt.configure_char('BatteryLevel') self.battstatus_char = serv_batt.configure_char('StatusLowBattery')
I understand, you think about rules. Not switching one lamp, switching a group. If I'm right, these function are not a part of a bridge. the bridge just connect devices...
> I'm creating a bridge and adding two accessories, > > * a light (on/off) > * a light that can be dimmed and has a brightness parameter. > When...