[mybmw] Fix images not loading anymore (#16643)

* [mybmw] fix image not loading anymore Fixes #16642

Signed-off-by: Martin Grassl <martin.grassl@digital-filestore.de>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Martin Grassl 2024-04-12 19:46:07 +02:00 committed by Ciprian Pascu
parent 66e4eeff1b
commit 3eec2ac20b
9 changed files with 45 additions and 21 deletions

View File

@ -492,13 +492,9 @@ Image representation of the vehicle.
| png | Image | Read | The image as png |
| view | String | Write | The view port of the car |
Possible view ports:
Possible view ports (currently only one is available, which is automatically set as default):
- _VehicleStatus_ Front Left Side View
- _FrontView_ Front View
- _FrontLeft_ Front Left Side View
- _FrontRight_ Front Right Side View
- _RearView_ Rear View
- _AngleSideViewForty_ Front Left Side View
## Further Descriptions

View File

@ -24,7 +24,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
public class ImageProperties {
public static final int RETRY_COUNTER = 5;
public int failCounter = 0;
public String viewport = "VehicleStatus";
public String viewport = "AngleSideViewForty"; // default view
public ImageProperties(String viewport) {
this.viewport = viewport;

View File

@ -98,11 +98,7 @@ channel-type.mybmw.home-distance-channel.label = Distance From Home
channel-type.mybmw.hood-channel.label = Hood
channel-type.mybmw.image-update-channel.label = Force update of the image
channel-type.mybmw.image-view-channel.command.option.FrontLeft = Left Side View
channel-type.mybmw.image-view-channel.command.option.FrontRight = Right Side View
channel-type.mybmw.image-view-channel.command.option.FrontView = Front View
channel-type.mybmw.image-view-channel.command.option.RearView = Rear View
channel-type.mybmw.image-view-channel.command.option.VehicleStatus = Front Side View
channel-type.mybmw.image-view-channel.command.option.AngleSideViewForty = Left Side View
channel-type.mybmw.image-view-channel.label = Image Viewport
channel-type.mybmw.last-fetched-channel.label = Last Openhab Update Timestamp
channel-type.mybmw.last-update-channel.label = Last Car Status Timestamp

View File

@ -13,11 +13,7 @@
<label>Image Viewport</label>
<command>
<options>
<option value="VehicleStatus">Front Side View</option>
<option value="FrontView">Front View</option>
<option value="FrontLeft">Left Side View</option>
<option value="FrontRight">Right Side View</option>
<option value="RearView">Rear View</option>
<option value="AngleSideViewForty">Left Side View</option>
</options>
</command>
</channel-type>

View File

@ -29,7 +29,7 @@
</channel-groups>
<properties>
<property name="thingTypeVersion">2</property>
<property name="thingTypeVersion">3</property>
</properties>
<representation-property>vin</representation-property>

View File

@ -29,7 +29,7 @@
</channel-groups>
<properties>
<property name="thingTypeVersion">2</property>
<property name="thingTypeVersion">3</property>
</properties>
<representation-property>vin</representation-property>

View File

@ -26,7 +26,7 @@
</channel-groups>
<properties>
<property name="thingTypeVersion">2</property>
<property name="thingTypeVersion">3</property>
</properties>
<representation-property>vin</representation-property>

View File

@ -29,7 +29,7 @@
</channel-groups>
<properties>
<property name="thingTypeVersion">2</property>
<property name="thingTypeVersion">3</property>
</properties>
<representation-property>vin</representation-property>

View File

@ -44,6 +44,15 @@
</add-channel>
<!-- channels to be updated -->
</instruction-set>
<instruction-set targetVersion="3">
<!-- channels to be removed -->
<!-- channels to be added -->
<!-- channels to be updated -->
<update-channel id="view" groupIds="image">
<type>mybmw:image-view-channel</type>
<label>Image Viewport</label>
</update-channel>
</instruction-set>
</thing-type>
<thing-type uid="mybmw:bev">
<instruction-set targetVersion="1">
@ -78,6 +87,15 @@
</add-channel>
<!-- channels to be updated -->
</instruction-set>
<instruction-set targetVersion="3">
<!-- channels to be removed -->
<!-- channels to be added -->
<!-- channels to be updated -->
<update-channel id="view" groupIds="image">
<type>mybmw:image-view-channel</type>
<label>Image Viewport</label>
</update-channel>
</instruction-set>
</thing-type>
<thing-type uid="mybmw:conv">
<instruction-set targetVersion="1">
@ -110,6 +128,15 @@
</add-channel>
<!-- channels to be updated -->
</instruction-set>
<instruction-set targetVersion="3">
<!-- channels to be removed -->
<!-- channels to be added -->
<!-- channels to be updated -->
<update-channel id="view" groupIds="image">
<type>mybmw:image-view-channel</type>
<label>Image Viewport</label>
</update-channel>
</instruction-set>
</thing-type>
<thing-type uid="mybmw:phev">
<instruction-set targetVersion="1">
@ -152,6 +179,15 @@
</add-channel>
<!-- channels to be updated -->
</instruction-set>
<instruction-set targetVersion="3">
<!-- channels to be removed -->
<!-- channels to be added -->
<!-- channels to be updated -->
<update-channel id="view" groupIds="image">
<type>mybmw:image-view-channel</type>
<label>Image Viewport</label>
</update-channel>
</instruction-set>
</thing-type>
</update:update-descriptions>