{"id":16317940,"url":"https://github.com/jamesleesaunders/pyalertme","last_synced_at":"2025-03-22T21:31:38.846Z","repository":{"id":56169740,"uuid":"68849608","full_name":"jamesleesaunders/PyAlertMe","owner":"jamesleesaunders","description":"Python Hive Hub","archived":false,"fork":false,"pushed_at":"2020-11-23T04:14:03.000Z","size":947,"stargazers_count":15,"open_issues_count":13,"forks_count":3,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-18T14:53:50.449Z","etag":null,"topics":["home-automation","hub","iris","xbee","zigbee"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesleesaunders.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-21T19:14:02.000Z","updated_at":"2021-10-18T04:01:20.000Z","dependencies_parsed_at":"2022-08-15T14:00:44.829Z","dependency_job_id":null,"html_url":"https://github.com/jamesleesaunders/PyAlertMe","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesleesaunders%2FPyAlertMe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesleesaunders%2FPyAlertMe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesleesaunders%2FPyAlertMe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesleesaunders%2FPyAlertMe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesleesaunders","download_url":"https://codeload.github.com/jamesleesaunders/PyAlertMe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245022566,"owners_count":20548560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["home-automation","hub","iris","xbee","zigbee"],"created_at":"2024-10-10T22:09:35.563Z","updated_at":"2025-03-22T21:31:38.439Z","avatar_url":"https://github.com/jamesleesaunders.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyAlertMe #\n\n[![Build Status](https://travis-ci.org/jamesleesaunders/PyAlertMe.svg?branch=master)](https://travis-ci.org/jamesleesaunders/PyAlertMe)\n[![codecov](https://codecov.io/gh/jamesleesaunders/PyAlertMe/branch/master/graph/badge.svg)](https://codecov.io/gh/jamesleesaunders/PyAlertMe)\n\nPyAlertMe is a set of classes which, when used in conjunction with a Digi XBee (ZigBee) module, can be used to simulate an AlertMe (Lowes Iris, Hive, British Gas Safe and Secure) Hub, SmartPlug or Sensor.\n\n## Use ##\n#### Hub ####\n```python\n# Setup Serial\nXBEE_PORT = '/dev/tty.usbserial-DN018OI6'\nXBEE_BAUD = 9600\nser = serial.Serial(XBEE_PORT, XBEE_BAUD)\n\n# Define Callback (Optional)\ndef callback(type, node_id, field, value):\n    if type == 'Attribute':\n        print(\"Attribute Update\\n\\tNode ID: \" + node_id + \"  Field: \" + field + \"  Value: \" + str(value))\n    elif type == 'Node':\n        print(\"Node Update\\n\\tNode ID: \" + node_id + \"  Field: \" + field + \"  Value: \" + str(value))\n\n# Create Hub Object\nhub_obj = Hub(callback)\nhub_obj.start(ser)\n```\nExample output:\n```\n2017-08-30 21:51:21,138 INFO zbhub 134 New Device 00:0d:6f:00:00:1b:6a:6a Fully Associated\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: manu\tValue: AlertMe.com]\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: type\tValue: Door/Window sensor]\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: version\tValue: 55979]\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: manu_date\tValue: 2008-04-17]\n{   '00:0d:6f:00:00:1b:6a:6a': {   'manu': 'AlertMe.com',\n                                   'type': 'Door/Window sensor',\n                                   'version': 55979},\n    '00:0d:6f:00:00:1b:76:ea': {   'manu': 'AlertMe.com',\n                                   'type': 'Lamp',\n                                   'version': 1905},\n    '00:0d:6f:00:00:78:61:c0': {   'manu': 'AlertMe.com',\n                                   'type': 'Button Device',\n                                   'version': 34667},\n    '00:0d:6f:00:03:bb:b9:f8': {   'manu': 'AlertMe.com',\n                                   'type': 'SmartPlug',\n                                   'version': 9586}}\nSelect Device:Attribute Update [Node ID: 00:0d:6f:00:03:bb:b9:f8\tField: power_demand\tValue: 0]\nAttribute Update [Node ID: 00:0d:6f:00:03:bb:b9:f8\tField: trigger_state\tValue: 0]\nAttribute Update [Node ID: 00:0d:6f:00:03:bb:b9:f8\tField: temperature\tValue: 99.05]\nAttribute Update [Node ID: 00:0d:6f:00:03:bb:b9:f8\tField: tamper_state\tValue: 1]\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: manu\tValue: AlertMe.com]\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: type\tValue: Door/Window sensor]\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: version\tValue: 55979]\nAttribute Update [Node ID: 00:0d:6f:00:00:1b:6a:6a\tField: manu_date\tValue: 2008-04-17]\nAttribute Update [Node ID: 00:0d:6f:00:03:bb:b9:f8\tField: power_demand\tValue: 0]\n```\n\nThe hub supports the following devices:\n* SmartPlug\n* Power Clamp\n* Button Device\n* PIR Device\n* Door/Window sensor\n* Alarm Detector\n* Keyfob Device\n* Beacon\n* Lamp\n\n#### SmartPlug ####\n```python\n# Setup Serial\nXBEE_PORT = '/dev/tty.usbserial-DN018OI6'\nXBEE_BAUD = 9600\nser = serial.Serial(XBEE_PORT, XBEE_BAUD)\n\n# Create SmartPlug Object\ndevice_obj = SmartPlug()\ndevice_obj.start(ser)\n```\n\n## XBee Setup ##\nConfigure XBee as follows:\nXBee Modem XB24-ZB, ZIGBEE Coordinator API, Version 21A7 (or better).\nAlternatively use you can use [scripts/setup-xbee.py](scripts/setup-xbee.py) to configure the Xbee. \n\n#### Coordinator (Hub) ####\n* ZigBee Stack Profile (ZS): 2\n* Encryption Enable (EE): 1\n* Encryption Options (EO): 1\n* Encryption Key (KY): 5a6967426565416c6c69616e63653039\n* API Enable (AP): 2\n* API Output Mode (AO): 3\n\n#### Router (Device) ####\n* ZigBee Stack Profile (ZS): 2\n* Encryption Enable (EE): 1\n* Encryption Options (EO): 0\n* Encryption Key (KY): None\n* API Enable (AP): 2\n* API Output Mode (AO): 3\n\n## Example Use ##\nSee [examples/hub-example.py](examples/hub-example.py) for example Hub.\nSee [examples/smartplug-example.py](examples/smartplug-example.py) for example SmartPlug.\n\n## Credits ##\nHuge thanks to Desert Home http://www.desert-home.com/2014/02/raspberry-pi-and-lowes-iris-smart-switch.html from which this project originates from.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesleesaunders%2Fpyalertme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesleesaunders%2Fpyalertme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesleesaunders%2Fpyalertme/lists"}