Bemerkung
Die openHAB-Dokumentation ist nur auf Englisch verfügbar.
Warnung
The openHAB bindings are still in beta, but the development was stopped.
This is the description of the openHAB API bindings for the GPS Bricklet. General information and technical specifications for the GPS Bricklet are summarized in its hardware description.
An installation guide for the openHAB API bindings is part of their general description.
UID:
- tinkerforge:brickletgps:[UID]
Required firmware version:
- 2.0.0
Firmware update supported:
- yes
Channels: Actions: Parameters:
- Status Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
- Specifies the update interval for the status in milliseconds. A value of 0 disables automatic updates.
- Altitude Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
- Specifies the update interval for the altitude and geodial separation in milliseconds. A value of 0 disables automatic updates.
- Motion Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
- Specifies the update interval for the course and speed in milliseconds. A value of 0 disables automatic updates.
Location
¶The location as determined by the bricklet.
Type:
- Location
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSLocation
Read only:
- No
Parameters:
- Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
- Specifies the update interval in milliseconds. A value of 0 disables automatic updates.
Fix
¶The current fix status
Type:
- Contact
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSFix
Read only:
- No
Satellites In View
¶The number of satellites that are in view.
Type:
- Number:Dimensionless
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSSatellitesInView
Read only:
- Yes
Satellites Used
¶The number of satellites that are currently used.
Type:
- Number:Dimensionless
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSSatellitesUsed
Read only:
- Yes
Altitude
¶The measured altitude
Type:
- Number:Length
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSAltitude
Read only:
- Yes
Unit:
- Meter
Geoidal Separation
¶The geoidal separation corresponding to the current altitude
Type:
- Number:Length
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSGeoidalSeparation
Read only:
- Yes
Unit:
- Meter
Course
¶The current course. A course of 0° means the Bricklet is traveling north bound and 90° means it is traveling east bound. Please note that this only returns useful values if an actual movement is present.
Type:
- Number:Angle
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSCourse
Read only:
- Yes
Unit:
- Degree Angle
Range:
- 0 Degree Angle to 360 Degree Angle (Step 0.01 Degree Angle)
Speed
¶The current speed. Please note that this only returns useful values if an actual movement is present.
Type:
- Number:Speed
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSSpeed
Read only:
- Yes
Unit:
- Kilometre Per Hour
Date Time
¶The current date and time.
Type:
- DateTime
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSDateTime
Read only:
- No
Parameters:
- Update Interval – Type: integer, Default: 1000, Unit: ms, Min: 0, Max: 4294967295
- Specifies the update interval in milliseconds. A value of 0 disables automatic updates.
Restart
¶Restarts the GPS Bricklet, the following restart types are available:
Type:
- Commands (String)
UID:
- tinkerforge:brickletgps:[UID]:BrickletGPSRestart
Read only:
- No
Commands:
- Hot Start
- Warm Start
- Cold Start
- Factory reset
Actions can be used in rules by creating an action object. All actions return a Map<String, Object>. Returned values can be accessed by name, sometimes the type deduction needs some hints, as shown below:
val actions = getActions("tinkerforge", "tinkerforge:brickletgps:[UID]")
val hwVersion = actions.brickletGPSGetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))
brickletGPSGetCoordinates
()¶Return Map: |
|
---|
Returns the GPS coordinates. Latitude and longitude are given in the
DD.dddddd°
format, the value 57123468 means 57.123468°.
The parameter ns
and ew
are the cardinal directions for
latitude and longitude. Possible values for ns
and ew
are 'N', 'S', 'E'
and 'W' (north, south, east and west).
PDOP, HDOP and VDOP are the dilution of precision (DOP) values. They specify the additional multiplicative effect of GPS satellite geometry on GPS precision. See here for more information.
EPE is the "Estimated Position Error". This is not the absolute maximum error, it is the error with a specific confidence. See here for more information.
This data is only valid if there is currently a fix as indicated by
Fix
.
brickletGPSGetStatus
()¶Return Map: |
|
---|
Returns the current fix status, the number of satellites that are in view and the number of satellites that are currently used.
Possible fix status values can be:
Value | Description |
---|---|
1 | No Fix, GetCoordinates() , Altitude and Course return invalid data |
2 | 2D Fix, only GetCoordinates() and Course return valid data |
3 | 3D Fix, GetCoordinates() , Altitude and Course return valid data |
There is also a blue LED on the Bricklet that indicates the fix status.
The following constants are available for this function:
For fix:
brickletGPSGetAltitude
()¶Return Map: |
|
---|
Returns the current altitude and corresponding geoidal separation.
This data is only valid if there is currently a fix as indicated by
Fix
.
brickletGPSGetMotion
()¶Return Map: |
|
---|
Returns the current course and speed. A course of 0° means the Bricklet is traveling north bound and 90° means it is traveling east bound.
Please note that this only returns useful values if an actual movement is present.
This data is only valid if there is currently a fix as indicated by
Fix
.
brickletGPSGetDateTime
()¶Return Map: |
|
---|
Returns the current date and time. The date is
given in the format ddmmyy
and the time is given
in the format hhmmss.sss
. For example, 140713 means
14.07.13 as date and 195923568 means 19:59:23.568 as time.
brickletGPSRestart
(short restartType)¶Parameters: |
|
---|
Restarts the GPS Bricklet, the following restart types are available:
Value | Description |
---|---|
0 | Hot start (use all available data in the NV store) |
1 | Warm start (don't use ephemeris at restart) |
2 | Cold start (don't use time, position, almanacs and ephemeris at restart) |
3 | Factory reset (clear all system/user configurations at restart) |
The following constants are available for this function:
For restartType:
brickletGPSGetIdentity
()¶Return Map: |
|
---|
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.
The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port). A Bricklet connected to an Isolator Bricklet is always at position 'z'.
The device identifier numbers can be found here.