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,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
You can check temperature readings via command line using the api,
Code:
curl -u reef-pi:reef-pi http://10.0.0.10:8080/api/tc/readings
the above example assume you have reef-pi running on ip 10.0.0.10 and with username/password as 'reef-pi', you can replace those with your installation specific details.

A complete list of api is present here. When UI is not working as expected, you can use the API straight with curl to crosscheck things https://reef-pi.github.io/additional-documentation/api/ ,
just another way to troubleshoot ,
 

Brad Cox

Active Member
View Badges
Joined
Mar 18, 2017
Messages
327
Reaction score
391
Rating - 0%
0   0   0
You can check temperature readings via command line using the api,
Code:
curl -u reef-pi:reef-pi http://10.0.0.10:8080/api/tc/readings
the above example assume you have reef-pi running on ip 10.0.0.10 and with username/password as 'reef-pi', you can replace those with your installation specific details.

A complete list of api is present here. When UI is not working as expected, you can use the API straight with curl to crosscheck things https://reef-pi.github.io/additional-documentation/api/ ,
just another way to troubleshoot ,
when running that command I get [] .
this is running the correct command for my setup. username and password and correct ip.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
nope I missed that step!.

I'm using the canakit ds18b20.

does this still require a resistor?
You might have fried the probe.
I am pretty sure your probe is not detected, hence you have no graph and no temperature readings.

Here is somewhat work in progress guide: https://reef-pi.github.io/build-guides/temperature/ , the adafruit tutorial linked in the guide has more thorough.

We need a way to expose these issue with reef-pi, I'll add that in my TODO list
 

HM3105

Well-Known Member
View Badges
Joined
Nov 30, 2014
Messages
665
Reaction score
417
Location
United States
Rating - 0%
0   0   0
@Ranjib I think the outlet status on the dashboard is backwards. It's showing green for all my outlets while they are in the off state.

Another question what is the "reverse" on the outlet set up?

My timers are working backwards I think, when I told it to turn on, it turned off.
 
Last edited:
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
@Ranjib I think the outlet status on the dashboard is backwards. It's showing green for all my outlets while they are in the off state.

Another question what is the "reverse" on the outlet set up?

My timers are working backwards I think, when I told it to turn on, it turned off.
Reverse is to mimic nc or no type relays (normally open or normally closed ), depending upon how you wire the relays , reef-pi logic can work reverse. Can you enable click the reverse checkbox in reef-pi outlet setting and check if it’s working as expected ? If so, your relay is configured nc. I’ll cross check for any bug in the logic as well tonight .
 

dburg30

Community Member
View Badges
Joined
Oct 22, 2017
Messages
56
Reaction score
93
Rating - 0%
0   0   0
If you have the probe type, between the red and yellow... To elaborate.. The red goes to pin 1 on the raspberry pi (3.3v) Yellow to pin 7 (GPIO4) Black to ground (pin 9) (or yellow can goto to any 3.3 and black to any ground.. Then the resistor goes between the 3.3v and GPIO4...
 
Last edited:

HM3105

Well-Known Member
View Badges
Joined
Nov 30, 2014
Messages
665
Reaction score
417
Location
United States
Rating - 0%
0   0   0
Reverse is to mimic nc or no type relays (normally open or normally closed ), depending upon how you wire the relays , reef-pi logic can work reverse. Can you enable click the reverse checkbox in reef-pi outlet setting and check if it’s working as expected ? If so, your relay is configured nc. I’ll cross check for any bug in the logic as well tonight .

Yeah my relays are NC, so I'm not sure why would need to reverse it. However, the reef-pi does register the relay working as NC once I click the reverse button. This is only applicable to the timers and dashboard. The switches were working fine.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Yeah my relays are NC, so I'm not sure why would need to reverse it. However, the reef-pi does register the relay working as NC once I click the reverse button. This is only applicable to the timers and dashboard. The switches were working fine.
For NC relays you have to reverse it because reef-pi assumes normally open by default. This is just an assumption. The way I wire my relays, if they are not being controlled by reef-pi, they'll not pass current, i.e if reef-pi is down the equipment controlled by reef-pi will be turned off. There are reasons for doing the opposite as well, and that is why I introduced it back

There are also solid state relays, which does not allow configuring NC/NO , like the mechanical ones, they are just NO , i used couple of those type of relays also.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
If you have the probe type, between the red and yellow... To elaborate.. The red goes to pin 1 on the raspberry pi (3.3v) Yellow to pin 7 (GPIO4) Black to ground (pin 9) (or yellow can goto to any 3.3 and black to any ground.. Then the resistor goes between the 3.3v and GPIO4...
Does this help?
learn_raspberry_pi_breadboard-ic.png
 

HM3105

Well-Known Member
View Badges
Joined
Nov 30, 2014
Messages
665
Reaction score
417
Location
United States
Rating - 0%
0   0   0
For NC relays you have to reverse it because reef-pi assumes normally open by default. This is just an assumption. The way I wire my relays, if they are not being controlled by reef-pi, they'll not pass current, i.e if reef-pi is down the equipment controlled by reef-pi will be turned off. There are reasons for doing the opposite as well, and that is why I introduced it back

There are also solid state relays, which does not allow configuring NC/NO , like the mechanical ones, they are just NO , i used couple of those type of relays also.

I mispoke @Ranjib, Mine are NO. If there is no power going to the relay it will not turn the equipment on.

The issue I am running into is that I set up the outlets in reef-pi normally (i.e. reversed and not reversed). Then I set up a timer to turn them on then another to turn them off 5 minutes later. When the timer for "on" came up, nothing happened (i.e. the relay did not react, it was in the off position the whole time). When the time went to "off" the relay charged.

My dashboard also seems to be reversed. I've got red bars when the outlets are "on" and green when they're "off"
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,058
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I mispoke @Ranjib, Mine are NO. If there is no power going to the relay it will not turn the equipment on.

The issue I am running into is that I set up the outlets in reef-pi normally (i.e. reversed and not reversed). Then I set up a timer to turn them on then another to turn them off 5 minutes later. When the timer for "on" came up, nothing happened (i.e. the relay did not react, it was in the off position the whole time). When the time went to "off" the relay charged.

My dashboard also seems to be reversed. I've got red bars when the outlets are "on" and green when they're "off"
Thats interesting. I went through couple of my setup running 0.9 again, and could not reproduce this issue. Here is my dashboard, and its working as I expect,
Screen Shot 2017-11-24 at 9.30.49 PM.png



Can you do the following things, that will help me understand your setup as well as detect if theres any thing silly reef-pi is doing:
1) A pic/image of your relay wiring if possible
2) Click on one of the equipment on/off and check the corresponding log entry. For example if you have an equipment named "Light" connected to outlet "O1", which is controlled by GPIO pin 26, then when you click on "Light" -> "on", you should see reef-pi logging "Setting GPIO Pin: 26 State: 0" (command: 'sudo journalctl -fu reef-pi.service')
 

Just grow it: Have you ever added CO2 to your reef tank?

  • I currently use a CO2 with my reef tank.

    Votes: 8 6.0%
  • I don’t currently use CO2 with my reef tank, but I have in the past.

    Votes: 5 3.7%
  • I have never used CO2 with my reef tank, but I plan to in the future.

    Votes: 7 5.2%
  • I have never used CO2 with my reef tank and have no plans to in the future.

    Votes: 108 80.6%
  • Other.

    Votes: 6 4.5%
Back
Top