should be fixed now… i need to release older version due Awtrix mdns changes, but Athom is not supporting 2 branches… right now, you should see 1.2.2
See: AWTRIX 3 | Homey
should be fixed now… i need to release older version due Awtrix mdns changes, but Athom is not supporting 2 branches… right now, you should see 1.2.2
See: AWTRIX 3 | Homey
Any updates about the use of icons? When using the experimental card I only get a message that there are no icons but I have a lot of them in the Icon folder on the Ulanzi device. I switched my setup from Home Assistant to Homey and did no factory default reset. Can this be an issue?
Just a quick update: running the testversion of the app now. No difference, still no icons visible.
Can I find you on slack? So we can talk there and give it some tests…
@Bckp Yes, just created an account on Slack and joined the channel
@Bckp:
Hello Radovan,
just a quick question. I know that the Ulanzi speakers are horrible … but I would like to play a sound for a notification.
I’ve read everything up and down here, but haven’t found anything. When I use the “Flow card” → “Play Melody”, enter the file name, for example alert.txt, and then save this file via the file system under “Melody”, nothing happens. I have also tried to work with a path within the flow card. Can you tell me what I am doing wrong?
Best regards
Christian
P.S: I created a pure TXT file as a test and copied a song from this page into it: RTTTL Songs – Laub-Home Wiki
As being a new user (yesterday I received my Ulanzi-clock) also would like to know if playing a sound is possible
Also tried some things but unfortunately not a sound (only a beep when turning on)
Do you use Awtrix 3.0 firmware?
It is possible to play RTTTL sound; I think it is noise. The display is nice but the sound is horrible. Please see https://blueforcer.github.io/awtrix3/#/sounds
Hello, display is capable of making noise, cant call it sound, current app version does have bug, and sound is not working… working on fix atm…
Yes, version 0.96
Seen it and read it more times then I would like to count now. Still cannot get a sound out of it.
In the settings I noticed there is a sound on/off and a volume control. Volume control says n/a.
And while typing I read the message about a bug
Also I think you are more creative with this kind of things Any tips / hint how to get the most out of it
In homey app is bug, that prevents sound of playing… i have fixed it, will release new test version soon, just few more stuff i want to fix i hope will get few days off, to get this some much needed love
Play melody expects RTTTL, not the file… and when fix is released, it will even play from display
Using it for:
Do not send to much information in a short time. There is a little memory and processor capacity in the device, and it will reboot/reset on overload.
New test version should fix RTTTL sounds:
Can you share your sonos homeyscripts? Sounds interesting
and not that I did not believe you before but indeed sound is terrible. But still good enough to get some attention for the screen when using a notification
First make advanced flow calling the HomeyScript. The red boxed functions are most important (sorry for Dutch language).
The HomeyScript (serial numbers partly removed for privacy). Use Google Translate translating the comments.
I have made some exotic settings not overloading the Ulanzi device.
Suggestions for improvement highly appreciated (I am not a developer).
//Lyrics ophalen van spelend nummer op Sonos
//ontvang parameter starttijd advanced flow starttijd om verwerkingstijd te berekenen: timing van teksten en pauzes
//parameter komt als string binnen; converteren naar nummer en vervolgens datum/tijd
var nParam = parseInt(args[0]);
var dTimer1 = new Date(nParam);
var sUlanziUrl = 'http://192.168.2.28';
//hardware devices
var sSonosId = 'a60035f1-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
var sSamsungTVId = 'cc134299-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
//haal kenmerken van de Sonos op
var Sonosdevice = await Homey.devices.getDevice({ $skipCache: true, id : sSonosId });
var sArtiest = Sonosdevice.capabilitiesObj.speaker_artist.value;
var sTrack = Sonosdevice.capabilitiesObj.speaker_track.value;
var bPlaying = Sonosdevice.capabilitiesObj.speaker_playing.value;
//haal kenmerken van Samsung TV beneden op
var TVdevice = await Homey.devices.getDevice({ $skipCache : true, id : sSamsungTVId });
var bTVstatus = TVdevice.capabilitiesObj.onoff.value;
//als artiest of nummer niet is ingevuld of als Sonos niet speelt of als TV beneden aan is: stop
if(sArtiest == null || sArtiest == '' || sTrack == null || sTrack == '' ||
bPlaying != true || bPlaying == null || bPlaying == '' || bTVstatus == true)
{
return;
}
//extra spaties aan de teksten toevoegen voorkomt notificaties met alleen zwart scherm
//bij te een groot aantal notificaties in een korte tijd reboot de Ulanzi
var sSpaties = ' '.repeat(1000);
//schoon eventueel tekst vorig nummer
await fetch(sUlanziUrl + '/api/notify',
{
method: 'POST',
headers: {},
body: JSON.stringify({'text':' ','scrollSpeed':1,'duration':1,'stack':false})
});
//extra 0,25 seconde wachten, zodat laatste tekst van vorig nummer eventueel nog kort wordt getoond
await wait(250);
//schoon nogmaals eventueel tekst vorig nummer
await fetch(sUlanziUrl + '/api/notify',
{
method: 'POST',
headers: {},
body: JSON.stringify({'text':' ','scrollSpeed':1,'duration':1,'stack':false})
});
//extra 0,25 seconde wachten, zodat laatste tekst van vorig nummer eventueel nog kort wordt getoond
await wait(250);
//toon artiest en naam van muzieknummer
await fetch(sUlanziUrl + '/api/notify',
{
method: 'POST',
headers: {},
body: JSON.stringify({'text':sArtiest + '-' + sTrack + sSpaties,'icon':'muziek','scrollSpeed':200,'repeat':1,'stack':false})
});
//licentie Musixmatch api via Rapidapi (maandelijks 500 opvragingen). 2 Licenties:
//key1: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
//key2: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
var sHost = 'musixmatch-lyrics-songs.p.rapidapi.com';
//haal songtekst en bijbehorende seconden van muzieknummer op
var sKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
var sLyricsTemp = await fetch('https://musixmatch-lyrics-songs.p.rapidapi.com/songs/lyrics?t=' + sTrack + '&a=' + sArtiest + '&type=json',
{
method: 'GET',
headers: {'X-RapidAPI-Key': sKey,'X-RapidAPI-Host': 'musixmatch-lyrics-songs.p.rapidapi.com'}
});
//geef melding als songtekst niet is gevonden
if(sLyricsTemp.status != 200)
{
await wait(3000);
var sResultaat = await fetch(sUlanziUrl + '/api/notify',
{
method: 'POST',
headers: {},
body: JSON.stringify({'text': 'Songtekst niet gevonden','scrollSpeed':200,'repeat':1,'stack':false})
});
return;
}
//songtekst gevonden: converteer resultaat naar json formaat
var sLyrics = await sLyricsTemp.json();
var nAantalRegels = sLyrics.length;
//speelduur in seconden (=tijdstip van laatste tekst)
var nSpeelduurSeconden = sLyrics[nAantalRegels - 1].time.total;
//loop door songtekst regels heen en bepaal de tussenliggende pauzes waarbij niet wordt gezongen
for (i = 0; i < nAantalRegels; i++)
{
//Indien artiest of nummer is veranderd tijdens spelen of Sonos speelt niet meer of
//TV beneden is aan: stop script voortijdig.
//Gebruik van parameter $skipCache: true noodzakelijk, zodat tussentijdse veranderingen in status Sonos of TV
//kunnen worden uitgelezen (bij gebruik van cache vindt uitlezen alleen bij start van script plaats)
var Sonosdevice = await Homey.devices.getDevice({$skipCache: true, id: sSonosId});
var TVdevice = await Homey.devices.getDevice({$skipCache: true, id: sSamsungTVId });
var bTVstatus = TVdevice.capabilitiesObj.onoff.value;
var bPlaying = Sonosdevice.capabilitiesObj.speaker_playing.value;
if(sArtiest != Sonosdevice.capabilitiesObj.speaker_artist.value ||
sTrack != Sonosdevice.capabilitiesObj.speaker_track.value || Sonosdevice.capabilitiesObj.speaker_playing.value == false || bPlaying != true || bPlaying == null || bPlaying == '' || bTVstatus == true)
{
//stop loop om teksten te tonen
break;
}
var sText = (sLyrics[i].text).trim();
var nTijdSeconden = sLyrics[i].time.total;
//als teksten snel opeen volgen: 2 teksten samenvoegen
if(i < nAantalRegels - 1 && sText != '' && i > 0)
{
if((sLyrics[i+1].text).trim() != '' && (sLyrics[i+1].time.total - sLyrics[i].time.total) < 2.6)
{
sText += ', ' + (sLyrics[i+1].text).trim();
i++;
}
}
//eind timer die script verwerkingstijd berekent: timing van teksten en pauzes
var dTimer2 = new Date();
//starttijd volgende songtekst regel - looptijd script tov. vorige tekst
var nPauze = (nTijdSeconden * 1000) - (dTimer2 - dTimer1);
//eerste pauzetijd verlagen met 0,5 seconden door opstarttijd
if(i == 0)
{
nPauze = nPauze - 500;
}
//als pauze > 10 seconden: toon muzieknoot
if(nPauze > 10000)
{
//5 sec pauze om lopende tekst eerst te tonen voordat intermezzo scherm wordt getoond
await wait(5000);
nPauze = nPauze - 5000;
var sResultaat = await fetch(sUlanziUrl + '/api/notify',
{
method: 'POST',
headers: {},
body: JSON.stringify({'text':' ','scrollSpeed':1,'duration':300,'icon':'muziek','stack':false})
});
}
if(nPauze > 0)
{
//wachttijd tot zang volgende tekst regel
await wait(nPauze);
}
//toon songtekst regel
if((sText != null && sText != '') || nTijdSeconden == nSpeelduurSeconden)
{
nProgressBar = Math.ceil((nTijdSeconden/nSpeelduurSeconden) * 100);
var sResultaat = await fetch(sUlanziUrl + '/api/notify',
{
method: 'POST',
headers: {},
body: JSON.stringify({'text':sText + sSpaties,'scrollSpeed':200,'progress':nProgressBar,'progressC':'#0000ff','progressBC':'#000000','repeat':1,'stack':false})
});
}
}
//schoon songtekst
var sLyrics = '';
var sResultaat = await fetch(sUlanziUrl + '/api/notify',
{
method: 'POST',
headers: {},
body: JSON.stringify({'text':' ','scrollSpeed':1,'repeat':1,'icon':'muziek','stack':false})
});
@Bckp Maybe you can use this idea to build in your app…
Great, thank you very much!