diff service/xidle/xidle.py @ 1166:64e36f30f046

xidle to docker Ignore-this: 2c930853a8f7e7aa9b323f50c46b705d darcs-hash:64d89546c78f166864fd96861caeb462ae29eea5
author drewp <drewp@bigasterisk.com>
date Sun, 09 Sep 2018 04:04:16 -0700
parents 3aef251c7585
children f1177213fe22
line wrap: on
line diff
--- a/service/xidle/xidle.py	Sun Sep 09 04:01:44 2018 -0700
+++ b/service/xidle/xidle.py	Sun Sep 09 04:04:16 2018 -0700
@@ -2,24 +2,29 @@
 from __future__ import division
 """
 X server idle time is now available over http!
+
+Note: HD-4110 webcams stop X from going idle by sending events
+constantly. Run this to fix:
+
+    xinput disable "HP Webcam HD-4110"
 """
 
 import time
-import sys, socket, json
+import sys, socket, json, os
 from rdflib import Namespace, URIRef, Literal
 from influxdb import InfluxDBClient
+import influxdb.exceptions
 import cyclone.web
 from twisted.internet import reactor, task
 
-# from http://bebop.bigasterisk.com/python/
-import xss
+import actmon
 # another option: http://thp.io/2007/09/x11-idle-time-and-focused-window-in.html
 
 DEV = Namespace("http://projects.bigasterisk.com/device/")
 ROOM = Namespace("http://projects.bigasterisk.com/room/")
 
-sys.path.append("/my/site/magma")
-from stategraph import StateGraph
+sys.path.append('../../lib')
+from patchablegraph import PatchableGraph, CycloneGraphEventsHandler, CycloneGraphHandler
 
 host = socket.gethostname()
 client = InfluxDBClient('bang6', 9060, 'root', 'root', 'main')