Was about to say - this is my every day life.You just described most days as a software developer![]()
@Neuk_ Feel free to shout anytime; happy to help where I can.
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
Was about to say - this is my every day life.You just described most days as a software developer![]()

UniFi Protect G4 PTZ is a high-performance pan-tilt-zoom camera with 4K, 24 FPS video streaming, 22x optical zoom, and adaptive IR LED night vision.
G4 PTZ is a superior surveillance camera for shopping centers, parking lots, airports, train stations, and other transportation hubs. Pairing G4 PTZ’s advanced optical and video technologies with UniFi Protect’s ease of use creates a unique solution for the most demanding environments. G4 PTZ comes with IP66 weatherproof casing and flexible powering options.
Features:
- 4K, 24 FPS video stream
- 22x optical zoom with F1.5 lens
- Tamper-resistant pan and tilt with servo feedback
- Multi-exposure HDR
- Adaptive IR LEDs, night vision distance up to 100 m
- Flexible power options: 802.3bt PoE++
- IP66 weatherproof rating
- Operating temperature -40˚ to + 50˚C (-40˚ to +122˚F)
- Managed by UniFi Protect software and mobile app
Look at this:HACS and Sonoff LAN are setup, looking for a way to feed the Sonoff cameras in with PTZ control but also playing around randomly with whatever I come across.

Look at this:
![]()
GitHub - AlexxIT/SonoffLAN: Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant - AlexxIT/SonoffLANgithub.com
Note the device ID is on the label on the camera, not the ID in the app.
Add those commands to your config file, I added a button for each direction below the camera feed in HA.
View attachment 952346
You will have to copy the commands for each camera.
Not to try and blow my own horn here, but I did put up a comprehensive guide on integrating Paradox with HA using a Pi Zero. No need for IP150 module. Just FWIWThanks, I am still struggling with the Paradox integration so I am going to get the camera's integrated next and then go back to the Paradox integration. What are you using for the camera feed?
Look at this:
![]()
GitHub - AlexxIT/SonoffLAN: Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant - AlexxIT/SonoffLANgithub.com
Note the device ID is on the label on the camera, not the ID in the app.
Add those commands to your config file, I added a button for each direction below the camera feed in HA.
View attachment 952346
You will have to copy the commands for each camera.
I have a long way to go from the little that I played around this eveningI had a look at the link you provided and tried to include it in my configuration and add a button but I honestly don't even know where to start so I have just tried stuff for the last hour with zero success.
This is the only thing I have done in HA so far, so I am in the same boat. Took a few hours to get this right as well.I have a long way to go from the little that I played around this eveningI had a look at the link you provided and tried to include it in my configuration and add a button but I honestly don't even know where to start so I have just tried stuff for the last hour with zero success.
script:
cam_left:
sequence:
- service: sonoff.send_command
data:
device: 'xxxxxx'
cmd: left
cam_right:
sequence:
- service: sonoff.send_command
data:
device: 'xxxxxx'
cmd: right
cam_up:
sequence:
- service: sonoff.send_command
data:
device: 'xxxxxx'
cmd: up
cam_down:
sequence:
- service: sonoff.send_command
data:
device: 'xxxxxx'
cmd: down
camera:
platform: ffmpeg
name: "Camera1"
input: (your rtsp link from the ewelink app)
type: vertical-stack
title: Camera1
cards:
- type: picture-entity
entity: camera.camera1
camera_image: camera.camera1
show_state: false
camera_view: live
- type: vertical-stack
cards:
- type: button
tap_action:
action: call-service
service: script.cam_up
entity: ''
name: Up
icon: 'mdi:arrow-up-bold'
show_state: false
show_icon: true
icon_height: 50px
- type: horizontal-stack
cards:
- type: button
tap_action:
action: call-service
service: script.cam_left
entity: ''
name: Left
icon: 'mdi:arrow-left-bold'
show_state: false
show_icon: true
icon_height: 50px
- type: button
tap_action:
action: call-service
service: script.cam_down
entity: ''
name: Down
icon: 'mdi:arrow-down-bold'
show_state: false
show_icon: true
icon_height: 50px
- type: button
tap_action:
action: call-service
service: script.cam_right
entity: ''
name: Right
icon: 'mdi:arrow-right-bold'
show_state: false
show_icon: true
icon_height: 50px
Yes there is about 8 seconds delay. I haven't tried mjpeg yet, will give it a go thanks.Isn’t ffmpeg very laggy? I found up to 10 seconds lag using it. I prefer using the mjpeg platform, if your camera supports it. It’s about as real-time as you can get, although the bit rate is much higher
Not to try and blow my own horn here, but I did put up a comprehensive guide on integrating Paradox with HA using a Pi Zero. No need for IP150 module. Just FWIW
Yes there is about 8 seconds delay. I haven't tried mjpeg yet, will give it a go thanks.
This is the only thing I have done in HA so far, so I am in the same boat. Took a few hours to get this right as well.
In your config.yaml file you need this:
The 'xxxxxx' should be the 6 digits on the back of your camera, and the name of each command (cam_left etc) will need to be unique if you have more than one camera. These are the functions that you can send to the camera for movement.Code:script: cam_left: sequence: - service: sonoff.send_command data: device: 'xxxxxx' cmd: left cam_right: sequence: - service: sonoff.send_command data: device: 'xxxxxx' cmd: right cam_up: sequence: - service: sonoff.send_command data: device: 'xxxxxx' cmd: up cam_down: sequence: - service: sonoff.send_command data: device: 'xxxxxx' cmd: down
I used the FFMPG camera feed to view the camera (this is also in your config.yaml file).
Code:camera: platform: ffmpeg name: "Camera1" input: (your rtsp link from the ewelink app)
Then in your UI you need a button or similar to call for one of these commands. I started with individual elements and built up from there.
Code:type: vertical-stack title: Camera1 cards: - type: picture-entity entity: camera.camera1 camera_image: camera.camera1 show_state: false camera_view: live - type: vertical-stack cards: - type: button tap_action: action: call-service service: script.cam_up entity: '' name: Up icon: 'mdi:arrow-up-bold' show_state: false show_icon: true icon_height: 50px - type: horizontal-stack cards: - type: button tap_action: action: call-service service: script.cam_left entity: '' name: Left icon: 'mdi:arrow-left-bold' show_state: false show_icon: true icon_height: 50px - type: button tap_action: action: call-service service: script.cam_down entity: '' name: Down icon: 'mdi:arrow-down-bold' show_state: false show_icon: true icon_height: 50px - type: button tap_action: action: call-service service: script.cam_right entity: '' name: Right icon: 'mdi:arrow-right-bold' show_state: false show_icon: true icon_height: 50px
With the UI I started with the Visual Editor then did the last changes in the code, which was easier especially for the vertical and horizontal tiles. Just make sure the names match between the config file, your entities and the UI.
This is my first attempt, if any of the more experienced users have a better way please share.

I hear you, no problem. I went the route I did because 1) I didn’t have an IP150, as the price was stupid 2) I didnt want to run Ethernet to the panel and 3) people were battling with IP150 in that it was temperamental - especially if it’s updated to recent firmware. On the other hand, the PAI setup has been rock solid the past few months even through its WiFi connectionThanks, I have the IP150 module already from when we did the initial install, so good to have it as a backup and my fiance may not like the HA interface so she can continue to use Insite Gold.
I hear you, no problem. I went the route I did because 1) I didn’t have an IP150, as the price was stupid 2) I didnt want to run Ethernet to the panel and 3) people were battling with IP150 in that it was temperamental - especially if it’s updated to recent firmware. On the other hand, the PAI setup has been rock solid the past few months even through its WiFi connection
I must admit I don’t stream the cameras directly to HA but via Blue Iris. I tried using ffmpeg to keep the camera native h264 going to the tablet viewing the cameras. That produced heavy delays (like 10 seconds). I then changed to mjpeg and it’s showing real-time (under 1 second lag, if that much).I tried both, even mjpeg is laggy for me but I presume there are a lot of variables at play?
Yeah, you have the best case scenario there for the IP150 to work. Pity it’s still temperamental. In my setup, I also still have the keypad connected as that is what the wife knows. She is slowly coming over to the HA way thoughThe IP150 and Insite Gold app can be very temperamental at times which is extremely frustrating but we have the TM70 touch screen as well for when we are at home. When we bought the house we renovated straight away so I had the fibre CPE installed in a passage cupboard along with the Paradox alarm panel and IP150, I put the HikVision NVR in there as well along with an old small screen and our main WiFi Router so only run LAN cable to the IP camera's, Apple TV in the lounge and second WiFi Router in our entertainment area at the back of the property.