Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




2219 posts

Uber Geek
+1 received by user: 435

Trusted

# 240704 21-Sep-2018 08:57
Send private message

My home automation currently consists of a bunch of Sonoff devices, including TH16 thermostats driving resititive heaters. Simply controlled by the ewelink app, haven't found a need pushing me to Tasmota yet. 

 

I would like to find a solution that lets me vary the thermostat target temperature by time of day, according to a pre-determined schedule and the forecast from Weather Underground. Technically it would be the thermostat upper and lower setting, but for simplicity I'll refer to a single target temperature which is an average of the upper and lower. I've done this manually (cranking the heater when I wake up early in the morning, and turning it off at 8pm) and the house seems to have enough thermal mass/insulation to coast for an hour or two once heated. Fluctuations of this magnitude don't seem to bother us. 

 

This would serve two purposes:

 

1) Optimizing use of off peak power - ramping up the target temperature by a couple of degrees prior to peak power prices (e.g. before 7am and 5pm), and easing the target temperature down on the tail end of peak prices (e.g. before 11am and 9pm). 

 

2) Minimising use of heater ahead of a hot day (our house is a sun trap) - ramping down the target temperature by a couple of degrees in the morning (from 7am) when the forecast indicates a warm and clear day.

 

Here's a graph to convey the idea:

 

 

Can anyone suggest an approach to make this happen, ideally with my existing Sonoff hardware? I have a raspberry pi if needed to pull everything together. IFTTT doesn't pull the temperature from the Sonoff TH16, so I'm guessing I'll need to go a more custom route.

 

If I can get this working for the heaters, I'd like to apply it to my hot water cylinder - using the headroom between 50C (minimum needed for reasonable shower) and 70C to coast through peak power price periods too.

 

 

 

Thanks!


Create new topic


2219 posts

Uber Geek
+1 received by user: 435

Trusted

  # 2094277 21-Sep-2018 09:04
Send private message

I should add that a solution that doesn't turn my heaters off when the internet goes down would be ideal too!


4009 posts

Uber Geek
+1 received by user: 1729

Subscriber

  # 2094341 21-Sep-2018 09:35
Send private message

Sounds like a job for Node Red.

Run that up on your Pi. Get Tasmota (or ESP Easy) flash to your Sonoff. And the have fun building the flow.

There is a node called 'Big Timer' that is quite complex, but allows very specific scheduling. There is also a node for weather underground - I tried using it but found WU weren't giving out api keys to the public any more.

Edit: FWIW I have moved my Sonoff basics to Tasmota over esp easy. Found it more stable on those devices. Would still use ESP Easy for modules like wemos d1 and nodemcu though.

 
 
 
 


3809 posts

Uber Geek
+1 received by user: 1712

Subscriber

  # 2094392 21-Sep-2018 11:08
Send private message

For the hot water cylinder, install an upper temp sensor (approx 1/4 to 1/3 from the top). During offpeak, heat as normal based on the bottom thermostat. During peak, only switch the element on when the upper temp sensor indicates low temp. As that means that the cylinder is close to running out of hot water.


Although the best option is a large hot water cylinder, with both a bottom and upper element. Then you only need some simple timers to get good power savings.

Assuming that your cylinder doesn't have solar or wetback connected?







2219 posts

Uber Geek
+1 received by user: 435

Trusted

  # 2094412 21-Sep-2018 11:40
Send private message

chevrolux: thanks, looks like Node Red will do the trick. I found a blog that used Big Timer for this very purpose, so that's a base for me. You've also prompted me to think about ESP Easy though. My graph is just three different setpoints, so could potentially do a simple set of 'rules' e.g. use time of day as a trigger to write the setpoint to a variable, then compare the actual temp to the setpoint variable and activate/deactivate the heater. Might make integration with IFTTT/Wunderground (and Flick spike notifications) more complicated/impossible though. Either way, I need to order another TH16 to play with.

 

 

 

aredwood: I'll be getting an electric cylinder shortly to replace instant gas. No solar or wetback. Will see about getting a top element - good idea. Could set the lower element to only run overnight to 70C, and the upper element to run in the afternoon to 55-60C. Then just need to choose a cylinder size that will carry me through peak periods without any boost. I'm thinking that 180L @ 70C should be sufficient for modern low flow fittings/appliances and 2.5 occupants.

 

 

 

Thanks guys!


4409 posts

Uber Geek
+1 received by user: 679

Trusted

  # 2094562 21-Sep-2018 14:06
One person supports this post
Send private message

Have you looked at OpenHAB/Home Assistant?  Both run on the pi, and would do what you want......and then like the rest of us, you'd get obsessed with automating, hooking in everything.

 

Given they're local and can be cloud enabled if you so desire, it satisfies your do something when no internet....assumes you network has power though.

 

 





Previously known as psycik

OpenHAB: Gigabyte AMD A8 BrixOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Xiaomi Humidity and Temperature sensors and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 10
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


3809 posts

Uber Geek
+1 received by user: 1712

Subscriber

  # 2094738 21-Sep-2018 19:25
Send private message

@nickb800 Get a 300L cylinder. Probably won't cost much extra compared to a 180L twin element anyway.

Then you should be fine with night only heating. And use the upper element just for quicker reheating if you run out. Or if wholesale prices are super low.







2219 posts

Uber Geek
+1 received by user: 435

Trusted

  # 2138391 3-Dec-2018 10:33
Send private message

So my Sonoff TH16 finally arrived (spare, so I can leave the others in service). I've spent five hours so far trying to get Tasmota onto it, and am no closer than I was five hours ago. I'm not a programmer so really struggling with this. Does anyone know any easier methods for flashing?

 

1) Arduino - coming across errors when compiling, relating to the changes here, but following the instructions leads to other parts of the code breaking, and I don't know how to fix

 

2) Tasmota auto flash - have used the .exe, all seems to go well then the .exe closes before anything is written to the sonoff

 

3) PlatformIO - I've grabbed a binary, gone through to change wifi variables, succesfully compiled then when I upload I get "warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
*** [upload] Error -1"

 

4) Esptool. Can't figure out how to install this in python. "easy installation" instructions give me a bad syntax error

 

 

 

I've loaded stuff onto Arduino and Wemos before, but this has me completely stumped. 


 
 
 
 


2115 posts

Uber Geek
+1 received by user: 1191


  # 2138397 3-Dec-2018 10:45
Send private message

In my experience, Arduino compile errors with no explanation are due to missing libraries. The rest are normally syntax errors.
Not sure about tasmota though.

What errors are you getting? Are all the libraries it includes, added to the Arduino software.




Location: Dunedin

 




2219 posts

Uber Geek
+1 received by user: 435

Trusted

  # 2138402 3-Dec-2018 11:03
Send private message

andrewNZ: In my experience, Arduino compile errors with no explanation are due to missing libraries. The rest are normally syntax errors.
Not sure about tasmota though.

What errors are you getting? Are all the libraries it includes, added to the Arduino software.

 

Thanks for the reply. I've included all of the libraries that came with Sonoff-Tasmota (there's a lot of them), which resolved the specified errors around missing libraries (notwithstanding your point about missing libraries being the culprit of unexplained errors). The arduino errors related to the "breaking change" from an update to ArduinoJson - relating to terms jsonbuffer, dynamicjsonbuffer and jsondocument. After fixing initial errors and recompiling, I get a different error about those terms being declared in the scope


4009 posts

Uber Geek
+1 received by user: 1729

Subscriber

  # 2138541 3-Dec-2018 12:46
Send private message

For Tasmota, use the Arduino IDE - and as above, compile errors are normally just missing libraries.

ESP Easy... download the latest ESP Easy Mega from github, use the built in exe flasher for that. Just make sure you use the right package for your particular module, and the correct size (Sonoff is 1024, Wemos d1 is 4096)



2219 posts

Uber Geek
+1 received by user: 435

Trusted

  # 2138565 3-Dec-2018 13:36
Send private message

Have got ESP Easy running on it now - thanks for your help everyone


Create new topic



Switch your broadband provider now - compare prices


Twitter and LinkedIn »



Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

New Zealand PC Market declines on the back of high channel inventory, IDC reports
Posted 18-Jun-2019 17:35


Air New Zealand uses drones to inspect aircraft
Posted 17-Jun-2019 15:39


TCL Electronics launches its first-ever 8K TV
Posted 17-Jun-2019 15:18


E-scooter share scheme launches in Wellington
Posted 17-Jun-2019 12:34


Anyone can broadcast with Kordia Pop Up TV
Posted 13-Jun-2019 10:51


Volvo and Uber present production vehicle ready for self-driving
Posted 13-Jun-2019 10:47


100,000 customers connected to fibre broadband network through Enable
Posted 13-Jun-2019 10:35


5G uptake even faster than expected
Posted 12-Jun-2019 10:01


Xbox showcases 60 anticipated games
Posted 10-Jun-2019 20:24


Trend Micro Turns Public Hotspots into Secure Networks with WiFi Protection for Mobile Devices
Posted 5-Jun-2019 13:24


Bold UK spinoff for beauty software company Flossie
Posted 2-Jun-2019 14:10


Amazon Introduces Echo Show 5
Posted 1-Jun-2019 15:32


Epson launches new 4K Pro-UHD projector technology
Posted 1-Jun-2019 15:26


Lenovo and Qualcomm unveil first 5G PC called Project Limitless
Posted 28-May-2019 20:23


Intel introduces new 10th Gen Intel Core Processors and Project Athena
Posted 28-May-2019 19:28



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.