Boiler control from MAX! Cube to Drayton Boiler via Raspberry Pi/Vera/Mysensors.
-
Hey, just got around to trying your fix and there's a little issue. The converted name works for the web page but not for the DB query. I've changed the following line in graphing from
tempData = DB.getTemps(cleanName, currentTime)
to
tempData = DB.getTemps(cleanName.replace(''', "''"), currentTime)to get it to work. Hope that helps
Now it's all happy I should really get around to connecting it to my boiler instead of just looking at the pretty graphs! :)
-
grrr, can you send me a copy of your database? I am wondering if it set the room name before the other changes if there is something extra in there.
And just to check, you are replacing one ' (quote) with two of them?
-
Ah, yes. My room names are already set up. Yes, replacing a single quote with two single quotes. I'll PM you my DB. It may have worked if I'd started from scratch.
-
OK, I have no idea how to PM you :)
-
This is my rooms table from the database
1 Living Room 12DA70
3 Hall 137F27
2 Kitchen 12DBCB
5 Master Bedroom 1245D7
4 Landing 12E19F
7 Lara's Room 12DA58
6 Luke's Room 12DA35 -
LOL me either maybe you cant. You could save it to google drive or dropbox and post a link i think.
-
kk cheers, I wonder why it is needing 2 quotes? I will have a better look.
-
Ah, sql syntax (according to a website I found) uses double single-quote to escape a single quote when used in a table.
-
Ok after faffing about for ages I ended up just moving your replace quote code into the database file, keeps it out of the way and seems to work ok if I simulate a room with a quote in it and without.
It is happy saving names with a quote in to the DB it is just searching after that needs it doubled. Something else learned.
-
Cool, thanks. I'll grab it so the version I'm running is in sync.
-
For @simrob problem.
I think the problem is in the database, and my code of course, With the way I developed it over time I think I added features later that cause a problem with a fresh install because It asks for the room names before it creates them. Where my database already had room names populated before I got to that point.
Could you install "DB Browser for SQLite" and have a look at the heating.db file that was created. Under brows data there should be a rooms table like mine."4" "Living Room" "1051D6"
"5" "Dining-Extension" "106FD5"
"2" "Bathroom" "1051DA"
"3" "Bedroom 1" "116B63"
"1" "Bedroom 2" "1163A5"If it is empty possibly just adding one record with the correct name and a random GroupID might be enough to get it past the point where it fails so it can fully populate the table. Also I think you must be using an older version as your line numbers don't quite match what I have. Try downloading the vera Virtual Thermostats branch and see if that helps, not saying it will but that will become the main branch when I sync it up.
I will look at getting in installed again on a blank Pi so I can test and fix this properly. But hopefully putting a line of data in the DB rooms table will get you past the problem. -
I have now changed the folder layout on github to make installing easier, also updated some of the files to hopefully stop the error on first run.
I tried on a blank Raspberry and it all seemed to work ok.
Give the README instructions a once over and see how it goes.
-
After many delays and other items got in the way I finally have almost sully working system. I do have one issue I am struggling with and that is that I can't seem to turn the boiler off once the temperatures have been met.
Also is there any way some of the configuration page could be clarified as there are a number of options I am a little unsure about.
Thanks
-
@twisted I have added a text file to explain the variables. As for not turning the heating off, not sure, remember that normally the Max system will gradually close the valves on the radiators as the temp goes over the requested temp, you will normally get a half degree or so higher. if it never shuts off I don't understand that it just sends the same vera command with a 1 or a 0.
-
Is the Max Boiler Controller from eq-3 not an option to do this more easily? It was introduced by eq-3 for the British market, but is now not available anymore. Google for BC-TS-Sw2-WM to get the manual from eq-3. Maybe we should push eq-3 to reintroduce this product again.
-
Never seen that before, reading the instructions it looks like it switches the boiler on using a daily timer function like the room heating and and a thermostat temperature, possibly if it switches on if any of the rooms are cold that would work. Not saying mine is better but it monitors the valves and gives you heat on demand when any of the radiators call for it.
-
I have to say using Vera and the boiler switch attached to that is a great solution, if I could just get past one problem. I wonder if anyone else is experiencing this, but I find the time taken for the valves to respond to the temperature changes is a little slow. Lets say I set the required temperature to 19c most rooms jump to 20/21 before the valves close enough to actually prevent further heating to the room.
My thoughts at the moment are to see if I can somehow directly communicate with the valves or maybe set offsets for each temp on the valves so they read a couple of degrees high.
Anyone have any thoughts?
-
What I do is only supply heat if valve is open more than 80% or more than 2 valves open 60% so heat shuts off at about 21.9 if you are looking for 22, then the residual heat in the radiator takes temp to about 22.2 before the room starts to slowly cool over the next hour or so down to 21.7 when the valve opens up enough to bring the heat back on.
