home automation

If it doesn't relate to Debian, but you still want to share it, please do it here

home automation

Postby Stian1979 » 2020-02-29 13:03

Im in the process to get some kinda smart management of my central heating.
I wish to fetch a list of spot prices of electrical power of the internet and fetch weather data and use this to estimate if I need to use electricity to heat up the water if the forcast dont show promisse of sunshine and try to boost the temperature when tje electricity is at it's chapest.
Im kinda curious what I should be running to do this.
Not planing a smart house thing, but a standalone energy management that controlls available energy.
Image
Stian1979
 
Posts: 313
Joined: 2007-07-29 14:57

Re: home automation

Postby arzgi » 2020-02-29 13:27

Obvious you need some scrictping to do that automation part. Also you have to check how elctricity is connected to your boiler, where would it be easiest to connect. Perhaps there are some wires you can utilize.

If you have programming experience, you probably have idea where to start. If not, i'd recommend python. It has libraries for many use, for example receiving data from net (urllib). And quite easy to learn the basics.

Closest what I have done is a python script that controls room air humidifier, and also measures the mold moisture of plants. Raspberry PI runs it, I have optically isolated relay to control the humidifier.
arzgi
 
Posts: 622
Joined: 2008-02-21 17:03
Location: Finland

Re: home automation

Postby CwF » 2020-02-29 14:48

Cool. I've been close to these things, a few projects in the past and a few ongoing. I still have moved none of it onto anything debian.

Anyway, there are gotchas. Look into using a 'vote' logic. This works best when there are more choices than you're considering maybe, like two power sources. Voting logic allows you to add intelligence and fudge factors like "I'm home" +1 vote. Avoid exact point choices, ie on/off at a set point, this can lead to 'hunting'. Also avoid indirect measure, like an internet source, it's unreliable.

Also, always consider the time lag. If you heat up the water on cheap power, how much dissipates until actual use. I've done heat/cooling load calculations to spec hvac (degree'd and 2 decades removed). The specifics you need to know for your central air are the coasting characteristics of the building, it's thermal mass, its air exchanges etc. For example if the house is concrete stucco like mine may have a maximum coast of close to twelve hours, a stick (wood) construction might coast for 4 hours,. Translated, the exterior temp effect is variable to construction type.
CwF
 
Posts: 645
Joined: 2018-06-20 15:16

Re: home automation

Postby arzgi » 2020-02-29 15:21

Good points, but where would you get weather forecasts or electricity prices if not from the net?
arzgi
 
Posts: 622
Joined: 2008-02-21 17:03
Location: Finland

Re: home automation

Postby Stian1979 » 2020-02-29 15:52

Weatherforcast for the next 12-24 hours are quite "reliable"
I have a 250litre accumulator tank for heat storage for the central heating.
I wish to uae weather forcast to predict next days heat production from evacuated tubes.
Hours dayligh*temperature as analog values and with clouds as correction factors.
I get the spot kWh prices for the whole day from my electricity provider 14:00 hours the day before they take effect.
I could then estimate if i need some heat stored for early morning use or if production wont be enough.
The 6kW heating element has a input i had to latch to make it work so this can be removed to instead be controlled by an relay.
Simply using some wago or phoenix io modules. Get it to work trough modbus tcp/ip
I have experience with simens logo and some C in microcontrollers. Made a rotating encoder LED dimmer with an atmel once, buy thats the most advanced i ever did.
I have it quite clear how i want it to work, but getting the data, store it and use it is in this case alien to me. Absolutely way into deep water if I where to do it in C.
Thinking of something debian since im likely to find the packages I need.
Only problem is I got no idea what i need.
Image
Stian1979
 
Posts: 313
Joined: 2007-07-29 14:57

Re: home automation

Postby CwF » 2020-02-29 16:01

yes, I understand common sense of the forecast, but I'm hedging on experience that you'll find it's close to irrelevant. There is a hell of lot more granularity needed. The forecast , and price, would need good error handling for out of bounds values. 24/7/365 at some point external data could be off or wrong so an error prone dependency. For price, I didn't think it varied beyond a published schedule?

The coasting characteristic means a local external measured temp will affect the interior in the future, hours or more away. So peak energy usage to correct isn't needed immediately upon measure, but coming up. In a way a local temp IS the forecast. A weather forecast doesn't have that detail. Personally, I wouldn't include it at all, just use local measure.

In some places the bill can be based on peak AmpHour usage and not total usage, more an industrial billing method. In those cases the logic includes a cap, so the AC needs to know the dishwasher is running...
CwF
 
Posts: 645
Joined: 2018-06-20 15:16

Re: home automation

Postby arzgi » 2020-02-29 16:10

You have to some searching on your own. The microcontroller you have might be used, if you get the altering data to control it.

If used pymcu controller, but it's been sold out for years. Comparable to it for example https://www.tindie.com/products/loglow/teensy-3536-breakout-revision-a-standard/?pt=ac_prod_search which can be programmed in many languages.

My knowledge of C is so light, I can't explain how to read data from net. Google may help, or wait if some with deeper knowledge responds.
arzgi
 
Posts: 622
Joined: 2008-02-21 17:03
Location: Finland

Re: home automation

Postby CwF » 2020-02-29 16:14

Stian1979 wrote:I have a 250litre accumulator tank for heat storage for the central heating.
I wish to uae weather forcast to predict next days heat production from evacuated tubes.


I cross posted and missed this, Ok I do understand then. It is relevant in your case to 'guess' ahead of any built in coasting. Really the coasting is the same idea, you are just adding extra storage. I have read up on an australian example storing sun heat for months. Yep, It's going to get complicated!

Don't have anything to add, I'll be listening for your solutions. As I said, I've yet to move anything like this to a debian based solution.
CwF
 
Posts: 645
Joined: 2018-06-20 15:16

Re: home automation

Postby arzgi » 2020-02-29 16:27

Stian1979 wrote:Thinking of something debian since im likely to find the packages I need.


What I and CwF have written indicates you hardly find any package[s] to do all that's required.
arzgi
 
Posts: 622
Joined: 2008-02-21 17:03
Location: Finland

Re: home automation

Postby CwF » 2020-02-29 16:37

maybe MPLAB -X
CwF
 
Posts: 645
Joined: 2018-06-20 15:16

Re: home automation

Postby Stian1979 » 2020-02-29 17:44

arzgi wrote:
Stian1979 wrote:Thinking of something debian since im likely to find the packages I need.


What I and CwF have written indicates you hardly find any package[s] to do all that's required.

I don't expect something finished, but some librarys that let me use modbus to control IO's, read weatherdata and fetch the electricity prices of the net and atore in a CSV file.
Then some program would need to read the content in the CSV and write comands to the IO according to the logic.
I'm having an off the shelf xcomfort system that use local outside temperature and control the rooms according to demand. Not planing to tey imtegrate them into eachother.
Electricity prices
https://www.nordpoolgroup.com/Market-da ... view=table
Image
Stian1979
 
Posts: 313
Joined: 2007-07-29 14:57

Re: home automation

Postby Stian1979 » 2020-02-29 17:56

CwF wrote:
Stian1979 wrote:I have a 250litre accumulator tank for heat storage for the central heating.
I wish to uae weather forcast to predict next days heat production from evacuated tubes.


I cross posted and missed this, Ok I do understand then. It is relevant in your case to 'guess' ahead of any built in coasting. Really the coasting is the same idea, you are just adding extra storage. I have read up on an australian example storing sun heat for months. Yep, It's going to get complicated!

Don't have anything to add, I'll be listening for your solutions. As I said, I've yet to move anything like this to a debian based solution.

I'm not storing for days. I expect only to top up for the first few hours of the day.
Not even having a sulution :(
Image
Stian1979
 
Posts: 313
Joined: 2007-07-29 14:57

Re: home automation

Postby trinidad » 2020-02-29 18:15

To do what you are describing Numerical Control code (like M or G code) would be the easiest to work with once your instrumentation is qualified within it. Control Activity could then be tied to the data sources.

TC
You can't believe your eyes if your imagination is out of focus.
trinidad
 
Posts: 128
Joined: 2016-08-04 14:58

Re: home automation

Postby arzgi » 2020-02-29 21:50

There is libmodbus in Debian repos, don't know other than name of it.

You need anyhow some I/O card, I don't know if linux kernel supports any, or some microcontroller to drive electricity on. PC can not do it on its own.

To read values from net, you can use Debian, there are many options, but all I know require at least some programming.
arzgi
 
Posts: 622
Joined: 2008-02-21 17:03
Location: Finland

Re: home automation

Postby Stian1979 » 2020-03-01 06:57

arzgi wrote:Obvious you need some scrictping to do that automation part. Also you have to check how elctricity is connected to your boiler, where would it be easiest to connect. Perhaps there are some wires you can utilize.

If you have programming experience, you probably have idea where to start. If not, i'd recommend python. It has libraries for many use, for example receiving data from net (urllib). And quite easy to learn the basics.

Closest what I have done is a python script that controls room air humidifier, and also measures the mold moisture of plants. Raspberry PI runs it, I have optically isolated relay to control the humidifier.


I been looking on phyton. Actualy someone else has taken the trouble to fetch electricity prices of nordpools page.
Weatherdata is also done. Seams the bigest problem will be learning phyton.
Image
Stian1979
 
Posts: 313
Joined: 2007-07-29 14:57

Next

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable