8000 Provide On/Off switch from webpage by m3d · Pull Request #9 · robotika/osgar-apps · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Provide On/Off switch from webpage #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 4, 2025
Merged

Provide On/Off switch from webpage #9

merged 8 commits into from
Jun 4, 2025

Conversation

m3d
Copy link
Member
@m3d m3d commented May 30, 2025

This is mainly for fulfilling requirements for FRE2025, but could be useful for later extension to some remote web configuration

@m3d m3d requested a review from tajgr May 30, 2025 05:26
@m3d
Copy link
Member Author
m3d commented May 30, 2025

Example of run:

(osgar) md@md-ThinkPad-P50:~/git/osgar-apps/web-switch$ python -m osgar.record --duration 10 test-wswitch.json 
2025-05-30 07:23:36,557 root             WARNING  Environment variable OSGAR_LOGS is not set - using working directory
2025-05-30 07:23:36,558 __main__         INFO     /home/md/git/osgar-apps/web-switch/test-wswitch-250530_052336.log
2025-05-30 07:23:36,577 __main__         INFO     SIGINT handler installed
MD: /
127.0.0.1 - - [30/May/2025 07:23:40] "GET / HTTP/1.1" 200 -
MD-POST: /
127.0.0.1 - - [30/May/2025 07:23:42] "POST / HTTP/1.1" 200 -
Received value from HTTP handler: True
MD-POST: /
127.0.0.1 - - [30/May/2025 07:23:42] "POST / HTTP/1.1" 200 -
Received value from HTTP handler: False
MD-POST: /
127.0.0.1 - - [30/May/2025 07:23:43] "POST / HTTP/1.1" 200 -
Received value from HTTP handler: True
2025-05-30 07:23:47,577 __main__         ERROR    thread 'Thread-2' still running!
2025-05-30 07:23:47,577 __main__         ERROR        class: threading.Thread
2025-05-30 07:23:47,577 __main__         ERROR        target: <function run_server at 0x7effea731940>
2025-05-30 07:23:47,578 __main__         ERROR    thread 'Thread-1' still running!
2025-05-30 07:23:47,578 __main__         ERROR        class: wswitch.WebPageSwitch
2025-05-30 07:23:47,578 __main__         ERROR        target: None
(osgar) md@md-ThinkPad-P50:~/git/osgar-apps/web-switch$ python -m osgar.logger /home/md/git/osgar-apps/web-switch/test-wswitch-250530_052336.log
 k           name bytes | count | freq Hz
-----------------------------------------
 0            sys 248 | 3 |   0.5Hz
 1 wswitch.status   3 | 3 |   0.5Hz

Total time 0:00:06.659397
(osgar) md@md-ThinkPad-P50:~/git/osgar-apps/web-switch$ python -m osgar.logger /home/md/git/osgar-apps/web-switch/test-wswitch-250530_052336.log --stream wswitch.status
0:00:05.539936 1 True
0:00:06.127317 1 False
0:00:06.659397 1 True

@m3d
Copy link
Member Author
m3d commented Jun 4, 2025

I am going to merge it soon, just that we have reference in master. Maybe I could try to setup CI workflow like for osgar ...

@m3d m3d merged commit 65c5297 into master Jun 4, 2025
4 checks passed
@m3d m3d deleted the feature/web-switch branch June 4, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0