3

I am quite new to Z-Wave. I have a gateway, 2 z-wave sockets and 3 light switches. Everything comes from Keemple brand if that helps. However, using Keemple I cannot automate things the way I would want. I am a programmer so writing scripts in any language is not a problem for me. I was thinking about making use of my raspberry pi. I would like my lights to automatically turn off when my phone disconnects from the Wifi network.

I am thinking of 3 possible scenarios:

  1. RPI becomes a z-wave gateway and I pair all devices with it. The only problem is that all devices are currently paired with Keemple gateway. Is it possible for one device to be connected to more than one gateway at a time? Once All z-wave devices are connected to RPI and the gateway, I could communicate directly from RPI and do some scripting there.

  2. RPI becomes a z-wave device (sensor). It would have a boolean values that would represent the states that I am interested in. Those states would contain values that would come from the scripts I would write. I would need to pair it somehow (not sure if possible) with my Keemple gateway and set up a scene for switching off all lights when phone becomes unreachable.

  3. RPI communicates with the gateway over TCP/IP. However I am not sure if it is possible. I learned about MQTT, but I cannot figure out the way to connect to my gateway over that protocol...Possibly it is only available for Keemple cloud and not for me to use.

Are both scenarios possible? Which way should I go to achieve what I need?

  • scenario #2 would turn off all the lights when the phone battery became depleted – jsotola May 29 at 17:43
  • I am fine with that. Moreover, this is a simplified case. In reality it will execute when both phones - mine and my wifes are unavailable. My battery almost never depletes, not to mention both at the same time :-) – Michal B. May 30 at 6:16
  • how are you going to check, if your phone is connected? android phones typically enter a sleep mode after some inactive display off time. Then they don't answer to pings, for example. I assume similar things happen with iOs. – oh.dae.su May 30 at 9:56
  • This is not part of the problem. My problem is the communication between Raspberry Pi and Z-Wave gateway that controls my Z-Wave devices. I learned about MQTT. It looks like the port is open on the gateway, but I am getting disconnected as soon as I connect, so I am looking for other ways... – Michal B. May 30 at 20:49
  • 1
    I changed my question a bit, because I see that many people divert from the original problem that I have. I hope now it is clear what I want to achieve. – Michal B. May 31 at 5:59
0

I learned that the best way is to turn RPI into a Z-Wave gateway using Z-Wave controller (USB device that can communicate with Z-Wave devices). It is important to note that one Z-Wave device can be connected to only one network at a time, so in my case I need to disconnect all devices from my current network and connect to the new one.

One of the good open source choices to turn your RPI into Z-Wave controller is Domoticz (http://www.domoticz.com/). Once this is set up one can connect devices and configure own scenes. Domoticz supports other protocols, not only Z-Wave, so it is a good way to integrate many devices with one home automation system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.