I currently monitor my mobile phone with network binding to detect my presence at home - all works great. But struggling little with displaying text “Occupied” or “Away” on separate syntax (Home_Status) when I`m home or away.
Here is my current setup.
Sitemap
Frame label="Presence" {
Text item=Home_Status icon="presence" {
Frame label="Andy`s Phone" {
Text item=Phone1Status label="Status [MAP(phone.map):%s]"
Text item=Phone1LastSeenTime label="Last Seen [%1$ta %1$tR]"
Items
/* Presence Detection - Mobile Phone Monitoring */
Switch Phone1Status <my_iphone>
DateTime Phone1LastSeenTime <time>
Switch Home_Status "House Status [%s]" <status>
Would someone please advise how to implement the above.
Many thanks.
Thanks for suggestion. I tried that but its not displaying house status.
Below is my current syntax and picture of each section so you can see what Im trying to achieve. Strangely, I cant see any error in logs which would give me a clue what to change.
Sitemap
Frame label="Home Status" {
Text item=Home_Status icon="presence" {
Frame label="Andy`s Phone" {
Text item=Phone1Status label="Status [MAP(phone.map):%s]"
Text item=Phone1LastSeenTime label="Last Seen [%1$ta %1$tR]"
Items
Group:Switch:OR(ON,OFF) Home_Status "House Status [MAP(home.map):%s]" <presence> (All)
Switch Phone1Status "Phone1" <my_iphone> (Home_Status)
DateTime Phone1LastSeenTime <time>
Switch Home_Status "The house is [%s]" <status> (Home_Status)
Not sure where I`m going wrong, sorry slightly embarrassed with that but changed configs as per your indication (I hope) and still no luck.
Have I done it correctly ?
Sitemap
Frame label="Home Status" {
Text item=Home_Status icon="presence" {
Frame label="Andy`s Phone" {
Text item=Phone1Status label="Status [MAP(phone.map):%s]"
Text item=Phone1LastSeenTime label="Last Seen [%1$ta %1$tR]"
Items
Group Presence (All)
Group:Switch:OR(ON, OFF) Presence "House Status [MAP(home.map):%s]" <presence> (All)
Switch Phone1Status "Phone1" <my_iphone> (Presence)
DateTime Phone1LastSeenTime <time>
Switch Home_Status "The house is [%s]" <status> (Presence)
You now have two Groups called Presence.
Every Item (which includes groups) must have a unique name.
I’m really not sure why you added the first one, just get rid.
The second version is good, a Group called Presence that will be ON if any of its member Items are ON.
This group has two members.
One is your phone status. All good so far.
The other member is the switch Item that you were first going to use as the “overall” indicator.
I’m not sure why you have kept that, but you can if you like.
Nothing will happen with it in the current setup.
I see now where was the problem @rossko57 swapped the mistake and everything works now as a treat - many thanks and thank you for explaining the functionality above that really helps me.
And I got confused with creating two groups with the same name, not really sure why I done it.
Once again, thanks a lot. I will probably add virtual switch to enable override presence status manually just in case my phone is out of action. Will that be just a new switch which belong to “Presence” group?