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

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
Hang on. If the PCA9685 output itself is not working, then there is no point testing the transistor. Lets ensure that pca9685 board is generating 5v pwm as expected.
Can you share your reef-pi log, when you change the channel intensity ?

Before slider change:

Code:
pi@raspberrypi:~ $ sudo systemctl status reef-pi.service
● reef-pi.service - raspberry pi based reef tank controller
   Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled; vendor preset:
   Active: active (running) since Fri 2017-11-03 18:44:18 PDT; 2min 16s ago
 Main PID: 327 (reef-pi)
   CGroup: /system.slice/reef-pi.service
           └─327 /usr/bin/reef-pi -config /etc/reef-pi/config.yml

Nov 03 18:45:26 raspberrypi reef-pi[327]: 2017/11/03 18:45:26 Telemetry disabled
Nov 03 18:45:26 raspberrypi reef-pi[327]: 2017/11/03 18:45:26 Telemetry disabled
Nov 03 18:45:26 raspberrypi reef-pi[327]: 2017/11/03 18:45:26 health check: Used
Nov 03 18:45:56 raspberrypi reef-pi[327]: 2017/11/03 18:45:56 Setting value: 99
Nov 03 18:45:56 raspberrypi reef-pi[327]: 2017/11/03 18:45:56 Telemetry disabled
Nov 03 18:46:26 raspberrypi reef-pi[327]: 2017/11/03 18:46:26 Setting value: 99
Nov 03 18:46:26 raspberrypi reef-pi[327]: 2017/11/03 18:46:26 Telemetry disabled
Nov 03 18:46:26 raspberrypi reef-pi[327]: 2017/11/03 18:46:26 Telemetry disabled
Nov 03 18:46:26 raspberrypi reef-pi[327]: 2017/11/03 18:46:26 Telemetry disabled
Nov 03 18:46:26 raspberrypi reef-pi[327]: 2017/11/03 18:46:26 health check: Used


After slider change:

Code:
pi@raspberrypi:~ $ sudo systemctl status reef-pi.service
● reef-pi.service - raspberry pi based reef tank controller
   Loaded: loaded (/lib/systemd/system/reef-pi.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-11-03 18:44:18 PDT; 7min ago
 Main PID: 327 (reef-pi)
   CGroup: /system.slice/reef-pi.service
           └─327 /usr/bin/reef-pi -config /etc/reef-pi/config.yml

Nov 03 18:50:56 raspberrypi reef-pi[327]: 2017/11/03 18:50:56 Telemetry disabled. Skipping emitting 1 on kessils-channel-1
Nov 03 18:51:18 raspberrypi reef-pi[327]: 2017/11/03 18:51:18 Setting value: 1  at pin: 1
Nov 03 18:51:18 raspberrypi reef-pi[327]: 2017/11/03 18:51:18 Telemetry disabled. Skipping emitting 99 on kessils-channel-2
Nov 03 18:51:26 raspberrypi reef-pi[327]: 2017/11/03 18:51:26 Setting value: 1  at pin: 1
Nov 03 18:51:26 raspberrypi reef-pi[327]: 2017/11/03 18:51:26 Telemetry disabled. Skipping emitting 99 on kessils-channel-2
Nov 03 18:51:26 raspberrypi reef-pi[327]: 2017/11/03 18:51:26 Telemetry disabled. Skipping emitting 0.15 on system-load5
Nov 03 18:51:26 raspberrypi reef-pi[327]: 2017/11/03 18:51:26 Telemetry disabled. Skipping emitting 14.15 on system-mem-used
Nov 03 18:51:26 raspberrypi reef-pi[327]: 2017/11/03 18:51:26 health check: Used memory: 14.15  Load5: 0.15
Nov 03 18:51:27 raspberrypi reef-pi[327]: 2017/11/03 18:51:27 ERROR: Failed to detect ip for interface 'eth0. Error: Cant detect IP of interface:eth0
Nov 03 18:51:27 raspberrypi reef-pi[327]: 2017/11/03 18:51:27 ERROR: Failed to detect ip for interface 'eth0. Error: Cant detect IP of interface:eth0
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Depending on you DMM, it may not be playing that well with PWM.
I dont suppose yours has a frequency or duty cycle setting?

Another sanity check on the PCA9685 output is two wire it directly to a 5mm led with ~100ohm resistor. You should be able to watch it dim. Step it up to 470-1k range for running it off of 12V PWM.
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Another thought.
Since I don't have an oscilloscope at home....right now a spare arduino should be able to read either the PWM or filtered "analog" level from the dimmer circuit.

My light just came in today, so hopefully I can find some time soon to start messing with this.
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
Bit of an update: As far as I can tell, it's software related. Sometimes the controls "update" and one channel will work, the voltage will change as appropriate, but most of the time the settings don't take and nothing changes. Most of the time only channel 1 will work at all. Generally I'll have to make the change, update, and restart the service several times before it will take. I wondered if it was part of the cache issues I had noted earlier but its the same in chrome and edge. I've removed all the setting, deleted the DB and started over, still the same issues with a lack of control. not sure whats up. At least it appears that the circuit is correct as it does change from about 187 mV-12.69V when I can get it to respond to the slider.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Bit of an update: As far as I can tell, it's software related. Sometimes the controls "update" and one channel will work, the voltage will change as appropriate, but most of the time the settings don't take and nothing changes. Most of the time only channel 1 will work at all. Generally I'll have to make the change, update, and restart the service several times before it will take. I wondered if it was part of the cache issues I had noted earlier but its the same in chrome and edge. I've removed all the setting, deleted the DB and started over, still the same issues with a lack of control. not sure whats up. At least it appears that the circuit is correct as it does change from about 187 mV-12.69V when I can get it to respond to the slider.
I'll be testing the pwm output right now. Gimme couple of hours, and I'll update. You are using 0.8 version right?
@Ryan115 I have oscilloscope , I can cross check the signal. But this is not necessary, as I dont think its DMM related, else I would have at least encounter this once, while testing with so many Pis. Likely to be a software bug or wiring issue...
@philshel if the log is not reflecting the correct value, then it is definitely a software issue.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
Thanks no rush on my end, glad it wasn't just me being a ****. Also noted that at least on channel 2, you cannot mouse click in the "slider track" area to change values. You must mouse grab the slider "knob" and move it to get the change to take.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I have cut a new release , 0.8.1 , following updates from last release:
- Bug fix: Multi channel manual mode pwm value issue, as encountered by @philshel
- Feature: Email notification is now available for out temperature out of range, and cpu /memory high usgae... more to come
- Chore: Dashboard updates: empty charts wont appear in dashboard. Temperature charts have Y axis range from 76-82F.
Packages can be found in the release page:
https://github.com/reef-pi/reef-pi/releases/tag/0.8.1
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
I have cut a new release , 0.8.1 , following updates from last release:
- Bug fix: Multi channel manual mode pwm value issue, as encountered by @philshel
- Feature: Email notification is now available for out temperature out of range, and cpu /memory high usgae... more to come
- Chore: Dashboard updates: empty charts wont appear in dashboard. Temperature charts have Y axis range from 76-82F.
Packages can be found in the release page:
https://github.com/reef-pi/reef-pi/releases/tag/0.8.1
This is perfect timing. I was testing out the NPN circuit yesterday morning and was getting intermittent changes to the signal when using it in manual mode. I was assuming it was my circuit, or something else I wasnt accounting for.
 

njtiger aquariums

Well-Known Member
View Badges
Joined
Oct 9, 2015
Messages
513
Reaction score
519
Location
NV
Rating - 0%
0   0   0
great work on this man. Coming along nice.

Quick question have you noticed your pi not reconnecting after the wireless drop out? For example I noticed my wireless dropped out but my pi didn't reboot. My system ran normal but I was unable to hit it from the web. I checked my setting tab and noticed it had no IP listed. Before I look into a solution I was wondering if you already ran into this and have a fix?

Screen Shot 2017-11-04 at 8.49.04 AM.png
 

njtiger aquariums

Well-Known Member
View Badges
Joined
Oct 9, 2015
Messages
513
Reaction score
519
Location
NV
Rating - 0%
0   0   0
I think I might have a solution just need to fully test it out. I found this bash script and I set it to run on a cron job every min. It checks for wireless connection and if this is none then it tries to reconnect.


#!/bin/bash
if ifconfig wlan0 | grep -q "inet addr:" ; then
printf "connected"
else
ifup --force wlan0
printf "trying to connect"
fi
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
great work on this man. Coming along nice.

Quick question have you noticed your pi not reconnecting after the wireless drop out? For example I noticed my wireless dropped out but my pi didn't reboot. My system ran normal but I was unable to hit it from the web. I checked my setting tab and noticed it had no IP listed. Before I look into a solution I was wondering if you already ran into this and have a fix?

Screen Shot 2017-11-04 at 8.49.04 AM.png
Arew you using pi 2 or pi 3. Pi 2 with wifi dongle encounters this issue very frequently. I have stopped hitting this since pi 3 migration. I think if you can configure systemd to restart wifi service if ip is not assigned..
 

njtiger aquariums

Well-Known Member
View Badges
Joined
Oct 9, 2015
Messages
513
Reaction score
519
Location
NV
Rating - 0%
0   0   0
Pi 2. I used to have it happen more (why I added the reboot button to the touch screen) but it been good lately. This was the first time in about 6months and I think I was the wireless/router not the pi cause my Hue lights acted up as well.
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
Happy to report that I now appear to have a functioning lighting cycle. Thank you @Ranjib and to everyone else who offered assistance and advice. Have moved the circuit to a perfboard, now just need a temp enclosure. Still having issues with the session cookies that Reef-pi sets, Chrome is not handling them well and I have to use "incognito" mode to get anything to actually work. Also, (possibly related) I have found that I can only make one change at a time and then have to hit the "update" before making another change even if the changes are on the same page.
 
OP
OP
Ranjib

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,825
Reaction score
17,041
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Happy to report that I now appear to have a functioning lighting cycle. Thank you @Ranjib and to everyone else who offered assistance and advice. Have moved the circuit to a perfboard, now just need a temp enclosure. Still having issues with the session cookies that Reef-pi sets, Chrome is not handling them well and I have to use "incognito" mode to get anything to actually work. Also, (possibly related) I have found that I can only make one change at a time and then have to hit the "update" before making another change even if the changes are on the same page.
Hmm.. this is not supposed to happen. I'll see if I can track down the UI issues.. these are kinda hard to detect and fix, unlike the logical issue which is easy to reproduce :-/ .
 

Ryan115

Well-Known Member
View Badges
Joined
Dec 28, 2010
Messages
586
Reaction score
1,085
Location
Mississippi
Rating - 0%
0   0   0
Just upgraded from 0.6 t0 0.8.1. Full remove with purge and deleted .db
First, I really like the new interface.
However I am having a few issues, mostly with the configuration screen.
Changes will work on that screen, but seem to not implement across the rest of reef-pi.
I was able to add equipment, but I cannot remove panels. If I uncheck them, and try to reload nothing changes.
The reload and reboot buttons are doing nothing.
Also, other features are not working because I can not get out of dev-mode.

I have attempted this both in Chrome (regular and incognito) and the browser on the raspberry pi.
Am I missing something?
 

philshel

Active Member
View Badges
Joined
Jul 24, 2010
Messages
364
Reaction score
381
Rating - 0%
0   0   0
Just upgraded from 0.6 t0 0.8.1. Full remove with purge and deleted .db
First, I really like the new interface.
However I am having a few issues, mostly with the configuration screen.
Changes will work on that screen, but seem to not implement across the rest of reef-pi.
I was able to add equipment, but I cannot remove panels. If I uncheck them, and try to reload nothing changes.
The reload and reboot buttons are doing nothing.
Also, other features are not working because I can not get out of dev-mode.

I have attempted this both in Chrome (regular and incognito) and the browser on the raspberry pi.
Am I missing something?

Sounds similar the issues I was having. I found that doing a restart of reef-pi by ssh after making changes works when the reload button does not.
 

Mastering the art of locking and unlocking water pathways: What type of valves do you have on your aquarium plumbing?

  • Ball valves.

    Votes: 72 51.8%
  • Gate valves.

    Votes: 70 50.4%
  • Check valves.

    Votes: 35 25.2%
  • None.

    Votes: 31 22.3%
  • Other.

    Votes: 9 6.5%

New Posts

Back
Top