logo elektroda
logo elektroda
X
logo elektroda

[Solved] Integration of Sonoff detectors with air conditioning - how to construct?

unky 2457 16
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18495127
    unky
    Level 18  
    I would like to install Sonoff window sensors in the windows and a Sonoff contactor to which the air-conditioning is connected.
    When any window is opened, the contactor should be disconnected and the air-conditioning switched off.
    Is it possible to build something like this based on Sonoff?
  • ADVERTISEMENT
  • #3 18504876
    sk1977

    IT specialist
    What you described can be done - the opening sensor can switch off the contactor (switch).
    Switch (suitable for the power of the air-conditioner) + Sonoff DW1 sensor + Sonoff Bridge connected to the same 2.4GHz network, with internet access cloud operation - if you want to do it on the eWelink app as a scenario.
    However, such a solution has a weakness: the information from the sensor will only relate to the opening of the window - it will not turn on the air conditioning when the window is closed. The need to use the Sonoff Bridge complicates and increases costs.

    There are also opening sensors that do not require a gate that reacts to opening or closing and gives the status, e.g. the Sonoff open/close sensor (I could not find information on the model and did not have the opportunity to learn more about it) - more expensive, but does not require a Bridge. Simplifies installation and configuration.

    If you have the ability to control the climate control by other means - e.g. IR, RF - this can be used.

    You can also use a system other than Sonoff or integrate systems - the possibilities are many.
    Helpful post? Buy me a coffee.
  • #4 18506333
    unky
    Level 18  
    I'm going to do it all on OpenHAB. I've done a bit of reading, even set up a server already and had a preliminary play around. A combo when it comes to smart home - there is a lot to learn but no cloud etc required.
    I will use an IR transmitter - Broadlink RM MINI3 - to operate the air conditioning. Perhaps additionally an on/off switch but I am advised against turning off the air conditioning by cutting the power.
    Now I'm looking for cool open-close sensors which I'll connect to OpenHAB and which will signal opening and closing and will respond to a query about the current status (just in case it cuts off the power if the window is open). In addition, I would like a contactor whose status can be checked and information if the contactor is loaded in order to check if the air-conditioning is working (in case someone "manually" turns it on).
    I will configure rules on OpenHAB and hopefully it will work nicely. The only concern I have is with the remote from the air-conditioner so that it can be replaced by this IR transmitter, but I will test this in battle.
    I want to put OpenHAB on a miniPC - Intel Nuc BOXNUC5CPYH - installation on Debian.

    By the way, I've done a bit of searching on the internet in the last few days on the subject of smart home and there's a whole bunch of these systems - Supla, Domoticz, eWelink, Somfy, Fibaro, Xiomi Smarthome etc. - normally a headache.
    Well, fortunately, I came across OpenHAB, which is supposed to tie everything together - it is supposedly the most difficult to set up but has support for many different devices of the above systems. After initial tests and trials it looks mega promising.
  • ADVERTISEMENT
  • #5 18506436
    sk1977

    IT specialist
    A good example of how delving into the subject of SmartHome works - it started with "wants to switch on one device" and in a few days already the server and system :) .

    See also Home Assistant + Node-RED - can be put on e.g. Rasberry PI - https://www.home-assistant.io/ - can be integrated into over 1500 systems, not bad support, fairly easy to use, constantly developed.

    unky wrote:
    Now I'm looking for cool lock opening sensors
    - see if you integrate: https://allegro.pl/oferta/czujnik-otwarcia-zamkniecia-wifi-ewelink-sonoff-8882278321
    I haven't had a chance to experience this device in person yet, but it looks promising. Or something from Xiaomi.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #6 18506477
    unky
    Level 18  
    sk1977 wrote:
    Good example of how delving into the topic of SmartHome works - started with "wants to switch on one device" and in a few days already server and system :) .
    .
    Right :) I have been drawn into this home automation:) .

    sk1977 wrote:
    -see if you integrate: https://allegro.pl/oferta/czujnik-otwarcia-zamkniecia-wifi-ewelink-sonoff-8882278321
    I haven't had a chance to experience this device in person yet, but it looks promising. Or something from Xiaomi.
    .
    You have to change the firmware on the Sonoff I think - from what I've read - it connects to eweLink and that's not an open solution. Xiomi would also be OK - it is easy to integrate but you need a gateway for this because it does not work over WiFi.

    sk1977 wrote:
    See also Home Assistant + Node-RED - can be installed e.g. on Rasberry PI - https://www.home-assistant.io/ - can be integrated into more than 1500 systems, good support, fairly easy to use, constantly developed.
    .
    I'll have to have a read - looks interesting too.

    Added after 8 [minutes]:

    sk1977 wrote:
    See still Home Assistant + Node-RED - can be put on e.g. Rasberry PI - https://www.home-assistant.io/ - can be integrated into more than 1500 systems, not bad support, reasonably easy to use, constantly developed.
    .

    Well, you've made my mind cloudy. I was already decided on OpenHAB and here's the conundrum with this Home Assistant which looks really mega interesting :) .
    Now I don't know which way to go.... ;-)
  • #7 18506534
    sk1977

    IT specialist
    If you absolutely want to operate without the cloud, the sonoff can be reprogrammed (I don't know if this one is too) - or you can use another sensor that can operate without the cloud.

    If you get a bit more involved, you will probably start using the cloud as well - it is worth going for solutions that can work with, for example, Google Home (you can use the voice assistant) and Amazon Alexa.
    In the case of Home Assistant, you can use it simultaneously with the cloud.
    Helpful post? Buy me a coffee.
  • #8 18506610
    unky
    Level 18  
    sk1977 wrote:
    If you absolutely want operation without the cloud, the sonoff can be reprogrammed (I don't know if this one is too) - or you can use another sensor that can operate without the cloud.

    If you get a bit more involved, you'll probably start using the cloud too - it's worth going for solutions that can work with, for example, Google Home (you can use the voice assistant) and Amazon Alexa.
    In the case of Home Assistant, it can be used simultaneously with the cloud.


    I take it you have converted Home Assistant as well as OpenHAB or mainly Home Assistant though?
    ps. It's a bit tricky to install HomeAssistant on NUC and Debian. OpenHAB definitely simpler in terms of installation:) .
  • #9 18506640
    sk1977

    IT specialist
    I haven't redone OpenHAB - so I don't have a comparison.
    Installing HA can be easy - Rasberry Pi and hassio - there are ready-made images. It's not difficult on debian either.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #10 18506701
    kood
    CCTV and Stationary Alarms specialist
    Check if you can cut off the power from the air conditioner, from what I remember from one facility of this type of system, turning off the power in one splice resulted in the air conditioner stopping working in the neighbouring rooms and you had to make a circuit that simulates pressing the splice off button rather than cutting off the power from it.
  • #11 18507312
    sk1977

    IT specialist
    unky wrote:
    To operate the air conditioning I will use an IR transmitter - Broadlink RM MINI3
    - the concept of cutting the power has already fallen through.

    Depending on the air-conditioner, you may want to think about low-voltage switches - e.g. Sonoff SV (or similar) and their integration into the air-conditioner (e.g. button simulation).

    It is also worth doing a status verification - you can use a circuit breaker with current measurement (without using the shutdown or as an alternative) and check if the air conditioner has been correctly switched off based on the current drawn.

    E.g. open a window -> 1. check if the air conditioner is running (current drawn) -> 2. if yes: send IR off code -> 3. wait x sec. -> 4. check if the air conditioner is working (current drawn) -> if no: back to 2.
    It is also possible to add a protection in case of switching on with the window open
    1. detect switch on (current drawn) -> 2. check window -> 3. if open send IR off code -> 4. wait x sec. -> 5. check if the air conditioner is working (current drawn) -> if yes: back to 3.

    The switch itself with the current measurement can be used to block the air-conditioner from switching on (e.g. based on temperature, time, departure, etc. - whatever you can think of) preferably also based on the principle of safe shutdown 1. send shutdown code -> 2. wait x sec. ->check current -> if clique in STB you can switch off power, if not go back to 1.

    Current (value) and time x to be checked experimentally.
    Helpful post? Buy me a coffee.
  • #12 18512349
    xury
    Automation specialist
    As already mentioned it is possible to integrate almost anything with HA and Node Red. In addition, popular modules based on ESP 8266, Xiaomi sensors and you can work wonders. For example, the Nora add-on is available in NodeRed and with it you can control practically everything by voice via Google home. You can make yourself all sorts of gateways or IR transmitters on the ESP8266.
    Nowadays, you can say "Give me any device and I will integrate it".
    When it comes to HA it is best to install as a whole hassio. There are ready-made images on Rpi, but you can also install via Docker
  • #13 18512976
    unky
    Level 18  
    I was initially thinking of OpenHAB but the more I read the more I get drawn into Home Assistant. The only thing that doesn't convince me is installing on a Raspberry. I've already purchased an Intel NUC with SSD and would like to install on Debian but that seems a bit breakneck to me because HA generally instslated on Rpi.
  • #14 18512988
    sk1977

    IT specialist
    unky wrote:
    HA generally instslated on Rpi
    - can also be installed on other devices - in Docker.
    Watch the videos. Once you have Debian, you use commands to install HA.
    Helpful post? Buy me a coffee.
  • #15 18512997
    unky
    Level 18  
    I just don't quite get the idea of Docker. I've known Debian for years but just at the utility layer without going too in-depth, and I've never heard of anything like Docker - the term first occurred to me when installing HA on Debian.
  • #16 18513452
    xury
    Automation specialist
    Here you go. This is how you install hassio in the docker container on intel nuc
    Code: Bash
    Log in, to see the code
    .

    For more info see: https://github.com/home-assistant/hassio-installer

    First of course you need to install docker on debian

    In short, Docker is a kind of virtualisation. It allows you to install systems in so-called containers, which do not interfere with your main system.
  • #17 18516984
    unky
    Level 18  
    The topic can be closed.
    Conclusion:
    I have tested both OpenHAB and HomeAssistant and by far the number one is HomeAssistant. Mass of plugins, huge community making plugins for smart-home devices. I had no idea that this area is so advanced and that there is such a huge community integrating all kinds of devices working with HomeAssistant.
    It turned out that there is a plug-in for HA that makes it possible to replace the air conditioning control application (Sevra air conditioning with WiFi module) - the ACFreedom app - which enables direct control of the air conditioning. I will install the plug-in with HA and it will hopefully work. Plus Xiomi window opening sensors, I'll write some rules and hopefully it will work as expected. In addition, I will install a Selly 1PM WiFi contactor, which will enable me to measure the energy consumed by the air-conditioning so that I can calculate the profitability of the air-conditioning in the rental flat.

    If it turns out that the plug-in replacing the AC Freedom app doesn't work as expected, I'll use the Shelly 1PM contactor I mentioned above and control the air conditioning via the Broadlink RM Mini 3 IR remote control. A few rules to enter into HA and it should work.

    Thanks to everyone for their help :-) .

Topic summary

The discussion revolves around integrating Sonoff window sensors and a contactor to control air conditioning systems. Users explore the feasibility of disconnecting the air conditioning when a window is opened, using Sonoff devices. Solutions include using a Sonoff DW1 sensor, a Sonoff Bridge for cloud operation, and alternatives like low-voltage switches or IR transmitters (e.g., Broadlink RM MINI3) for controlling the air conditioning. Concerns are raised about cutting power to the air conditioning, with suggestions for using current measurement to verify operation status. The conversation also highlights the choice between home automation platforms, primarily OpenHAB and Home Assistant, with a preference emerging for Home Assistant due to its extensive plugin support and community resources. The final solution involves using Xiaomi window sensors and a Selly 1PM WiFi contactor for energy monitoring.
Summary generated by the language model.
ADVERTISEMENT