Hello and sorry to speak english.
I am new in smarthome.py.
I made a working well configuration for severals squeeze box and it is OK.
I can drive them and see the differents status and values on SmartVISU.
I only have a problem with "Time" value in the song.
Squeezeserver only send the duration value of the played song (not for streaming) but never the time. It is possible to ask the server to have it.
I want to calculate the position value with time and duration. I made a logic script to do that. The script is started every 10 seconds.
Code:
#!/usr/bin/env python
if sh.sqb.Play:
if sh.sqb.Duration() != 0:
sh.sqb.Position((sh.sqb.Time() / sh.sqb.Duration()) * 100)
I try severals items attributs for sqb.Time item, but I not find the solution.
I certainly missed something in my items configuration, but I don't know what.
If somebody have a solution ?
If you want, I can put the items and logic files to contribute to the plugin.
Regards



Einen Kommentar schreiben: