3dprinter:octoprint
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
3dprinter:octoprint [2023/05/01 13:11] – [PSUControl + Tuya Plug/LED On/Off] Wulf Rajek | 3dprinter:octoprint [2023/05/29 11:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 119: | Line 119: | ||
{{: | {{: | ||
+ | |||
+ | {{: | ||
To locally control the Tuya devices, the tinytuya python module needs to be installed: | To locally control the Tuya devices, the tinytuya python module needs to be installed: | ||
Line 166: | Line 168: | ||
# Optional: Keep socket open for multiple commands | # Optional: Keep socket open for multiple commands | ||
d.set_socketPersistent(True) | d.set_socketPersistent(True) | ||
- | d.set_socketNODELAY(True) | + | #d.set_socketNODELAY(True) |
- | d.set_sendWait(0) | + | #d.set_sendWait(0) |
# Get Status as dictionary | # Get Status as dictionary | ||
Line 183: | Line 185: | ||
for key, value in olddps.items(): | for key, value in olddps.items(): | ||
# print(' | # print(' | ||
+ | if key == 1: | ||
+ | continue | ||
d.set_value(key, | d.set_value(key, | ||
+ | d.set_value(1, | ||
# ' | # ' | ||
# Wulf Default: | # Wulf Default: | ||
- | d.set_value(1, | ||
d.set_value(2, | d.set_value(2, | ||
d.set_value(3, | d.set_value(3, | ||
Line 197: | Line 201: | ||
d.set_value(9, | d.set_value(9, | ||
d.set_value(10, | d.set_value(10, | ||
+ | d.set_mode(mode=' | ||
+ | d.set_value(1, | ||
time.sleep(10) | time.sleep(10) | ||
Line 214: | Line 220: | ||
chmod 755 ~/ | chmod 755 ~/ | ||
</ | </ | ||
+ | |||
+ | |||
+ | ====== motion webcam ====== | ||
+ | |||
+ | https:// | ||
+ | https:// | ||
+ | |||
+ | < | ||
+ | sudo apt-get install motion | ||
+ | mkdir ~/.motion | ||
+ | vi ~/ | ||
+ | </ | ||
+ | <code - ~/ | ||
+ | videodevice /dev/video2 | ||
+ | picture_output off | ||
+ | movie_output off | ||
+ | stream_quality 98 | ||
+ | stream_grey off | ||
+ | stream_maxrate 5 | ||
+ | stream_port 8090 | ||
+ | stream_localhost off | ||
+ | stream_motion on | ||
+ | # stream_motion off #stream 1 fps when no motion detected | ||
+ | framerate 10 | ||
+ | movie_codec mpeg4 | ||
+ | # http:// | ||
+ | width 1280 | ||
+ | height 720 | ||
+ | auto_brightness off | ||
+ | vid_control_params " | ||
+ | #log_level 7 | ||
+ | webcontrol_interface 0 | ||
+ | webcontrol_localhost off | ||
+ | webcontrol_port 8091 | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | Log Level 7 shows camera controls, e.g: | ||
+ | < | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | [1:ml1] [INF] [VID] v4l2_ctrls_list: | ||
+ | </ | ||
+ | |||
+ | Since the exact device number is set by the kernel upon boot, when there is more than one video device it is possible that the particular cameras that were assigned to /dev/video0 and /dev/video1 may switch. In order to set up Motion so that a particular camera is always assigned the same way, users can set up a symbolic link using udev rules. To do this a unique attribute must be identified for each camera. The camera attributes can be viewed by using the command < | ||
+ | |||
+ | Once a unique attribute has been identified for each camera, edit or create the file / | ||
+ | Assuming that the unique attribute for the camera was name and was '' | ||
+ | Once the change has been made and saved, reboot the computer and there should now be a " | ||
+ | |||
+ | |||
+ | URL for static current image: http:// | ||
3dprinter/octoprint.1682943099.txt.gz · Last modified: 2023/05/29 11:53 (external edit)