Commit graph

97 commits

Author SHA1 Message Date
Brian Martin
b604a4d214 fix ecovacshome cleanlogs
update for lg logs to support viewing cleaning logs in ecovacs home app. Tested with D901.
2019-10-13 01:14:14 -04:00
Brian Martin
abaf9ebae2 add log_all_requests middleware
Add middleware to log all request/responses to confserverlog.
2019-10-12 14:04:13 -04:00
Brian Martin
5ac6663502 fix send_command payloadType
Used toType instead of payloadType...
2019-10-01 20:20:23 -04:00
Brian Martin
e233fe933e send_command json instead of str
send_command json instead of str
2019-10-01 16:27:58 -04:00
Brian Martin
c8acac767f More MQTT Logging
MQTT Server logs routed to mqttserver.log
2019-09-27 17:25:57 -04:00
Brian Martin
2b934bb5fa Update EcoVacsHomeProducts
Update EcoVacsHomeProducts with latest map
2019-09-16 00:11:22 -04:00
Brian Martin
2663c46d52 remove a few try
remove a few try
2019-06-20 21:05:36 -04:00
Brian Martin
9be1ba8321 restart_XMPP
restart_XMPPServer
2019-06-20 20:39:45 -04:00
Brian Martin
40d4af3f80 fixing the broken tests
leftover helperbot= in tests causing failures....
2019-06-20 08:59:15 -04:00
Brian Martin
7fc7cb80cb api - restart_{service}
add restart_{service}

- restart_Helperbot
- restart_MQTTServer

- Removed a few outstanding references to threads
2019-06-20 08:48:01 -04:00
Brian Martin
58b3567887 split models and db from init
Move models into their own file
Move db functions into their own file
Update tests
2019-06-19 09:29:45 -04:00
Brian Martin
d541234600 add devicealert as boterror
add devicealert as boterror
2019-06-19 07:52:39 -04:00
Brian Martin
b48905b4e4 catch bot errors in log
Close #10
- New boterror log
- Works for MQTT and XMPP
2019-06-19 07:29:12 -04:00
Brian Martin
4fe7f056f4 test api
testing api pulling from db
2019-06-18 20:21:01 -04:00
Brian Martin
f0c13dc8e2 db with open
switch to using with open
2019-06-18 20:18:54 -04:00
Brian Martin
f2585b0450 Remove debug prints
Remove forgotten prints from debugging
2019-06-15 01:49:38 -04:00
Brian Martin
0b38562b4a
Merge branch 'master' into docker 2019-06-15 00:12:45 -05:00
Brian Martin
6b2ed31c9e remove first run prompt - fix tests
remove first run prompt, default to generate certs
fix tests
2019-06-10 22:10:18 -04:00
Brian Martin
d8b2d02ca4 remove extra listeners
removed service_listeners and using bumper_listen
2019-06-09 21:16:37 -04:00
Brian Martin
d5db3b696c dockerfile and env var
Add Dockerfile, requirement.txt, and new BUMPER_CERTS env var.
2019-06-09 20:09:35 -04:00
Brian Martin
1f0e417760 no more start_bumper
remove start_bumper
- built into __main__ + __init__
- add tests
2019-06-08 16:45:52 -04:00
Brian Martin
edf5e8e3c0 add first_run
if certs aren't in folder, ask to create with create_certs.
2019-06-07 19:16:44 -04:00
Brian Martin
6c429b93e6 more grace
more graceful shutdown and error handling
2019-06-07 00:54:12 -04:00
Brian Martin
4e46d7e810 add autoflake
add autoflake
remove unused imports
2019-06-06 23:18:28 -04:00
Brian Martin
75810c18e2 Update __init__.py 2019-06-06 22:47:16 -04:00
Brian Martin
72f3b5d049 change execution
bumper.start/shutdown
- allow envionrment variables (prep for docker)
- move bumper.db to new "data" directory
start_bumper reworked
- use argparse
2019-06-06 22:46:40 -04:00
Brian Martin
29356c9849 add confserver tests
add confserver tests
2019-06-04 23:46:28 -04:00
Brian Martin
2a4c369d58 add more xmpp tests
- test xmpp server
- test starttls upgrade
2019-06-04 22:20:11 -04:00
Brian Martin
105f0ad632 more mqtt tests
more mqtt tests
2019-06-04 17:29:39 -04:00
Brian Martin
3060e7db20 remove iq auth
Remove old iq auth that is replaced by sasl
2019-06-03 16:41:52 -04:00
Brian Martin
d4414bd150 Reworking tests
Reworking tests with pytest
2019-05-31 22:06:54 -04:00
Brian Martin
d2ebe12145 Split README into docs
Splitting README into docs to make it shorter and easier to maintain.

- Change to os_db_path adding createdir so tests can skip creation of the path
2019-05-30 09:13:19 -04:00
Brian Martin
c3098e03e4 Format with black
Formatting code with black
- pipenv update
2019-05-30 06:55:15 -04:00
Brian Martin
2dd59a5b98 STARTTLS working
Addresses #35

Re-worked XMPP to use protocol and adds support for STARTTLS.

Re-worked start and added graceful close on Ctrl+C
2019-05-29 20:48:47 -04:00
Brian Martin
b50b0df734 WIP - Init
WIP, not working
2019-05-25 08:39:24 -04:00
Brian Martin
32ae8468a3 xmpp - set from if empty 2019-05-23 15:15:25 -04:00
Brian Martin
7dc2504f2b Fix confserver test and add dev pbr
Fix confserver test and add dev pbr
2019-05-23 09:20:17 -04:00
Brian Martin
2460182f4f Fix the things
XMPP is now async and works - Closes #27
Full async - Closes #22
Individual log files - Closes #21
2019-05-23 09:01:30 -04:00
Brian Martin
3ae24976af
Merge branch 'dev_broken-XMPP' into fix-#31 2019-05-21 10:28:24 -04:00
Brian Martin
5bf202189d Return 500 errors for command timeout
Bumper was returning an invalid errno when a command for MQTT would timeout.  Change to return a 500 errno with a debug message.

Closes #31
2019-05-21 10:13:21 -04:00
Brian Martin
79ad55d2ec
Merge branch 'dev_broken-XMPP' into support-ecovacs-home 2019-05-20 22:20:19 -04:00
Brian Martin
25a7be6fc6 Logs and fixes
- Fix for username
- Cleaning log loads stats, but no logs
  - This is broken without Bumper as well, maybe we can fix it as a TODO later it seems to be doing server-side processing unlike the Ecovacs app.
2019-05-20 12:45:13 -04:00
Brian Martin
734d1cee79 Initial Support
Initial Support for EcoVacs Home app.
- Login and most commands/controls work
2019-05-20 09:01:27 -04:00
Brian Martin
9509163464 Updates for XMPP
Updates for XMPP, seems to fix an issue with holding the rest of the asyncio loops hostage after a disconnect.
2019-05-18 15:55:00 -04:00
Brian Martin
d238ded6c1 Better MQTT logging and asyncio debug on
Better MQTT logging and asyncio debug on
2019-05-18 08:35:08 -04:00
Brian Martin
c4900be511 Fix db_path and test
Earlier commit broke the db_path and tests.....
2019-05-12 15:49:08 -04:00
Brian Martin
652a0b0e9b Fix command_responses
Final removal of contextvars
2019-05-12 15:42:47 -04:00
Brian Martin
d6816a02ec Remove vars
Start removal
2019-05-12 15:31:52 -04:00
Brian Martin
2683421c34 Fix startup and create db path
Fix for listen args and create db path if it doesn't exist
2019-05-12 15:20:10 -04:00
Brian Martin
17d7ee5f66 Individual log files
Log files per service - Closes #21
2019-05-03 09:00:05 -04:00