This plugin needs an running owserver from owfs. I have tested owfs-2.7p34 and owfs-2.8p15.
Hint: to run the owserver as non root. You have to add a udev rule for the usb busmasters.
# /etc/udev/rules.d/80-smarthome.rules SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTR{idVendor}=="04fa", ATTR{idProduct}=="2490",GROUP="smarthome",MODE="0660"
Hint2: You can also use a running owserver on another host.
[ow] class_name = OneWire class_path = plugins.onewire # host = 127.0.0.1 # port = 4304
This plugins is looking by default for the owserver on 127.0.0.1 port 4304. You could change this in your plugin.conf.
Advanced options in plugin.conf. Please be careful.
This is a name for the defined sensor information.
This is the type of the sensor data. Currently ‘num’ and ‘bool’ are supported.
‘ow_addr’ defines the 1wire adress of the sensor (formerly ‘ow_id’). If ‘ow_addr’ is specified, the 1wire plugin monitors this sensor.
‘ow_sensor’ defines the particular data of the sensor. Currently are supported:
for ibuttons:
If an ibutton master (‘BM’) is specified, the 1-wire plugin will monitor this bus with a higher frequency for changes. The ibutton sensor (‘B’) returns ‘true’, if the ibutton is present or ‘false’, if not. If I/O sensors (2406) are specified they will be monitored within a shorter timeframe.
Currently the following 1wire devices are tested by users:
[test-1wire] [[bm-ibutton]] name = ibutton busmaster to identify ibutton buses type = bool ow_addr = 81.75172D000000 ow_sensor = BM [[ib-guest]] name = ibutton guest type = bool ow_addr = 01.787D58130000 ow_sensor = B [[temp_outside]] name = temperature outside type = num ow_addr = 28.8DEAAA030000 # could be T, T9, T10, T11, T12 ow_sensor = T [[lux_outside]] name = lux / lightintensity outside type = num ow_addr = 26.8DD76B010000 ow_sensor = L [[humidity_outside]] name = humidity outside type = num ow_addr = 26.8DD76B010000 ow_sensor = H [[input_water_leak]] name = input water leak detection type = bool ow_addr = 3A.C6CC07000000 # could be IA, IB ow_sensor = IA [[output_led1]] name = output led1 keys type = bool ow_addr = 3A.C6CC07000000 # could be OA, OB ow_sensor = OB [[voltage_sensor]] name = voltage of the sensor input (0-10V) type = num ow_addr = 26.A9D76B010000 ow_sensor = V
This is a special function which is called if an unknown ibutton is attached to the bus. If the unknown ibutton is already seen, the id will be cached and the function is not called again. The cache will be reset every ten minutes. The function must take two arguments. The first will be the id of the ibutton and the second is the item of the ibutton busmaster (e.g. sh.home.key_hanger).
To use it you have to assign a (useful) function. For this you could do something like this:
# my startup.py logic which is called at startup with crontab = init def intruder_alert(ibutton_id, item): sh.notify("iButton-Alert","Someone uses an unknown iButton ({0}) at {1}".format(ibutton_id, item)) # sh.take_picuture() # ... sh.ow.ibutton_hook = intruder_alert