UniversalDevicesInc-PG3 / udi-poly-notification

Polyglot v2 NodeServer for Notifications
MIT License
2 stars 1 forks source link

Recognize Pushover Exceeded limit message #33

Open jimboca opened 2 years ago

jimboca commented 2 years ago
2022-03-05 12:54:39,816 Thread-41842 udi_interface.node DEBUG    node:setDriver: po_homeisy:Service Pushover homeisy No change in ST's value
2022-03-05 12:54:39,817 Thread-41842 udi_interface      DEBUG    Pushover:post: params={'message': 'AwakeSome: 0\nAwayAll: 0\nAwayAllDisable: 0\nAwayPets: 0\nFamilyRoomOccupied: 1\nGuestDownOccupied: 0\nGuestUpOccupied: 0\nPrepareForBed: 0\nPrepareForWake: 0\nSleeping: 0\nVacation: 0\nDayNigt:  2\n Morning: 1\n Day:     2\n Dusk:    3\n Dark:    4\n\n\n \n', 'node': 'po_homeisy', 'device': 'JimsPhone', 'monospace': '1', 'priority': 0, 'subject': 'Home Stage Changed', 'title': 'Home Stage Changed', 'sound': 'pushover', 'user': 'tavzn48CN3tsp8iXwPwNgDxbfw3ngh', 'token': 'XY2bmjgRLzy4LANZREGd23WrewFawA'}
2022-03-05 12:54:39,817 Thread-41842 udi_interface      DEBUG    Pushover:post: try #1
2022-03-05 12:54:39,818 Thread-41842 udi_interface      DEBUG    PolyglotREST:post: Sending: url=https://api.pushover.net/1/messages.json payload={'message': 'AwakeSome: 0\nAwayAll: 0\nAwayAllDisable: 0\nAwayPets: 0\nFamilyRoomOccupied: 1\nGuestDownOccupied: 0\nGuestUpOccupied: 0\nPrepareForBed: 0\nPrepareForWake: 0\nSleeping: 0\nVacation: 0\nDayNigt:  2\n Morning: 1\n Day:     2\n Dusk:    3\n Dark:    4\n\n\n \n', 'node': 'po_homeisy', 'device': 'JimsPhone', 'monospace': '1', 'priority': 0, 'subject': 'Home Stage Changed', 'title': 'Home Stage Changed', 'sound': 'pushover', 'user': 'tavzn48CN3tsp8iXwPwNgDxbfw3ngh', 'token': 'XY2bmjgRLzy4LANZREGd23WrewFawA'}
2022-03-05 12:54:40,153 Thread-41842 udi_interface      DEBUG    PolyglotREST:response:  Got: code=429
2022-03-05 12:54:40,154 Thread-41842 udi_interface      DEBUG    PolyglotREST:response:       text={"token":"invalid","errors":["application has exceeded its monthly limit of 10000 messages"],"status":0,"request":"a1d7c408-790f-4f3b-b530-577ad1132805"}
2022-03-05 12:54:40,155 Thread-41842 udi_interface      ERROR    PolyglotREST:response: Unknown response 429: https://api.pushover.net/1/messages.json {"token":"invalid","errors":["application has exceeded its monthly limit of 10000 messages"],"status":0,"request":"a1d7c408-790f-4f3b-b530-577ad1132805"}
2022-03-05 12:54:40,156 Thread-41842 udi_interface      ERROR    PolyglotREST:response: Check system status: https://status.ecobee.com/
2022-03-05 12:54:40,157 Thread-41842 udi_interface      ERROR    Pushover:post: From Pushover: ['application has exceeded its monthly limit of 10000 messages']
2022-03-05 12:54:40,157 Thread-41842 udi_interface      DEBUG    Pushover:post: res={'status': False, 'code': 429, 'data': {'token': 'invalid', 'errors': ['application has exceeded its monthly limit of 10000 messages'], 'status': 0, 'request': 'a1d7c408-790f-4f3b-b530-577ad1132805'}}
2022-03-05 12:54:40,158 Thread-41842 udi_interface      WARNING  Pushover:post: Previous error can not be fixed, will not retry
2022-03-05 12:54:40,159 Thread-41842 udi_interface      INFO     Pushover:set_error: 5
2022-03-05 12:54:40,159 Thread-41842 udi_interface      INFO     Pushover:set_error: Set ERR to 5
2022-03-05 12:54:40,160 Thread-41842 udi_interface.node DEBUG    node:setDriver: po_homeisy:Service Pushover homeisy Reporting set ERR to 5 to Polyglot
2022-03-05 12:54:40,161 Thread-41842 udi_interface.node DEBUG    node:reportDriver: Updating value to 5
jimboca commented 1 year ago

Also, "banned" message.


2023-06-20 09:29:23,772 Thread-286 udi_interface      ERROR    PolyglotREST:response: Unknown response 429: https://api.pushover.net/1/messages.json { status: 0, ip: "banned", errors: "your IP has made too many failed requests in a short amount of time and has be
en blocked - see https://pushover.net/api#friendly" }
2023-06-20 09:29:23,773 Thread-286 udi_interface      ERROR    PolyglotREST:response: Check system status: https://status.ecobee.com/
2023-06-20 09:29:23,773 Thread-286 udi_interface      ERROR    udi_interface:write: Exception in thread
2023-06-20 09:29:23,773 Thread-286 udi_interface      ERROR    udi_interface:write: Thread-286
2023-06-20 09:29:23,773 Thread-286 udi_interface      ERROR    udi_interface:write: :
2023-06-20 09:29:23,773 Thread-286 udi_interface      ERROR    udi_interface:write: Traceback (most recent call last):
2023-06-20 09:29:23,773 Thread-286 udi_interface      ERROR    udi_interface:write: File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
2023-06-20 09:29:23,774 Thread-286 udi_interface      ERROR    udi_interface:write: self.run()
2023-06-20 09:29:23,774 Thread-286 udi_interface      ERROR    udi_interface:write: File "/usr/local/lib/python3.9/threading.py", line 917, in run
2023-06-20 09:29:23,774 Thread-286 udi_interface      ERROR    udi_interface:write: self._target(*self._args, **self._kwargs)
2023-06-20 09:29:23,774 Thread-286 udi_interface      ERROR    udi_interface:write: File "/var/polyglot/pg3/ns/0021b9025d7d_5/nodes/Pushover.py", line 679, in post
2023-06-20 09:29:23,775 Thread-286 udi_interface      ERROR    udi_interface:write: if 'errors' in res['data']:
2023-06-20 09:29:23,775 Thread-286 udi_interface      ERROR    udi_interface:write: TypeError
2023-06-20 09:29:23,775 Thread-286 udi_interface      ERROR    udi_interface:write: :
2023-06-20 09:29:23,775 Thread-286 udi_interface      ERROR    udi_interface:write: argument of type 'bool' is not iterable
``