My Events based "Thermostat"

Moderator: Telldus

individual
Posts: 72
Joined: Thu Jan 18, 2018 11:08 am

My Events based "Thermostat"

Post by individual » Thu Jan 18, 2018 11:08 am

With the help of Telldus Live is now possible to have a thermostat and integrate the Gas Heating into the home automation system. Hardware used:

- Tellstick NET
- COCO Technology ACM-1000 on/off receiver
- Oregon Scientific THGN132N temperature/humidity sensor

The ACM-1000 receiver was "hacked" in the sense that, on the output, instead of delivering 220V to power a load, it will have a logic open/close relay. It was very easy to do it, and bellow you will find very explicit pictures. Now the receiver just becomes a logic relay which can be automated with Telldus Live Events. This logic relay will just command the Gas Heater to turn itself ON or OFF. I may mention that my Gas Heater also have an internal program which heats water based on some algorithms and an external temperature probe, so it decides itself what temperature to heat the water, based on outside temperature and the internal thermostat setting. Now my internal thermostat is part of home automation.

Going PRO will add the notification and multiple conditions to the functioning of the heating. Conditions can be used for programming the heating based on time interval, day of the week, other sensor's value, etc.

A long time waiting-for was so easy to be solved. I wish that device manufacturers would come up with a standard relay receiver!

NOTES:
- I tried to configure a single event based on temperature and rearm boundary, however, I find this rearm boundary rather tricky - sometimes it works, sometime it doesn't.

- The way events are implemented, the event's trigger based on temperature takes place only if the sensor value swings above or bellow the treshold set. If for instance, you have deactivated the event, and re-activate it while the value already passed the treshold value, the event will not be triggered! You would have to manually turn On the device, wait for the temperature to increase, hopefully, the corresponding "above set temperature" event will trigger the device Off, wait for the room to cool down, so that the "bellow set temperature" event will trigger the device On once again, and then you are in between these automated events. This is not really working like a real life thermostat which periodically checks the temperature on its own, and if under the treshold set, it sends the command to the relay.

- For those interested further, please read the posts bellow. Some better Events setup solve the triggering and condition issues.
Attachments
P4211159.jpg
Receiver installed.
P4211159.jpg (96.67 KiB) Viewed 14464 times
P4211157.jpg
Red marked points are breaks in electric circuit on the PCB. One side of relay's output is connected with a wire to the receiver's connector. The other side, remains as it is, through the fuse.
P4211157.jpg (140.6 KiB) Viewed 14464 times
Last edited by individual on Sat Apr 26, 2014 7:30 am, edited 14 times in total.
TellStick Net v17 controller
COCO Technology & Proove switches/dimmers
Oregon THGN132N & Proove sensors
Software: Tasker, Remotestick, Telldus Live, DomoSpeak, TelLIVE Remote, Tellmon

simonbove
Posts: 109
Joined: Thu Jan 18, 2018 11:08 am

Re: Hacking a Thermostat

Post by simonbove » Thu Jan 18, 2018 11:08 am

there already exits relays with no power on the output.

individual
Posts: 72
Joined: Thu Jan 18, 2018 11:08 am

Re: Hacking a Thermostat

Post by individual » Thu Jan 18, 2018 11:08 am

simonbove wrote:there already exits relays with no power on the output.
Sure. They can be use as well. But this is a cheap Telldus supported receiver and the hack is really simple, mechanical, so to speak. And it is conveniently cased to fit a standard electrical casing. No brainer.
TellStick Net v17 controller
COCO Technology & Proove switches/dimmers
Oregon THGN132N & Proove sensors
Software: Tasker, Remotestick, Telldus Live, DomoSpeak, TelLIVE Remote, Tellmon

krambriw
Posts: 654
Joined: Thu Jan 18, 2018 11:08 am

Re: Hacking a Thermostat

Post by krambriw » Thu Jan 18, 2018 11:08 am

It is kind of you, sharing this, but there are certainly also safety & regulation issues related that you have to consider:
- you are breaking the CE approval of the thing
- your home/house insurance company might find objections if something (like fire) would happen and the cause can be traced to the modification
- you might be found liable also for damage caused to your neighbors (if you live in an apartment where things happen to go wrong)

Just think about it...be careful

BR Walter

jorang
Posts: 259
Joined: Thu Jan 18, 2018 11:08 am
Location: Norway

Re: Hacking a Thermostat

Post by jorang » Thu Jan 18, 2018 11:08 am

simonbove wrote:there already exits relays with no power on the output.
Can you please link to some examples? Preferably available i Norway/ Scandinavia such as ie. Nexa
______________________________
Mvh/ BR JoranG

individual
Posts: 72
Joined: Thu Jan 18, 2018 11:08 am

Re: Hacking a Thermostat

Post by individual » Thu Jan 18, 2018 11:08 am

jorang wrote:
simonbove wrote:there already exits relays with no power on the output.
Can you please link to some examples? Preferably available i Norway/ Scandinavia such as ie. Nexa
I am sorry but I only had a COCO receiver. You can see the pictures in the first post. The principle would be the same for any receiver: to isolate the output of the relay from the receiver's electronics and use that part of the relay as a logic switch (on or off). Through that part of the relay, there is no electrical current to pass.

Alternatively, you can use a chinese 433MHz relay that can be seen by Telldus, but you will also have to fit it in a box, power it (maybe on batteries), which is unconvenient, because, most likely, you will replace your existing thermostat relay which may already be wired to 230V, so a receiver powered also at 230V would replace it in a snap. And it has it's own casing.
Last edited by individual on Thu Apr 24, 2014 7:29 am, edited 1 time in total.
TellStick Net v17 controller
COCO Technology & Proove switches/dimmers
Oregon THGN132N & Proove sensors
Software: Tasker, Remotestick, Telldus Live, DomoSpeak, TelLIVE Remote, Tellmon

loa46
Posts: 63
Joined: Thu Jan 18, 2018 11:08 am

Hacking a Thermostat

Post by loa46 » Thu Jan 18, 2018 11:08 am

jorang wrote:
simonbove wrote:there already exits relays with no power on the output.
Can you please link to some examples? Preferably available i Norway/ Scandinavia such as ie. Nexa

Yes, some links would be nice.

arneolav
Posts: 279
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by arneolav » Thu Jan 18, 2018 11:08 am

I have done something corresponding;
My heating is done by water, heated by electricity, controlled by TelldusNet, TelldusLive and Oregon temp.sensor.

2 contactors and a valve is controlled by NEXA LCMR1000's.
The LCMR1000's is not modified, just controlling the contactors and the valve.
The valve is controlled directly as it has a much lower power level than the heating circuits.

With TelldusLive, MyEvents I'm trying to keep the temperature as close as possible between 22 and 22.5 degrees C.

To be sure the heating is startet, four temp. levels is defined: 22.2, 22.0, 21.8, 21.6 deg.
And to be sure the heating is stopped, other four temp. is defined: 22.0, 22.2, 22.4, 22.6 deg.
Due to slowness in the system, I have to start/stop heating 0.2 deg before the wanted temp is reached.
This 0.2 deg, due to slowness, might be changed when outside temperature is very low.
I'v set up the night temperature to 19 deg in a simular way, but this is never used as the in door night temp never seems to go below 20-21 deg.

Rearm is set to 0.1,
Repeats 3.

If the second, third or fourth level is fired, a mail is sent, but now, after the upgrade of Telldus to V16/17, this does never happend.

The heating is stopped in the evening and started in the morning, diferent time in weeksdays and holidays.

Next winter i'll reduce to two levels, as after the upgrade of Telldus to V16/17, the first step allways work well.

I'm using http://tellmon.net/ to watch the temperature-curvs and graphical on/off of devices.

.......
This is not a perfect way to keep the temperature steady so some kind of thermostat-function is wanted in TelldusEvents,

But, as I'm writing I'm thinking:
This can already be done in My Events.
Set the temperture to be checked every 5, 10 or 15 minute,
and in conditions:
if temperature is below wanted temp (ex 22.2 deg), start heating,
and if tenp. is over wanted temp (22.2 deg), stop heating.

individual
Posts: 72
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by individual » Thu Jan 18, 2018 11:08 am

As I observed and noted in the first post, after many testing conditions, the problem is the way the trigger based on temperature acts: "if temperature GOES bellow/over".

So, the temperature cannot simply be checked with a function like "if temperature IS bellow/over" (as the conditions set after trigger DO work!!!). That is the real problem, and if Telldus would add or modify this simple condition in the trigger section, the trigger would fire as a real life thermostat function requiers.

By the way, how would you "check the temperature every 5 minutes?"

But now, waiting for the temperature to swing makes the system slow to react, and there may be times and real life situations where simply activating the event while temperature being bellow the treshold point may result in system missing to trigger.
TellStick Net v17 controller
COCO Technology & Proove switches/dimmers
Oregon THGN132N & Proove sensors
Software: Tasker, Remotestick, Telldus Live, DomoSpeak, TelLIVE Remote, Tellmon

arneolav
Posts: 279
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by arneolav » Thu Jan 18, 2018 11:08 am

individual wrote: As I observed and noted in the first post, after many testing conditions, the problem is the way the trigger based on temperature acts: "if temperature GOES bellow/over".
So, the temperature cannot simply be checked with a function like "if temperature IS bellow/over" (as the conditions set after trigger DO work!!!). That is the real problem, .....
Yes, That's the problem, as far as I ca see its possible to solve it only this way; Have a trigger fired by a timer, and in Conditions, use the temperature over/under .
I have been testing this since yesterday and it seems to work ok.
individual wrote: By the way, how would you "check the temperature every 5 minutes?"
I have defined a dummy/fake device and defined a trigger on this device like this: "TimeTriggerAny" and 00, 10, 20, 30, 40 and 50 minutes; Action On.
This could even be done for 5 minutes intervaL, but it seems (in my house) 10 minutes interval is ok.
(If Telldus would add an "interval-function" where we could define intervals like "evry 1, 2, 3... 60 minute" ....this would be more simple.)

The fake device is just because I want to define the "time table triggers" only once.. and by use of this "time-trigger" the other events are more simples.

In trigger of the heater: When "dummy/Fake" device is turned On, Conditions: When Temp is over/under, turn off/on Heater.

You dont need to switch Off the dummy, as other triggers are fired when the dummy switch is set to ON.
But .. I did'nt like to see the Dummy allways is ON, so I put an separate event with 10 secounds delay to switch off the dummy...
(This could be done in a delay of, say 10 sec, just after the ON action , but on reload of the MyEvents Page, by some strange reason, Telldus switches the sequence of the actions..... then the OFF is exectued before the ON. This seems to be an error so I reported It. )

.....
I have defined 4 "heating events", all trigged by the dummy:
1) Day temperature ON; When dummy turns ON; In Conditions, inside day time interval in the day and temperature under wanted day temp.... Action ON
2) Day temperature OFF; When dummy turns ON; In Conditions, temperature over .... Action OFF (No time interval needed)
3) Night temperature ON; When dummy turns ON; In Conditions, if temperature is under wanted night temp.... Action ON (No time interval needed)
4) Night temperature OFF; When dummy turns ON; In Conditions, inside night time interval and temperature over wanted night temp; Action OFF.

This could be modified by separate triggers for weekend and weekdays, but so far I have not done so.

....
Close to the main door of the house I have two switches (Nexa WTE-2):
One for "short time out of house"; Turns off some lights and turn on cameras.
The other switch is called "long time away"; Cut off water supply, turn off som lights, (Light on/off is an other story...) and activate night temp in the house.

Hope this helps.

individual
Posts: 72
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by individual » Thu Jan 18, 2018 11:08 am

Clever! Thank you. I totally missed "TimeTriggerAny" timer option. Now it works much better and precise. More pair of events are needed now, but at least they are based on an actual state (IF...), instead of sensor's temperature swinging over time (GOES...).

However! I noticed that a multiple OR trigger innitiates as many actions as a result. I mean, if I have a time check every 10 minutes as a trigger and the contdition is met, then the action comand is sent 6 times (eventually 6 emails!!!). I don't know if this is a bug, but it looks like one.

I defined a 5 min interval as triggers for each event, because the dummy device configuration would bother me more.

Telldus did think of something of a thermostat logic with the "rearm boundary" concept, but they missed the real life functionality where triggers take place NOW and thermostat is switched on and off all the time, and windows are open, and schedules are made based on each behavior and needs, etc. I hope they will revise and adapt to the concept of a real thermostat functionality, and make it available in an easier to configure Thermostat Event.

And it would also be nice and handy to have available an ELSE condition...

My actual setup:

In the end, I preserve just 2 events, where Heating ON condition is based on "IF bellow temperature" of one sensor, and Heating OFF condition is based on " IF above temperature" of either one of the two sensors I have in two rooms. I trigger these two events every 5 minutes to check up the conditions for either turning heating on or off. I also check to have windows closed before turning Heating ON and if they are open in between, I have another event that turns off heating; and also, the Heating OFF action passes through if an window is open at next time check. This is to prevent heating while having windows open. I also prevent turning Heating ON if the outside sensor is above 10 degree Celsius, because I asume I only need heating if weather it is cold enough.

The only thing I haven't solved yet is that don't want to keep activating/inactivating the Heating ON event based on my presence, I want to have it set and go. I do have a Tasker profile turning Heating OFF when I am out of home, but if temperature and the other conditions are met at the next time check, then heating will start ON again. Maybe I should configure a DUMMY device which is set ON by Tasker if I am home and OFF if I am out, like a "presence state"? Any opinions?
Attachments
Untitled-1.jpg
Updated "THERMOSTAT" events.
Untitled-1.jpg (91.18 KiB) Viewed 14105 times
TellStick Net v17 controller
COCO Technology & Proove switches/dimmers
Oregon THGN132N & Proove sensors
Software: Tasker, Remotestick, Telldus Live, DomoSpeak, TelLIVE Remote, Tellmon

arneolav
Posts: 279
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by arneolav » Thu Jan 18, 2018 11:08 am

individual wrote: However! I noticed that a multiple OR trigger innitiates as many actions as a result. I mean, if I have a time check every 10 minutes as a trigger and the contdition is met, then the action comand is sent 6 times (eventually 6 emails!!!). I don't know if this is a bug, but it looks like one.
This is not a bug; As you write, if the contdition is met, then the action comand and email is sent.
This is one of the reasons why I prefere a dummy for the clock-interval, no email in its action, just set the dummy ON..
But, ofcourse, you could test if heat allready is ON and stop the action.
.....
After some testing you will not need the email.
I'm using email only if somthing seems not normal, if temperature outside is low and inside is too high (>23.5)... the something may be wrong, ... send mail....
individual wrote: I defined a 5 min interval as triggers for each event, because the dummy device configuration would bother me more.
I dont think so, if you set up a dummy device for the clock intervals (you need only one)
Then all other events are trigged from this dummy then.. things will be more simples and easy to understand. (Only my opinion!)
individual wrote: And it would also be nice and handy to have available an ELSE condition...
I don't agree, an ELSE condition will make it possible to creat complicated events, too complicated.
You can do the same with a second test or event, its more clear.

As an old programmer I prefere to keep things as simple as possible.
(But in normal programming, yes, nested IF..ELSE... is a 'must have' but not here.)
Try to think; Can this be done more simple?

individual wrote: Maybe I should configure a DUMMY device which is set ON by Tasker if I am home and OFF if I am out, like a "presence state"? Any opinions?
Yes, i think you are correct, then you can test in Condition "Home ON/OFF", this is exact the same as mine, execpt i'm using a manual switch. Working greate.

individual
Posts: 72
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by individual » Thu Jan 18, 2018 11:08 am

I was thinking about "presence dummy" but is not that easy to figure it out in the absence of a presence sensor. I will go with what I have now, and see if I get a new ideea. Thank you for your ideas.
TellStick Net v17 controller
COCO Technology & Proove switches/dimmers
Oregon THGN132N & Proove sensors
Software: Tasker, Remotestick, Telldus Live, DomoSpeak, TelLIVE Remote, Tellmon

arneolav
Posts: 279
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by arneolav » Thu Jan 18, 2018 11:08 am

De nada...

individual
Posts: 72
Joined: Thu Jan 18, 2018 11:08 am

Re: My Events based "Thermostat"

Post by individual » Thu Jan 18, 2018 11:08 am

Just a small update: I have configured a "presence" dummy receiver which is toggled on/off by Tasker, when I connect/disconnect to my WiFi. Based on that, av event checks every 5 minutes and turns everything off, including my heater, if I am out of home. The real gain here (instead on rely only on Tasker only for this functionality) is that I could have more presence dummies, for all people in the house. The result being, if I go out and is still someone home, then the power and heater won't switch off, because their presence is also a condition.

This one simple addition also permits me to receive emails if I go out and I forget my door unlocked (I have a magnetic sensor installed on it). The state of the "lock" sensor is checked every few minutes. Pretty neat.
TellStick Net v17 controller
COCO Technology & Proove switches/dimmers
Oregon THGN132N & Proove sensors
Software: Tasker, Remotestick, Telldus Live, DomoSpeak, TelLIVE Remote, Tellmon

Post Reply