pihome-shc / pihome Goto Github PK
View Code? Open in Web Editor NEWPiHome - Smart Heating, Ventilation and Air Conditioning (HVAC)
Home Page: http://www.pihome.eu
License: Other
PiHome - Smart Heating, Ventilation and Air Conditioning (HVAC)
Home Page: http://www.pihome.eu
License: Other
option to edit alert settings for each node. sorry i have to attached file github is messing up my code.
But i can not get it to work, maybe someone else can look at this.
node_alert.txt
Implement Holidays Module,
The relay board control requires this file easyi2c.py and an example of how to use it is in:
Basic Steps:
import easyi2c
dev = easyi2c.IIC(0x32,1) # 0x32 is the address of the relay board
dev.i2c([n,1,0,1],0) # on
dev.i2c([n,0,0,1],0) # off
The boards are manufactured with the same address, if more are needed, the user has to re-program them with commands. Full datasheet is here if you want to see some of the other features (use delay, read back status etc) see datasheet
Something strange is happening when editing schedules.
After adding schedule, if trying to edit, all temperatures get updated to 0
Hi, just wanted to let the developers know that I had to make a mod to the weather_update.php file to get the function to work, I suspect this is due to changes in the API call at openweather.org.
In three places in the ‘sixdays’ code I had remove the ‘/daily’ to change, the ‘5 day/3hr’ section had already been updated.
//$weather_sixdays_api = “http://api.openweathermap.org/data/2.5/forecast/daily?q=”.$city.”,”.$country.”&appid=”.$appid;
to
//$weather_sixdays_api = “http://api.openweathermap.org/data/2.5/forecast?q=”.$city.”,”.$country.”&appid=”.$appid;
can any one test this, because its working for me without any change but it might be my api is older and new signup have this issue.
The delete node button does not appear to do anything and neither does the save button on the add node screen.
When adding zone, it set to zone temperature sensors id to 0 and zone controller only show boiler controller from drop down list.
#69 - Missing save button on Zone edit
Add node options i.e gpio pin treated as node and i2c relay board treated as node and have option under settings to add these nodes manually.
Hi all, not sure if its me (ie browser/my setup) but i am unable to see schedules. When i create one, i can create by selecting zones etc, but i cant then view them. If i check in maria, i can see it, but not on the GUI?
I have taken a clone from git hub as it is now (23:00 on Thursday 2nd Jan GMT), and overwrote all files in my /var/www + updated the sql connection details and run the update_db.php script.
Am i missing something?
Right Now, there inst any option to change timezone for system and for pihome under setting table in GUI. just throwing the idea out to see what can be done about this.
Hi all,
At this stage PiConnect works over http request which is very CPU intensive i m looking for ideas to improve PiConnect i m by no mean expert but after reading few blogs and watching some YouTube videos i think websocket is better options and MQTT on public is domain is another option, what you guys thing and which way PiConnect should go?
Hi, Great work, Im trying to setup my zones, but there is no save button on the Zone edit page. Using Chrome V77.
Its there for boiler edit.
Making PiHome compatible with HVAC system i was thinking to add functionality for cooling, if any one have any information please let me, what i have gathered so far:
North American gas furnaces (with or without air conditioning) have standardized HVAC equipment terminals:
G – Fan, usually a green wire
R – 24 VAC usually a red wire
C – 24 VAC Common
Y – Air Conditioning (Cooling) Compressor, usually a yellow wire
W – Heat, usually a white wire
When you get into dual-stage heating and cooling systems, there are additional terminals which can be powered if the system isn’t meeting the demand – this is normally only in very large houses:
Y2 – 2nd stage cooling
W2 – 2nd stage heating
Cooling works on same principle as heating but circulation fan extra with variable speed. also some systems use to control cooling and by opening valve , Tricky question is to modulate the valve to open 25%, 50%, 75% and 100% and modulating fan velocity.
Need to collect information about APAC
typo in the setup_db.php - can not find pihome_mysql_database.sql
2018-04-09 20:01:54 - MySQL DataBase Table View Script Ended
`
the MySQL_Database is requested twice in the script path.
Running boiler.php faster by duplicating the cron job and delaying one of them by 30 seconds could get a faster response in boiler actions.
Having hysteresis set at 3 minutes means that boiler cron is 1/3 of that time, which in my opinion is pretty high.
Solution:
`*/1 * * * * /usr/bin/php /var/www/cron/boiler.php >/dev/null 2>&1
*/1 * * * * sleep 30; /usr/bin/php /var/www/cron/boiler.php >/dev/null 2>&1`
Not a great improvement, but on the same principle, cron jobs could be tripled and delayed by 20 seconds.
When boost is triggered for one zone let say 30 minutes with 23c, and then you trigger boost for another zone with higher time 60 minutes with 40c is only take time from first boost and turns off boost for second zone as well with first one. which seems bug in the boost
while i was testing buffer tank setup i noticed boost button console id and boost button id don't get updated if you change them in model, i think only workaround this is to disable them but if user want then user need to create new boost entry with correct boost console id and boost button. its small bug if you are using boost console and want to make some modifications.
Most boilers require a closed circuit to turn on heating. This means that a boiler connected to a Normal Open relay would be OFF in normal state. When triggering the relay the circuit gets closed and the boiler turns ON.
Having security in mind and assuming that the SD card or the Raspberry Pi could get faulty then the relay would close the NC contacts and the boiler would turn ON indefinitely. I suggest an inverse logic in /cron/boiler.php
$relay_on = '1'; //GPIO value to write to turn on attached relay
$relay_off = '0'; // GPIO value to write to turn off attached relay
Same as Temperature sensors, Zone and Boiler controller last seen does not get updated, this could be one step close to email notifications.
schedule_add.php allows user to enter a schedule that crosses midnight (e.g. from 22:00 to 02:00), but doesn't get returned if it's past midnight (01:00) by the query in boiler.php
$query = "SELECT * FROM schedule_daily_time_zone_view WHERE CURTIME() between
startAND
end AND zone_id = {$zone_id} AND time_status = '1' LIMIT 1;";
CURTIME is absolute, while the schedule times are relative, so past midnight the query takes the 'start' time to be after the 'end' time and (thankfully) returns nothing.
Solutions?: I'm wondering if inserting a 'fake' end and start time either side of midnight might do it - end at 23:59:59 and insert a new schedule from 00:00:00 - or just curtail the users ability to enter end times that don't fall between the start time and 23:59:59 and make them aware of the limitation, so they can do it manually. Thoughts?
(I'm not sure how 'night climate' works in this regard, either)
Helping text is missing from all fields and its confusing for ordinary users while creating zone.
Follow same pattern as in Setting->Boiler
<div class="form-group" class="control-label"><label>Main Label</label> <small class="text-muted">Helping Text</small>
If your temperature sensor doesn't communicate or you have no temperature reading for a time:
during the night database clean-up removed old records, in result it get reading 0 and frost protection kicks in (it will probably keep going until the sensor starts working). Not good if you are on holidays.
Suggestion: Would be good if code could fault the zone if there is no temperature reading for a time or no comms with zone relay (so you don't turn on boiler when you can't communicate with zone controller), and then you have something in place to indicate zone fault on main screen.
For that one you probably need changes in boiler logic to mark zone fault, new column in zone table to mark it faulty for display on webpage and you need to force sending valid temperature reading from the sensor even if it didn't change from time to time.
Add option for Week days for night climate same as we have in daily schedule.
Underfloor radiant heating and its higher inertia and controlling of the boiler. For the first, it should be enough to add some learning PWM modulation mechanism (should be available for PHP but need to search ).
For the second it requires implementation of OpenTherm protocol and probably is next step, as majority of boilers can set the equithermal curves itself pretty well.
Start search for Smart Home Gateway if PiHome lost connection to Gateway, this is already give info in settings under gateway icon but it must start search if it fails to connect at set amount of failure to fix itself.
if boiler is running, and your gateway goes down or pi is powered down/crashed. Your boiler relay will remain on as it won't get any new command.
Suggestion:
Fix would be easy, have a new variable, that is reset to 0 every time you receive a message (you should receive message roughly every minute).
In loop(){} have wait() and then increase the variable if the variable exceeds some set value turn off the boiler relay. That way if you don't get any command for a time it will knock off the relay.
Note: Same does not apply to zone relay for safety reason as it cause not problem if we leave zone open.
Hi, is someone able to adjust to allow for a single config file which can be user created to provide connection details for the database? Then slowly we can point anything that needs database access to use that single file rather then have connection details in multiple files?
Github has an option of ignoring specified files, so if/when someone then does a commit, that file is not pushed up, and likewise not overwritten when pulled down
I can see icon for PiHome Updates under setting but nothing implemented to update/pull code from GitHub or update database.
For code it would be easy to have script to run git pull origin
once a while but how to update database? and how to keep track of older version i.e. let’s say if I miss one update I can get code updated to latest and greats but how to gradually update database?
I m just throwing this idea out to see what others think.
Night climate I think it should have account for midnight rollover same as schedules.
Idea is to have option in the schedule for the zone to have contitional/coop cut in.
Probably no big use for it if you have 3 zones, but might be handy for example for hot water, it makes more sense with multiple zones like I plan to have, with 8 zones there will be one of them cutting in after the other so probably boiler will run all the time.
Idea is that if zone has conditional/coop schedule active it won't start even if it's below setpoint, it will only start if it's below setpoint and boiler is already running and then finish normally when sp is reached even if zones that enabled start of it finished heating.
So basically let's say during day I control temperature downstairs on normal schedule, and attic and bedrooms cut in only when they are below temperature and downstairs cut in.
Same during the night I have normal zone control in bedrooms and rest of the house is conditional start, basically temperatures I don't care about that much start only when the ones I care about more are already running.
Same can be used for hot water, thee ate periods when you want hot water, morning, evening for shower (use normal schedule then), but for rest of the day don't start boiler if only request is hot water, wait for other zone that has normal schedule to start and heat it together.
Hi, Some boilers have an option for hot water priority - where the boiler will increase the heat output to heat up a hot water tank quickly - at a higher temprature then the radiators would normally take.
for this, the boiler has an additional set of controls.
Is there a way for PiHome to be programmed such that if Hot Water demand is on, Close off all zone valves for non hot water if the following two criteria is met: there is a demand for hot water from the tank +the scheduled window for hot water is active?
small bug:
i try to setup email under e-mail alert and its not saving any setting, i did some investigation and found that query in db.php only updating record and not searching if record exit or not.
$query = "UPDATE email SET smtp = '".$e_smtp."', username = '".$e_username."', password = '".$e_password."',
from= '".$e_from_address."',
to = '".$e_to_address."', status = '".$status."' where ID = 1;";
Yesterday for first time I encountered strange issue, all 3 of my nodes were reporting wrong temperature. Boiler was ON for longer as it should have been. At first I couldn’t tell what was the problem, as all 3 nodes frequently were updating DB with “current” temperature. Next morning I checked graphs (see below) and you can see that right temperature curve appeared about 6 hours late. As it affected all notes the bottleneck must have been on receiving end.
Spikes shown on graph around 1am, was me testing nodes at around 10pm.
Raspberry Pi temp curve looks as it should (different script, not affected by serial read)
Haven’t done any testing, but this is what I have observed. All of this is my closest guess. Ref similar issue on stackoverflow
serialgw.py script has time.sleep(1) in its loop, so it means if serial port receives more than 1 message a second, messages will start to pile up in queue and will be read out one by one every second.
To delay serial read by this much (6h) about 21600 additional messages needed to be written/read in short period of time (not sure how many messages are generated in normal circumstances).
Part 1: In general we are not expecting more than 1 message per second in average, but to prevent such unexpected behaviour and provide future proof, serialgw.py loop should be implemented without sleep as well as without causing extensive additional resources on CPU.
Part 2: Number of additional messages looks to be way too high. Need to be investigate what could have generated all of them in such sort time.
Set 30 seconds delay to turn on boiler so zone valve can open and delay to close zone valve when boiler shuts off so pressure in systems can dissipate properly.
If user have 1-Wire DS18B20 temperature sensors connected to Raspberry pi GPIO then graph for Hot water wouldn't show and need code modification i.e. charlist.php and modify node id to respective 1-Wire temperature sensor id to get graph drawn in web interface.
Change the code same as zone and loop through the zones set as hot water
look in chartfooter.php from line 46 to 119
Hi,
I'm very intrested in setting up a similar controller to what you have, but php coding is non existent for me, the work i have done is by learning python.
Can you assist/guide me a little on how to make this work for me?
The setup i have at the moment is
1)multiple DS18B20's around the house connected to multiple pi's. Each pi sends back readings to a central mysql database.
2) use bv4627 relay board to switch on and off various zones - i have an ufh manifold of 8 zones, plus first floor and DHW - so at present 10 zones (This will be come 15 in the future)
Everything is wired at present so no need to the wireless side, but want some pointers on where to make adjustments for the different relay controller, and also the data being held on a central mysql (not running on a pi!) I cant see any contact points via the website so forgive me for raising as an issue - feel free to close without comment if you are unable to help me!
As @pihome-shc have mentioned in another post list of icons in settings menu keeps growing.
Open this issue to discussion how we could tackle this.
Example suggestions:
Systems °, OS Version, PIHome Update, Uptime, Wifi, Ethernet, etc. could be added to one "system" menu under one icon as all just displays info. Maybe reboot and shutdown buttons added to it as well as they are relevant to the system.
Once of confit of temperature units, language, time zone, etc., should be grouped under "First Startup".
Or icons could be grouped like "One Touch" button on home screen
i was looking at the ever growing list of icons under settings. i was thinking to put these settings under language or system or perhaps another icon for time-zone?
Originally posted by @pihome-shc in #121 (comment)
@dvdcut added option on GUI to add/delete boost options this can be improved with edit on the screen.
list all all PiHome Cronjobs and possible add option to modify from web interface.
I have a number of Temperature Sensor Nodes which are not used to control zone valves, hence it makes sense to leave controler_id and controler_child_id set to NULL.
In order to graph these nodes a change is required for zone_view to display these rows, also the Zone Modal will need a change to tidy up the display
Great project and very impressive GUI, Thank you for sharing with us.
I have tried to get alerts setup with my Gmail account without any success, I can see on main page when zone/boiler controller or sensor isn’t reporting for set time but no email alerts.
Do you have any plane to implement PHPMailer? i see you have older version of PHPMailer "class.phpmailer.php" but can not locate its reference anywhere.
i m unable to modify schedule, i can add successfully and delete as well but i can not modify schedule. can not see any obvious reason but I'll investigate this.
I'm using the dev branch to install pihome.
my setup.php has the following;
$hostname = '192.168.1.100';
$dbname = 'pihome';
$dbusername = 'pihome';
$dbpassword = 'pihome';
Passwords, username etc changed, but are correct. I have php 7 installed, and mysql is on 192.168.1.100.
when i try to run /usr/bin/php /var/www/setup.php
i get the following error:
pi@test_heatingpi:/var/www $ /usr/bin/php /var/www/setup.php
S M A R T H E A T I N G C O N T R O L
Have Fun - PiHome.eu *
2018-04-08 18:20:11 - php version 7.0.27-0+deb9u1 looks OK
PHP Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'pihome'@'192.168.1.90' (using password: YES) in /var/www/setup.php on line 48
Database Connecction Failed with Error: Access denied for user 'pihome'@'192.168.1.90' (using password: YES)pi@test_heatingpi:/var/www $
The ip the script is targeting the host of the pi rather then the ip i've set.
Add a 'Remember Me' checkbox on the login screen for the web interface. It's tedious having to sign in every time.
Changing and creating zone with GPIO is very confusing when selecting node id for GPIO. Same for boiler when selecting GPIO for boiler.
When creating GPIO node notice interval is set to 30, change this to 0 when node is created by default.
By default some GPIO pins are set to IN and they must be set to OUT. gpio mode <pin> out
On zone fail, sensor battery low, frost protection and over temperature.
Some background and explanation about buffer tank and combined storage tank.
A buffer tank is a backup/reserve tank for storing heating in form of hot water which can be called upon when needed. Buffer Tanks are designed for use with standard central heating systems (biomass or solid fuel systems in conjunction with solar water heating system. The water is heated by the heat source (solar, biomass or wood boiler) to a set temperature in the tank and this hot water can be stored until it is required. It therefore will reduce the ‘short cycling’ of a boiler, in that it will reduce the amount of times that a boiler will turn on and off to heat the water and in doing this it will help to increase the lifetime of the boiler.
A combined storage tank combines hot water storage for heating support. As a result, warm water, typically from solar thermal energy is stored temporarily for both purposes for later consumption. (its rare installation but still if some one else can shed some light and give schematic for connection and how to control it)
As i understand right now PiHome do not support second heat source and now way of controlling it or deciding where the heat comes from (heat sources is defined as boiler) and heat comes from same single source.
Build some differential controller with two sensors and two relay and let that differential controller to decide where the heat comes from, PiHome only send instructions when there is demand for heat. This would be ideal if buffer tank and boiler are in same location.
In some cases buffer tank and boiler aren't in same location hence one differential controller isn't going to work. configure/modify PiHome to have buffer tank as second heat source or should I say proffered heat source and if that heat source is above set point then heat should be called from buffer tank and if buffer tank is below set point then call for heat from second heat source i.e gas boiler. i know second option requires two controller: one for boiler and second for buffer tank.
This would be huge advantage for PiHome over commercially available solution in the market. all commercially available solutions do not have any way of managing or calling second heat source in managed and decent way as far as i tell (may be i m wrong but i m open to correction).
I would prefer to see PiHome managing/controlling second heat source from itself and second option would definitely gives more controller rather then having only option one implemented, also implementing option one would left out all those who's boiler and buffer tank in separate locations.
sorry for long story but i felt the needs explaining, i m not an expert by any mean and open to correction.
Under settings: this ability can be added to delete exiting boost records and add new ones if needed. i think this is very important as some default ones are not always useful for everyone.
Redundant hysteresis_time for zone and boiler. The problem appears if selecting a smaller hysteresis for zone than the histeresis set for boiler.
This one is small GUI bug. When zone heating isn't starting due to dead-band or weather temperature compensation than on GUI its very misleading and it shows schedule icon as but boiler icon stay blue, I think it would be nice to display why heating/boiler isn’t starting i.e icon for dead-band and weather temperature compensation.
@aszumski
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.