To extend the cable of Raspberry Pi camera you could buy a flex ribbon extension cable like this one.
I can’t help about waterproofing the cameras, in my case i have my RPi camera outside my terrarium looking inside, but i’m also interested in updating my camera setup, even including more than one. Does Mycodo support IP cameras?
To extend the Raspberry Pi camera cable I use these adapter boards that allow you to use a standard HDMI cable in place of the ribbon cable. The ribbon cable can have very bad signal interference at lengths over 24 inches. HDMI cables are shielded and will let you place the camera 15-20 feet away with a good HDMI cable.
As far as waterproofing the camera, find a good case, try vendors who sell underwater remote vehicle and drone parts. You can also waterproof to some degree using conformal coatings, but you have to be careful not to get the coating on any connector pins, contacts, the photo sensor itself, or the lens. The biggest problems with cameras in humid environments is moisture getting inside lens assemblies and causing condensation or mold on the lens elements. The only way I know of to avoid this is to make sure the entire camera and lens are inside a water proof case (with a desiccant pack), or make sure the lens itself is rated as waterproof.
Hey, another possibility would be an old/broken waterproof smartphone - you can set it up as IP camera with quite a few apps, IPwebcam being a good starting point. The main issues with such a solution would be constant charging of the phone, hence the battery might not last long, but frankly i’ve used huawei mate 20 pro for a year nonstop and it only downgraded the battery by 6 7%.
I typically don’t bother with cases unless the board might be subject to water splashes, condensation, or excessive heat. I don’t own a 3D printer so I can’t just make a custom case whenever the mood strikes. If the board might be subject to water or condensation I usually use a spray or paint-on conformal coating to protect the electronics where needed… but it’s usually not needed for hydroponics setups. In my setup I simply screwed the HDMI adapter board to the outside of the thermal case I have on the Pi. The camera is also not in a case, the adapter board and camera are screwed to an aluminium bracket that is just clipped to my lights. They have been running like this for well over a year with no issues. I just need to dust off the camera board and clean the lens once in a while.
Aha - in my case, there will be a mistking system inside the tank/greenhouse - so there’s a chance of water splash.
Also, the humidity will be around 80% - so I’m guessing that’s not too great for electronics?
I can look into the conformal coatings - it seems there’s acrylic vs silicone ones, I’ll need to do some more research here. Also, I assume it won’t protect the connectors (e.g. CSI2, or the Ethernet ones), so I assume I’ll still need to find a case that will protect the CSI2 to Ethernet adapters.
Also - one other thing I didn’t consider - the Raspberry Pi only has a single CSI2 camera connector - so I will need to find out some way to multiplex multiple cameras to it, and still have that be supported by MyCodo.
I did look into PoE IP cameras - however, most of those are not designed for close focusing (e.g. 10-20cm - which the Raspberry Pi cameras can do), but instead from say 0.5 to 1.0m or more.