diff -Nru congruity-20/Changelog congruity-21/Changelog --- congruity-20/Changelog 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/Changelog 2022-08-15 00:27:11.000000000 +0000 @@ -1,3 +1,12 @@ +* 2022-08-14 Scott Talbert +- congruity-21 is released +- congruity/mhgui: Fix compatibility with wxPython 4.1.0+ +- mhgui: Fix account creation with Python 3.9+ +- mhgui: Update login process to match latest official software +- mhgui: Handle invalid credentials and members.harmonyremote.com accounts +- mhgui: Numerous updates to WSDL/XSD to match Logitech changes (thanks Chris + Mayo) + * 2018-06-14 Scott Talbert - congruity-20 is released - congruity/mhgui: fix installation with Python 2 (thanks Chris Mayo) diff -Nru congruity-20/congruity/account.xsd congruity-21/congruity/account.xsd --- congruity-20/congruity/account.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/account.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -7,7 +7,7 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - + @@ -63,6 +63,7 @@ + @@ -80,6 +81,7 @@ + @@ -127,6 +129,7 @@ + @@ -137,6 +140,7 @@ + diff -Nru congruity-20/congruity/activity.xsd congruity-21/congruity/activity.xsd --- congruity-20/congruity/activity.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/activity.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - - + + diff -Nru congruity-20/congruity/arrays.xsd congruity-21/congruity/arrays.xsd --- congruity-20/congruity/arrays.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/arrays.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -9,10 +9,16 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - - - - + + + + + + + + + + diff -Nru congruity-20/congruity/button_mapping.xsd congruity-21/congruity/button_mapping.xsd --- congruity-20/congruity/button_mapping.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/button_mapping.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -6,7 +6,7 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - + diff -Nru congruity-20/congruity/congruity.py congruity-21/congruity/congruity.py --- congruity-20/congruity/congruity.py 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/congruity.py 2022-08-15 00:27:11.000000000 +0000 @@ -29,7 +29,7 @@ import wx import wx.lib.dialogs -version = "20" +version = "21" try: import libconcord @@ -203,7 +203,8 @@ ALIGN_LTA = wx.ALIGN_LEFT | wx.ALIGN_TOP | wx.ALL ALIGN_XTA = wx.EXPAND | wx.ALIGN_TOP | wx.ALL ALIGN_LCA = wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL -ALIGN_RCA = wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.ALL +ALIGN_RA = wx.ALIGN_RIGHT | wx.ALL +ALIGN_CA = wx.ALIGN_CENTER_VERTICAL | wx.ALL ALIGN_XCA = wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.ALL ALIGN_LBA = wx.ALIGN_LEFT | wx.ALIGN_BOTTOM | wx.ALL ALIGN_XBA = wx.EXPAND | wx.ALIGN_BOTTOM | wx.ALL @@ -1112,14 +1113,14 @@ sizer_buttons = wx.BoxSizer(wx.VERTICAL) btn_zi = wx.Button(self, -1, "+") - sizer_buttons.Add(btn_zi, 0, ALIGN_RCA, 5) + sizer_buttons.Add(btn_zi, 0, ALIGN_RA, 5) self.Bind(wx.EVT_BUTTON, self.OnZoomIn, btn_zi) btn_zo = wx.Button(self, -1, "-") - sizer_buttons.Add(btn_zo, 0, ALIGN_RCA, 5) + sizer_buttons.Add(btn_zo, 0, ALIGN_RA, 5) self.Bind(wx.EVT_BUTTON, self.OnZoomOut, btn_zo) - sizer.Add(sizer_buttons, 0, ALIGN_RCA, 0) + sizer.Add(sizer_buttons, 0, ALIGN_CA, 0) self.SetSizer(sizer) diff -Nru congruity-20/congruity/dm_data.xsd congruity-21/congruity/dm_data.xsd --- congruity-20/congruity/dm_data.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/dm_data.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -6,7 +6,7 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - + @@ -28,6 +28,7 @@ + @@ -42,6 +43,7 @@ + diff -Nru congruity-20/congruity/dm_operation.xsd congruity-21/congruity/dm_operation.xsd --- congruity-20/congruity/dm_operation.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/dm_operation.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -11,12 +11,12 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - - - - - - + + + + + + diff -Nru congruity-20/congruity/mhgui.py congruity-21/congruity/mhgui.py --- congruity-20/congruity/mhgui.py 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/mhgui.py 2022-08-15 00:27:11.000000000 +0000 @@ -42,13 +42,13 @@ from .mhmanager import MHAccountDetails from .mhmanager import SaveActivityTemplate from .mhmanager import Secrets -except ModuleNotFoundError: +except (ImportError, ModuleNotFoundError): from mhmanager import MHManager from mhmanager import MHAccountDetails from mhmanager import SaveActivityTemplate from mhmanager import Secrets -version = "20" +version = "21" HARMONY_350_SKIN_ID = "104" HARMONY_LINK_SKIN_ID = 82 @@ -94,8 +94,8 @@ ALIGN_LTA = wx.ALIGN_LEFT | wx.ALIGN_TOP | wx.ALL ALIGN_XTA = wx.EXPAND | wx.ALIGN_TOP | wx.ALL ALIGN_LCA = wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL -ALIGN_RCA = wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL | wx.ALL -ALIGN_XCA = wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.ALL +ALIGN_CA = wx.ALIGN_CENTER_VERTICAL | wx.ALL +ALIGN_XA = wx.EXPAND | wx.ALL ALIGN_LBA = wx.ALIGN_LEFT | wx.ALIGN_BOTTOM | wx.ALL ALIGN_XBA = wx.EXPAND | wx.ALIGN_BOTTOM | wx.ALL @@ -218,7 +218,7 @@ self.deviceTitle = wx.StaticText(self) font = wx.Font(14, wx.SWISS, wx.NORMAL, wx.BOLD) self.deviceTitle.SetFont(font) - self.sizer.Add(self.deviceTitle, 0, ALIGN_XCA, 5) + self.sizer.Add(self.deviceTitle, 0, ALIGN_XA, 5) self.textMessage = WrappedStaticText(self) self.sizer.Add(self.textMessage, 0, ALIGN_XTA, 5) @@ -243,7 +243,7 @@ self.usernameSizer = wx.BoxSizer(wx.HORIZONTAL) self.usernameSizer.Add(self.usernameLabel, 0, ALIGN_LCA, 0) self.usernameSizer.AddStretchSpacer() - self.usernameSizer.Add(self.usernameCtrl, 0, ALIGN_RCA, 0) + self.usernameSizer.Add(self.usernameCtrl, 0, ALIGN_CA, 0) self.userSizer.Add(self.usernameSizer, 0, wx.EXPAND, 0) self.passwordText = wx.StaticText(self, -1, "Password:") self.passwordCtrl = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD) @@ -251,7 +251,7 @@ self.passwordSizer = wx.BoxSizer(wx.HORIZONTAL) self.passwordSizer.Add(self.passwordText, 0, ALIGN_LCA, 0) self.passwordSizer.AddStretchSpacer() - self.passwordSizer.Add(self.passwordCtrl, 0, ALIGN_RCA, 0) + self.passwordSizer.Add(self.passwordCtrl, 0, ALIGN_CA, 0) self.userSizer.Add(self.passwordSizer, 0, wx.EXPAND, 0) self.sizer.Add(self.userSizer) self.sizer.AddSpacer(25) @@ -908,7 +908,7 @@ self.manufacturerSizer = wx.BoxSizer(wx.HORIZONTAL) self.manufacturerSizer.Add(self.manufacturerLabel, 0, ALIGN_LCA, 0) self.manufacturerSizer.AddStretchSpacer() - self.manufacturerSizer.Add(self.manufacturerCtrl, 0, ALIGN_RCA, 0) + self.manufacturerSizer.Add(self.manufacturerCtrl, 0, ALIGN_CA, 0) self.typeSizer.Add(self.manufacturerSizer, 0, wx.EXPAND, 0) self.modelNumberText = wx.StaticText(self, -1, "Model Number:") self.modelNumberCtrl = wx.TextCtrl(self, -1, "") @@ -916,7 +916,7 @@ self.modelNumberSizer = wx.BoxSizer(wx.HORIZONTAL) self.modelNumberSizer.Add(self.modelNumberText, 0, ALIGN_LCA, 0) self.modelNumberSizer.AddStretchSpacer() - self.modelNumberSizer.Add(self.modelNumberCtrl, 0, ALIGN_RCA, 0) + self.modelNumberSizer.Add(self.modelNumberCtrl, 0, ALIGN_CA, 0) self.typeSizer.Add(self.modelNumberSizer, 0, wx.EXPAND, 0) self.sizer.Add(self.typeSizer) self.searchButton = wx.Button(self, label="Search") @@ -2507,7 +2507,7 @@ self.commandGrid.EnableEditing(False) self.commandGrid.SetColLabelValue(0, "Command") self.commandGrid.SetColLabelValue(1, "Duration") - self.commandGrid.SetSelectionMode(wx.grid.Grid.wxGridSelectRows) + self.commandGrid.SetSelectionMode(wx.grid.Grid.SelectRows) self.commandGrid.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnSelectCell) self.sizer.Add(self.commandGrid) diff -Nru congruity-20/congruity/mhmanager.py congruity-21/congruity/mhmanager.py --- congruity-20/congruity/mhmanager.py 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/mhmanager.py 2022-08-15 00:27:11.000000000 +0000 @@ -27,6 +27,7 @@ import random import datetime import json +import html from six.moves.html_parser import HTMLParser from suds.cache import ObjectCache from suds.client import Client @@ -168,28 +169,23 @@ # account. def Login(self, email, password): baseUrl = "https://setup.myharmony.com" - url = baseUrl + "/MartiniWeb/Account/TestLoginAndMW?provider=hp&&verify=true&toucheck=true" + url = baseUrl + "/martiniweb/account/ProceedWithLIPLogin?provider=hp&state=&toucheck=True" data = json.dumps({'email': email, 'password': password}).encode('utf-8') headers = {'Content-Type': 'application/json'} request = urllib.request.Request(url, data, headers) response = urllib.request.urlopen(request) # For some reason the response to this is double-encoded jsonResponse = json.loads(json.loads(response.read().decode('utf-8'))) - if "mwResult" in jsonResponse: - if jsonResponse["mwResult"]: # members.harmonyremote.com acct + if jsonResponse == 401: + url = baseUrl + '/martiniweb/Home/TestMWLoginUser' + request = urllib.request.Request(url, data, headers) + response = urllib.request.urlopen(request) + jsonResponse = json.loads(response.read().decode('utf-8')) + if jsonResponse["Result"]: # members.harmonyremote.com acct return None else: return False - url = baseUrl + "/MartiniWeb/Home/Login?i=" + jsonResponse["id_token"] - url += "&a=" + jsonResponse["access_token"] + "&cl=en-US" - request = urllib.request.Request(url) - response = urllib.request.urlopen(request) - parser = LoginResponseHTMLParser() - parser.feed(response.read().decode('utf-8')) - initparams = dict(u.split("=", 1) for u in parser.initparams.split(",")) - self.contentServiceAuthKey = initparams['ContentServiceAuthKey'] - url = "https://svcs.myharmony.com/CompositeSecurityServices/Security.svc/json2/signin" data = json.dumps({'id_token': jsonResponse['id_token'], 'access_token': jsonResponse['access_token']}).encode('utf-8') @@ -577,7 +573,7 @@ response = conn.getresponse() data = response.read().decode('utf-8') parser = CountryListHTMLParser() - parser.feed(parser.unescape(data)) + parser.feed(html.unescape(data)) return [parser.country_codes, parser.countries] def AddRemote(self, serialNumber, skinId, usbPid, usbVid): @@ -1071,13 +1067,6 @@ password = "" keepMeInformed = "" -class LoginResponseHTMLParser(HTMLParser): - def handle_starttag(self, tag, attrs): - if tag == 'param' and ('name', 'initparams') in attrs: - for key, value in attrs: - if key == 'value': - self.initparams = value - class CreateAccountResponseHTMLParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) diff -Nru congruity-20/congruity/operation.xsd congruity-21/congruity/operation.xsd --- congruity-20/congruity/operation.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/operation.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -9,10 +9,10 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - - - - + + + + diff -Nru congruity-20/congruity/product.xsd congruity-21/congruity/product.xsd --- congruity-20/congruity/product.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/product.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -6,7 +6,7 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - + diff -Nru congruity-20/congruity/search_match.xsd congruity-21/congruity/search_match.xsd --- congruity-20/congruity/search_match.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/search_match.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -6,7 +6,7 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - + @@ -22,6 +22,7 @@ + diff -Nru congruity-20/congruity/user_button_mapping.xsd congruity-21/congruity/user_button_mapping.xsd --- congruity-20/congruity/user_button_mapping.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/user_button_mapping.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -6,7 +6,7 @@ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"> - + @@ -25,6 +25,16 @@ + + + + + + + + + + diff -Nru congruity-20/congruity/user_feature.xsd congruity-21/congruity/user_feature.xsd --- congruity-20/congruity/user_feature.xsd 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/congruity/user_feature.xsd 2022-08-15 00:27:11.000000000 +0000 @@ -1,12 +1,14 @@ - + + @@ -54,6 +56,19 @@ + + + + + + + + + + + + + @@ -69,6 +84,7 @@ + @@ -87,6 +103,8 @@ + + diff -Nru congruity-20/debian/changelog congruity-21/debian/changelog --- congruity-20/debian/changelog 2021-09-24 14:44:50.000000000 +0000 +++ congruity-21/debian/changelog 2022-08-16 19:50:00.000000000 +0000 @@ -1,3 +1,10 @@ +congruity (21-1) unstable; urgency=medium + + * Update to new upstream release 21 + * Update Standards-Version to 4.6.1 (no changes needed) + + -- Scott Talbert Tue, 16 Aug 2022 15:50:00 -0400 + congruity (20-2) unstable; urgency=medium [ Debian Janitor ] diff -Nru congruity-20/debian/control congruity-21/debian/control --- congruity-20/debian/control 2021-09-24 14:36:18.000000000 +0000 +++ congruity-21/debian/control 2022-08-16 19:49:06.000000000 +0000 @@ -7,7 +7,7 @@ dh-python, python3-all, python3-setuptools, -Standards-Version: 4.6.0 +Standards-Version: 4.6.1 Homepage: https://sourceforge.net/projects/congruity/ Vcs-Browser: https://salsa.debian.org/debian/congruity Vcs-Git: https://salsa.debian.org/debian/congruity.git diff -Nru congruity-20/README.txt congruity-21/README.txt --- congruity-20/README.txt 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/README.txt 2022-08-15 00:27:11.000000000 +0000 @@ -1,13 +1,13 @@ Requirements ============================================================================== -Python (tested with 2.7.15 and 3.6.5 on Fedora 28) +Python (tested with 3.10.6 on Fedora 36) See https://www.python.org/ -wxPython (tested with wxPython-3.0.2.0 and wxPython-4.0.1 on Fedora 28) +wxPython (tested with wxPython-4.0.7 and wxPython-4.2.0 on Fedora 36) See https://www.wxpython.org/ -libconcord (version 1.1 is *required*; tested on Fedora 28) +libconcord (version 1.1 or newer is *required*; tested on Fedora 36) See https://www.phildev.net/concordance/ Note that the python bindings are also required; see libconcord/bindings/python @@ -15,7 +15,7 @@ python-six Six is used for enabling Python 3 support. -python-suds (tested with 0.7 [jurko fork 94664ddd46a6] on Fedora 28) +python-suds (tested with 1.1.2 on Fedora 36) Suds is required for mhgui. libsecret and PyGObject (optional for mhgui) diff -Nru congruity-20/setup.py congruity-21/setup.py --- congruity-20/setup.py 2018-06-15 01:40:18.000000000 +0000 +++ congruity-21/setup.py 2022-08-15 00:27:11.000000000 +0000 @@ -38,7 +38,7 @@ setup( name='congruity', - version='20', + version='21', description='Applications for programming Logitech Harmony remote controls', url='https://sourceforge.net/projects/congruity/', packages=['congruity'],