pofs, thanks for the tip. I will try to use what you suggest, but I doubt I will be able to pass commands like "find.zwave.me:8083/zwaveapi/run/" because even when I'm logged via the browser(cookie is passed), I am not able to do this. I might got your idea wrong though. Can you please help me with some example? Thanks.
RisingFenix , hi
What my configuration does now is the following:
- All device changes are bound to a PHP script1 at my server. The PHP script1 writes data changes to a mysql DB.;
- A dedicated mailbox is created for the automation system. It passes all mails which come to it to a PHP script2. This script2 checks the mail content(sender,subject,message). So if the mail is from me or my girfriend, the script will continue, if not, the sender will get an automatic email with message to f*ck off
. If the script continues with the right senders, it parses the mail message and searches for keywords. For example: if the script2 finds the key phrase "last motion", me and my girlfriend will receive a respond from the system "The last motion was detected at $time on $date.(this data is fetched from the mysql DB)"; (and a few other checks like this - temp,light level)
-Another thing what script2 does is , if it receives message with key phrase for example "away mode", it sets a value of a cell in the DB to 1 and responds with message that the away mode is ON. Now when the motion sensor sends data to script1 that motion is detected, script1 not only saves the data, but it also checks if the "away" cell is 1 or 0. So when it's 1, we will get notified immediately that motion is detected at our apartment while we are away. When we get back, we send mail to the automation system with key phrase lets say "coming home" and now script 2 will set the "away" value to 0. So script1 will read it and won't notify us with every movement detected.
It's pretty simple, but cool for me and I play a lot
But those operations are just for reading data from the devices and PHP scripts. The next level is to find a way to pass commands to the devices from external server, so I can set values to them(stop/start lights, control thermostat etc.) with my own scripts, and not through the UI. So i'm trying to find secure ways. Maybe I can try what you have in mind-VPN, but i will have to find some custom firm to the router to set up a VPN to be always available, then find a way how to connect a php script to the vpn with auth , and then pass the Zwaveapi http requests. Thanks for your tip
Don't know if that is interesting to anyone, but the idea of these forums is to share, so I share.