-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request - if possible #172
Comments
Dunno, does it show in the Sonos app? Could you please run
substituting the IP address of the Roam for |
Hi, yes it ist shown in the app ... here the file but i not found the battery Info :-( |
Is that when the app connects to the Beam over Wifi, or when it connects over Bluetooth? I would half expect the battery level to be in the |
good question :-D i get the speaker today, implement him in Homebridge and do this in the first step via wifi. I do not test bluetooth. i can try this tomorrow. do not it helping you. With node-red an sonosevents-selection platte i get a more info field
here "MoreInfo":"BattChg:NOT_CHARGING,RawBattPct:79,BattPct:82,BattTmp:35" so this may be a part of the device infos. okay .. now with bluetooth. no changes i think: |
That is helpful. No need to sniff the app, I guess. Can you do a And could you also do that while charging the Beam? And if you leave it running (overnight), do you see multiple |
no problem ... :-) the roam is charing at the moment i take the log |
Yes in node-red i debug this. If you disconnect oder the level is change, there is an new output with changed events. is this helping you? |
That's looking really good. Their API is a headache, but all the required info is in there. |
fine - you are the best. really good support! i will be waiting if you can put the battery service in the Homebridge object. Thanx a lot! |
Could you try beta v1.2.3-0? For zone players that report battery info in
Could you please capture a debug log file (see https://github.com/ebaauw/homebridge-hue/wiki/FAQ#homebridge) and attach that here, so I can check whether it works as intended. I don't have a Roam to test myself. |
Hi and good evening :-) Great Work ... it works ... see the attachment. With the log. i change volume, skip, stop play an plug unplug power. hope this helps you? |
Thanks. I don't see any update of the battery status in the log. Did you connect the Roam to the power while Homebridge was running? And did the status in the Home app change? |
Yes ... plug in and plug out one time. But you are wright ... not update the status. In the Sonos App there is a new battery Level and it loose the room assignment after restart ZP oder the complete HB. edit: i play a little bit ... the Sonos app do also only change the battery level if you plug out and in. otherwise it stay stable on the last value |
I think I found the cause of that. Could you try v1.2.3-1?
I'm afraid that's a known bug, see #139. Until I've solved that, best make sure your zone players are reachable when |
the room assignment is not a big problem ... hier i connect und reconnect the power [20/04/2021, 22:19:31] [Sonos] initialised But the Level not updated. In Sonos 95 in HB 90 ... also the unplug process is not recognize. In the Sonos app an a mac mini - there is not display for loading process in then App on iPhone - there is. |
Could you try v1.2.3-2? It should log the full Somehow, the log file 3 isn't attached? |
ups .. okay ... i try the new version - at the moment the box is on 100% so after the restart HB is keeps this value, but not recognize the plug unplug process. the log 4 ... |
Hm, the events contain what I expected, and the XML parser decodes the battery info. I suppose it just takes the Roam some time to update its battery and charging state? Do you use a plug or wireless charging? Maybe just leave the Roam unplugged overnight and check in the morning whether the value has changed. Could you also check that The iOS Sonos app contains more functionality than the macOS Sonos app. I think they're slowly phasing out the macOS app and I would't be surprised if it doesn't fully support the battery. Could also be that the iOS app communicates with the Roam over Bluetooth as well. Does it still update the state when you disable Bluetooth on the iPhone? |
Hi, i take the Roam with me today, play with bluetooth and run down zu 57%. Come back at home an switch the roam an. before do this i run a tail at Homebridge log for grep Sonos.
after restart hb an unplug power this is in the log after replug power: so you see he get the info charge no charge an chaining of batterykapa.
pi@Homebridge01:~ $ zp -H 192.168.2.139:1400 info
The idea with switch off bluetooth nothing change. But yes, the Mac app ist facing out - thing the will make on app with M1 processor Macs. so no idea what i can test at the moment. I thing the values coming too the HB see in the log. But don't update the HomeKit object thanx a lot for trying - really it is not soooo important. :-) |
Indeed, I'm afraid it was too late yesterday evening. Could you try beta v1.2.3-3? |
;-) Nice ... i know this. After a well sleep knight, the world be a little bit lighter :-D It works perfekt! Un Plug plug, 2 seconds later the HomeKit change the status. All fine. At the moment the battery cap is 100% but i am sure it will also work. i will tell it, if not. Many thanx - really i love this developer, witch work with idealism's an heart blood on the plugins. With out people like you the scene Homebridge will still an really good thing. so give me some days for stress test ... if there is nothing - i think so - than i give you a feedback. |
So one day later. coming home with Sonos Roam, 44 % battery time 18:22 in Log Homebridge nothing ...
trying plug unplug oder Controller start stop musik - no event. So the Plugin, my understanding can not parse anything. than i switch on of, regulation volume and so on :
so also no update for loading state oder battery cppa. i do not know but after a while something happened, what ever, and than the Event ist coming. here the log - by the way. the zp info shows every time status as it is in Sonos app. edit: |
so -- wait some hours - nothing is happen, so i restart the HB and now all runs fine ... Status okay, and looks like all works. for analyse ... the log |
There seems to be something wrong with your Homebridge ZP setup: I don't see any event notifications in the log. I think you still have debug mode enabled, since I see the requests in the log. The period in the log file is probably too short for Homebridge ZP to renew the subscriptions (every 30 minutes by default). Do/did you see any error earlier or later in the log? Did you change anything in your network or firewall settings? So here, the Roam is still not connected to the network:
It was last seen sine 10.5 hours ago, and it was using IP address IP 192.168.2.139. Here, the Roam comes online. Apparently is has rebooted:
Now, I would expect/hope that Homebridge ZP would subscribe to event notifications here, since the zone player would have dropped these on reboot. Yet I don't see any. Consequently the Roam will not send any events to Homebridge ZP. A bit later, the Roam has again disconnected?
OK, it has rebooted:
And again
But still no SUBSCRIBE requests. |
So, just before shutting down, Homebridge ZP shuts down its webserver (used to receive the event notification), but I see no UNSUBSRIBE requests (to cancel the open subscriptions). Somehow, all subscriptions were lost, or failed to renew?! So here you see Homebridge ZP starting the web server and subscribing to
I don't yet see a changed battery percentage, but the event notifications come in alright. I don't know why the subscriptions failed. Would really need to see the error when Homebridge ZP tries to renew the subscriptions. If memory serves, the Roam was selected as associated zone player before (the |
hmm ... wrong with setup ... and yes in this morning i take it with me, come 10h later home, switch on, it connect to the network at 17:48. So i wait until 18:22 doing nothing - also no Sonos box ist playing Musik ... than 18:22 i try to do something. Also reboot roam, on of and so on - nothing happens. and no: no changes in network firewall or rest of setup. so? ZP Uninstall, install with reboot between the steps? Node.js 14.16.1 |
i am not sure what you exactly mean here? |
No. Need to capture a log over a longer period of time, trying to capture an error on SUBSCRIBE. Maybe the server running Homebridge got disconnected from the network at the wrong moment in time?
Mostly note to myself. Like the Sonos app, Homebridge ZP picks an "associated" zone player to receive the topology events from. Typically this is the first non-hidden zone player that responds to the initial probe after restore from cache or discovery. |
Hmm .. how i can provide you? write the Log only [Sonos] events in a file over a while? I definitiv have trouble with my wifi 2.4 ghz - mesh. So in the outside i lose very often network connect to Terrasse left oder right oder both of them. So many networks in the near. So many times i have disconnects from the network of Sonos Speakers. What me is wondering: if i debug with Node-Red and the Sonos Plug in, this is log the request und chances of the Roam. Every time i stop start or connect Plug Power. So something is happen on the network. any way: can i do something. |
Are you using a Sonos mesh network, or are you using your home Wifi mesh? I find it best to connect one or two zone players by wire and let them form their own mesh with the other zone players.
That depends on to what services Node Red subscribes. It wouldn't show the notifications to Homebridge ZP (each API client has its own web server to receive the notifications), and it wouldn't log the POST requests Homebridge ZP makes, nor the responses. Note that each Sonos API client has its own subscription (containing the IP address/port of the web server) per service, and the zone player only supports a limited number of subscriptions (I think something like 30). So having too many clients open could break the notifications. So could having a client crash without unsubscribing, as this causes stale subscriptions. That's why Homebridge ZP uses a 30-minute timeout, and handles Homebridge/NodeJS errors, to UNSUBSCRIBE before NodeJS would crash. I have seen a couple of plugins that break this part, but as long as you see the |
I using a Wifi Mesh from Netgear ( not the best decision) Orbit. One Play 3 has a Kabel Network and a Sonos Input Port. The rest ist still in the Mesh wifi. So if i understand you right: a dear is to switch of Wifi on the Sonos System and let them make a Sonos Wifi? In this case i have to read the manual. No idea how this works. Last update of my system i remove the Sonos access Point ( S1 old, out by Sonos) and put all of them in my wifi. I do not know what Node-red-sonos using. But yes may be this talk so all Sonos Sperre separate on the Webserver - and sorry about me - not know exactly the differents to Zone Player. at the moment all is fine. Controll ist possible the update ist coming ... no idea |
So I have now tried everything that came to my mind and also have SONOS boxes that were feasible connected to ethernet and set up a Sonos network. |
This seems to be a "feature" of the Roam, I don't think I can do anything about that. There is a bug buried deep in Homebridge ZP, that it doesn't subscribe to notifications when the zone player is rebooted, if the subscription time has expired too long ago. See #1 (comment). I suppose the easiest workaround would be for Homebridge ZP to shutdown Homebridge when it sees a zone player has rebooted, hoping some service will restart Homebridge, but that seems kinda blunt. It might actually be the right response if Homebridge ZP runs in a child bridge, but I don't know if a plugin can detect that.
The battery state is reported in the |
is seems do ... ic think, you can close this ChangeRequest, because it will bring data, it the roam is connect.
haha .. no .. not the best idea reboot HB if Roam make a reboot. I can put the ZP in a Child. to sole this, if the roam is not working. What about the move? Since experiences already made with? Has it been out for a while? But as I said, close the ticket. I am really at peace and can live with it. Maybe later on she will have a brilliant idea. |
I don’t have the Move either and haven’t seen any reports about it. I will need to make the subscriptions more robust on zone player reboot, but that’s tricky. That’s already tracked in #1, so indeed closing this issue. |
Hi,
i have a Sonos Roam since today, and a simple question: if it possible, is there a way to get the battery level, lo Battery as characteristics in the Homebridge/HomeKit?
The text was updated successfully, but these errors were encountered: