Hello,
J’ai aussi un C510W fonctionnelle en PTZ.
Vu que l’intégration tapo est non fonctionnelle, je suis passé par mqtt, sans passer par onvif.
La config frigate :
mqtt:
enabled: true
host: 192.168.1.3
user: nom-mqtt
password: motdepasse-mqtt
port: 1883
detectors:
coral:
type: edgetpu
device: usb
go2rtc:
streams:
jardin:
- tapo://motdepasse@192.168.1.35
cameras:
jardin:
enabled: true
onvif:
host: 192.168.1.35
port: 2020
user: nom
password: motdepasse
ffmpeg:
inputs:
- path: rtsp://nom:motdepasse@192.168.1.35:554/stream1
roles:
- record
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
- mouse
# - bird
Création d’input buttons :
J’ai fait un petit flow node red, pour utiliser le ptz, une impulsion fait bouger la caméra dans la direction désirée pendant 500ms (à adapter)
[{"id":"998e708357822317","type":"group","z":"53491665e37c8348","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["77feb5c4d1a011ec","1b0e89271837e9f7","cc336722f838db97","14f5ed9803fdd257","982a33385d8fb898","fc46018cf14cd006","1e30d0d0af721f4d","7a17b11ed6d3275b","c8f7c46c29d6ce37","700ea4f3fecfa32f"],"x":14,"y":2399,"w":672,"h":382},{"id":"77feb5c4d1a011ec","type":"server-state-changed","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin up","server":"35ed60ee.1830b","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.camera_jardin_up","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":2440,"wires":[["cc336722f838db97","1b0e89271837e9f7"]]},{"id":"1b0e89271837e9f7","type":"api-call-service","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin up","server":"35ed60ee.1830b","version":5,"debugenabled":false,"domain":"frigate","service":"ptz","areaId":[],"deviceId":[],"entityId":["camera.jardin"],"data":"{\"action\":\"move\",\"argument\":\"up\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":2440,"wires":[[]]},{"id":"cc336722f838db97","type":"delay","z":"53491665e37c8348","g":"998e708357822317","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":370,"y":2600,"wires":[["14f5ed9803fdd257"]]},{"id":"14f5ed9803fdd257","type":"api-call-service","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin stop","server":"35ed60ee.1830b","version":5,"debugenabled":false,"domain":"frigate","service":"ptz","areaId":[],"deviceId":[],"entityId":["camera.jardin"],"data":"{\"action\":\"stop\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":570,"y":2600,"wires":[[]]},{"id":"982a33385d8fb898","type":"server-state-changed","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin down","server":"35ed60ee.1830b","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.camera_jardin_down","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":2520,"wires":[["fc46018cf14cd006","cc336722f838db97"]]},{"id":"fc46018cf14cd006","type":"api-call-service","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin down","server":"35ed60ee.1830b","version":5,"debugenabled":false,"domain":"frigate","service":"ptz","areaId":[],"deviceId":[],"entityId":["camera.jardin"],"data":"{\"action\":\"move\",\"argument\":\"down\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":2520,"wires":[[]]},{"id":"1e30d0d0af721f4d","type":"server-state-changed","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin left","server":"35ed60ee.1830b","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.camera_jardin_left","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":2660,"wires":[["7a17b11ed6d3275b","cc336722f838db97"]]},{"id":"7a17b11ed6d3275b","type":"api-call-service","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin left","server":"35ed60ee.1830b","version":5,"debugenabled":false,"domain":"frigate","service":"ptz","areaId":[],"deviceId":[],"entityId":["camera.jardin"],"data":"{\"action\":\"move\",\"argument\":\"left\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":2660,"wires":[[]]},{"id":"c8f7c46c29d6ce37","type":"server-state-changed","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin right","server":"35ed60ee.1830b","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_button.camera_jardin_right","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":130,"y":2740,"wires":[["700ea4f3fecfa32f","cc336722f838db97"]]},{"id":"700ea4f3fecfa32f","type":"api-call-service","z":"53491665e37c8348","g":"998e708357822317","name":"Caméra jardin right","server":"35ed60ee.1830b","version":5,"debugenabled":false,"domain":"frigate","service":"ptz","areaId":[],"deviceId":[],"entityId":["camera.jardin"],"data":"{\"action\":\"move\",\"argument\":\"right\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":2740,"wires":[[]]},{"id":"35ed60ee.1830b","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]
Avec une carte mushroom :
type: horizontal-stack
cards:
- type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-template-card
entity: switch.relais_sam_eclairage
layout: horizontal
- type: custom:mushroom-chips-card
chips:
- type: template
entity: input_button.camera_jardin_up
icon: mdi:arrow-up-bold-box-outline
card_mod:
style: |
ha-card {
position: absolute;
left: 60px;
top: -20px;
background: none;
--chip-background: dark-grey;
--chip-border-width: 0;
--chip-icon-size: 40px;
--chip-border-radius: 100%;
--chip-height: 64px;
}
@keyframes blink {
50% {opacity: 0;}
}
tap_action:
action: toggle
- type: template
entity: input_button.camera_jardin_down
icon: mdi:arrow-down-bold-box-outline
card_mod:
style: |
ha-card {
position: absolute;
left: 60px;
top: 80px;
background: none;
--chip-background: dark-grey;
--chip-border-width: 0;
--chip-icon-size: 40px;
--chip-border-radius: 100%;
--chip-height: 64px;
}
@keyframes blink {
50% {opacity: 0;}
}
tap_action:
action: toggle
- type: template
entity: input_button.camera_jardin_left
icon: mdi:arrow-left-bold-box-outline
card_mod:
style: |
ha-card {
position: absolute;
left: 10px;
top: 30px;
background: none;
--chip-background: dark-grey;
--chip-border-width: 0;
--chip-icon-size: 40px;
--chip-border-radius: 100%;
--chip-height: 64px;
}
@keyframes blink {
50% {opacity: 0;}
}
- type: template
entity: input_button.camera_jardin_right
icon: mdi:arrow-right-bold-box-outline
card_mod:
style: |
ha-card {
position: absolute;
left: 110px;
top: 30px;
background: none;
--chip-background: dark-grey;
--chip-border-width: 0;
--chip-icon-size: 40px;
--chip-border-radius: 100%;
--chip-height: 64px;
}
@keyframes blink {
50% {opacity: 0;}
}
- type: template
entity: input_button.camera_jardin_centrer
icon: mdi:image-filter-center-focus-strong-outline
card_mod:
style: |
ha-card {
position: absolute;
left: 60px;
top: 30px;
background: none;
--chip-background: dark-grey;
--chip-border-width: 0;
--chip-icon-size: 40px;
--chip-border-radius: 100%;
--chip-height: 64px;
}
@keyframes blink {
50% {opacity: 0;}
}
card_mod:
style:
style: |
ha-card {
height: 178px !important;
margin-left: auto;
margin-right: auto;
}
mushroom-template-chip$: |
ha-state-icon {
--chip-icon-size: 40px;
}