Bugzilla – Bug 8085
Controller firmware update should be a server push, not a poll
Last modified: 2009-09-08 09:24:23 UTC
(16:26:35) Richard Titmuss: morning ben (16:26:41) Ben Klass: hi richard (16:26:45) Richard Titmuss: i've noticed something and it's bugging me now! (16:26:55) Ben Klass: uh oh :) (16:27:10) Richard Titmuss: the firmware upgrade code should not really be polling from jive (it seems to do this every 10 secs?), it should be a server push. (16:29:37) Ben Klass: okay, sure. 7.1 bug, assign to me? I can probably solve that one pretty quickly
SetupFirmwareUpgradeMeta appears to me to be checking once/10 minutes (subscribe:3600), but SC (I need to check that) should push a firmwarestatus update immediately after receiving a new firmware version, which this should pick up. Isn't that the correct way to do this? local monitor = { notify_playerCurrent = function(self, player) if not player then return end if meta.player and meta.player ~= player then meta.player:unsubscribe('/slim/firmwarestatus/' .. meta.player.id) end meta.player = player local fwcmd = { 'firmwareupgrade', 'firmwareVersion:' .. JIVE_VERSION, 'subscribe:3600' } player:subscribe( '/slim/firmwarestatus/' .. player.id, firmwareUpgradeSink, player.id, fwcmd ) end, } jnt:subscribe(monitor)
i keep seeing info messages about firmware update every 10 seconds or so. can you also not use 0 in the subscribe, there really is not point doing periodic updates?
I'll set subscribe down to 0, but are you meaning messages like this every 10 seconds? 112701:6924313 INFO (NetworkThread.lua:248) - NOTIFY playerNeedsUpgrade: Player {Office SB3}, false, false Those are playerNeedsUpgrade messages, which don't have anything to do with SBC Firmware upgrade subscriptions afaik The playerNeedsUpgrade notification was added for dealing with placing a full-screen spinny on SBC when the connected player needs an upgrade or in the process of upgrading. So, perhaps the code in jive.slim.Player is sending out playerNeedsUpgrade notifications when it shouldn't (i.e., when the state hasn't changed)? Is that what we're trying to fix here?
Yes, that's what were trying to fix. But let's do both :) heh, ok it's my SqueezePlay 7.2 that needs upgrading. So maybe that's not a bug. But why is this notification sent every 10 seconds when the status does not change? Not that's a bug.
for the record, I get those messages too, but once/30 seconds, which is the frequency of playerstatus messages coming from SC. I'm confused why you're receiving them 3x more often. I'll review jive.slim.Player and see why those notifications are always going out. I recall it was a bit tricky getting the logic right to deal with the combinations of player_is_upgrading and player_needs_upgrade messages.
the issue described in comment #3, playerNeedsUpgrade messages showing up every 10-30seconds, is fixed with 7.1 r2538 leaving the bug open to address the push/pull issue also described here
add firmwarestatus subscription that SC will push notification on. Make sure not to break existing implementation when adding this one. cc:ing Andy because this has SN implications.
retargetting for 7.2
Ben, also the date request should be a notification from SC, send every hour and not jive polling SC. Can you fix that with this bug too.
scratch that last comment, i've made a new bug for the date subscription. (bug 8646). looking at the code in jive i'm not sure why this bug is still open, is a SC change still needed?
double check for 7.2. close if we're already doing this, which I think we are.
Ben: Are you going to look at this or are we done?
just checked, we're done with this bug
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.