summaryrefslogtreecommitdiff
path: root/bin/ebus_app
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2010-06-09 19:41:46 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2010-06-09 19:41:46 +0000
commit6c580608f942d2f4b931faa6fe81171fd9e8a878 (patch)
tree4176230fe3b61f61bbe2aca8ce4068fda8810dd4 /bin/ebus_app
parent3fc788b05bba8813b5b5b274ac1676050104d2f0 (diff)
downloadebus-alt-6c580608f942d2f4b931faa6fe81171fd9e8a878.tar.gz
ebus-alt-6c580608f942d2f4b931faa6fe81171fd9e8a878.zip
bla
git-svn-id: http://10.2.2.13/svn/common/ebus@1679 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'bin/ebus_app')
-rwxr-xr-xbin/ebus_app30
1 files changed, 0 insertions, 30 deletions
diff --git a/bin/ebus_app b/bin/ebus_app
deleted file mode 100755
index d381254..0000000
--- a/bin/ebus_app
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-# -*- coding:utf8 -*-
-# xapek.org, 2010
-import asyncore
-from pymongo import Connection
-from ebus import EbusReader
-from time import time
-
-connection = Connection("10.2.2.13", 27017)
-db = connection["ebus"]
-db.authenticate("ebus", "ebus")
-collection = db["data"]
-
-def insert(ebus_packet):
- try:
- if ebus_packet.values() != dict():
- data={'name':ebus_packet.name(), 'values':ebus_packet.values(), 'time':time()}
- collection.insert(data)
- print "Inserted: %s" % data
- except Exception,e:
- try:
- print "Failed to insert %s -- %s" % (ebus_packet.name(), e)
- except Exception,e:
- print e
-
-reader = EbusReader()
-reader.handle_ebus = insert
-reader.debug = False
-
-asyncore.loop()