Robinjo
April 29, 2024, 7:23pm
1087
Check
Other thing I’m trying is to set panel css for genericsocket widgets, can’t get is to work. What am I doing wrong?
.dashboard { background: url("https://images.hdqwalls.com/download/abstract-cube-digital-art-5k-hc-480x800.jpg ") no-repeat center -40px; background-size: cover }
.dashboard .widget .genericsocket .content {background: rgba(0,0,0,0.7);box-shadow:1px 1px 5px #00FFFF }
.dashboard .widget .genericsocket .content .box {margin-top: -10px}
.dashboard .widget .genericsocket .content .mdi {font-size: 50px}
.dashboard .widget .genericsocket .content .name {margin-top: 70px; font-size: 14pt; font-weight: 550}
.dashboard .widget .genericsocket .tapped .content {background: rgba(0,255,255,0.7)}
Robinjo
April 29, 2024, 7:48pm
1089
great that was it! thanks
With the standard virtual camera it seems impossible to change the url with a flow.
I have installed the Homey app Device Capabilities. With this app you can define a virtual camera and load the Ring snapshot; the image is visible in Homey. Question is: are you able to read such a “Advanced Virtual Device/Camera”?
Yes i have tried some time ago, the url is in setting params.
Try if in device info in smartdash is present the url
Robinjo
April 29, 2024, 8:18pm
1092
Is not working in panel CSS I need to put it in the widget. Is this because it is a triggered function?
No Url in device info. One device can contain multiple virtual devices, so it’s quite complex.
Is the solution with a dynamic url in a variable feasible?
I don’t remember where is added .tapped, try to concatenate with .genericsocket or .content
Robinjo
April 29, 2024, 8:52pm
1096
it was .genericsocket.tapped concatenate indeed!
Love this ability to set global page css, saves a lot of time!
Only have to set it one time per page and every widget I add get its layout!
The Ring image is in the Homey Images folder with the name “homey:app:com.amazon.ring”. Only the Id is different each time. Can you access the image on its name?
There is an API that returns the list of all images, I don’t know if it’s useful. Have to try it
In “images” on my Homey the following is available with an url (finally)!:
'0bd35bf0-7524-4782-8429-80966a996a80': n {
__athom_api_type: 'HomeyAPI.ManagerImages.Image',
id: '0bd35bf0-7524-4782-8429-80966a996a80',
ownerUri: 'homey:app:com.amazon.ring',
url: '/api/image/0bd35bf0-7524-4782-8429-80966a996a80',
lastUpdated: 1714453534548
},
My local url of the Ring image is:
https://192-168-2-40.homey.homeylocal.com/api/image/0bd35bf0-7524-4782-8429-80966a996a80
For each snapshot the id could change. After a Homey reboot the id changes in all cases.
This can work but has some problems because you have to filter the list by app ring:
it can be slow if there are many photos
what happens if one has 2 ring cameras?
It depends from user to user but in general it’s not a problem
Could be a problem, but i can use lastUpdated for get the new screenshot created, maybe it solves it.
Perhaps it is better to create a VirtualRingCamera Widget and do not modify the original VirtualCamera Widget
1 Like
Alternatives preventing a lot of widgets variants/tiles:
define a dropdown with options in existing VirtualCamera Widget, or
let a user type in the image name, and the logic will find the local url. This could be used for other Doorbell brands or for album sleeve image.
I agree, choosing a text variable that contains the URL can be a good alternative (However, I would already have the appropriate working widget ready)
Because of the dynamic urls changing frequently, I think that setting up the image name in SmartDash and the SmartDash logic searching in Homey images for the current url, and loads the image with that url, is a better solution. Easy talking, but I don’t have to and can’t program it…