├── config ├── index.html ├── components │ ├── angularjs │ │ └── version.txt │ ├── bootstrap │ │ ├── version.txt │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ └── css │ │ │ └── bootstrap-theme.min.css │ ├── font-awesome │ │ ├── version.txt │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ ├── modal.html │ ├── modal.js │ ├── reconnecting-websocket │ │ ├── reconnecting-websocket.min.js │ │ └── reconnecting-websocket.js │ ├── cfg-pw2py.css │ ├── pw2py.css │ ├── editform.html │ ├── switch.css │ ├── pw2py.js │ ├── hot │ │ └── dist │ │ │ └── jquery.handsontable.full.css │ └── cfg-pw2py.js ├── schedules │ ├── winter.json │ ├── carcharging.json │ ├── testsched1.json │ └── testsched2.json ├── pw2py.html └── cfg-pw2py.html ├── domoticz ├── .gitignore ├── README.md └── plugwise2py-domoticz.nodered ├── swutil ├── __init__.py ├── pwmqtt.py ├── util.py └── HTTPWebSocketsHandler.py ├── plugwise ├── __init__.py └── exceptions.py ├── openhab ├── configurations │ ├── transform │ │ ├── pw2py-monitor.js │ │ ├── pw2py-power1h.js │ │ ├── pw2py-power8s.js │ │ ├── pw2py-avgpower-prod.js │ │ ├── pw2py-avgpower.js │ │ ├── pw2py-monitor-prod.js │ │ ├── pw2py-online-n.js │ │ ├── pw2py-circleonoff.js │ │ ├── pw2py-energy.js │ │ ├── pw2py-switch.js │ │ ├── pw2py-cmdswitch.js │ │ ├── pw2py-reqstate.js │ │ ├── pw2py-power8s-s.js │ │ └── pw2py-fullstate.js │ ├── sitemaps │ │ └── plugwise2py.sitemap │ ├── items │ │ └── plugwise2py.items │ └── rules │ │ └── plugwise2py.rules └── README.md ├── .gitignore ├── autostart-howto ├── PW2py_bootstart.sh ├── plugwise2py.conf ├── plugwise2py-web.conf └── README.md ├── config-default ├── pw-hostconfig.json ├── pw-hostconfig-mqtt.json ├── pw-conf.json └── pw-control.json ├── upstart ├── README.md └── plugwise-2-py ├── homey └── README.md ├── setup.py ├── devtools └── plugwsie_util.py ├── README.md └── Plugwise-2-web.py /config/index.html: -------------------------------------------------------------------------------- 1 | Hello world 2 | -------------------------------------------------------------------------------- /domoticz/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /swutil/__init__.py: -------------------------------------------------------------------------------- 1 | #An empty file is enough -------------------------------------------------------------------------------- /plugwise/__init__.py: -------------------------------------------------------------------------------- 1 | #An empty file is enough -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-monitor.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | json.power; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-power1h.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | json.power1h; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-power8s.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | json.power8s; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-avgpower-prod.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | -json.power; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-avgpower.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | json.power; 3 | 4 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-monitor-prod.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | -json.power; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-online-n.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | json.online ? 1 : 0; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-circleonoff.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | ws = json["switch"]; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-energy.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | json.energy / 1000.0; 3 | 4 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-switch.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | ws = json["switch"].toUpperCase(); 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Folders 2 | /nongit 3 | 4 | #misc 5 | get-pip.py 6 | config/*.json 7 | *.pyc 8 | *.log 9 | *.out 10 | *.pem 11 | -------------------------------------------------------------------------------- /config/components/angularjs/version.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /config/components/bootstrap/version.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-cmdswitch.js: -------------------------------------------------------------------------------- 1 | result = '{"mac":"","cmd":"switch","val":"' + input.toLowerCase() + '"}' 2 | result; 3 | -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-reqstate.js: -------------------------------------------------------------------------------- 1 | result = '{"mac":"","cmd":"reqstate","val":"' + input.toLowerCase() + '"}' 2 | result; 3 | -------------------------------------------------------------------------------- /config/components/font-awesome/version.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /config/components/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SevenW/Plugwise-2-py/HEAD/config/components/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /autostart-howto/PW2py_bootstart.sh: -------------------------------------------------------------------------------- 1 | cd /home/pi/Plugwise-2-py 2 | nohup python Plugwise-2.py >>/tmp/pwout.log& 3 | nohup python Plugwise-2-web.py >>pwwebout.log& 4 | -------------------------------------------------------------------------------- /config-default/pw-hostconfig.json: -------------------------------------------------------------------------------- 1 | {"permanent_path": "/home/pi/datalog", "tmp_path": "/tmp", "log_path": "/home/pi/pwlog", "serial": "/dev/ttyUSB0", "log_format": "epoch"} -------------------------------------------------------------------------------- /config/components/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SevenW/Plugwise-2-py/HEAD/config/components/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /config/components/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SevenW/Plugwise-2-py/HEAD/config/components/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /config/components/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SevenW/Plugwise-2-py/HEAD/config/components/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /config/components/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SevenW/Plugwise-2-py/HEAD/config/components/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /config/components/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SevenW/Plugwise-2-py/HEAD/config/components/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /config/components/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SevenW/Plugwise-2-py/HEAD/config/components/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /config-default/pw-hostconfig-mqtt.json: -------------------------------------------------------------------------------- 1 | {"permanent_path": "/home/pi/datalog", "tmp_path": "/tmp", "log_path": "/home/pi/pwlog", "serial": "/dev/ttyUSB0", "log_format": "epoch", "mqtt_ip": "127.0.0.1", "mqtt_port": "1883"} -------------------------------------------------------------------------------- /openhab/configurations/transform/pw2py-power8s-s.js: -------------------------------------------------------------------------------- 1 | var json = JSON.parse(input); 2 | //ws = json["switch"]; 3 | if (json.online) { 4 | ws = json.power8s.toFixed(1) + " W"; 5 | } else { 6 | ws = "offline"; 7 | } 8 | ws; 9 | -------------------------------------------------------------------------------- /upstart/README.md: -------------------------------------------------------------------------------- 1 | Plugwise-2-py - upstart scripts 2 | =============================== 3 | 4 | #Notes 5 | This is very experimental. I did not test this. 6 | Please contribute upstart scripts for different linux distro's 7 | 8 | -------------------------------------------------------------------------------- /homey/README.md: -------------------------------------------------------------------------------- 1 | Plugwise-2-py - homey installation 2 | ================================== 3 | 4 | #Installation 5 | After installing en configuring Plugwise-2-py install the Homey app through 6 | the appstore: https://apps.athom.com/app/com.gruijter.plugwise2py 7 | 8 | For further instructions please visit https://forum.athom.com/discussion/1998 9 | -------------------------------------------------------------------------------- /openhab/configurations/sitemaps/plugwise2py.sitemap: -------------------------------------------------------------------------------- 1 | sitemap Plugwise2py label="Plugwsie-2-py Control and Monitor" 2 | { 3 | Frame { 4 | Group item=gCtrl label="Plugwise control" icon="switch" 5 | Group item=gPowr label="Energy consumption" icon="energy" 6 | Group item=gProd label="Energy production" icon="sun" 7 | Group item=gState label="Circle state" icon="temperature" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /openhab/README.md: -------------------------------------------------------------------------------- 1 | Plugwise-2-py Openhab integration 2 | ================================= 3 | Openhab can communicate with Plugwise-2-py through a MQTT server. Openhab provides a convenient system to operate switches and schedules. Also it can be used to record power readings and draw some graphs. 4 | 5 | TODO: Add a description. 6 | Example sitemap, items, rules and transforms can be found in the openhab folder in this repository 7 | 8 | -------------------------------------------------------------------------------- /config/components/modal.html: -------------------------------------------------------------------------------- 1 |
{{modalOptions.bodyText}}
6 || # | 69 |MAC | 70 |Name | 71 |Location | 72 |Category | 73 |Edit | 74 |Remove | 75 | 76 |
|---|---|---|---|---|---|---|
| {{$index+1}} | 81 |{{circle.mac}} | 82 |{{circle.name}} | 83 |{{circle.location}} | 84 |{{circle.category}} | 85 |
86 |
87 |
88 |
89 | |
90 |
91 |
92 |
93 |
94 | |
95 |
| # | 137 |name | 138 |Edit | 139 |Remove | 140 | 141 |
|---|---|---|---|
| {{$index+1}} | 146 |{{row}} | 147 |148 | 149 | | 150 |
151 |
152 |
153 |
154 | |
155 |
Expect some future extensions of the Plugwise-2.py web applicaiton.
204 |Change log-level
205 |Enable communication logging
206 |Enable changes of static ocnfiguration, requiring restart of Plugwise server
207 |Configure MQTT, etc...
208 | 209 | 212 |