slimserver
slimserver copied to clipboard
CLI subscribe power missing state sometimes
I use the CLI to monitor the power state of my piCorePlayer to also power on/off the amplifier. Recently, the subscribe power command has been returning 'power ' without the 1 or 0 but not always. When this happens, my script now explicitly requests the power state using 'power ?' and this works properly.
Still I think there is a bug with either the subscribe command and/or the power parameter.
I'm running Logitech Media Server Version: 7.9.3 - 1597753178 @ Sun Aug 23 19:21:22 CEST 2020
Thanks, Daniel
What do you mean by "recently"? Your build is from two months ago. It hasn't changed since...
Hard to say exatly. It's a machine I use once in while (in my outside veranda but everything is inside the house except for the speakers). Let's say I noticed it about a month ago.
The first time it happened, I logged in to the CLI using telnet and it worked fine. I rebooted the slimserver computer and the home automation server monitoring the subscribe command and it was working fine for a while. My automation script is written in perl and runs on a Raspberry Pi. Let me just say I use the CLI for many other things and it always works without a hitch.
It happened again yesterday so I modified my script to go get the squeezebox power status when it is not received from the subscribe itself and decided to raise a defect on github.
Please let me know if you would like more details.
Daniel Born
On 2020-10-19 8:28 a.m., Michael Herger wrote:
What do you mean by "recently"? Your build is from two months ago. It hasn't changed since...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Logitech/slimserver/issues/441#issuecomment-712122610, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLXHAPEJCWL3Z3BDDZAW4TSLQWHHANCNFSM4SWAWOJA.
When you don't get any result, would the state always be off or on?
No, when I get into the condition of no status returned, it will continously do that for either on (1) or off (0).
On October 20, 2020 4:50:16 p.m. EDT, Michael Herger [email protected] wrote:
When you don't get any result, would the state always be off or on?
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Logitech/slimserver/issues/441#issuecomment-713131495
-- Sent from my Samsung Galaxy phone
I think that I've been experiencing the same issue when using a script similar to this one.
Version: Logitech Media Server Version: 7.9.3 - 1597753178 @ Sun Aug 23 19:24:13 CEST 2020
$ nc music.lan 9090
subscribe power
subscribe power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power 1
b8%3A27%3Aeb%3Aab%3Acd%3Aef power 0
b8%3A27%3Aeb%3Aab%3Acd%3Aef power 1
b8%3A27%3Aeb%3Aab%3Acd%3Aef power 0
b8%3A27%3Aeb%3A12%3A34%3A56 power 1
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
b8%3A27%3Aeb%3A12%3A34%3A56 power 1
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
b8%3A27%3Aeb%3A12%3A34%3A56 power 1
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
power ?
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
power ?
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
b8%3A27%3Aeb%3A12%3A34%3A56 power 1
power ?
b8%3A27%3Aeb%3A12%3A34%3A56 power 1
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
b8%3A27%3Aeb%3Aab%3Acd%3Aef power 1
b8%3A27%3Aeb%3Aab%3Acd%3Aef power 0
b8%3A27%3Aeb%3A12%3A34%3A56 power 1 1
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
b8%3A27%3Aeb%3A12%3A34%3A56 power 1
b8%3A27%3Aeb%3A12%3A34%3A56 power 0
b8%3A27%3Aeb%3Aab%3Acd%3Aef power 1 1
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3A12%3A34%3A56 power 1 1
b8%3A27%3Aeb%3A12%3A34%3A56 power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
b8%3A27%3Aeb%3Aab%3Acd%3Aef power
^C
I've tried to reproduce this problem. But I'm not sure I fully understand what the issue is - besides the fact that I seem to be able to set power to pretty much any single character value... But that's not what you reported, is it?
In particular I've never seen a non-result when power was on. I could eg. run just power
, and that would afterwards return power 0
if queried for. But I've never seen a wrong result in Perl's understanding of true and false. Eg. (undefined value)
would be false, x
would be true, 0
false etc.
The issue is that no status is returned after the "power" identifier. I could assume
On December 7, 2020 7:45:23 a.m. EST, Michael Herger [email protected] wrote:
I've tried to reproduce this problem. But I'm not sure I fully understand what the issue is - besides the fact that I seem to be able to set power to pretty much any single character value... But that's not what you reported, is it?
In particular I've never seen a non-result when power was on. I could eg. run just
power
, and that would afterwards returnpower 0
if queried for. But I've never seen a wrong result in Perl's understanding of true and false. Eg.(undefined value)
would be false,x
would be true,0
false etc.-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Logitech/slimserver/issues/441#issuecomment-739896012
-- Sent from my Samsung Galaxy phone
But can you easily trigger the issue? I've tried, but haven't been able to.
Easily no, but it does happen once in a while and seems to be stuck in that mode once it starts happening. I've modified my script to go get the power status explicitly when all it gets is the power notification without the state. I will try to experiment over the Holidays.
On December 7, 2020 9:36:51 a.m. EST, Michael Herger [email protected] wrote:
But can you easily trigger the issue? I've tried, but haven't been able to.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Logitech/slimserver/issues/441#issuecomment-739957333
-- Sent from my Samsung Galaxy phone