iCloud Binding - Coordinates
Verfasst: 1. Dez 2018 15:51
Ach verdammt aber auch.... ich könnte verzweifeln gleich...
Nachdem etwas spezielles nicht funktioniert hat, habe ich habe jetzt mal alles 1:1 so wie in dem Binding erklärt eingerichtet.
Leider funzt es immer noch nicht richtig... ich habe kein Plan was genau der Fehler ist.
icloud.things
icloud.items
icloud.sitemap
icloud.rules
Soweit so gut optisch schaut es gut aus, die Karte ist da und die Position passt.
Was nicht funktioniert ist die Angabe der "Coordinates" mein Text wäre "iPhone Koordinaten"
Im Log finde ich keine Fehlermeldung
kann mir bitte jemand helfen?

Nachdem etwas spezielles nicht funktioniert hat, habe ich habe jetzt mal alles 1:1 so wie in dem Binding erklärt eingerichtet.
Leider funzt es immer noch nicht richtig... ich habe kein Plan was genau der Fehler ist.
icloud.things
Code: Alles auswählen
Bridge icloud:account:myaccount [appleId="meine Mailadresse", password="meinPW", refreshTimeInMinutes=5]
{
Thing device myiPhone6s "Joe's iPhone 6s" @ "World" [deviceId="blablablaa"]
Code: Alles auswählen
Group iCloud_Group "iPhone"
String iPhone_BatteryStatus "Battery Status [%s]" <battery> (iCloud_Group) {channel="icloud:device:myaccount:myiPhone6s:batteryStatus"}
Number iPhone_BatteryLevel "Battery Level [%d %%]" <battery> (iCloud_Group) {channel="icloud:device:myaccount:myiPhone6s:batteryLevel"}
Switch iPhone_FindMyPhone "Trigger Find My iPhone" (iCloud_Group) {channel="icloud:device:myaccount:myiPhone6s:findMyPhone", autoupdate="false"}
Switch iPhone_Refresh "Force iPhone Refresh" (iCloud_Group) {channel="icloud:device:myaccount:myiPhone6s:location", autoupdate="false"}
Location iPhone_Location "Coordinates" (iCloud_Group) {channel="icloud:device:myaccount:myiPhone6s:location"}
Number iPhone_LocationAccuracy "Coordinates Accuracy [%.0f m]" (iCloud_Group) {channel="icloud:device:myaccount:myiPhone6s:locationAccuracy"}
DateTime iPhone_LocationLastUpdate "Last Update [%1$td.%1$tm.%1$tY, %1$tH:%1$tM]" <time> (iCloud_Group) {channel="icloud:device:myaccount:myiPhone6s:locationLastUpdate"}
Switch iPhone_Home "Phone Home" <presence> (iCloud_Group)
Code: Alles auswählen
Frame item=iCloud_Group {
Text item=iPhone_BatteryStatus
Text item=iPhone_BatteryLevel
Text item=iPhone_Home
Text item=iPhone_LocationAccuracy
Text item=iPhone_LocationLastUpdate
Switch item=iPhone_FindMyPhone mappings=[ ON="Find!" ]
Switch item=iPhone_Refresh mappings=[ REFRESH='Refresh now' ]
// mapview for web UI, invisible in iOS client
Mapview item=iPhone_Location height=8
}
Code: Alles auswählen
rule "iPhone Home"
when
Item iPhone_Location changed
then
// specify your home location
val PointType home_location = new PointType(new DecimalType(59.1231435), new DecimalType(7.123456770009))
val PointType phone_location = iPhone_Location.state as PointType
val int distance = phone_location.distanceFrom(home_location).intValue()
// specify your preferred radius (in meters)
if ( distance < 200) {
iPhone_Home.postUpdate(ON)
logInfo("iPhone Home", "iPhone is at home.")
} else {
iPhone_Home.postUpdate(OFF)
logInfo("iPhone Home", "iPhone is away.")
}
end
Was nicht funktioniert ist die Angabe der "Coordinates" mein Text wäre "iPhone Koordinaten"
Im Log finde ich keine Fehlermeldung
kann mir bitte jemand helfen?