GithubHelp home page GithubHelp logo

stephenmhall / piheating Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 608 KB

python code for Raspberry Pi Heating control

Python 59.43% CSS 2.07% JavaScript 2.55% Shell 0.23% HTML 14.79% CoffeeScript 12.12% Arduino 8.82%

piheating's People

Contributors

stephenmhall avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

qidane asantaga

piheating's Issues

KeyError on room with 0.0 temp

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)

Why like this

Hey Stephen

After a long break I finally got around to forking your code (via twistedsanity) and I have a couple of questions

  1. 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

  2. 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!

VeraLess Options?

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

Error when saving values

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.