TheSpaghettiDetective / moonraker-obico

GNU Affero General Public License v3.0
148 stars 40 forks source link

Service fails to connect to moonraker upon boot #26

Closed Gofven closed 2 years ago

Gofven commented 2 years ago

When booting up the computer, moonraker-obico likely attempts to connect to moonraker. However in the app, it doesnt detect the printer being online, however it still posts an imagefeed...

Current fix is to just run sudo systemctl restart moonraker-obico once moonraker is active, alternatively run install.sh again.

2022-05-15 14:52:08,283      INFO  obico - starting moonraker-obico (v0.1.1)
2022-05-15 14:52:08,288     DEBUG  obico - ServerConfig(url='https://app.obico.io', auth_token='<SECRET_TOKEN>', upload_dir='Obico_Upload', feedrate_xy=100, feedrate_z=10)
2022-05-15 14:52:08,292     DEBUG  obico.tsdconn - fetching printer data
2022-05-15 14:52:08,293   WARNING  obico.moonrakerconn - api key is unset, trying to fetch one
2022-05-15 14:52:08,294     DEBUG  obico.tsdconn - GET https://app.obico.io/api/v1/octo/printer/
2022-05-15 14:52:08,294     DEBUG  obico.moonrakerconn - GET {url}
2022-05-15 14:52:08,608      INFO  obico.tsdconn.ws - connecting to wss://app.obico.io/ws/dev/
2022-05-15 14:52:08,609      INFO  obico - linked printer: {'is_pro': True, 'id': 109179, 'name': 'Monstadt'}
2022-05-15 14:52:08,609     DEBUG  obico.tsdconn - waiting for connection
2022-05-15 14:52:08,863      INFO  obico.tsdconn - connection is ready
2022-05-15 14:52:08,864      INFO  obico - capturing and posting snapshot
2022-05-15 14:52:08,865     DEBUG  obico.webcam - GET http://127.0.0.1:8080/?action=stream
2022-05-15 14:52:08,866     DEBUG  obico.tsdconn.ws - sending {"current_print_ts": -1, "octoprint_data": {}, "octoprint_settings": {"webcam": {"flipV": false, "flipH": false, "rotate90": false, "streamRatio": "4:3"}, "agent": {"name": "moonraker_obico", "version": "0.1.1"}}}
2022-05-15 14:52:08,877     DEBUG  obico.tsdconn.ws - receiving {"remote_status": {"viewing": false, "should_watch": false}}
2022-05-15 14:52:08,879      INFO  obico - from tsd: {'remote_status': {'viewing': False, 'should_watch': False}}
2022-05-15 14:52:08,883     DEBUG  obico.tsdconn - POST https://app.obico.io/api/v1/octo/pic/
2022-05-15 14:52:09,348      INFO  obico - posting snapshot finished
2022-05-15 14:52:14,306     DEBUG  obico.tsdconn.ws - sending {"current_print_ts": -1, "octoprint_data": {}}
2022-05-15 14:52:19,311     DEBUG  obico.tsdconn.ws - sending {"current_print_ts": -1, "octoprint_data": {}}
2022-05-15 14:52:37,897     DEBUG  obico.tsdconn.ws - sending {"current_print_ts": -1, "octoprint_data": {}}
2022-05-15 14:53:27,954     DEBUG  obico.tsdconn.ws - sending {"current_print_ts": -1, "octoprint_data": {}}
2022-05-15 14:54:09,001      INFO  obico - capturing and posting snapshot
2022-05-15 14:54:09,003     DEBUG  obico.webcam - GET http://127.0.0.1:8080/?action=stream
2022-05-15 14:54:09,031     DEBUG  obico.tsdconn - POST https://app.obico.io/api/v1/octo/pic/
2022-05-15 14:54:09,639      INFO  obico - posting snapshot finished
2022-05-15 14:54:18,011     DEBUG  obico.tsdconn.ws - sending {"current_print_ts": -1, "octoprint_data": {}}

image

kennethjiang commented 2 years ago

Fixed in version 0.2.3. Please upgrade and test it again.