Open twa127 opened 3 years ago
When I initially did the migration of the database to separate out the zone_sensors table, the field max_operating_time was moved from the zone table to the new zone_sensors table, I've since moved it back to the zone table as it made more sense to leave it there. I updated migrate_db.php, but unless you restored to the pre-updated database and re-ran migrate_db,php you would have max_operation_time still in the zone_sensors table and this would cause the failure of the view update in migrate_controller.php. The failure of the data migration was caused by a typo in migrate_controller.php, the new version fixes both problems and should work with max_operating_time in either the zone table or the zone_sensors table and the result will be that zone, zone_sensors and zone_controllers tables are updated to the latest configuration.
I've now updated my live system, so I'll let you know how it goes
Setup a Lamp zone with 1 MySensor and 2 Tasmota controllers attached, all seams okay at the moment I can schedule, start from the GUI or voice command them as group. I'll keep you updated
@twa127 That looks very good. How about backend?
I now have a working boiler.php, will convert it back from BB to RPi and post a copy
okay RPi boiler.php attached, if you execute with a parameter (anything will do) it runs with debug messages eg php boiler.php debug
i think i have problem with migrate_controller.php it says all ok but zone controller table is empty,
spoke to soon, i just replicated my live database to dev and did update. and then migrate controller and all worked and boiler.php is working as well.
please let me know if you find any problems
@twa127 / @pihome-shc - I understand the great work you have set out above was primarily aimed at simultaneous control of multiple sonoff lights. Is there a way that this process could also be used for heating zones? Ie. if you have multiple zones simply measuring temperature in different rooms but these are all grouped under one zone valve (eg. ground floor) - that any one of the individual rooms could be a controller for the group?
thinking out loud -
Perhaps we should not have all these dummy zones which are really only used to display room temperatures. We could display the dummy zones as controllers perhaps to the right of the boiler tile and be able to swap the active zone controller for the 'real' zones (which we can do anyway from the zones GUI).
@twa127 are you finished with testing multi controller?
I've been using on my live system for a couple of weeks and all appears okay. Not yet done anything with the dummy zones, apart from thinking that it sounds like a good idea :-)
tested the data migration with @scottagecheeseandcrackers last database post and all worked okay. It might be a good idea if I commit without the database changes initially, this way the database will not get changed before running the data migration and avoid screwing up the existing database. What do you think ?
yes, leaving database for next round is good idea, do you need me to test anything or you can do pull request for this.
I've been running this version live for over a week so think it is good to go, I'll commit the the update later today
@twa127 anything else left to work on this issue?
have small issue, i created zone and then deleted it, it got purge 1 but zone is still there, i think cron/piconnect.php need some modifications to delete zone.
I'll investigate
received email from one PiHome user.
Hi
In general, after the reinstalling all works, however there are some issues
1) In zone setup, there are 2 records of every zone sensor; it was only one at the beginning but when I corrected the names of every zone because of incorrect LV characters, double record has been created
Probably related issue – there are double zone names also in charts
2) When I press on ‘hot water’ button, nothing opens; despite when hit on other buttons, the schedule opens
3) When I’m trying to adjust the hot water temperature of existing schedule, before touching the temperature slidebar, it shows 50 degrees and slidebar is on maximum right position, but when I’m trying to increase/decrease the temperature, the maximum value that can be set is 30 degrees
Do you have any idea about how to prevent those behaviors?
Thank you!
I'm guessing that something has gone wrong with the migration process, can you post a copy of the database please
Migration worked ok but this issue is after editing zone
Okay so all looked okay after migration, then a zone was edited and we ended up with errors.
How was the zone edited, ie what was changed ?
user only changed the name of zone.
1) In zone setup, there are 2 records of every zone sensor; it was only one at the beginning but when I corrected the names of every zone because of incorrect LV characters, double record has been created
okay, I'll have to backout my latest developments to investigate
Managed to reproduce the error, I'll investigate
Committed a fix, please let me know if this resolves the issue
I have upgraded the PiHome by using commands cd /var/www/ git pull origin However all 3 of the reported issues still persists. Here is a backup: pihome_mysql_2020-09-22_22-12-25.zip
Can you please post a copy of your database from before the update
The zone_sensors table is causing some of your problems
As you can see there are duplicate entries for zone_id 33,34 and 35, please try deleting id 33, 34 and 35 or 38, 39 and 40 depending which ones have the correct value for sp_deadband
Hi @twa127 I have deleted the id's 38, 39 and 40. Issues 1 and 2 then resolved. Thank you very much for your advice! However, the issue 3 still persists.
Hi,
The problem is in table zone_type, where id=3 type value should be Water and not Hot Water
Hi @twa127, Zone type change resolved the issue. Thank you very much!
@twa127
I'm not sure if this is the right place for this issue... when I look on the temperature graphs of last 24 hours, the time zone on x axis is not the same with time for the drawn chart. Can you suggest where to set the time zone for the x axis?
Thanks!
@uldjan Shaun Jepson commented on following post while back, can you try this, file name is changed to chart_load.php
http://www.pihome.eu/2020/05/24/pihome-version-1-75/
Comment: Hello Kevin,
I note that the time axis of all the charts shows up in UTC time. This is not a big issue for you based near Dublin as for six months of the year you are on UTC and the other 6 months just one hour difference. Here in France we are two hours different and it is noticeable.
I have made the following changes to correct this and show the time axis in local time.
update chartfooter.php line 109 from xaxis: { mode: "time", timeformat: "%H:%M"}, to xaxis: { mode: "time", timezone: "browser", timeformat: "%H:%M"},
update chartfooter.php line 218 from xaxis: { mode: "time", timeformat: "%H:%M"}, to xaxis: { mode: "time", timezone: "browser", timeformat: "%H:%M"},
update chartfooter.php line 184 from
xaxis: { mode: "time", timeformat: "%H:%M"},
to
xaxis: { mode: "time", timezone: "browser", timeformat: "%H:%M"},
Hope this helps with some of the other users in Latvia and Romania who have an even bigger time difference.
Thank You Shaun Jepson
Hi,
The line numbers to change in chart_load.php are 135, 148 and 159
Hi @pihome-shc , @twa127 The issue with time zone of x-axis resolved! Thank you very much!
Hi @pihome-shc On current lv.php was missing 52 records compared to en.php. I have added and translated them. Please include it in new installations, otherwise selecting the Latvian language will lose the dashboard and get the notice "This page isn’t working".
@uldjan thank you,
@twa127 your recent change added extra } i m getting error on migrate controller
root@pihome:/var/www/MySQL_Database# php migrate_controller.php
PHP Parse error: syntax error, unexpected '}', expecting end of file in /var/www/MySQL_Database/migrate_controller.php on line 182
root@pihome:/var/www/MySQL_Database# php migrate_controller.php
Hi,
What do you think about the option to link more than 1 controller to a single zone. Thinking about switching on a number of lamps all using the same schedule, for example lounge lamps to switch on/off 3 individual lamps with the same voice command or schedule?