# Raspberry Pi vivarium monitor and controller with web interface.



## danieldean (Apr 29, 2020)

Hi,

I got concerned about going to work and leaving my two young toads without any supervision. I realise they would most likely be fine for a few hours but I wanted to check in on them...

Naturally this gave me an excuse to play around with a Raspberry Pi. Over the past few months I built a coded my solution which can do the following:


Log tempreture and humidity
Switch a heater, mister and fan on or off depending on temperature and/or humidity
Turn a light on and off on a schedule
Show a live camera feed
All usable over the web
Low and high temperature, low humidity, and time schedules can be updated remotely
Manual override - heaters, mister, fan and light can be turned on and off remotely

It can be found on my GitHub here:

https://github.com/danieldean/Vivarium_CTRL

Depending camera used it costs around £70 to £90. I have a night vision camera which makes my setup around £90.

This is a fairly niche solution and a bit overkill but I thought it may interest some of you.

Happy to provide help if anyone wants to give it a go.

Daniel


----------



## mikeymopar (Dec 21, 2020)

Very nice and well laid out in your GitHub. Thanks for sharing!


----------



## Malc (Oct 27, 2009)

Excellent project, but just be mindful that given it switches mains supply and runs heaters, should someone build one and for whatever reason it causes an issue (fire or death of an animal) you as the developer are personally liable in the eyes of the law, more so if you ever developed this into a custom plug in board and sold them... Hence why I never took my multi-channel thermostat project to market


----------



## mikeymopar (Dec 21, 2020)

He's safe, like the other thousands of on-line electronics projects, should someone take it upon themself to attempt to replicate his "project". But like you stated, should he actually sell manufactured units and he gets certification from the applicable review center (UL or CE) then he is responsible.


----------



## Malc (Oct 27, 2009)

mikeymopar said:


> But like you stated, should he actually sell manufactured units and he gets certification from the applicable review center (UL or CE) then he is responsible.


That's the thing... to CE mark a device or product it's done by the person / company making the item, not a review board. However there are set standards that cover things such as low voltage (sub 50v), high voltage (50v+) and electro-emissions (radio interference) that stipulate the requirements that any device such as this would have to comply with. It's down to the individual / company to have their devices tested at these institutions and only once passed can they safely mark the device. With these test costing around £7K each, it makes marketing any niche products costly. 

Granted anyone could mark an item with the CE mark without doing said tests and sell it, but if it kept knocking out your DAB or if it caught fire and it was found that the device didn't comply with the standards then you would find yourself in court. 

Yes there are 1000's of electronic projects available for download, but I still wonder if a simple " no responsibility" statement would hold up in a court of law... assuming you could trace the originator and get a summons issued.

You probably find though that some of these DIY projects (mine included) have more safety protection than current products on the market. For example my multi-channel stat poles each digital temperature sensor and if it doesn't receive the checksum back sounds an alarm, and disables the output to the heater. If the temperature exceeds a user programmable threshold the alarm is sounded and the output is disabled... if the temperature continues to increase (in the rare case the SSR has latched on for any reason) then a secondary SSR cuts the supply to all outputs. In the 11 years of developing this I've never had an SSR fail in the closed position, if they do fail it has been in the open position, and it's been the low temperature threshold that triggered the alarm.


----------



## danieldean (Apr 29, 2020)

Anything touching mains power should be an existing product and is using a commercial RF plug bank which I did not make. Everything else, i.e. the bits I put together, is connected to the Raspberry Pi and is USB voltage at most and harmless.

It is all licensed under the MIT License which makes it pretty clear you are on your own should anything go wrong.


----------



## Malc (Oct 27, 2009)

danieldean said:


> Anything touching mains power should be an existing product and is using a commercial RF plug bank which I did not make. Everything else, i.e. the bits I put together, is connected to the Raspberry Pi and is USB voltage at most and harmless.
> 
> It is all licensed under the MIT License which makes it pretty clear you are on your own should anything go wrong.


In theory it sounds good... if in a scenario you found yourself in front of a judge, showing that you used a wireless interface to the mains supply would be in your favour. However the MIT licence gives people permission to use the code, drawings, and related files, such as the gerbers for a PCB, not a statement of compliance or liability. Also, being US based may be overridden by any laws in other countries, however the fact such a project is open source, and has been put together from readily available modules and is aimed at the hobbyist would be taken into account.

Anyway, it's a nice interesting project and thanks for sharing.


----------



## danieldean (Apr 29, 2020)

Malc said:


> danieldean said:
> 
> 
> > Anything touching mains power should be an existing product and is using a commercial RF plug bank which I did not make. Everything else, i.e. the bits I put together, is connected to the Raspberry Pi and is USB voltage at most and harmless.
> ...


I get where your coming from but this is a set of instructions not a product.

The MIT License does include limitations on liability a warrenty. Though it is from a US institution it is used by the UK Gov so I am fairly confident it stands up to scrutiny.


----------

