reef-pi :: An opensource reef tank controller based on Raspberry Pi.

Des Westcott

Well-Known Member
View Badges
Joined
May 29, 2018
Messages
646
Reaction score
1,035
Location
Durban - South Africa
Rating - 0%
0   0   0
I got the Shelly 1PM today. It's smaller than I expected. Here's the insides if anyone else is curious. The antenna goes off to a flex pcb sticker on the top of the enclosure, so be careful if you plan to open one up.



1584319054268.png

Michael

That second picture broke me for a while. I couldn't figure out why the manufacturers would have special terminals made cut at an angle and why they would need it. Then I realised the top left corner of the blue terminal was actually out of frame of the photo :oops:
 

Badfish2too

Community Member
View Badges
Joined
Nov 12, 2018
Messages
83
Reaction score
66
Rating - 0%
0   0   0
the connector issue is a UI only issue that happens when you upgrade from 2.0 version without deleting database or if you delete a driver without deleting connector/associated equipment first. None the less, in all cases things should always reset if you delete the database and start over. Remote connection loss might be just due to the fact that reef-pi is not running, or else its something unrelated. Stop reef-pi, delete database, and start reef-pi again and if you encounter any error that way.. let us know
I did try to stop, reset database, and restart. It just keeps doing it. I might just start from scratch with the SD card and format that. But more detailed is, I start reef pi after the data reset. Activate pH on main settings. Then add the driver. Then add the connector (if it allows me, most of the time I just keep getting that error and I have to keep trying to get to that screen by waiting it starting over again), then once I get it to add the connector I enable it under the pH tab and then it crashes usually within a couple minutes. I can see the pH controller hooked up with i2cdetect
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
I did try to stop, reset database, and restart. It just keeps doing it. I might just start from scratch with the SD card and format that. But more detailed is, I start reef pi after the data reset. Activate pH on main settings. Then add the driver. Then add the connector (if it allows me, most of the time I just keep getting that error and I have to keep trying to get to that screen by waiting it starting over again), then once I get it to add the connector I enable it under the pH tab and then it crashes usually within a couple minutes. I can see the pH controller hooked up with i2cdetect
This may be due to a recent change in the driver system. Can you include log information?
Code:
sudo journalctl -fu reef-pi.service
 

Badfish2too

Community Member
View Badges
Joined
Nov 12, 2018
Messages
83
Reaction score
66
Rating - 0%
0   0   0
This was right after fresh DBwipe and added drivers and then pH sensor, then connector, then went to pH tab to add and crash

-- Logs begin at Mon 2020-03-16 01:51:40 CDT. --
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/device_manager.New(0x2108730, 0x7, 0x2108737, 0x5, 0x2108740, 0xa, 0x1000000, 0x10101, 0x101, 0x10100, ...)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/device_manager/device_manager.go:64 +0xbc
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/daemon.New(0x6a1fb4, 0x3, 0x210e580, 0x1b, 0x0, 0x0, 0x0)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:53 +0x2dc
Mar 16 14:56:11 20gal reef-pi[1937]: main.daemonize(0x210e580, 0x1b)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:15 +0x3c
Mar 16 14:56:11 20gal reef-pi[1937]: main.main()
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:94 +0x1e4
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Failed with result 'exit-code'.
 

BenB

Active Member
View Badges
Joined
Jun 11, 2019
Messages
112
Reaction score
155
Rating - 0%
0   0   0
This was right after fresh DBwipe and added drivers and then pH sensor, then connector, then went to pH tab to add and crash

-- Logs begin at Mon 2020-03-16 01:51:40 CDT. --
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/device_manager.New(0x2108730, 0x7, 0x2108737, 0x5, 0x2108740, 0xa, 0x1000000, 0x10101, 0x101, 0x10100, ...)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/device_manager/device_manager.go:64 +0xbc
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/daemon.New(0x6a1fb4, 0x3, 0x210e580, 0x1b, 0x0, 0x0, 0x0)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:53 +0x2dc
Mar 16 14:56:11 20gal reef-pi[1937]: main.daemonize(0x210e580, 0x1b)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:15 +0x3c
Mar 16 14:56:11 20gal reef-pi[1937]: main.main()
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:94 +0x1e4
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Failed with result 'exit-code'.
I think after adding the driver you first have to restart. I do that when adding a PCA9586 driver, otherwise I get errors.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
This was right after fresh DBwipe and added drivers and then pH sensor, then connector, then went to pH tab to add and crash

-- Logs begin at Mon 2020-03-16 01:51:40 CDT. --
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/device_manager.New(0x2108730, 0x7, 0x2108737, 0x5, 0x2108740, 0xa, 0x1000000, 0x10101, 0x101, 0x10100, ...)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/device_manager/device_manager.go:64 +0xbc
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/daemon.New(0x6a1fb4, 0x3, 0x210e580, 0x1b, 0x0, 0x0, 0x0)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:53 +0x2dc
Mar 16 14:56:11 20gal reef-pi[1937]: main.daemonize(0x210e580, 0x1b)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:15 +0x3c
Mar 16 14:56:11 20gal reef-pi[1937]: main.main()
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:94 +0x1e4
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Failed with result 'exit-code'.
This looks like an error that was introduced in 3.3. It has been corrected, but we have not cut a new release yet. In the meantime, I recommend downgrading to the previous version.
 

Michael Lane

Well-Known Member
View Badges
Joined
Aug 11, 2018
Messages
677
Reaction score
1,123
Rating - 0%
0   0   0
This was right after fresh DBwipe and added drivers and then pH sensor, then connector, then went to pH tab to add and crash

-- Logs begin at Mon 2020-03-16 01:51:40 CDT. --
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/device_manager.New(0x2108730, 0x7, 0x2108737, 0x5, 0x2108740, 0xa, 0x1000000, 0x10101, 0x101, 0x10100, ...)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/device_manager/device_manager.go:64 +0xbc
Mar 16 14:56:11 20gal reef-pi[1937]: github.com/reef-pi/reef-pi/controller/daemon.New(0x6a1fb4, 0x3, 0x210e580, 0x1b, 0x0, 0x0, 0x0)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/controller/daemon/reef_pi.go:53 +0x2dc
Mar 16 14:56:11 20gal reef-pi[1937]: main.daemonize(0x210e580, 0x1b)
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/daemon.go:15 +0x3c
Mar 16 14:56:11 20gal reef-pi[1937]: main.main()
Mar 16 14:56:11 20gal reef-pi[1937]: /Users/ranjib/gocode/src/github.com/reef-pi/reef-pi/commands/main.go:94 +0x1e4
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 16 14:56:11 20gal systemd[1]: reef-pi.service: Failed with result 'exit-code'.
I've published reef-pi 3.3.1, which includes a fix for this issue.

https://github.com/reef-pi/reef-pi/releases/tag/3.3.1
 

Ikk

New Member
View Badges
Joined
Oct 14, 2019
Messages
21
Reaction score
14
Rating - 0%
0   0   0
New to reef-pi. Can I get some help in connecting the Kasa HS300 to the reef pi. I downloaded the driver but I am not sure how to identify each of the power plugs and provide them names.

Thanks in advances
 

ahnuts72

Community Member
View Badges
Joined
Sep 24, 2018
Messages
30
Reaction score
50
Rating - 0%
0   0   0
Hey all I'm about to start my controller build(Ill star a thread as soon as the boards i had made get here)but i thought i would post this here so anyone could see it.
I purchased this light for my aquarium Phlizon-Dimmable-Decoration-Saltwater-Freshwater/dp/B074DRJK18/ref=sr_1_5?crid=1PWPDGSW7IQQ2 ( Freshwater at the moment) these are the long thin ones but they have the 16 inch ones as well and disassembled it to see what i would need to control it and low and behold after looking at the driver it uses 3.3 volt pwm to control dimming i also fed 3.3 volt dc into the control wire since they are just using a potentiometer and it works with straight dc as well i went up to 4.5 volts and no harm as far as i can tell.
I have hooked it up straight to the pca outputs and working great.
And it is immaculately constructed as far as wiring goes.
The 12 volt driver is being used for the fans.
The lights will also turn on and of with just the pwm signal they will turn on at 6% on my setup and they turn completely off below that.
u do seem to lose a tiny bit off brightness at the top end just going to 3.3 volt so i may look into trying it up to 5 volts after i find the data sheet on the drivers i have some level converters i may try to get it up a little
IMG_20200317_165900_0.png
IMG_20200317_165909_9.png
IMG_20200317_165918_1.png
IMG_20200317_165923_4.png
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Hey all I'm about to start my controller build(Ill star a thread as soon as the boards i had made get here)but i thought i would post this here so anyone could see it.
I purchased this light for my aquarium Phlizon-Dimmable-Decoration-Saltwater-Freshwater/dp/B074DRJK18/ref=sr_1_5?crid=1PWPDGSW7IQQ2 ( Freshwater at the moment) these are the long thin ones but they have the 16 inch ones as well and disassembled it to see what i would need to control it and low and behold after looking at the driver it uses 3.3 volt pwm to control dimming i also fed 3.3 volt dc into the control wire since they are just using a potentiometer and it works with straight dc as well i went up to 4.5 volts and no harm as far as i can tell.
I have hooked it up straight to the pca outputs and working great.
And it is immaculately constructed as far as wiring goes.
The 12 volt driver is being used for the fans.
The lights will also turn on and of with just the pwm signal they will turn on at 6% on my setup and they turn completely off below that.
u do seem to lose a tiny bit off brightness at the top end just going to 3.3 volt so i may look into trying it up to 5 volts after i find the data sheet on the drivers i have some level converters i may try to get it up a little
IMG_20200317_165900_0.png
IMG_20200317_165909_9.png
IMG_20200317_165918_1.png
IMG_20200317_165923_4.png
Thanks so much for this. I wantef to buy 2 of these because of the spectrum for a freshwater planted. With 3.3v pwm control they will hook up to my reef pi easily!!!
 

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
Hey all I'm about to start my controller build(Ill star a thread as soon as the boards i had made get here)but i thought i would post this here so anyone could see it.
I purchased this light for my aquarium Phlizon-Dimmable-Decoration-Saltwater-Freshwater/dp/B074DRJK18/ref=sr_1_5?crid=1PWPDGSW7IQQ2 ( Freshwater at the moment) these are the long thin ones but they have the 16 inch ones as well and disassembled it to see what i would need to control it and low and behold after looking at the driver it uses 3.3 volt pwm to control dimming i also fed 3.3 volt dc into the control wire since they are just using a potentiometer and it works with straight dc as well i went up to 4.5 volts and no harm as far as i can tell.
I have hooked it up straight to the pca outputs and working great.
And it is immaculately constructed as far as wiring goes.
The 12 volt driver is being used for the fans.
The lights will also turn on and of with just the pwm signal they will turn on at 6% on my setup and they turn completely off below that.
u do seem to lose a tiny bit off brightness at the top end just going to 3.3 volt so i may look into trying it up to 5 volts after i find the data sheet on the drivers i have some level converters i may try to get it up a little
IMG_20200317_165900_0.png
IMG_20200317_165909_9.png
IMG_20200317_165918_1.png
IMG_20200317_165923_4.png
What frequeny is your pca9685 set at?
Have you tried a different frequency?
Lowering the frequency may allow you to dim below 6 percent.

For an example:
At 1000hz the on time of the pulse at 6 percent is (1÷1000)×.06=.00006 or 60 microseconds.
At 200hz the on time at 6 percent is (1÷200)×.06=.0003 or 300 microseconds.

The led driver may be filtered or not a be able to "see" a short pulse of 60 microseconds but may be quick enough to see a frequency of 300 microseconds and may allow you to dim the light to a lower level.

This may be worth checking out.
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
possibly stupid question, but hey, I don't know the answer so it can't be that stupid....

So... I do not have a chiller, don't believe I need on as we tend to keep our house at or below 78 all summer.

I do have a heater and want to set an upper limit say 78.2 and lower limit of 77.8 on my tank. How do I set that up? The temperature settings don't make it clear.

Thanks in advance.
 

ahnuts72

Community Member
View Badges
Joined
Sep 24, 2018
Messages
30
Reaction score
50
Rating - 0%
0   0   0
What frequeny is your pca9685 set at?
Have you tried a different frequency?
Lowering the frequency may allow you to dim below 6 percent.

For an example:
At 1000hz the on time of the pulse at 6 percent is (1÷1000)×.06=.00006 or 60 microseconds.
At 200hz the on time at 6 percent is (1÷200)×.06=.0003 or 300 microseconds.

The led driver may be filtered or not a be able to "see" a short pulse of 60 microseconds but may be quick enough to see a frequency of 300 microseconds and may allow you to dim the light to a lower level.

This may be worth checking out.
Im running at 800hz i wasnt thinking about it being filtered inside the driver guess that makes sense since it will accept both pwm and dc im just now starting to get back into my electronics hobby and this gave me a good excuse to dust off the 2467 and the tm506.
I will try to lower it when i get everything put together i broke it all down as the boards i had made from Michael's schematics will be here friday and then i will have everything to assemble it this weekend Im
using www.amazon.com/Pyle-Pro-PDBC10-Outlet-Supply-Center/dp/B0037GPLOE as my power center the wiring is a tad small 20 gauge but it is easily changed and probably enough room in this thing to put the pi and everything inside so for 28 dollars not to bad.





IMG_20200317_202833_8.png
.
Screenshot (39).png
 
Last edited:

Bigtrout

Valuable Member
View Badges
Joined
Dec 16, 2018
Messages
1,189
Reaction score
2,826
Rating - 0%
0   0   0
possibly stupid question, but hey, I don't know the answer so it can't be that stupid....

So... I do not have a chiller, don't believe I need on as we tend to keep our house at or below 78 all summer.

I do have a heater and want to set an upper limit say 78.2 and lower limit of 77.8 on my tank. How do I set that up? The temperature settings don't make it clear.

Thanks in advance.
Welcome to Reef2reef.

First off start a build thread as answers in this thread can get lost sometimes.

To keep my tank at 79 with a max temp of 79.2 degrees I set the heater threshold to 79 and hysteresis to .2

On these settings my 75 gallon stays between 78.9 and 79.2 degrees at a room temp of 70 degrees. This is with a 300 watt heater.

You may have to play around with this because of tank size...heater size and room temperature
 

GaryE

Well-Known Member
View Badges
Joined
Mar 12, 2020
Messages
992
Reaction score
1,385
Location
Coatesville, Indiana
Rating - 0%
0   0   0
Welcome to Reef2reef.

First off start a build thread as answers in this thread can get lost sometimes.

To keep my tank at 79 with a max temp of 79.2 degrees I set the heater threshold to 79 and hysteresis to .2

On these settings my 75 gallon stays between 78.9 and 79.2 degrees at a room temp of 70 degrees. This is with a 300 watt heater.

You may have to play around with this because of tank size...heater size and room temperature
I also have a 75. I'll try those settings and see how it works.. Thanks for the quick reply.
 

Matt Carden

Valuable Member
View Badges
Joined
Apr 13, 2018
Messages
1,647
Reaction score
4,086
Location
Detroit Metro
Rating - 0%
0   0   0
Something to remember when wiring Alternating Current (AC) - 120V in the USA, 220V where I live. The positive and negative (Hot and Negative) switch polarity according to the Frequency (Hertz value). 60Hz here and (I think??) 50Hz in the USA. So actually, the positive and negative connections don't really matter as these are switching polarity between themselves 50 / 60 times a second.

HOWEVER, it is good practice to adhere to a convention so that anyone else that comes and works on your stuff can easily figure out how the circuits are made up.

The one NON-NEGOTIABLE is the Earth / Ground wire. The must only be joined to other Earths and to Earth points / connections
Big Trout is right that there is only one hot wire (black) and the other 2 are connected to ground.
 

ahnuts72

Community Member
View Badges
Joined
Sep 24, 2018
Messages
30
Reaction score
50
Rating - 0%
0   0   0
I just hooked them up again @Bigtrout and i am getting 3.3 volts almost exactly till i turn on the pot it has a switch as well built in but after the voltage goes up to around 4.5/4.7 volts at full brightness but i was trying to get the reading trying to hold the probes and the switch at the same time and they have a conformal coating so might not be perfectly accurate because u cant open the housing up all the way unless you unplug the pots..

Anything below 400mv they turn off.

When hooked up to the pot when u click it on they come on at around 6 to 10% and don't go any lower that is the bottom of the pot before it switches off.

I cant find a datasheet anywhere on the drivers i will try to remember to pull one of the drivers apart this weekend so we can get a look at the inside.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
New to reef-pi. Can I get some help in connecting the Kasa HS300 to the reef pi. I downloaded the driver but I am not sure how to identify each of the power plugs and provide them names.

Thanks in advances
welcome to reef2reef and thank you for trying out reef-pi.
Now, onto hs300 setup
- Go to Configuration -> Drivers section and add a new driver with type "hs300" and provide ip:port as addresss. Port should be 9999. IP you can get from your wifi router.
- Go to connector section and create 6 new outlet and analog inputs. You can name them whatever you want. I prefer to use Plug1 -> Plug6 to reflect Kasa's original naming. Associate them with pin 0 to 5 for plug1 to plug 6.
- After that you can create equipment and associate them with relevant outlets. You can also create fake ph probes and associate them with the corresponding analog input to chart current usage (in Amps)

This is probably the third time im writing these steps down :-( , i really need some help to update the adafruit guides
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top