I have a music-player that updates a text-device in domoticz on every change. In this device the url on the internal network is updated like;
Code: Select all
http://raudio.local/data/webradio/img/https:||wwoz-sc.streamguys1.com|wwoz-hi.mp3-thumb.jpg
Code: Select all
blocks['Music'] = {
idx: 180,
title: false,
type: 'dial',
values: [
{
idx: 177,
value: 'Level',
image: 'coldwarm.jpg'
last_update: false,
isSetpoint: true,
},
],
width: 6,
showring: true,
shownumbers: true,
showvalue: false,
min:0,
max: 100,
last_update: false
}
custom.js
Code: Select all
function getStatus_179(block) { //iconpath for music
var idx10 = block.idx;
var device10 = block.device;
if (device10['Data'] != '') { //if image is available
Dashticz.setBlock(180, { //Music Dial
//image: device10.Data <------- this one
addClass: 'classImage'
//image: 'coldwarm.jpg'
//dialimage: 'http://raudio.local/data/webradio/img/https:||wwoz-sc.streamguys1.com|wwoz-hi.mp3-thumb.jpg'
});
} // end if
else { //if image is empty
Dashticz.setBlock(180, { //Music Dial
//image: ''
});
} //end if else
} // end funtion icon path music
as you can see i also tried to add the image trhrough a css class
Code: Select all
.classImage {
background-image:url('http://raudio.local/data/webradio/img/https:||wwoz-sc.streamguys1.com|wwoz-hi.mp3-thumb.jpg');
}
Code: Select all
.dial[data-id='Music'] .data { /* hide level value*/
display: none;
}
.dial[data-id='Music'] img { /* position dial image */
position: fixed;
top: 25px;
left: 25px;
width: 80px!important;
height: 80px!important;
}
Maybe somehow fit a frame inside the dial? I don't know how I should do that
Please help
Edit: opened a feature request on Github for this, dialimage isn't supported yet (fully) I think