Make your presence known
Posted: Friday 31 March 2017 15:30
Probably not the first to explain this, but I did a quick search and didn't really found anything.
So here goes:
I wanted to make my presence know at home for Domoticz.
Did some research on this forum and found a Python script that looks for an IP in the network. If found, your presence is know.
But, this didn't really go well, probably an outdated script.
So, I looked for something else.
I remembered I had the app Automate (https://play.google.com/store/apps/deta ... b.automate) installed on my phone and began thinking about a way to make my presence know with this and quickly saw my Wi-Fi connection as a good presence status.
I made this:
- I have a dummy On/Off switch in Domoticz "MyPresence"
- When Wi-Fi status changed, check connected to "MyWifiName"?
- Yes: HTTP request to JSON url "MyPresence" On
- No: HTTP request to JSON url "MyPresence" Off
The Events I made in Domoticz are now made with the check if "MyPresence" is on or off.
In example, when I'm home, our livingroom lights turn on when my dusk sensor goes On.
Now, with this setup: The lights won't go on when me or my girlfriend aren't at home.
Also, when everybody is gone, all lights will turn off automatically.
I hope this has some use for someone!
If you want to know more, I could post some screenshots if you want.
I've had some people asking me how I made this in Automate, so I made this explanation:
HOWTO This 'flow' has been running for days without stopping, so it's pretty stable as far as I can see.
So here goes:
I wanted to make my presence know at home for Domoticz.
Did some research on this forum and found a Python script that looks for an IP in the network. If found, your presence is know.
But, this didn't really go well, probably an outdated script.
So, I looked for something else.
I remembered I had the app Automate (https://play.google.com/store/apps/deta ... b.automate) installed on my phone and began thinking about a way to make my presence know with this and quickly saw my Wi-Fi connection as a good presence status.
I made this:
- I have a dummy On/Off switch in Domoticz "MyPresence"
- When Wi-Fi status changed, check connected to "MyWifiName"?
- Yes: HTTP request to JSON url "MyPresence" On
- No: HTTP request to JSON url "MyPresence" Off
The Events I made in Domoticz are now made with the check if "MyPresence" is on or off.
In example, when I'm home, our livingroom lights turn on when my dusk sensor goes On.
Now, with this setup: The lights won't go on when me or my girlfriend aren't at home.
Also, when everybody is gone, all lights will turn off automatically.
I hope this has some use for someone!
If you want to know more, I could post some screenshots if you want.
I've had some people asking me how I made this in Automate, so I made this explanation:
HOWTO This 'flow' has been running for days without stopping, so it's pretty stable as far as I can see.