Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonoff TH: Infallibility #25

Closed
xoseperez opened this issue Jan 4, 2017 · 13 comments
Closed

Sonoff TH: Infallibility #25

xoseperez opened this issue Jan 4, 2017 · 13 comments
Labels
Milestone

Comments

@xoseperez
Copy link
Owner

Originally reported by: Pavel Eremin (Bitbucket: paveleremin, GitHub: paveleremin)


Hello everyone,

I've got my first Sonoff TH and I decide to test own firmware before change it to espurna.

  1. I setup automatic mode with minTemp and maxTemp - all worked fine

  2. Then I turned off the router, and it's continue to work!

The question is: will Sonoff TH continue work without wifi?

If not, I think it's not safe use it with gas boiler, because in this case we have two points of failure: router and mqtt server. @xoseperez what do you thing about it?

@xoseperez
Copy link
Owner Author

You mean the factory firmware, right? AFAIK settings are stored in the device so yes, the sonoff will still work without connection.
That's a feature ESPurna does not have, yet. ESPurna does not need a cloud server to work but right now interactions are done via MQTT using a software line Node-RED, Domoticz or alike, that can be in a local server.

@xoseperez
Copy link
Owner Author

Original comment by Denis French (Bitbucket: denisfrench, GitHub: denisfrench):


Hi Xose; I've checked out several Sonoff/ESP8266 firmwares at GitHub, I'm glad I found yours hidden here in Bitbucket ;-)

I too would be interested in a thermostat function internal to the firmware. I get that there are other ways to implement this via MQTT using node-red or some home automation solution, but for critical applications (like Pavel's boiler or my solar hot water electric booster) it's safest to remove all possible points of failure (wifi and internet connectivity, MQTT and home automation/node-red server...) and have the thermostat able to operate independently.

It's great to still have MQTT control and status reporting, which is why I'm currently using this ESP8622-based relay; https://guide.openenergymonitor.org/integrations/mqtt-relay/

Their latest firmware isn't open sourced, so I am looking elsewhere for alternatives. If you were to begin a branch implementing this I'll probably have a tinker with it. I might give it a go myself, but my skills are more at the "tinkerer" than the "developer" level :-)

BTW; I can see you have a branch called "scheduling", which is another feature I need for the solar hot water booster...

@xoseperez
Copy link
Owner Author

Original comment by Pavel Eremin (Bitbucket: paveleremin, GitHub: paveleremin):


@denisfrench you can try ESP Easy with the Setting -> "Device -> Level Control", it's store and control temperature inside the device and report it with MQTT. Also you can play with "Device -> Dummy device" and change Temp and Hysteresis with your UI (for example OpenHAB). But that firmware not so fast with Sonoff as espurna.

@xoseperez
Copy link
Owner Author

@denisfrench @paveleremin I agree that has to be in the roadmap somewhen soon. Actually it might be a good idea to bind the scheduling along with actions based on sensor data. This way you could toggle the relay on when the temperature goes under a certain value but only in the afternoon, or when it detects movement using a PIR at night.

@xoseperez
Copy link
Owner Author

Original comment by Denis French (Bitbucket: denisfrench, GitHub: denisfrench):


Thanks @paveleremin, that sounds promising; I'll check it out.

@xoseperez that would be perfect for my application, where I only have the thermostat on in the wee-hours during the off-peak electricity tarif :-)

@xoseperez
Copy link
Owner Author

Original comment by f-fish (Bitbucket: f-fish, GitHub: Unknown):


Not sure how the scheduling would work, but on some of my espeasy devices I use Rules as the fail safe ... With lights I had a habit of working on the tanks after the domoticz lights out period. On device Rules ensure that the tanks have some dark cycles.

#!arduino

On Clock#Time=All, 20:15 do
 gpio,12,0
endon

On Clock#Time=All, 23:15 do
 gpio,12,0
endon

On Clock#Time=All, 02:15 do
 gpio,12,0
endon

Later Ferdie

@xoseperez
Copy link
Owner Author

Original comment by Alexey Belyaev (Bitbucket: AlexeyBelyaev, GitHub: AlexeyBelyaev):


I'll second this option. Currently I use bunch of electrodragons with 3rd party firmware to control water heating in my countryhouse. I prefer to have thermostat implementation in esp boxes and not in home automation center to avoid single point of failure (it would be painful in our climate), so currently MQTT broker is used to set the value of setpoint, esp saves it to flashmemory (to avoid resetting to default in case of powerdrop) and uses ds18b20 reading and simplest possible thermostat logic to keep room temperature close to setpoint. I'll be glad to use espurna in this setup, since it looks more robust and logical compared with currently used firmware. Thanks for all your efforts and best wishes

@xoseperez
Copy link
Owner Author

Duplicate of #131.

@xoseperez
Copy link
Owner Author

Original comment by Denis French (Bitbucket: denisfrench, GitHub: denisfrench):


Hi Xose; nice to see you making progress on the scheduler.

I agree the scheduling aspect is a duplicate of #131, however #131 does not seem to mention the thermostat feature.

Is the thermostat integral to the scheduler perhaps? Or is it already implemented and I missed it?

The thermostat function is critical to adequately replacing Sonoff TH OEM firmware.

I am currently using ESPEasy rules for my application, however am eagerly awaiting thermostat scheduling within Espurna.

Thanks for your work on this.

@xoseperez
Copy link
Owner Author

The idea is to have a IFTTT type of approch with different inputs (like time itself, or any magnitude from a sensor) and actions on the relay as output. So the thermostat will still be possible ("if time is between 22:00 and 08:00 and temperature is below 16ºC turn relay ON", for instance).

@xoseperez
Copy link
Owner Author

Original comment by Denis French (Bitbucket: denisfrench, GitHub: denisfrench):


@xoseperez that sounds like a very flexible approach.

It will however require two rules to implement a thermostat, which may not be obvious in the first instance to some users.

It took me a little while to work out EspEasy's rules, but then half of the issue was their odd syntax.

@xoseperez
Copy link
Owner Author

Original comment by sierrarc (Bitbucket: sierrarc, GitHub: Unknown):


+1 for the same functionality.
I want to put all electric heating of my house to be controlled by espruna. Do you have ETA on this feature?
Thanks for your great work!

@artua
Copy link

artua commented Mar 24, 2018

Good day,

Is it somehow available now? I mean scheduling based on sensor value.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants