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

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
Which kind of info about the setup do you need?
Electronics (Raspberry Pi version, ICs), wiring or i2cdetect output, what version of reef-pi you are using (`reef-pi -version` will show).
And the output of `sudo journalctl -u reef-pi.service`
 

ClaudioA

New Member
View Badges
Joined
Jun 7, 2017
Messages
16
Reaction score
13
Rating - 0%
0   0   0
I don't use ds18b20 . I am currently using a coralife digital thermometer's probe (i cut off the probe from the rest and connected a barrel jack to it, if i do it again I'll go with BNC connector instead)
I have two ds18b20, one is for the water to keep trace of the temperature, but the heater is menage from external thermometer. The other ds18b20 trace the temperature of the aquarium lighting
 
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
yes, it is enable

Code:
root@raspberrypi:~# i2cdetect -y 1
  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:  -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
Ok. This is a software bug then, I think I know the fix, I just have to patch the software and rebuild it for you to test
 

ClaudioA

New Member
View Badges
Joined
Jun 7, 2017
Messages
16
Reaction score
13
Rating - 0%
0   0   0
Ok. This is a software bug then, I think I know the fix, I just have to patch the software and rebuild it for you to test
With the .deb file I have this error:
Code:
root@raspberrypi:/home/pi/reefpi# systemctl status reef-pi.service
● reef-pi.service - raspberry pi based reef tank controller
  Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled)
  Active: failed (Result: exit-code) since mer 2017-06-07 13:00:16 CEST; 2s ago
  Process: 1427 ExecStart=/usr/bin/reef-pi -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)
Main PID: 1427 (code=exited, status=1/FAILURE)

giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Initializing DB for ato_configs bucket
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Initializing DB for inlets bucket
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Initializing DB for lightings bucket
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Enabled GPIO subsystem
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Creating equipment: Return
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Setting GPIO Pin: 5 On: false State: 0
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Failed to precreate equioment: Return
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 embd: your host ": ARMv7 Processor rev 5 (v7l)" is not supported at this moment. request support at https://git.../embd/issues
giu 07 13:00:16 raspberrypi systemd[1]: reef-pi.service: main process exited, code=exited, status=1/FAILURE
giu 07 13:00:16 raspberrypi systemd[1]: Unit reef-pi.service entered failed state.

with the compiled version this one:
Code:
reef-pi.service - raspberry pi based reef tank controller
  Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled)
  Active: failed (Result: exit-code) since mer 2017-06-07 17:17:58 CEST; 1s ago
  Process: 7675 ExecStart=/usr/bin/reef-pi -config /etc/reef-pi/config.yml (code=exited, status=2)
Main PID: 7675 (code=exited, status=2)

giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/kidoman/embd.NewI2CBus(0x7efb01, 0x17, 0x10b61d80)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/kidoman/embd/i2c.go:75 +0x70
giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/ranjib/reef-pi/controller.NewPWM(0x7c0f50, 0x10b0c058, 0x1)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/controller/pwm.go:23 +0x1c
giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/ranjib/reef-pi/controller.(*State).Bootup(0x10b61b80, 0x0, 0x0)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/controller/state.go:43 +0x3bc
giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/ranjib/reef-pi/controller.(*Controller).Start(0x10b61cc0, 0x0, 0x10c085a0)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/controller/controller.go:57 +0x48
giu 07 17:17:58 raspberrypi reef-pi[7675]: main.main()
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/commands/main.go:50 +0x17c

Of course I would have other issues created during the compilation even if it did not return any errors
 

sbash

Valuable Member
View Badges
Joined
Mar 17, 2014
Messages
1,659
Reaction score
1,123
Location
Ottawa, Canada
Rating - 0%
0   0   0
I don't use ds18b20 . I am currently using a coralife digital thermometer's probe (i cut off the probe from the rest and connected a barrel jack to it, if i do it again I'll go with BNC connector instead)

Good to know, thanks... How did you connect it to the Pi? Any resistors needed, etc...
 
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
Good to know, thanks... How did you connect it to the Pi? Any resistors needed, etc...
Currently, I am experimenting with MCP3008 straight, without any resistor, and see if the values are somewhat proportional to the observed temperature. I have plan to try out ADS1115 as well,
 
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
With the .deb file I have this error:
Code:
root@raspberrypi:/home/pi/reefpi# systemctl status reef-pi.service
● reef-pi.service - raspberry pi based reef tank controller
  Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled)
  Active: failed (Result: exit-code) since mer 2017-06-07 13:00:16 CEST; 2s ago
  Process: 1427 ExecStart=/usr/bin/reef-pi -config /etc/reef-pi/config.yml (code=exited, status=1/FAILURE)
Main PID: 1427 (code=exited, status=1/FAILURE)

giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Initializing DB for ato_configs bucket
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Initializing DB for inlets bucket
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Initializing DB for lightings bucket
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Enabled GPIO subsystem
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Creating equipment: Return
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Setting GPIO Pin: 5 On: false State: 0
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 Failed to precreate equioment: Return
giu 07 13:00:16 raspberrypi reef-pi[1427]: 2017/06/07 13:00:16 embd: your host ": ARMv7 Processor rev 5 (v7l)" is not supported at this moment. request support at https://git.../embd/issues
giu 07 13:00:16 raspberrypi systemd[1]: reef-pi.service: main process exited, code=exited, status=1/FAILURE
giu 07 13:00:16 raspberrypi systemd[1]: Unit reef-pi.service entered failed state.

with the compiled version this one:
Code:
reef-pi.service - raspberry pi based reef tank controller
  Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled)
  Active: failed (Result: exit-code) since mer 2017-06-07 17:17:58 CEST; 1s ago
  Process: 7675 ExecStart=/usr/bin/reef-pi -config /etc/reef-pi/config.yml (code=exited, status=2)
Main PID: 7675 (code=exited, status=2)

giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/kidoman/embd.NewI2CBus(0x7efb01, 0x17, 0x10b61d80)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/kidoman/embd/i2c.go:75 +0x70
giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/ranjib/reef-pi/controller.NewPWM(0x7c0f50, 0x10b0c058, 0x1)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/controller/pwm.go:23 +0x1c
giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/ranjib/reef-pi/controller.(*State).Bootup(0x10b61b80, 0x0, 0x0)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/controller/state.go:43 +0x3bc
giu 07 17:17:58 raspberrypi reef-pi[7675]: github.com/ranjib/reef-pi/controller.(*Controller).Start(0x10b61cc0, 0x0, 0x10c085a0)
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/controller/controller.go:57 +0x48
giu 07 17:17:58 raspberrypi reef-pi[7675]: main.main()
giu 07 17:17:58 raspberrypi reef-pi[7675]: /Users/ranjib/gocode/src/github.com/ranjib/reef-pi/commands/main.go:50 +0x17c

Of course I would have other issues created during the compilation even if it did not return any errors
When you say compiled version, do you mean you are building the binary on your computer?
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
I am looking at using a vga cable/connectors, for interface between the (PI/display) and (relay/pwm ). Essentially the outlets, relays, and PWM control will be remote from the PI and display similar to the reef angel. Whatcha think?

I figure I could pirate the parts from an old PC.
 
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
@Ranjib
Do you have a break out of the MCP3008 connection points for pi and the probe? I have PWM and all (8) relays fired up.
You dont need a breakout board for mcp3008, the wiring is straight forward, as mentioned here . Probe one end will be with connected to the analog input, other end to 3.3 v.
It is possible that my current circuit is wrong, for the probe that I am using, some known probes like ds18b20 will solve it, but I wanted to start testing with sensor in general, so my first priority was to get the end to end integration going (i.e. a sample probe + ADC IC + reef-pi code + adafruit.io based dashbaord), which is currently present in reef-pi. I'll iterate over the implementation and fix issues as I move forward.

BTW, Im stoked to hear that you got the relay and pwm working :) pic please
 
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
I am looking at using a vga cable/connectors, for interface between the (PI/display) and (relay/pwm ). Essentially the outlets, relays, and PWM control will be remote from the PI and display similar to the reef angel. Whatcha think?

I figure I could pirate the parts from an old PC.
Awesome :) . Let me know how it goes. I am also thinking doing the reverse, i.e. make reef-pi work on pi zero, and make it a even more tinier. Display will be separate, HDMI or a dedicated Pi instance, whatever. But the actual controller will be cheaper (less than 50$) , and one can add display later if need be. They can use phone or tablet to configure reef-pi via wifi
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
You dont need a breakout board for mcp3008, the wiring is straight forward, as mentioned here . Probe one end will be with connected to the analog input, other end to 3.3 v.
It is possible that my current circuit is wrong, for the probe that I am using, some known probes like ds18b20 will solve it, but I wanted to start testing with sensor in general, so my first priority was to get the end to end integration going (i.e. a sample probe + ADC IC + reef-pi code + adafruit.io based dashbaord), which is currently present in reef-pi. I'll iterate over the implementation and fix issues as I move forward.

BTW, Im stoked to hear that you got the relay and pwm working :) pic please

Here is what I'm doing to house the relays and PWM.
c0959ae76b8b8dc99446b2bbf3f77c63.jpg


This is a pirated UPS with the electronics and battery gutted.

f4299bb134d416dbacdccd913d0248e1.jpg


New components installed

0e52ec01e364d17cbc10e11ba892b927.jpg


Battery access cover allows access to relay module

731a3b3622a9e10987978008010dfb1e.jpg


Cat5e port for PWM to lighting
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
I ended up mounting the pi on the outside of the enclosure. Both channels of PWM are dimming and all relays operate via the "equipments" tab. I have the lights working from the "jobs" tab but the relays won't respond via assigned jobs.

What needs to be entered in the "day" box for a job to run everyday?
Is an input needed for the "seconds" box?

Thanks Ranjib!
 
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
Quoting from reef-pi's documentation:

  • "day of month" represent which day of every month the job will be triggered. Values can range from 1 to 31
  • "hour" represent which hour of the day job will be triggered. Values can range from 0 to 23
  • "minute" represent which minute of the hour job will be triggered. Value can range from 0 to 59
  • "second" represent which second of the minute job will be triggered. Values can range from 0 to 59
Other than their mentioned ranges, each of this field can also take few special entries.

They are:

  • "*" represents every . Like every hour, every day etc
  • "-" to represent ranges. Example: hour can be "2-6" to trigger a job every hour from 2 to 6
  • "/" to represent after every. Example: Hour value "*/3" represents after every 3 hours
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
So the PWM control in the jobs tab works great. I can program on and off dim points for both white and blue channels. The relays don't respond in either "on" or "off" state from the jobs tab.

Another note. If you toggle a relay "off" from the equipment tab, then navigate to another tab, when you return to the equipment tab it shows all relay state as "on"

Have you done a write up on the "Lighting" tab? This is the function that I am most interested in right now. I want to do sunrise to sunset dimming for my Chinese black box. Currently I can control it via the "equipment" tab via sliders. It would be super cool if we could set up lunar cycle via location.
 

scriptmonkey

Valuable Member
View Badges
Joined
Mar 22, 2017
Messages
1,677
Reaction score
4,545
Location
Baltimore, MD
Rating - 0%
0   0   0
Here is what I'm doing to house the relays and PWM.
c0959ae76b8b8dc99446b2bbf3f77c63.jpg


This is a pirated UPS with the electronics and battery gutted.

f4299bb134d416dbacdccd913d0248e1.jpg


New components installed

0e52ec01e364d17cbc10e11ba892b927.jpg


Battery access cover allows access to relay module

731a3b3622a9e10987978008010dfb1e.jpg


Cat5e port for PWM to lighting

You sir are a genius!!!!....just wish you posted this last weekend when I took my bad battery APC to the dump to recycle it :(
 

Aaron Smith

Active Member
View Badges
Joined
Apr 9, 2017
Messages
250
Reaction score
273
Location
Oregon
Rating - 0%
0   0   0
You sir are a genius!!!!....just wish you posted this last weekend when I took my bad battery APC to the dump to recycle it :(
I grabbed 2 of them from our maintenance people before they drove them off to recycle. I literally grabbed them 15 minutes before they were gone!
 
Back
Top