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:
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.
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.
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?