Sonos things are offline

Thanks for the testing and the opening of issue on Github!

Did you just restore from a backup or is it easy to rollback to an older snapshot?

I am using my own way to backup/restore and it is fully manual but very easy as everything is in one unique place.

Of course, this problem should not impact users running OH 2.1 but only users running the last snapshot.

If others have this problem with snapshots starting at 1077, please tell us. I have difficulties to convince there is a real problem with UPnP in ESH. If we are not only 2, maybe this will help.

After i uninstalled Sonos Binding and rebooted and then installed again, it is working for me in OH 2.1.

I,
I have a similar problem (I created a separate topic for this, because I overlooked this one):

I have a Sonos 5 and a Sonos Connect:amp.

Although openhab.log was empty, I did notice these in events.log:

2017-11-12 10:14:54.235 [hingStatusInfoChangedEvent] - 'sonos:CONNECTAMP:RINCON_000E583F6C4A01400' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): The Sonos player RINCON_000E583F6C4A01400 is not available in local network.
2017-11-12 10:03:43.673 [hingStatusInfoChangedEvent] - 'sonos:PLAY5:RINCON_000E58834E6A01400' changed from OFFLINE (COMMUNICATION_ERROR): The Sonos player RINCON_000E58834E6A01400 is not available in local network. to ONLINE

Yes, you confirm the problem.
By the way, the problem is easy to reproduce in Eclipse. The problem is due to our upgrade to the new version of the jUPnP library.
Until this is fixed, I will try to find a manual workaround to replace the new library by the previous version of the library in the deployed 1078 distribution.

Same here, was on Snapshot 1069 (now upraded to latest to see if it was fixed). And 1 of my 2 sonos players is offline. Tried to reboot openhab but can’t get it online so far.

Please comment if you have this issue after upgrading to snapshot 1078.

yes, I had this on 1078

yes, I have it on 1078. However, it does come online now, but I get quite a lot of error messages:

‘sonos:CONNECT:RINCON_949F3E20’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): The Sonos player RINCON_949F3E20 is not available in local network.

and:

[ERROR] [rg.jupnp.protocol.sync.ReceivingEvent] - Invalid subscription ID, no active subscription: (IncomingEventRequestMessage) NOTIFY /upnpcallback/dev/RINCON_000E58D12EBC01400/svc/upnp-org/AudioIn/event/cb SEQUENCE: 0

I think any UPnP call can randomly fail with the new library. So the problem could happen when you request a command from OH like a pause command for example.

I’m trying to DEBUG sonos because of the same issue and have added this to “org.ops4j.pax.logging.cfg”:

Custom Loggers

log4j2.logger.sonos.name = org.openhab.binding.sonos
log4j2.logger.sonos.level = DEBUG
log4j2.logger.sonos.additivity = false
log4j2.logger.sonos.appenderRefs = sonos
log4j2.logger.sonos.appenderRef.sonos.ref = sonos

Appenders configuration

Custom Appenders

log4j2.appender.sonos.name = sonos
log4j2.appender.sonos.type = RollingRandomAccessFile
log4j2.appender.sonos.fileName = /var/log/openhab2/sonos.log
log4j2.appender.sonos.filePattern = /var/log/openhab2/sonos.log.%i
log4j2.appender.sonos.immediateFlush = true
log4j2.appender.sonos.append = true
log4j2.appender.sonos.layout.type = PatternLayout
log4j2.appender.sonos.layout.pattern = %d{dd-MMM-yyyy HH:mm:ss.SSS} [%-5.5p] [%-50.50c] - %m%n
log4j2.appender.sonos.policies.type = Policies
log4j2.appender.sonos.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.sonos.policies.size.size = 10MB
log4j2.appender.sonos.strategy.type = DefaultRolloverStrategy
log4j2.appender.sonos.strategy.max = 10

But it doesn’t log anything :frowning: The file “sonos.log” is there but keeps empty. Tried the same with homematic instead of sonos and this is working as expected…so…cfg-file should be OK. I’m lost. Any ideas what’s wrong here?

Thanks
Michael

I see that @Kai posted this comment in another thread…does anyone know if the incorporated changes from ESH fix the SONOS issue?

no, the issue still exists. i did the update and this is the status of my sonos devices:

image

I’m curious as to why some of your SONOS units are online and others are not?

It happens randomly… :wink: And then it goes offline.

Hello,
with 2.1.0 release build, Sonos devices are well discovered , i haven’t go further

The problem is clearly in library jUPnP and the result of the move from v2.2 to v2.3.
We have to be patient and wait for a fix in that library. If noone is able or interested to fix it, I hope there will be a brillant decision by the staff to revert to v2.2.
More you will be to complain, more it could help Kai to take the right decision.

Thanks - yes, otherwise I’ll just have to stick to the old openHAB snapshot. I use Sonos for notifications around the house, so without a functional binding my system is essentially broken.

Dan