stephenmhall / piheating Goto Github PK
View Code? Open in Web Editor NEWpython code for Raspberry Pi Heating control
python code for Raspberry Pi Heating control
webui.py got
self.switchHeat()
File "H:/src/PiHeating/PiHeating\max.py", line 486, in switchHeat
roomTemps = CreateUIPage().createRooms()
File "H:/src/PiHeating/PiHeating\webui.py", line 215, in createRooms
actualTemp = goodTemps[roomText]
KeyError: u'Utility Room'
fixed this by changing line 215 from
actualTemp = goodTemps[roomText]
to
actualTemp = goodTemps.get(roomText, 0)
Hey Stephen
After a long break I finally got around to forking your code (via twistedsanity) and I have a couple of questions
Why do you generate a static file for the website? The only reason I can think of doing this is to reduce the load on querying the MaxCube, but the code is kinda hard to read. Im not a python programmer (more java/node) but this looks like a strange thing to do.. that said it will perform nicely.. Just wondering why you did it this way
I noticed you store initialization variables AND runtime data in variables.txt.. Why? I would have thought an init.properties file and a seperate runtime data file would be better.. or store it in the local DB... Curious to why
otherwise thanks for the head start!
I plan to use this code but without a Vera system, I was thinking it might be good to have a flag, like useVera=true|false, and whenever we call out to a vera device we check to see if the flag is set.
I dont plan to use a vera, will use direct relay and thinking this might make it more generic
Im running the code on my windows box (for now till I get a relay for the PI) and have noticed I get the following error when saving a temperature to a valve. The valve however does get the new temperature
BaseHTTPRequestHandler.__init__(self, request, client_address, server)
File "C:\Python27\lib\SocketServer.py", line 652, in init
self.handle()
File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "H:/src/PiHeating/PiHeating\requesthandler.py", line 72, in do_GET
SendMessage().updateRoom(roomData)
File "H:/src/PiHeating/PiHeating\sendmessage.py", line 191, in updateRoom
CreateUIPage().updateWebUI()
File "H:/src/PiHeating/PiHeating\webui.py", line 23, in updateWebUI
self.saveAdminUI()
AttributeError: CreateUIPage instance has no attribute 'saveAdminUI'
going through the code I noticed that manual boiler switch is commeted out in both max.py and heatinggpio.py, just wondering why? its controlled by flags
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.