Very nice. I created the (almost ) exact same thing a couple of years ago, using picamera. However, Iāve never found the time to update it to the new camera library, so this is very helpful. Thanks a lot
Iāve looked at bit more at it and really like it; much more elaborate and neat than my old code. I was wondering if I could make a feature request? Support for a tilt servo. I have a RB-Moto2 controller board that can control two stepper servos. Would be lovely to be have both pan and tilt
Yes, tilt function is already planned. On the one hand it is easy to integrate a 2nd stepmotor in software e.g. for above mentioned RB-Moto2 controller board. But on the other hand I actually donāt have a good idea how construct / integrate the motor that Iām able to tilt the camera since I donāt have a 3D printer. To pan only the case like this is simple, but how to add the tilt motor here ?
But I found this Pan-Tilt HAT , I think Iāll integrate this solution. It provides a light sensor, too.
Yeah, not having access to a 3D printer can somewhat limit your designs. Drilling holes in boxes, hefty use of gluegun and the like
At my old job I had access to a really nice 3D printer and managed to get a couple of these printed out. I do also have some of those cheap pan-tilt thingies (just without the board), so would be interested in support for that too.
Very interesting project - thank you for sharing. Would it work with the āoldā picam as well ? Currently, I only have access to an old picamera and I am eager to try your client and to check, if it would fit for me.
I dontā know any restriction to older Pi Camera hardware but Raspberry Pi OS āBullseyeā or newer is required and legacy CAM support must be disabled in raspi-config.
As part of the new Open Camera System, Raspberry Pi has updated the V4L2 drivers for its v1 (OmniVision OV5647) and v2 (Sony IMX219) camera modules, developed a new HQ camera (Sony IMX477), and is working on upstreaming the Broadcom Unicam CSI-2 and ISP peripheral drivers to support libcamera.
I am trying to get it up and running. My broker runs locally on my NAS and all my sensors etc (some 20+ devices) connect to this broker. Since the only access to the outside world is by VPN, the broker has no user and pass.
When I start pi2camcrtrl.py I get the following messages:
cfgfile = ./config.json
[118:24:01.658510009] [26963] INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70
[118:24:01.804178138] [26966] INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media2 and ISP device /dev/media0
17:07:23 - INFO - configured camera model:ov5647 ,detected: 1
17:07:23 - INFO - Starting up MQTT Service picam2ctrl
17:07:23 - ERROR - [Errno 104] Connection reset by peer
Could not establish MQTT Connection! Try again 3 xtimes
17:07:26 - ERROR - SSL/TLS has already been configured.
Could not establish MQTT Connection! Try again 2 xtimes
17:07:29 - ERROR - SSL/TLS has already been configured.
Could not establish MQTT Connection! Try again 1 xtimes
17:07:29 - ERROR - Could not connect to MQTT Broker 192.168.yyy.xx exit
Mmh, I have no idea. I can connect with username + password and without username + password as well: I removed username & PW and set strings in config.json to āā - no problems. My Mosquitto MQTT Broker is running as docker container on other 2nd Raspberry. I only I didnāt verify clientkey/cert based connections.
What you can try:
double check port settings config.json with mosquito.conf
login at your Raspberry and try to āpingā brokerās ip address
i use the same configuration as joshmosh
and i get the same message,
ping is ok and config is ok
other mqtt enabled services can connectā¦ Is authorization required? Can it not use anonymous/guest communication?
Mmh, strange, for me it works fine even without user / pw. Which error is shown in the brokerās log ( mosquitto) ? What kind of broker host , Raspberry Pi, localhost ?
Super exciting! I have been playing around with Pi-TiMoLo (based on the old Picamera library) this week. I wish I had found your project. I opened an Issue on your repo about adding Topics to your repo, thatās how I found Pi-TiMoLo originally.
Iāll be testing tonight and will let you know how I go. Thanks for sharing your project
No, because you have to setup e.g. a specific IP address or file storepath which depends on your installation. But it is quite easy to create this manually , please see README at the end,chapter āHome Assistant Configurationā