openHAB thermostats

I have two questions:

a) Is there really now newsgoup, mailing list or any other reputable venue for openHAB? All I could find are dysfunctional and totally unacceptable web fora.

b) There seem to be ways to integrate expensive wireless room thermostats into the system. What I am looking for is different. There is no need for distributed thermostats, open hab can be accessed in many comfortable ways from anywhere in the flat. All I need are temperature sensors and a bit of algorithm and GUI. The sensors should be connected by cable. Every room already has a (rather primitive, which is why openHAB should supersede them) wall mounted thermostat and cable ducts leading to it.

As this is the most basic and most common regulation task in any flat or house, can it really be that nobody has ever attempted it before?

Danke Axel

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger
Loading thread data ...

Den 2017-09-26 skrev Axel Berger :

My personal reflection is that most such turn-key control systems exist not to provide the home owner with a stable control system, but instead tie the customer into relying on the provider not going bust, E2C being up, and that cash flows to the company. Mostly from said customer.

On to the subject:

Dallas Semiconductors 1-wire sensors can be used as long as you pay some attention to the cabling; they are meant to be on a bus, and buses do not lend themselves to typical star-shaped conduit plans. This of course can be dealt with.

Several options exist for connecting to the Pi (to keep us on-topic)

-- among others for instance the Temperatur.nu expansion module:

formatting link
(no, I'm not affiliated, just swedish) . The card becomes reachable via owfs and you can piggyback several cards on the same pi.

Another option is a serial port adapter, and a USB-serial dongle. Cheaper if you have the dongle.

There are hubs that can branch the bus, and those can be bought from several vendors as well.

To get this into your OpenHAB, one way seems to be:

formatting link

--

MN-1334-RIPE           SA0XLR            +46 705 989668 
I want you to organize my PASTRY trays ... my TEA-TINS are gleaming in 
formation like a ROW of DRUM MAJORETTES -- please don't be FURIOUS with me --
Reply to
Mans Nilsson

Which is why a bunch of clever people conceived of openHAB as an open source project. That's why I'm surprised at its tending to rely on commercial components.

Connecting the sensors is not my problem, although I've not yet looked into the details yet. Thermostatic control, especially for a slow delayed system with floor heating, is a non trivial problem and there are several additional constraints. Not even my simple mechanical ones with large hystreresis and internal feedback are that easy to emulate in software. Intelligent room thermostats have their price for a reason. It's just that runnung openHAB centrally I do not want or need a computer, display and interface in every room. It's certainly doable, but nor something everyone can hack together for himself in a few minutes - i.e. exactly the kind of thing you'd expect to find modules for.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

On Wed, 27 Sep 2017 16:17:18 +0200, Axel Berger declaimed the following:

Could some of that be due to building/wiring codes and insurance liability coverage?

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

I doubt it. The security issues are with the outputs, where the Pi is somehow made to control the actuators of the heating system, here open/close valves driven by 230 V. How its input is derived and desired output is computed, is not an issue. Sure, it can become far too hot or too cold, but you can achieve that manually using a standard thermostat too.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

Den 2017-09-27 skrev Axel Berger :

Yes, one would expect that. But regulation and process control theory are not taught in Computer Science :-) -- even if it maybe should be. Mostly because it requires patience and interacting with the actual reality, where Moores Law won't help with thermal inertia et al. :-)

Apparently it is the realm of embedded programming or super-expensive process control systems. And it is written by engineers not trained as programmers. Or at least, it has security holes that suggest it was.

On the actual issue you've got, I did google a bit to see if this was easy. Apparently it is not.

formatting link
is a reasonable discussion, IMNSHO.

--

MN-1334-RIPE           SA0XLR            +46 705 989668 
Yow!  I threw up on my window!
Reply to
Mans Nilsson

You seem to be absolutely right. I have just started a thread on the openHAB community (and through a snafu, fault is mine, can't contribute or reply there any more) and from what I see nobody there has an inkling what a thermostat is or does.

All they can come up with is

If temp

Reply to
Axel Berger

You probably need an PID-regulator solution (proportional, integrating and derivative).

formatting link

Code for this can be found with some effort, my first Google hit that seems suitable, although for the Arduino instead of the Pi, is

formatting link

Most languages can do this, if they have a math library. I'm no enemy of C even though I'm no programmer, so that's what I'd try. FORTRAN certainly compiles on Linux, so that might be a vintage solution. (OTOH, most supercomputer physics code still is FORTRAN, so YMMV.)

1-wire can, as I wrote a few posts upthread, be branched. That probably is your best option.
--

MN-1334-RIPE           SA0XLR            +46 705 989668 
I'm having fun HITCHHIKING to CINCINNATI or FAR ROCKAWAY!!
Reply to
Mans Nilsson

On Fri, 29 Sep 2017 16:34:18 +0200, Axel Berger declaimed the following:

Given that the "Pi" part of the name purportedly derives from "Python" as the target language (for a learning environment), and that you likely don't need the fastest response times, Python is likely the easiest language to use (especially as the R-Pi has a dedicated I/O library for Python).

I don't know if there is anything for the R-Pi equivalent to the BeagleBone "bonescript" (node.js Javascript with a library to access the BBB I/O pins).

If the chosen sensors use chip-select signals, you might be able to use a serial->parallel shift register (74HC595). You'd send (serial -- one pin) the correct byte pattern to select one of the eight sensors (if active high: 1, 2, 4, 8, 16, 32, 64, 128; active low would be complementary bits). After latching the data (another pin, I suspect) you would then send/receive command/data on the shared sensor pins. Repeat for each sensor, then "zero" the shift register to deselect all sensors. {Note:

74HC595 can, as I recall, be daisy-chained, so more than 8 "selects" could be used}
--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

A lot of low level driver stuff for breakout boards is for Python, my current project is using a couple of those and thus is being written in Python. I don't like it either. It's probably my lack of knowledge about the very basics of how Python expects you to construct your program and how to properly organise the source code file structure. I've yet to find a good, clear, guide/tutorial on those aspects.

I wouldn't write off 1-wire, it can do star. IIRC star and parasitic power don't play nicely. There are some pretty good guides on the limitations and how to configure/build 1-Wire networks out there. I think they are on the Dallas site.

Or there is the Embeded Systems OW Server that has three 1-Wire ports, fairly sure they are independant of each other.

Yuk, have a look at the 1-Wire DS2408 8 channel addressable switch. I'm using one to monitor the state of some mains relays as you can read the state of the output pins not just an internal register You can read those as well though. You can of course switch things on/off and as you can read the state of the of pins get feedback that at least the switch in the chip has operated.

formatting link

2408.html

I see that there are relay boards controlled by this chip on eBay but

exactly cheap.

--
Cheers 
Dave.
Reply to
Dave Liquorice

On Sat, 30 Sep 2017 00:09:29 +0100 (BST), "Dave Liquorice" declaimed the following:

It's not Java; you don't have the restriction of one class definition per file, with the corresponding imports. During development you could easily get by with just one master file for all your code, importing just standard libraries. Later you can extract out portions that implement significant yet independent functionality into a separate module. If you are creating libraries for specific cards, you still end up with fewer files than Java.

Easiest way to get familiar with how to configure modules would be to study some of the standard library -- I've yet to have to create a "package" module; single file modules are the most I've needed.

A common idiom for Python is to set up the main program as:

-=-=-=- import ...

class ...

def ...

def main(...): #main program logic

if __name__ == "__main__": main(...)

-=-=-=-

When the file is run from the command line, it runs with the inherent name of __main__; but if the file is used later as a module (a file does "import theModule") it gets the name "theModule" and hence does NOT automatically run the main logic.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

Some years ago, I lived in a house with radiant floor heating. Surprisingly (to me) it was controlled by a simple thermostat--negligible hysteresis, no anticipator.

As you might imagine, it would switch on in the afternoon and typically run until about 5am, after which the temperature would continue to climb until almost noon, necessitating opening doors and windows to stay comfortable!

My solution was to install a simple timer switch in the thermostat circuit that switched on about 4pm and off about midnight. The effect of this arrangement was that on cooler days, the heat came on earlier, but not before 4pm, and turned off at midnight. This provided a "pulse width modulated" heat input to the house with a daily period.

The result is that the house was beginning to warm as the night got colder, and the heat in the slab was sufficient to keep the house comfortable until the afternoon (on a cold day) or the evening (on a not-so-cold day). A further benefit was that it cut our heating fuel cost in half.

For heating systems with lags of hours, it is important to anticipate a future need for heat as well as anticipating the considerable overshoot that will occur after the heat is switched off. I found this simple PWM approach quite effective.

--
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com
Reply to
Michael J. Mahon

The Pi, being a Linux PC runs 100's of different programming languages. Python is just 2 of them.

Try BASIC?

sudo apt-get install rtb

and off you go. It supports most of the gpio natively.

(With the disclaimer that I wrote RTB :-)

You can also test simple stuff using the gpio command - and then use that to write shell scripts too - if you want to code in bash or another shell...

You can star wire 1-wire devices, but it's not the best way, however, depending on the distance, you can pseudo-star them - ie. wire from the master to the first sensor, then back to the master, but not connected to anything, then off to the next sensor, and so on. It's just one big bus and you can use 4-pair cat-5 cable for the connection to each one, so 2 pairs using 3 wires for the "out" leg and another wire (or pair tied together) for the back leg to the next sensor. You'll want to use active power for this rather than parasite power, so you'll need a resistor and power & gnd. at the Pi end.

Gordon

Reply to
Gordon Henderson

PWM usually uses a frequency somewhat greater than 0.000023 Hz. :-)

Reply to
Rob Morley

I meant 0.000012 Hz.

Reply to
Rob Morley

Usually, but we're talking loooooong time constants here! ;-)

I consider it "analogous" to PWM. ;-)

--
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com
Reply to
Michael J. Mahon

Well *that* makes all the difference! ;-)

--
-michael - NadaNet 3.1 and AppleCrate II:  http://michaeljmahon.com
Reply to
Michael J. Mahon

Iirc you also said "with due care" or something intimidating in that vane. But thanks for the heads-up. If it's worth a try, then I'll do it.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

Python it is then, go with the flow. You'renever too old to learn somenting and all the platitudes I keep hearing, so I'll go for it.

That's a place to begin looking.

Danke Axel

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

Sounds reasonable. The point I'm thinking about is sensitivity. The current thermostats are in closed plastic cases, that's how the internal feedback through a heating resistor works. It means they're shielded from rapid changes. If I have a sensor with small thermal mass it will see a large drop every time someone passes throught the door. So a low pass is the absolute minimum.

Not necessarily. With the afternoon sun coming in it tends to get warmer than the set point. When it cools down, it does so very slowly. After switching on the floor becomes very comfy in much less than an hour. Turning off again in time is the more important bit as you have found. That's the part the internal feedback in those cheapo units supplies.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.