Author Topic: Another feature request  (Read 662 times)

Offline ChrisTheC

  • Full Member
  • ***
  • Posts: 139
  • Karma: +3/-1
Another feature request
« on: March 27, 2018, 05:46:59 am »
Hi amg0,
Can it be possible to return the battery percentage when a particular IPhoneLocator device is queried from the iCloud?
Thanks,
Chris

Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2997
  • Karma: +203/-8
Re: Another feature request
« Reply #1 on: April 02, 2018, 07:48:13 am »
Hi amg0,
Can it be possible to return the battery percentage when a particular IPhoneLocator device is queried from the iCloud?
Thanks,
Chris

Good idea, I created v2.45 with that feature.
it is not yet in MCV app store but you can get it directly from https://github.com/amg0/IPhoneLocator

Offline ChrisTheC

  • Full Member
  • ***
  • Posts: 139
  • Karma: +3/-1
Re: Another feature request
« Reply #2 on: April 03, 2018, 07:11:54 am »
Thanks a lot Amg0!
Works good!
Chris

Code: [Select]
2018-04-03 06:56:33.454   luup.variable_set:29: 29.urn:micasaverde-com:serviceId:HaDevice1.BatteryLevel was: EMPTY now: 100 #hooks:0
2018-04-03 06:56:33.454   luup.variable_set:29: 29.urn:upnp-org:serviceId:IPhoneLocator1.PrevUpdate was: 1518274853.565 now: 1518817246.555 #hooks:0
2018-04-03 06:56:33.454   luup.variable_set:29: 29.urn:micasaverde-com:serviceId:HaDevice1.LastUpdate was: 1518817246.555 now: 1522752794.594 #hooks:0
2018-04-03 06:56:33.455   luup.variable_set:29: 29.urn:upnp-org:serviceId:IPhoneLocator1.CurLat was: XX.000000 now: XX.000000 #hooks:0
2018-04-03 06:56:33.455   luup.variable_set:29: 29.urn:upnp-org:serviceId:IPhoneLocator1.CurLong was: -XX.000000 now: -XX.000000 #hooks:0
2018-04-03 06:56:33.455   luup.variable_set:29: 29.urn:upnp-org:serviceId:IPhoneLocator1.PrevDistance was: 9.235 now: 0.003 #hooks:0
2018-04-03 06:56:33.455   luup.variable_set:29: 29.urn:upnp-org:serviceId:IPhoneLocator1.Distance was: 0.003 now: 0.005 #hooks:0
2018-04-03 06:56:33.455   luup_log:29: IPhoneLocator: ETA set to =>0.3
2018-04-03 06:56:33.456   luup.variable_set:29: 29.urn:upnp-org:serviceId:IPhoneLocator1.ETA was: 0.18 now: 0.3 #hooks:0
2018-04-03 06:56:33.456   luup_log:29: IPhoneLocator: Device Status(29): in Home
2018-04-03 06:56:33.456   luup_log:29: IPhoneLocator: updateHouseMode(true)
2018-04-03 06:56:33.456   luup_log:29: IPhoneLocator: HouseMode, getMode() returns: 1, Home

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1313
  • Karma: +34/-32
Re: Another feature request
« Reply #3 on: April 03, 2018, 07:19:19 pm »
Just updated the plugin. I'll see how VeraMate displays the battery.

Edit: I guess this version is 2.45. I'll have to wait a little longer.
« Last Edit: April 03, 2018, 07:32:50 pm by Don Phillips »
Vera 3, 1.7.1030, CT101, Everspring motion sensor, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb, Hue, Alexa

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 155
  • Karma: +3/-1
Re: Another feature request
« Reply #4 on: April 03, 2018, 10:00:24 pm »
Hi amg0,
And now when battery is low make announcement on Sonos, Please charge your Iphone ?
Thanks

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1235
  • Karma: +62/-23
Re: Another feature request
« Reply #5 on: April 03, 2018, 10:54:26 pm »
Hi amg0,
And now when battery is low make announcement on Sonos, Please charge your Iphone ?
Thanks

That's easy to do... with a scene triggered by the battery level.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2997
  • Karma: +203/-8
Re: Another feature request
« Reply #6 on: April 04, 2018, 02:17:08 am »
Just updated the plugin. I'll see how VeraMate displays the battery.

Edit: I guess this version is 2.45. I'll have to wait a little longer.
this should install it : open this url in your browser and ignore error message, let time to download & reload luup
http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=4686&Version=36126

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 155
  • Karma: +3/-1
Re: Another feature request
« Reply #7 on: April 04, 2018, 07:02:05 am »
When i try to create the scene, i give me only 3 trigger choices:

1-A device is present or away
2-Distance goes below
3-Distance goes above

Hi amg0,
And now when battery is low make announcement on Sonos, Please charge your Iphone ?
Thanks

That's easy to do... with a scene triggered by the battery level.

Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2997
  • Karma: +203/-8
Re: Another feature request
« Reply #8 on: April 04, 2018, 12:16:33 pm »
When i try to create the scene, i give me only 3 trigger choices:

1-A device is present or away
2-Distance goes below
3-Distance goes above

Hi amg0,
And now when battery is low make announcement on Sonos, Please charge your Iphone ?
Thanks

That's easy to do... with a scene triggered by the battery level.
you can try these json files,  the trigger will appear but I had no chance to test if it really work. normally it should

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1313
  • Karma: +34/-32
Re: Another feature request
« Reply #9 on: April 04, 2018, 09:39:31 pm »
Just updated the plugin. I'll see how VeraMate displays the battery.

Edit: I guess this version is 2.45. I'll have to wait a little longer.
this should install it : open this url in your browser and ignore error message, let time to download & reload luup
http://<yourip>:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=4686&Version=36126

+1 amg0. And icon shows up on VeraMate.
Vera 3, 1.7.1030, CT101, Everspring motion sensor, GE/Jasco switch, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, Weatherunderground, LB60Z-1 bulb, Hue, Alexa

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1235
  • Karma: +62/-23
Re: Another feature request
« Reply #10 on: April 05, 2018, 02:07:32 am »
When i try to create the scene, i give me only 3 trigger choices:

1-A device is present or away
2-Distance goes below
3-Distance goes above

Hi amg0,
And now when battery is low make announcement on Sonos, Please charge your Iphone ?
Thanks

That's easy to do... with a scene triggered by the battery level.
you can try these json files,  the trigger will appear but I had no chance to test if it really work. normally it should

Otherwise if you use ALTUI, you can trigger through a variable watch on the battery level. On UI7, you can also set the variable watch in the startup LUA but it takes a bit more coding.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline michelhamelin

  • Full Member
  • ***
  • Posts: 155
  • Karma: +3/-1
Re: Another feature request
« Reply #11 on: April 05, 2018, 07:37:51 am »
Works but after 2 or 3 hours it show Iphone battery at 0% why?

When i try to create the scene, i give me only 3 trigger choices:

1-A device is present or away
2-Distance goes below
3-Distance goes above

Hi amg0,
And now when battery is low make announcement on Sonos, Please charge your Iphone ?
Thanks

That's easy to do... with a scene triggered by the battery level.
you can try these json files,  the trigger will appear but I had no chance to test if it really work. normally it should
« Last Edit: April 08, 2018, 08:54:09 pm by michelhamelin »

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1235
  • Karma: +62/-23
Re: Another feature request
« Reply #12 on: June 02, 2018, 09:59:06 pm »
the 0% is an indication that icloud lost track of your phone. This has nothing to do with the plugin but rather the connection between your phone and either GPS satellites or internet as it needs both to update icloud. I have observed this too and I found that checking the extra polling helps decrease the frequency. It does not appear that icloud polls the phone that often either so the API sometimes gives an empty response and needs a second poll after it found the phone.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!