-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
Add camera tile to Wear OS #3870
Add camera tile to Wear OS #3870
Conversation
- Create UI to set camera tile settings - Reuse shortcut tile settings activity as a general tile settings activity
- On initial load also create a list of camera entities to make it possible to select them without showing up elsewhere in the app - Add text to empty state instructing the user to set a camera - Update tile preview images
So I loaded up the debug APK on my phone and watch. First I went to settings and saw the no camera tiles added message. Then I added a tile and it told me to login eventhough I was already logged in. Then going back to settings I am still told I need to add a camera tile despite 1 already being added. let me know if there is any logging needed but my setup is kinda stuck like this now |
Hmm that's odd. It sounds like somehow |
no it does not, the messaging is still stuck. Tile still tells me to login and settings tells me there are no tiles added |
Pushing a fix for telling you login is required while already logged in. Still not sure why the tile add didn't register, if you still have issues with the latest commit could you check logcat, and try editing it from the watch face/tiles list on your watch? |
Will recheck when the build is done but saw this error show up for a tile that has been setup but refuses to show the image
sometimes I see a blank image and other times I see the tile has not been setup message |
Latest build now resolves the tile log out issue :) will retest when the resizing issue is fixed |
- Scale the received image to a bitmap that does not exceed the screen size to ensure timely refreshes and prevent parcels that are too big
Resizing added, also feels a bit faster here but that could be random. |
yup I no longer see an error and every camera I have is able to load an image. It does indeed feel faster for me too! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been testing the latest build for past 30 hours with 2 camera tiles and default refresh interval and don't experience any extra drain! Great work!
Summary
Add a camera tile to the Wear OS app which will display a snapshot of a camera. This includes logged out/empty states, UI to customize the tile behavior/camera selection, and support for multiple tiles.
While there are a lot of changes, code is primarily based on existing tiles (shortcuts for multiple tiles functionality, template for layout and refresh interval) and phone camera widget. As a result, some code is moved around to limit duplicate code. Cameras also aren't supported elsewhere in the app so I'm adding code to store the initial states on first load as this is required to select one, should be fine as updates aren't required.
Implements #3763 as far as I'm concerned - matching default Home Assistant camera functionality within the constraints imposed on tiles.
Screenshots
Tile:
In-app settings:
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#984
Any other notes