summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Rplots.pngbin84474 -> 0 bytes
-rw-r--r--doc/LICENSE_gpl.txt (renamed from doc/LICENSE)0
-rw-r--r--doc/ebus_specification.html502
-rw-r--r--doc/ebus_specification.html.xslt91
-rw-r--r--doc/ebus_specification.txt79
-rw-r--r--doc/ebus_specification.txt.xslt49
-rwxr-xr-xormtest.py33
-rw-r--r--setup.py25
-rwxr-xr-xsql/chart.r (renamed from test.r)0
-rw-r--r--sql/populate_cache.sql (renamed from populate_cache.sql)0
-rw-r--r--sql/refresh_cache.sql (renamed from refresh_cache.sql)0
-rw-r--r--sql/trigger.sql (renamed from trigger.sql)0
-rwxr-xr-xtest.py36
14 files changed, 14 insertions, 804 deletions
diff --git a/.gitignore b/.gitignore
index 39e2fa8..f166d6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
*pyc
*~
+build
+ebus-xml/build
+ebus.egg-info/
diff --git a/Rplots.png b/Rplots.png
deleted file mode 100644
index 42d2e63..0000000
--- a/Rplots.png
+++ /dev/null
Binary files differ
diff --git a/doc/LICENSE b/doc/LICENSE_gpl.txt
index 94a9ed0..94a9ed0 100644
--- a/doc/LICENSE
+++ b/doc/LICENSE_gpl.txt
diff --git a/doc/ebus_specification.html b/doc/ebus_specification.html
deleted file mode 100644
index fbdd101..0000000
--- a/doc/ebus_specification.html
+++ /dev/null
@@ -1,502 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<style type="text/css">
- table {
- border: 1px solid gray;
- width: 100%;
- }
- table td {
- border-left: 1px dotted gray;
- border-right: 1px dotted gray;
- }
-
- table th {
- border: 1px dotted gray;
- }
- </style>
-</head>
-<body>
-<h2>Ebus Geräte</h2>
-<table class="devices">
-<tr>
-<th>Adresse</th>
-<th>Gerät</th>
-<th>Typ</th>
-</tr>
-<tr>
-<td>0x00</td>
-<td>PC/Modem</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x03</td>
-<td>Feuerungsautomat 2</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x0f</td>
-<td>RC Clock Model</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x07</td>
-<td>Unknown</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x10</td>
-<td>Heizkreisregler 2</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x11</td>
-<td>Bus Interface 1</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x13</td>
-<td>Feuerungsautomat 2</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x30</td>
-<td>Heizkreisregler 1</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x31</td>
-<td>Bus Interface 2</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x33</td>
-<td>Feuerungsautomat 3</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x70</td>
-<td>Heizkreisregler 2</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x71</td>
-<td>Heizkreisregler 9</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x73</td>
-<td>Feuerungsautomat 4</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0xf1</td>
-<td>Heizkreisregler 10</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0x50</td>
-<td>Mischer 1</td>
-<td>slave</td>
-</tr>
-<tr>
-<td>0x51</td>
-<td>Mischer 2</td>
-<td>slave</td>
-</tr>
-<tr>
-<td>0x90</td>
-<td>Raumgeräte/Fernsteller 1</td>
-<td>slave</td>
-</tr>
-<tr>
-<td>0x91</td>
-<td>Raumgeräte/Fernsteller 2</td>
-<td>slave</td>
-</tr>
-<tr>
-<td>0xf0</td>
-<td>Heizkreisregler 3</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0xf3</td>
-<td>Feuerungsautomat 5</td>
-<td>master</td>
-</tr>
-<tr>
-<td>0xfe</td>
-<td>Broadcastadresse</td>
-<td>broadcast</td>
-</tr>
-<tr>
-<td>0xff</td>
-<td>PC</td>
-<td>master</td>
-</tr>
-</table>
-<h2>Ebus Pakete</h2>
-<table class="packets">
-<tr>
-<th>Primary Command</th>
-<th>Secondary Command</th>
-<th>Name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>0x05</td>
-<td>0x03</td>
-<td>betriebsdatenRegler1</td>
-<td>Betriebsdaten des Feuerungsautomaten an den Regler Block1</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields">
-<tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>3</td>
-<td>byte</td>
-<td>stellgradKesselleistung</td>
-<td>Stellgrad Kesselleistung</td>
-</tr>
-<tr>
-<td>4</td>
-<td>data1c</td>
-<td>kesselTemperatur</td>
-<td>Kessel Temperatur</td>
-</tr>
-<tr>
-<td>4</td>
-<td>byte</td>
-<td>ruecklaufTemperatur</td>
-<td>Rücklauf Temperatur</td>
-</tr>
-<tr>
-<td>6</td>
-<td>byte</td>
-<td>boilerTemperatur</td>
-<td>Boiler Temperatur</td>
-</tr>
-<tr>
-<td>7</td>
-<td>byte</td>
-<td>aussenTemperatur</td>
-<td>Aussentemperatur</td>
-</tr>
-</table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-<tr>
-<td>0x05</td>
-<td>0x07</td>
-<td>betriebsdatenFeuerungsautomat</td>
-<td>Betriebsdaten des Reglers an den Feuerungsautomaten</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields">
-<tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>0</td>
-<td>byteEnum</td>
-<td>betriebszustand</td>
-<td>
- </td>
-</tr>
-<tr>
-<td>1</td>
-<td>byteEnum</td>
-<td>aktion</td>
-<td>
- </td>
-</tr>
-<tr>
-<td>2</td>
-<td>data2c</td>
-<td>kesselSollwertTemperatur</td>
-<td>Kessel Temperatur Sollwert</td>
-</tr>
-<tr>
-<td>4</td>
-<td>data2b</td>
-<td>kesselSollwertDruck</td>
-<td>Kesseldruck Sollwert</td>
-</tr>
-<tr>
-<td>6</td>
-<td>data1c</td>
-<td>stellgrad</td>
-<td>Stellgrad</td>
-</tr>
-<tr>
-<td>7</td>
-<td>data1c</td>
-<td>brauchwasserSollwert</td>
-<td>Brauchwasser Sollwert</td>
-</tr>
-</table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-<tr>
-<td>0x07</td>
-<td>0x00</td>
-<td>datumZeit</td>
-<td>Datum/Zeit Meldung eines eBus Master</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields">
-<tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>0</td>
-<td>data2b</td>
-<td>aussenTemperatur</td>
-<td>Aussentemperatur</td>
-</tr>
-<tr>
-<td>2</td>
-<td>bcd</td>
-<td>sekunden</td>
-<td>Sekunden</td>
-</tr>
-<tr>
-<td>3</td>
-<td>bcd</td>
-<td>minuten</td>
-<td>Minuten</td>
-</tr>
-<tr>
-<td>4</td>
-<td>bcd</td>
-<td>stunden</td>
-<td>Studen</td>
-</tr>
-<tr>
-<td>5</td>
-<td>bcd</td>
-<td>tag</td>
-<td>Tag</td>
-</tr>
-<tr>
-<td>6</td>
-<td>bcd</td>
-<td>monat</td>
-<td>Monat</td>
-</tr>
-<tr>
-<td>7</td>
-<td>bcd</td>
-<td>wochentag</td>
-<td>Wochentag</td>
-</tr>
-<tr>
-<td>8</td>
-<td>bcd</td>
-<td>jahr</td>
-<td>Jahr</td>
-</tr>
-</table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-<tr>
-<td>0x08</td>
-<td>0x00</td>
-<td>sollwertuebertragungRegler</td>
-<td>Sollwertübertragung des Reglers an andere Regler</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields">
-<tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>0</td>
-<td>data2b</td>
-<td>TK_soll</td>
-<td>Kessel Sollwert in °C [1/256]</td>
-</tr>
-<tr>
-<td>2</td>
-<td>data2b</td>
-<td>TA_ist</td>
-<td>Aussentemperatur in °C [1/256]</td>
-</tr>
-<tr>
-<td>4</td>
-<td>data1b</td>
-<td>L_zwang</td>
-<td>Leistungszwang in %</td>
-</tr>
-<tr>
-<td>5</td>
-<td>bit</td>
-<td>Status</td>
-<td>Status</td>
-</tr>
-<tr>
-<td>6</td>
-<td>data2b</td>
-<td>TB_soll</td>
-<td>Brauchwassersollwert</td>
-</tr>
-</table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-<tr>
-<td>0x03</td>
-<td>0x08</td>
-<td>brenstoffmengeLesen</td>
-<td>Gesamtbrennstoffmenge Lesen</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields"><tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr></table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-<tr>
-<td>0x50</td>
-<td>0x14</td>
-<td>vorlauftemperatur</td>
-<td>Reversed: http://www.mikrocontroller.net/topic/91164#1070401</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields">
-<tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>0</td>
-<td>data2b</td>
-<td>vorlauftemperaturIst</td>
-<td>Aktuelle Vorlauftemperatur Mischerkreis</td>
-</tr>
-<tr>
-<td>2</td>
-<td>data2b</td>
-<td>vorlauftemperaturSoll</td>
-<td>Soll Vorlaufteperatur Mischerkreis</td>
-</tr>
-</table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-<tr>
-<td>0x50</td>
-<td>0x17</td>
-<td>solarDaten</td>
-<td>Solar Daten</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields">
-<tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>0</td>
-<td>bit</td>
-<td>solarPumpe</td>
-<td>Betriebszustand Solarpumpe</td>
-</tr>
-<tr>
-<td>2</td>
-<td>data2c</td>
-<td>tempKollektor</td>
-<td>Wassertemperatur am Kollektor</td>
-</tr>
-<tr>
-<td>4</td>
-<td>data2c</td>
-<td>tempWarmwasserSolar</td>
-<td>Warmwassertemperatur am Kollektor</td>
-</tr>
-</table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-<tr>
-<td>0x50</td>
-<td>0x18</td>
-<td>solarDatenSumme</td>
-<td>Reversed siehe ebus-wiki</td>
-</tr>
-<tr>
-<td></td>
-<td colspan="3"><table class="fields">
-<tr>
-<th>offset</th>
-<th>typ</th>
-<th>name</th>
-<th>Description</th>
-</tr>
-<tr>
-<td>0</td>
-<td>data2b</td>
-<td>aktuelleLeistung</td>
-<td>Aktuelle Solarleistung</td>
-</tr>
-<tr>
-<td>2</td>
-<td>word</td>
-<td>tagesertragLow</td>
-<td>Tagesertrag low</td>
-</tr>
-<tr>
-<td>4</td>
-<td>word</td>
-<td>tagesertragHigh</td>
-<td>Tagesertrag high * 1000</td>
-</tr>
-<tr>
-<td>6</td>
-<td>word</td>
-<td>ertragssumme</td>
-<td>Ertragssumme</td>
-</tr>
-<tr>
-<td>8</td>
-<td>word</td>
-<td>ertragssummeT</td>
-<td>Ertragssumme T * 1000</td>
-</tr>
-<tr>
-<td>10</td>
-<td>word</td>
-<td>ertragssummeM</td>
-<td>Etragssumme M * 1000 * 1000</td>
-</tr>
-</table></td>
-</tr>
-<tr><td colspan="4"><hr></td></tr>
-</table>
-</body>
-</html>
diff --git a/doc/ebus_specification.html.xslt b/doc/ebus_specification.html.xslt
deleted file mode 100644
index 2743e5b..0000000
--- a/doc/ebus_specification.html.xslt
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf8"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:template match="/">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
- <style type="text/css">
- table {
- border: 1px solid gray;
- width: 100%;
- }
- table td {
- border-left: 1px dotted gray;
- border-right: 1px dotted gray;
- }
-
- table th {
- border: 1px dotted gray;
- }
- </style>
- </head>
- <body>
- <h2>Ebus Geräte</h2>
- <table class="devices">
- <tr>
- <th>Adresse</th>
- <th>Gerät</th>
- <th>Typ</th>
- </tr>
- <xsl:for-each select="ebus/devices/device">
- <tr>
- <td>
- <!-- anchor -->
- <xsl:value-of select="@address"/>
- </td>
- <td><xsl:value-of select="text()"/></td>
- <td><xsl:value-of select="@type"/></td>
- </tr>
- </xsl:for-each>
- </table>
-
- <h2>Ebus Pakete</h2>
- <table class="packets">
- <tr>
- <th>Primary Command</th>
- <th>Secondary Command</th>
- <th>Name</th>
- <th>Description</th>
- </tr>
- <xsl:for-each select="ebus/packets/packet">
- <tr>
- <td><xsl:value-of select="@primary"/></td>
- <td><xsl:value-of select="@secondary"/></td>
- <td><xsl:value-of select="@name"/></td>
- <td><xsl:value-of select="@description"/></td>
- </tr>
- <tr>
- <td/>
- <td colspan="3">
- <table class="fields">
- <tr>
- <th>offset</th>
- <th>typ</th>
- <th>name</th>
- <th>Description</th>
- </tr>
- <xsl:for-each select="fields/*">
- <tr>
- <td><xsl:value-of select="@offset"/></td>
- <td><xsl:value-of select="name()"/></td>
- <td><xsl:value-of select="@name"/></td>
- <td><xsl:value-of select="text()"/></td>
- </tr>
- </xsl:for-each>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <hr />
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/doc/ebus_specification.txt b/doc/ebus_specification.txt
deleted file mode 100644
index da47b90..0000000
--- a/doc/ebus_specification.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-
-=== Ebus Geräte
-
-Adresse | Gerät | Typ
-
- 0x00|PC/Modem|master
-0x03|Feuerungsautomat 2|master
-0x0f|RC Clock Model|master
-0x07|Unknown|master
-0x10|Heizkreisregler 2|master
-0x11|Bus Interface 1|master
-0x13|Feuerungsautomat 2|master
-0x30|Heizkreisregler 1|master
-0x31|Bus Interface 2|master
-0x33|Feuerungsautomat 3|master
-0x70|Heizkreisregler 2|master
-0x71|Heizkreisregler 9|master
-0x73|Feuerungsautomat 4|master
-0xf1|Heizkreisregler 10|master
-0x50|Mischer 1|slave
-0x51|Mischer 2|slave
-0x90|Raumgeräte/Fernsteller 1|slave
-0x91|Raumgeräte/Fernsteller 2|slave
-0xf0|Heizkreisregler 3|master
-0xf3|Feuerungsautomat 5|master
-0xfe|Broadcastadresse|broadcast
-0xff|PC|master
-
-
-=== Ebus Pakete
-
-Primary Command | Secondary Command | Name | Description
- ---- offset | typ | name | description
- 0x05|0x03|betriebsdatenRegler1|Betriebsdaten des Feuerungsautomaten an den Regler Block13|byte|stellgradKesselleistung|Stellgrad Kesselleistung
- 4|data1c|kesselTemperatur|Kessel Temperatur
- 4|byte|ruecklaufTemperatur|Rücklauf Temperatur
- 6|byte|boilerTemperatur|Boiler Temperatur
- 7|byte|aussenTemperatur|Aussentemperatur
-
- 0x05|0x07|betriebsdatenFeuerungsautomat|Betriebsdaten des Reglers an den Feuerungsautomaten0|byteEnum|betriebszustand|
-
- 1|byteEnum|aktion|
-
- 2|data2c|kesselSollwertTemperatur|Kessel Temperatur Sollwert
- 4|data2b|kesselSollwertDruck|Kesseldruck Sollwert
- 6|data1c|stellgrad|Stellgrad
- 7|data1c|brauchwasserSollwert|Brauchwasser Sollwert
-
- 0x07|0x00|datumZeit|Datum/Zeit Meldung eines eBus Master0|data2b|aussenTemperatur|Aussentemperatur
- 2|bcd|sekunden|Sekunden
- 3|bcd|minuten|Minuten
- 4|bcd|stunden|Studen
- 5|bcd|tag|Tag
- 6|bcd|monat|Monat
- 7|bcd|wochentag|Wochentag
- 8|bcd|jahr|Jahr
-
- 0x08|0x00|sollwertuebertragungRegler|Sollwertübertragung des Reglers an andere Regler0|data2b|TK_soll|Kessel Sollwert in °C [1/256]
- 2|data2b|TA_ist|Aussentemperatur in °C [1/256]
- 4|data1b|L_zwang|Leistungszwang in %
- 5|bit|Status|Status
- 6|data2b|TB_soll|Brauchwassersollwert
-
- 0x03|0x08|brenstoffmengeLesen|Gesamtbrennstoffmenge Lesen
- 0x50|0x14|vorlauftemperatur|Reversed: http://www.mikrocontroller.net/topic/91164#10704010|data2b|vorlauftemperaturIst|Aktuelle Vorlauftemperatur Mischerkreis
- 2|data2b|vorlauftemperaturSoll|Soll Vorlaufteperatur Mischerkreis
-
- 0x50|0x17|solarDaten|Solar Daten0|bit|solarPumpe|Betriebszustand Solarpumpe
- 2|data2c|tempKollektor|Wassertemperatur am Kollektor
- 4|data2c|tempWarmwasserSolar|Warmwassertemperatur am Kollektor
-
- 0x50|0x18|solarDatenSumme|Reversed siehe ebus-wiki0|data2b|aktuelleLeistung|Aktuelle Solarleistung
- 2|word|tagesertragLow|Tagesertrag low
- 4|word|tagesertragHigh|Tagesertrag high * 1000
- 6|word|ertragssumme|Ertragssumme
- 8|word|ertragssummeT|Ertragssumme T * 1000
- 10|word|ertragssummeM|Etragssumme M * 1000 * 1000
-
- \ No newline at end of file
diff --git a/doc/ebus_specification.txt.xslt b/doc/ebus_specification.txt.xslt
deleted file mode 100644
index dda1e33..0000000
--- a/doc/ebus_specification.txt.xslt
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf8"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<!-- TODO: padding -->
- <xsl:output method="text" />
- <xsl:template match="/">
-=== Ebus Geräte
-
-Adresse | Gerät | Typ
-
- <xsl:for-each select="ebus/devices/device">
- <xsl:value-of select="@address"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="text()"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="@type"/>
- <xsl:text>
-</xsl:text>
- </xsl:for-each>
-
-=== Ebus Pakete
-
-Primary Command | Secondary Command | Name | Description
- ---- offset | typ | name | description
- <xsl:for-each select="ebus/packets/packet">
- <xsl:value-of select="@primary"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="@secondary"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="@description"/>
-
- <xsl:for-each select="fields/*">
- <xsl:value-of select="@offset"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="name()"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text>|</xsl:text>
- <xsl:value-of select="text()"/>
- <xsl:text>
- </xsl:text>
- </xsl:for-each>
- <xsl:text>
- </xsl:text>
- </xsl:for-each>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/ormtest.py b/ormtest.py
deleted file mode 100755
index 91b8277..0000000
--- a/ormtest.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/python
-from ebus.web import model
-from sqlalchemy import create_engine
-
-#engine = create_engine('sqlite:///:memory:', echo=True)
-engine = create_engine("postgresql:///ebus_test", echo=False)
-
-model.ModelBase.metadata.create_all(engine)
-
-from sqlalchemy.orm import sessionmaker
-Session = sessionmaker()
-Session.configure(bind=engine)
-
-session = Session()
-
-t1_sensor = model.Sensor("foosensor", "blatest")
-session.add(t1_sensor)
-
-#annahme 100 mal 3 values /min
-for i in xrange(360*24*60*100):
- session.add( model.ValueInt(t1_sensor, 1) )
-
- session.add( model.ValueFloat(t1_sensor, 1.2) )
-
- session.add( model.ValueString(t1_sensor, "foobar") )
-
- if i%1000 == 0:
- print i
- session.commit()
-
-session.commit()
-session.close()
-
diff --git a/setup.py b/setup.py
index 4a3e284..aa607ed 100644
--- a/setup.py
+++ b/setup.py
@@ -1,16 +1,11 @@
#!/usr/bin/env python
+import subprocess
+from setuptools import setup, find_packages
-version='0.2'
-try:
- import pysvn
- from pysvn import Client
- import os
- extra = Client().info(os.path.dirname(__file__)).revision.number
- version = "%s-r%s" % (version,extra)
-except:
- pass
-from setuptools import setup, find_packages
+version = subprocess.Popen(["git", "describe", "--tags", "--long"],stdout=subprocess.PIPE).communicate()[0].strip()
+assert len(version) > 3
+
setup(
name='ebus',
@@ -20,9 +15,10 @@ setup(
author_email='ebus@xapek.org',
url='http://xapek.org',
scripts=[
- "bin/ebus_dump".
- "bin/ebus_app",
- "bin/ebus_web",
+ "bin/ebus_dump.py",
+ "bin/ebus_app.py",
+ "bin/web_prod.py",
+ "bin/web_dev.py",
],
packages=find_packages(),
package_data={'doc':['*.txt'], 'xml':['*.xml']},
@@ -34,8 +30,9 @@ setup(
"Intended Audience :: Developers",
],
requires=[
- "itty==0.6.7",
+ "bottle",
"SQLAlchemy",
+ "psycopg2",
],
)
diff --git a/test.r b/sql/chart.r
index 5575293..5575293 100755
--- a/test.r
+++ b/sql/chart.r
diff --git a/populate_cache.sql b/sql/populate_cache.sql
index f302607..f302607 100644
--- a/populate_cache.sql
+++ b/sql/populate_cache.sql
diff --git a/refresh_cache.sql b/sql/refresh_cache.sql
index 8734348..8734348 100644
--- a/refresh_cache.sql
+++ b/sql/refresh_cache.sql
diff --git a/trigger.sql b/sql/trigger.sql
index fb60617..fb60617 100644
--- a/trigger.sql
+++ b/sql/trigger.sql
diff --git a/test.py b/test.py
deleted file mode 100755
index 958c7b1..0000000
--- a/test.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from ebus.web import model
-
-from sqlalchemy import create_engine
-
-engine = create_engine('sqlite:///:memory:', echo=True)
-#engine = create_engine("postgresql://yvesf:iii@10.2.2.13:5432/yvesf", echo=True)
-
-model.ModelBase.metadata.create_all(engine)
-
-from sqlalchemy.orm import sessionmaker
-Session = sessionmaker()
-Session.configure(bind=engine)
-
-session = Session()
-
-
-t1_sensor = model.Sensor("foosensor", "blatest")
-session.add(t1_sensor)
-
-for i in xrange(10):
- m = model.ValueInt(t1_sensor, 1)
- session.add( m )
-
- m = model.ValueFloat(t1_sensor, 1.2)
- session.add( m )
-
- m = model.ValueString(t1_sensor, "foobar")
- session.add( m )
-
-
-session.commit()
-session.close()
-
-
-
-