Pretty easy question: Can I use Sonoff Switches to control motorvalves and integrate them into OpenHab2?
I need to be able to set rules which control the valves with an accuracy of 1 minute and it needs to be synchronized properly. Example: I want to send the command to open one valve and send another command to close the other valve, so that one is open and another is closed at the same time. Can I do this or will the be system not accurate enough? I believe the system can do that, as it is nothing different to turn lamps on or off in a synchronized way…
Also what devices would you recommend? Sonoff Basic or another brand and product? Cheap and easy integration would be best. Not much other requirements.
The accuracy and timeliness will depend on all sorts of factors that we cannot predict for your specific situation. OH will definitely be able to issue the commands in order and in the subsecond time frame. However, the technology may not be able to support commands that fast and it might lose some of the commands when it gets overloaded. I know for sure this is a problem with Hue, I’ve seen hints of this with Zwave, and I suspect it will be a problem with other technologies.
Other factors include how congested the wireless environment is. For example, if the wifi environment is congested or the valves are far from the access point there might be a lot of latency in commands sent to Sonoffs or other wifi based devices. For Zwave, Zigbee, and 433MHz the same sorts concerns come into play.
All things considered, if you have to send two commands that will cause two valves to activate at exactly the same time you need to be looking at a wired approach and “cheap and easy” is not what you should be looking for. Instead, solid and reliable is what you need.
One approach I can think of is if you combine the controls for the two valves into one device so you can send one command (wirelessly or not) and it activates the two valves locally. Something like an ESP8266 or Arduino or even a RPi W0 that can receive the command wirelessly and activate both valves appropriately.
Though it occurs to me that valves are not instant ON/OFF. You will need to close one and then open the other once the first one is closed or else for a brief time both will be partially open at the same time.
Thank you very much for your answer! This answer says me that the system is suitable for my demands. I wanted to get an impression of what I can expect of the system.
The devices will not be far from the access points. But what amount of latency with a sonoff device are you talking about? Minutes? An ESP8266 is same like Sonoff yes?
The latency really depends on your individual environment and what else is going on. A latency of seconds is probably on the outside of what you can expect. If you are seeing a latency of minutes something else is going on (e.g. the CPU on your OH host is pegged for some reason).
The bigger concern you will have is lost messages. I doubt you would ever see a latency of minutes because the message will get dropped or time out long before that point.
Sonoff is based on an ESP8266 but they are not the same thing.