This library adds a block to invoke the IP Camera thing actions allowing to record a video in MP4 or GIF format for a specified amount of seconds. You need the IP Camera binding installed, with a camera properly configured and the video processing tools as specified in the docs.
Blocks
Records the specified amount of seconds in MP4 or GIF format from the provided IP Camera thing. Change the filename, it should include the appropriate extension - .mp4 or .gif.
Changelog
Version 0.1
- initial release
Resources
uid: ipcamera
tags: []
props:
parameters: []
parameterGroups: []
component: BlockLibrary
config:
name: IP Camera
slots:
blocks:
- component: BlockType
config:
type: record
message0: Record %1 video from %2 for %3 seconds into file %4
lastDummyAlign0: right
args0:
- type: field_dropdown
name: FORMAT
options:
- - MP4
- MP4
- - GIF
- GIF
- type: input_value
name: THING
align: right
- type: field_number
name: SECONDS
value: 10
- type: input_value
name: FILENAME
align: right
previousStatement: ""
nextStatement: ""
colour: 0
tooltip: ""
helpUrl: ""
slots:
code:
- component: BlockCodeTemplate
config:
template: >
{{utility:things}}.getActions('ipcamera', {{input:THING}}).record{{field:FORMAT}}({{input:FILENAME}}, {{field:SECONDS}});
toolbox:
- component: PresetInput
config:
name: FILENAME
type: text
shadow: true
fields:
TEXT: filename
- component: PresetInput
config:
name: THING
type: oh_thing
shadow: true
utilities:
- component: UtilityJavaType
config:
name: things
javaClass: org.openhab.core.model.script.actions.Things