Hello Hudiy support,
it's me again and i have some more questions and updates
1. are there any plans to expand/change the hudiy object to go back to the previous page or to the dashboard if "onBack" is catched? Maybe something wich would also work with touchscreen? Tap somewhere on the screen and then a bubble with a "X" pops up?
If so, i can wait and don't need to implement websocket connection and sending "hudiy_dashboard" action for every html site
2. With my python3 script i'm sending the following to get back to the hudiy dasboard, wich works:
Code: Select all
client.send(api.MESSAGE_DISPATCH_ACTION, 0, api.DispatchAction(action="hudiy_dashboard").SerializeToString())
But i can not find any refernce to a action "hudiy_dashboard" on github. But as i've found out just in the moment i wrote this: this is the default action name from the "dashboards.json" file (
https://github.com/wiboma/hudiy/blob/ma ... oards.json:
Code: Select all
{
"dashboards": [
{
"isDefault": true,
"action": "hudiy_dashboard",
"widgets": [
{ "type": "date_time", "size": "small_narrow" },
{ "type": "now_playing", "size": "large_narrow" },
{ "type": "phone", "size": "small_narrow" },
{ "type": "web", "size": "medium_narrow", "url": "file:///home/pi/scripts/hudiy_api/api/js/cpu_widget.html" }
]
}
]
}
Could you maybe put this also into the github readme?
3. Update: I've got the reversecamera with guidelines work with the html example from GitHub (
https://github.com/wiboma/hudiy/blob/ma ... amera.html).
I have now one default camera html file and one modified with the guidelines part.
In my script i use the two crated actions "camera_web" and "camera_web_with_lines" and to disable the camera stream the action "hudiy_dashboard"
Code: Select all
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
html, body {
margin: 0;
padding: 0;
background: black;
height: 100%;
overflow: hidden;
}
video, img#overlay {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
object-fit: cover;
}
/* Overlay does not intercept clicks into the stream */
img#overlay {
pointer-events: none;
}
</style>
</head>
<body>
<video id="cam" autoplay playsinline></video>
<!-- Your transparent PNG as overlay -->
<img id="overlay" src="lines.png" alt="Overlay" />
<script>
navigator.mediaDevices.getUserMedia({ video: true })
.then(stream => {
document.getElementById('cam').srcObject = stream;
})
.catch(err => {
console.error("Camera error:", err);
});
</script>
</body>
</html>