Nice one.
Would you like to share it? I would like to “copy” the playlist dropdown
Did you or anyone else manage to get he suggested Angular update from the page containing the player? My solution with a forced update from the script file wasn’t a clean solution. Hammering the spotify API every 5sek 24/7/365 isn’t that good …
Keep up the good work everyone!
And again @pmpkk thanks for all your contributions on the HABPanel layouts.
Part of it relies on the css file. I’ve never modified a css file before, so I missed it up completely, so some of the other menus look a bit messed up but usable. Items, functions, etc should all be here https://github.com/unparagoned/openhab_spotify-webconnect-api
I do the update within the spotify.rules file instead. On my panel i have an Item that i use to navigate between tabs, when it’s showing the spotify page i let the rule hammer the spotify every 5-sec for an update…
The rules file also updates the list of devices every hour…
//Update the device list 5min after each hour
rule "Spotify update devices"
when
Time cron "5 * * * * ?"
then
val resp = executeCommandLine("/usr/bin/python /etc/openhab2/scripts/spotify.py get_devices", 5000)
logInfo("Spotify", resp)
end
rule "Spotify run script when page music"
when
Time cron "0/5 * * * * ?"
then
if (MENU_page.state.toString == "P-Music?kiosk=on"){
val resp = executeCommandLine("/usr/bin/python /etc/openhab2/scripts/spotify.py", 5000)
logInfo("Spotify", resp)
}
end
For some days I’m trying to fix a bug I have. When a light switch from OFF to ON, I would like to display inside the slider I’ve made the current brightness value. Thing is that I’m unable to make it work :
I tried “{{itemValue(item.name)}}” but it’s definitely not working. May someone know how to use itemValue inside a ng-init ?
Also @pmpkk I would like to make something like a digipad (for a remote channel for examaple), do you ever managed to do somehting like this with your theme ? I didn’t tested yet but I’m not sure it could be easily doable with my current CSS knowledge. I though to use div class=row to arrange the whole thing.
In this picture, you can see “Entrée (debug : value : 69)” and its bar which is using widget-slider thanks to your response, and “Chambre (debug: value : 64)” which use my code.
I have to precise a bit my code :
When “light” is off : value forced to 0
When “light” is on : value should be the actual one right after its turned on.
With your code or mine, it’s working as soon as you set a value using the slider bar, but not when using “ON” button.
I’m still looking for a way to fix it, but once more, thank you
@pmpkk@ysc thanks for all your help and examples.
Here are some screenshots of my panel. There are still some work to be done. I just bought a NetAtmo Weather station and a WelcomeHome Camera that needs to be implemented
I need to tweak the thermostat control, it looks terrible right now. I needed it up fast since I have this installation at my summerhouse and need to turn on the heating remote when I plan to go there (Getting cold in Sweden)
The first section is the clock (NTP), and 3 group items to show number of lights, windows, doors open.and then the navigation.
You can remove the “?kiosk” if you don’t want it to run in full-screen.
@Andrew_Pawelski
Ysc made a nice implementation.
I have used the layout from Patrick’s css in this tread. It uses the 3-big dash layouts (3col/1row) on the tablet/pc-screen and 1 col/3rows on a smaller screen.
I will give Ysc’s a try when I’m back at the office in a couple of weeks.
I have been playing and can now see you have used kiosk to “replace” the top dash title. @ysc’s is good but I think how you have done it is better as you can keep the title od the dash there and control the layout better