Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Origin/Destination airport codes #13

Closed
masterfish1 opened this issue Jul 15, 2022 · 16 comments
Closed

Origin/Destination airport codes #13

masterfish1 opened this issue Jul 15, 2022 · 16 comments
Labels
enhancement New feature or request

Comments

@masterfish1
Copy link

Firstly, love the card. So simple but just works.

I don't know where you are getting the data from but does it include the origin and destination airport codes? It would be nice to have a column with that information, e.g. LHR-JFK.

@masterfish1 masterfish1 added the enhancement New feature or request label Jul 15, 2022
@fratsloos
Copy link
Owner

Thanks @masterfish1 for your message. The data comes from your own ADS-B receiver and does not come with the flight information such as origin an destination airports. Without adding external services (if available) it won't be possible to add this information. I think it would not be wise to add external services in this card for the data that is refreshed every 10 seconds.

@masterfish1
Copy link
Author

That's a shame but what you say makes sense. As a long shot, I've just sent a message to FR24 to ask if they would consider including this data in that file.

@masterfish1
Copy link
Author

They replied. They thought the card was cool (which is another nice compliment) but it isn't possible as that data is matched server side to display on the website. A shame but not an unexpected answer.

@BrettEBowman
Copy link

I would like a configuration option to have the popup do a call to the FlightAware page for the flight which will show the details (origin airport, destination airport, etc.) when the ident is not an aircraft registration number. The format of the URL is:
https://flightaware.com/live/modes/_ICAO_/ident/_Ident_/redirect
For example:
https://flightaware.com/live/modes/a422f7/ident/DAL851/redirect

@fratsloos
Copy link
Owner

@masterfish1 Thanks for updating us. It's kind of what we expected. But nice to hear they thought the card was cool. :)

@BrettEBowman So basically you want an option to optionally show a button or link to FlightAware with that URL?

@BrettEBowman
Copy link

@fratsloos Yes, I'd like some easy way to display the specific FlightAware flight page. My original thought was a config option to just make the double click pull that up rather than the normal popup detail display. But a button to show it would be fine, too.

@fratsloos
Copy link
Owner

@BrettEBowman I like the idea of having a double click or long click to display your favourite tracker in a popup with an iframe. Could be FlightAware, FlightRadar24, PlaneFinder, or any other. Unfortunately it is not possible. Most of the sites (if not all) use a security that prevents them from being loaded into an iframe by another website. These are the X-Frame-Options (documentation) and as far as I know there is no way around them.

I think there is no other option than to create a configuration parameter for whether or not to show the buttons in the popup. Or perhaps a parameter to open the desired tracker instead of the popup. I need to think about how this can be implemented, especially with backwards compatible configuration.

@BrettEBowman
Copy link

Whatever you do should definitely be backwards compatible.

It might be that my FlightAware page behaves slightly differently, too, since I have an account there which gets auto-logged into from my browser. I had wondered about that.

If you want someone else to test out any options, etc., let me know.

@BrettEBowman
Copy link

I'm wondering if you could have a configuration option to simply add a "Right Button" option at the bottom of the browser_mod pop-up which would open a new browser tab (to avoid the iframe issue)? Maybe something like if the option isn't configured, then the browser_mod pop-up wouldn't have any Right Button displayed. But if it is defined, it could be a label for the button and a URL template with placeholders (${registration} and ${flight}) to be filled in with the selected flight's info. Something like:

popup:
popup-enabled: true
right-button-label: "FlightAware Lookup"
right-button-URL: "https://flightaware.com/live/modes/${registration}/ident/${flight}/redirect"

@fratsloos
Copy link
Owner

Thanks for the input, @BrettEBowman. I was thinking of something similar.

In the background I'm updating the code for the card to improve the maintainability of it. The plan is to switch to LitElement, which is also used by HA. I had a working example in uncompressed code, but there were some issues when the code was compressed for distribution. I have to pick that up again. :)

When I;ve finished that, I'll work on the feature requests, like this one.

fratsloos added a commit that referenced this issue Dec 5, 2023
fratsloos added a commit that referenced this issue Dec 11, 2023
* #20 - Color of icon based on altitude
* #13 - [wip] Double click to open provider page
* #20 - Updated readme
* #20 - Updated readme
* #13 - Added buttons to external providers
* # 13 - Updated readme
* #13 - Provider logo's
fratsloos added a commit that referenced this issue Dec 11, 2023
* #20 - Color of icon based on altitude
* #13 - [wip] Double click to open provider page
* #20 - Updated readme
* #20 - Updated readme
* #13 - Added buttons to external providers
* # 13 - Updated readme
* #13 - Provider logo's
* #23 - Added option to `hide` object to hide ground vehicles
* #23 - Updates readme
* #23 - Fixed filtering issue
@fratsloos
Copy link
Owner

fratsloos commented Dec 11, 2023

Today I released version 1.0.0-alpha. This release includes changes for this request. If you want to test the feature, please see the release. To use this feature, the card config needs to be updated, see the readme for more information.

The card can be tested by enabling the option 'Show beta versions' when (re)downloading the card in HACS. Issues with the release can be reported in the issue tracker.

@BrettEBowman
Copy link

I just installed on one of my HA systems. The link to FlightAware and FlightRadar24 functionality is GREAT! Thanks for getting that working.

@masterfish1
Copy link
Author

Thanks for the new version, it looks good and works well.

I'm going to guess there isn't but, if you have the FlightRadar24 app on your phone, is there are way to open the app via the link rather than the website?

@fratsloos
Copy link
Owner

I'm going to guess there isn't but, if you have the FlightRadar24 app on your phone, is there are way to open the app via the link rather than the website?

No, I'm afraid not. The card cannot 'request' this from your phone. If the website you are sent to includes a code it is possible for them to open the deep link in the app.

@masterfish1
Copy link
Author

That's what I suspected. I wondered though as if you click on a link they tweet (X), it opens in the app.

@fratsloos
Copy link
Owner

It is possible, but it is something you need to do on the website. For example, for Android to have these deeplinks on the website to open the app there should be a file on the root of the website. See this page. That is not something I can do from this card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants