This topic has come up before but I haven't seen an answer. Symptom: AltuUI says there is a new update available, so you tell it to do the update but the update does not happen. AltUI remains stuck on it's old version. On other occasions it works OK. So my version is:
AltUI v2.49.2546, © 2019
AltUI says this:
a newer version #2551 of ALTUI is available, do you want to upgrade ?
add scrollable dialog for long boxes
bugfix: clock display on safari
remote url update ( @olov )
update jquery and bootstrap versions
credential to camera device url ( @rafale77 )
ignore Ezlo hub ( @reneboer)
Track through the JavaScript and find that this issues the update command:
function _triggerAltUIUpgrade(newversion,newtracnum) {
var url = '?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version={1}&TracRev={0}'.format(newversion,newtracnum);
return _httpGet(url,{}).always( function() {
PageMessage.message(_T("Upgrade Request succeeded, a Luup reload will happen"),"success");
});
};
And the url variable equals:
url: "?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=40628&TracRev=2551"
All looks good so far. I manually issue the same url complete with my openLuup ip_address in a local browser. Update fails - looks like AltUI is doing as it should:
http://ip_address:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=40628&TracRev=2551
In openLuup I see:
2021-12-06 13:56:14.821 luup_log:3: ALTUI: startupDeferred, called on behalf of device:3
2021-12-06 13:56:14.838 luup.variable_set:: 3.urn:upnp-org:serviceId:altui1.Version was: v2.49 now: v2.49 #hooks:0
And then later:
2021-12-06 13:55:58.256 openLuup.server:: GET /data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8246&Version=40628&TracRev=2551 HTTP/1.1 tcp{client}: 0x25712a8
2021-12-06 13:55:58.257 luup.call_action:: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.CreatePlugin
2021-12-06 13:55:58.259 luup.call_action:: 4.urn:upnp-org:serviceId:AltAppStore1.update_plugin
2021-12-06 13:55:58.260 luup_log:4: AltAppStore : starting <run> phase...
2021-12-06 13:55:58.262 luup_log:4: AltAppStore : downloading amg0/ALTUI [2551] to trash/AltAppStore/
2021-12-06 13:55:58.262 luup_log:4: AltAppStore : GitHub request: https://api.github.com/repos/amg0/ALTUI/contents?ref=2551
2021-12-06 13:55:58.760 luup_log:4: AltAppStore : GitHub request: https://api.github.com/repos/amg0/ALTUI/contents/blockly?ref=2551
2021-12-06 13:55:59.543 luup_log:4: AltAppStore : getting contents of version: 2551
2021-12-06 13:55:59.544 luup.variable_set:: 4.urn:upnp-org:serviceId:altui1.DisplayLine1 was: AltAppStore now: Downloading... #hooks:0
2021-12-06 13:55:59.544 luup.variable_set:: 4.urn:upnp-org:serviceId:altui1.DisplayLine2 was: now: Alternate UI #hooks:0
2021-12-06 13:55:59.544 luup_log:4: AltAppStore : scheduling <job> phase...
2021-12-06 13:55:59.544 openLuup.requests::
2021-12-06 13:55:59.545 openLuup.server:: request completed (148 bytes, 1 chunks, 1288 ms) tcp{client}: 0x25712a8
2021-12-06 13:55:59.554 openLuup.server:: request completed (6233 bytes, 1 chunks, 16442 ms) tcp{client}: 0x255e680
2021-12-06 13:55:59.555 luup_log:4: AltAppStore : ...final <job> phase
2021-12-06 13:55:59.555 luup_log:4: AltAppStore : Total size 0.000 (kB)
2021-12-06 13:55:59.555 luup.variable_set:: 4.urn:upnp-org:serviceId:altui1.DisplayLine2 was: Alternate UI now: Alternate UI 100% #hooks:0
2021-12-06 13:55:59.555 luup_log:4: AltAppStore : updating icons in icons/ ...
2021-12-06 13:55:59.555 luup_log:4: AltAppStore : updating device files in ./ ...
2021-12-06 13:55:59.556 luup_log:4: AltAppStore : ... 0 icon files
2021-12-06 13:55:59.556 luup_log:4: AltAppStore : ... 0 device files
2021-12-06 13:55:59.556 luup_log:4: AltAppStore : Alternate UI update completed
2021-12-06 13:55:59.556 openLuup.luup:: device 4 'Alternate App Store' requesting reload
2021-12-06 13:55:59.556 luup.reload:: saving user_data
2021-12-06 13:56:00.262 openLuup.luup:: exiting with code 42 - after 0.3 hours
All looks OK. Then I check GitHub. It shows the latest changes to the version 2551. However this page says the latest version is 2550.
So I wondering what's going on. Seems the latest version number is not being picked by the installer? (not sure how it works.) Is it possible for openLuup to log a bit more about the version it's trying to install. As this call returns.
https://api.github.com/repos/amg0/ALTUI/contents?ref=2551
message "No commit found for the ref 2551"
documentation_url "https://docs.github.com/v3/repos/contents/"
But this works fine:
https://api.github.com/repos/amg0/ALTUI/contents?ref=2550
So it looks like AMG0 doesn't always update the repository with whatever is needed to get this to work (I imagine that's easy to forget). But could openLuup send back a fail result to AltUI and AltUI pick that up? Currently it looks like AltUI always assumes everything went OK. Or somehow; could openLuup log and/or notify the user what went wrong?