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

Added PiAlert widget #1493

Merged
merged 3 commits into from
May 21, 2023
Merged

Added PiAlert widget #1493

merged 3 commits into from
May 21, 2023

Conversation

thegabriele97
Copy link
Contributor

@thegabriele97 thegabriele97 commented May 13, 2023

Proposed change

This PR introduces the new PiAlert widget that pulls stats from PiAlert's APi (https://github.com/jokob-sk/Pi.Alert).

image

The user will be able to add the widget to the services.yaml file using the following configuration:

widget:
    type: pialert
    url: http://ip:port

The PiAlert's API are not documented, I am using as endpoint /php/server/devices.php?action=getDevicesTotals, that returns the following response:

[30,22,0,0,0,0]

It is an array where each item corresponds respectively to AllDevices, Connected, Favorites, NewDevices, DownAlerts, Archived.

Type of change

  • New service widget
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (please explain)

Checklist:

  • If adding a service widget or a change that requires it, I have added a corresponding PR to the documentation here: Add PiAlert widget documentation  benphelps/homepage-docs#101
  • If applicable, I have checked that all tests pass with e.g. pnpm lint.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.

@thegabriele97 thegabriele97 changed the title Added PiAlert widget Added PiAlert widget [WIP] May 13, 2023
@shamoon
Copy link
Collaborator

shamoon commented May 13, 2023

Thank you but we only accept service widget PRs based on feature requests with interest (currently arbitrarily designated as 5 "up-votes") from the community...

Feel free to open FR for this

See https://gethomepage.dev/en/more/development/#service-widget-guidelines

@shamoon shamoon closed this May 13, 2023
@thegabriele97
Copy link
Contributor Author

thegabriele97 commented May 21, 2023

Thank you but we only accept service widget PRs based on feature requests with interest (currently arbitrarily designated as 5 "up-votes") from the community...

Feel free to open FR for this

See https://gethomepage.dev/en/more/development/#service-widget-guidelines

Hi! I opened a FR #1495 and it received 5 up-votes. Any chance to reopen this PR? Thank you

@shamoon shamoon reopened this May 21, 2023
@shamoon
Copy link
Collaborator

shamoon commented May 21, 2023

This works fine in my testing, please see the small changes. Any other reason this was marked as a draft?

@shamoon shamoon marked this pull request as ready for review May 21, 2023 15:08
@shamoon
Copy link
Collaborator

shamoon commented May 21, 2023

Ps. Please create a documentation PR as noted above

@thegabriele97
Copy link
Contributor Author

This works fine in my testing, please see the small changes. Any other reason this was marked as a draft?

Thank you. It was marked as draft because I needed to finish a few things (as you did, thank you) and I still need to create a PR in the documentation repo. I will do ASAP

@thegabriele97
Copy link
Contributor Author

Done!

@shamoon
Copy link
Collaborator

shamoon commented May 21, 2023

Great thanks

@shamoon shamoon merged commit 36eaaaf into gethomepage:main May 21, 2023
@shamoon shamoon changed the title Added PiAlert widget [WIP] Added PiAlert widget May 29, 2023
Copy link
Contributor

github-actions bot commented Feb 5, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants