Trafikverket Cameras, multiple cameras on same place

I’ve been trying to select one of two cameras i want to use from trafikverket and the naming of them makes it impossible to integrate in current solution

Bålsta, Bålsta Ö

when entering Bålsta as location it says multiple cameras found. and looking at documentation, it says to give more details of the camera if multiple cameras are found. but there is no more details to give in this case.

so a feature request would be to list the cameras in a dropdown menue or similar.

also remember the api key :slight_smile:

are there any workarounds other than grabbing the image url directly?

@gjohansson maybe you have some input? :slight_smile:

If the description text differs you can try typing a portion of that text to search for.
I am working on a permanent solution but it will likely not make it until 2024.1 unfortunately as I’m a bit late and need to make some other changes first before implementing this.

1 Like

no rush.

trying to use the last camera of these two. nothing unique in the name of it.

{
	"Active": false,
	"CameraGroup": "SE_STA_VVIS234",
	"ContentType": "Jpeg",
	"CountyNo": [
		2,
		1
	],
	"Deleted": false,
	"Geometry": {
		"SWEREF99TM": "POINT (645317.0063401654 6605318.167850053)",
		"WGS84": "POINT (17.5717087 59.56085)"
	},
	"HasFullSizePhoto": true,
	"IconId": "trafficCameraOutOfOrder",
	"Id": "SE_STA_CAMERA_Geni_4572_K1",
	"ModifiedTime": "2023-11-27T18:55:26.084Z",
	"Name": "Ö Bålsta",
	"Type": "Väglagskamera",
	"PhotoTime": "2023-05-09T09:33:13.000+02:00",
	"PhotoUrl": "https://api.trafikinfo.trafikverket.se/v2/Images/RoadConditionCamera_39635434.Jpeg",
	"Status": "videoOrImagesUnavailableDueToCameraFault"
},

{
	"Active": true,
	"CameraGroup": "SE_STA_VVIS321",
	"ContentType": "Jpeg",
	"CountyNo": [
		3
	],
	"Deleted": false,
	"Geometry": {
		"SWEREF99TM": "POINT (640401.9476798068 6608603.208201925)",
		"WGS84": "POINT (17.4869976 59.592)"
	},
	"HasFullSizePhoto": true,
	"IconId": "roadConditionCamera",
	"Id": "SE_STA_CAMERA_Geni_4881_K1",
	"ModifiedTime": "2023-11-27T18:55:36.768Z",
	"Name": "Bålsta",
	"Type": "Väglagskamera",
	"PhotoTime": "2023-11-27T19:52:19.000+01:00",
	"PhotoUrl": "https://api.trafikinfo.trafikverket.se/v2/Images/RoadConditionCamera_39635739.Jpeg",
	"Status": "videoOrImagesAvailable"
},					

Since you have this information you can just use the “Id” of the camera as the location and it will grab and use it.

didn’t work :stuck_out_tongue:

“Could not find a camera location with the specified name”