object_page http://www.yama-lab.org/fwb4pi/index.php?capture_20250115 or http://www.yama-lab.org/fwb4pi/index.php?capture_20250115
device yama_bot_0000_0000_0000_0001 or yama_bot_0000_0000_0000_0001 start after no write for 10 min.
command: set read_interval=300000
command: set exec_interval=5000
command: set report_length=400
command: py test
py: import subprocess
py: import time
py: date=self.Pico_Time.get_now()
py: #date=2024-12-31 14:25:16.61944
py: time_x=(date.split())[1]
py: print('time_x='+time_x)
py: time_xx=time_x.split(':')
py: hm=time_xx[0]+'_'+time_xx[1]
py: ms=time_xx[1]
py: ss=time_xx[2]
py: dec_sec=ss[1]
py: if ms=='00' and dec_sec==0:
py:     print('time='+hm)
py:     attach_dir='/home/pi/python/'
py:     attach_name=hm+'.jpg'
py:     print('attach_name='+attach_name)
py:     cmd_line="/usr/bin/libcamera-jpeg -o "+attach_dir+attach_name+" -t 1000 --width 640 --height 480"
py:     print(cmd_line)
py:     cmd_line_list=cmd_line.split()
py:     subprocess.run(cmd_line_list)
py:     list=self.get_attachment_list()
py:     if attach_name in list:
py:          self.delete_attachment(attach_name)
py:     self.upload_file(attach_dir, attach_name)
py:     line="device=camera, Date="+self.Pico_Time.get_now()+", v="+attach_name
py:     self.write_line(line)
py:     time.sleep(6)
command: end test
command: run test
result:
current_device="yama_bot_0000_0000_0000_0001". Date=2024-12-29 01:13:35.523630

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS