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

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
I have also disabled the adafruit.io integration, as from the errors it appears you have reached the free account limit. I have triggered a reboot. Can you check if the pwm error is still there?
Hi, same problem, same error, can be version of raspbian? I installed lite version
1555196783981.jpeg
 
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
Hi, same problem, same error, can be version of raspbian? I installed lite version
1555196783981.jpeg
Can you check the content of that folder ? /sys/class/pwm/.../period and duty_cycle . I’ll try to reproduce it tonight .
 

ChrisNH

Active Member
View Badges
Joined
Mar 21, 2019
Messages
305
Reaction score
254
Rating - 0%
0   0   0
Is this what you are looking for:

Code:
pi@reefpi:/sys/class/pwm/pwmchip0/pwm0 $ ls -l
total 0
-r--r--r-- 1 root root 4096 Apr 14 20:58 capture
-rw-r--r-- 1 root root 4096 Apr 14 20:58 duty_cycle
-rw-r--r-- 1 root root 4096 Apr 14 20:58 enable
-rw-r--r-- 1 root root 4096 Apr 12 17:06 period
-rw-r--r-- 1 root root 4096 Apr 14 20:58 polarity
drwxr-xr-x 2 root root    0 Apr 14 20:58 power
-rw-r--r-- 1 root root 4096 Apr 14 20:58 uevent

They are files. With mine both are files that contain "0"

The log error is
Code:
Apr 14 20:57:08 reefpi reef-pi[294]: 2019/04/14 20:57:08 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argument

I thought when I had looked before that the kernel version was 4.9 something but since the reinstall I am getting 4.14.98-v7+

I also went through the cycle of creating the jack, restarting, creating my light, etc.. to no avail.
 
Last edited:
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
Got a handful of things done this weekend. RAP was awesome. Tank in it’s full glory after today’s water change
7FCE0C4B-473A-479F-86FD-64340AAF63CE.jpeg


Testing out the pico base boards ph driver (Learning should be equally applicable to ph board as well ) . More on that later ..
Got a few things done on The model railroad layout as well. Rock wall , where reef tank will be located is done
2DC71CB1-8123-4B9B-AE4C-19A5C52D0F80.jpeg

Grass cover is finished as well
90130C10-9A22-4E9A-B99A-E55E5C705813.jpeg

Here is how it will look (tentatively )
AC400C5F-5394-4913-B5F5-E0FBC2CC9140.jpeg


Had to readjust the maker beam based stand (thank you @rushbattle for sponsoring this :) , again)
D9A32F01-47B8-4A89-8A10-C1B062300005.jpeg


Sunday evening was spend bursting bubble :)
CF955858-E543-4740-A9D4-7D9F8C6BA182.jpeg
 

bishoptf

Valuable Member
View Badges
Joined
Jan 1, 2019
Messages
1,344
Reaction score
1,720
Location
Missouri
Rating - 0%
0   0   0
Got a handful of things done this weekend. RAP was awesome. Tank in it’s full glory after today’s water change
7FCE0C4B-473A-479F-86FD-64340AAF63CE.jpeg


Testing out the pico base boards ph driver (Learning should be equally applicable to ph board as well ) . More on that later ..
Got a few things done on The model railroad layout as well. Rock wall , where reef tank will be located is done
2DC71CB1-8123-4B9B-AE4C-19A5C52D0F80.jpeg

Grass cover is finished as well
90130C10-9A22-4E9A-B99A-E55E5C705813.jpeg

Here is how it will look (tentatively )
AC400C5F-5394-4913-B5F5-E0FBC2CC9140.jpeg


Had to readjust the maker beam based stand (thank you @rushbattle for sponsoring this :) , again)
D9A32F01-47B8-4A89-8A10-C1B062300005.jpeg


Sunday evening was spend bursting bubble :)
CF955858-E543-4740-A9D4-7D9F8C6BA182.jpeg



Bursting bubbles are the Best, cute picture, best one yet!!! :)
 

Young_Reefer

Community Member
View Badges
Joined
Jan 4, 2019
Messages
42
Reaction score
42
Location
Nashville
Rating - 0%
0   0   0
@Ranjib Turns our the Koralia Nano 12V is a 12V AC motor... I’ve got it running on a 12V AC transformer and plugged into an outlet. Alternating on and off every 10 seconds... guess we’ll see how long it lasts. I got the DROK motor controller to work too so I may buy a 12 V DC Pump and implement an ATO. Lots of head scratching this weekend haha
 
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
@Ranjib Turns our the Koralia Nano 12V is a 12V AC motor... I’ve got it running on a 12V AC transformer and plugged into an outlet. Alternating on and off every 10 seconds... guess we’ll see how long it lasts. I got the DROK motor controller to work too so I may buy a 12 V DC Pump and implement an ATO. Lots of head scratching this weekend haha
see.. i told ya :-/ . I did extensive research while working on the wave maker stuff. And my conclusion was we can do jebao or gyre style controls, but given most gyre comes with its own controller, i felt this is not probably the most important thing, and dropped wavemaker from 2.0 priority list.
But I'll get back to this, I have a BLDC unit and a few power heads... its just i want to wrap up the pH stuff first, its been pending for really long time.
 
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
Is this what you are looking for:

Code:
pi@reefpi:/sys/class/pwm/pwmchip0/pwm0 $ ls -l
total 0
-r--r--r-- 1 root root 4096 Apr 14 20:58 capture
-rw-r--r-- 1 root root 4096 Apr 14 20:58 duty_cycle
-rw-r--r-- 1 root root 4096 Apr 14 20:58 enable
-rw-r--r-- 1 root root 4096 Apr 12 17:06 period
-rw-r--r-- 1 root root 4096 Apr 14 20:58 polarity
drwxr-xr-x 2 root root    0 Apr 14 20:58 power
-rw-r--r-- 1 root root 4096 Apr 14 20:58 uevent

They are files. With mine both are files that contain "0"

The log error is
Code:
Apr 14 20:57:08 reefpi reef-pi[294]: 2019/04/14 20:57:08 ERROR: lighting-subsystem: Failed to set pwm value. Error: write /sys/class/pwm/pwmchip0/pwm0/duty_cycle: invalid argument

I thought when I had looked before that the kernel version was 4.9 something but since the reinstall I am getting 4.14.98-v7+

I also went through the cycle of creating, the jack, restarting, creating my light, etc.. to no avail.
Your issue is not related to raspbian or linux. This is something related to reef-pi or the way we are setting the frequency (hard to say , I am not able to reproduce this). can you manually set the frequency. Run this as root.
Code:
echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle

and reload reef-pi.
Im really sorry for the trouble, I understand this can be frustrating :-/
 
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
Its been almost two weeks since I rolled out the prometheus integration. That has opened up lot more powerful graphing, charting possibilities with grafana and promql. I am using it for a host of usecases. Here is one, comparing two ds18b20 in my garage (not tank), two week pattern:
Screen Shot 2019-04-14 at 10.31.17 PM.png


They are fairly close, here is a more detailed snapshot
Screen Shot 2019-04-14 at 10.31.37 PM.png

The reading difference is almost 0.3 F . Not too bad for aquarium use cases. It will be interesting to see how calibration impacts this, in future.
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
Your issue is not related to raspbian or linux. This is something related to reef-pi or the way we are setting the frequency (hard to say , I am not able to reproduce this). can you manually set the frequency. Run this as root.
Code:
echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle

and reload reef-pi.
Im really sorry for the trouble, I understand this can be frustrating :-/
Hi again, i have tried to modify the file duty_cycle and when saving says: error writing duty_cycle: invalif argument
1555333965497.jpeg
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
and in the console with root
root@raspberrypi:/sys/class/pwm/pwmchip0/pwm0# echo 10000000 > duty_cycle
bash: echo: write error: Invalid argument
 

ChrisNH

Active Member
View Badges
Joined
Mar 21, 2019
Messages
305
Reaction score
254
Rating - 0%
0   0   0
So the plot thickens..

When I try run the line provided above I got a permissions issue which really shouldn't happen with pi and sudo.

I opened it with pico using sudo and when I try to save I get:

[ Error writing /sys/class/pwm/pwmchip0/pwm0/duty_cycle: Invalid argument ]

I also tried stopping the reef-pi service and that did not help.

So something is preventing us from updating the file.

Im really sorry for the trouble, I understand this can be frustrating :-/

No worries at all, we appreciate the work that went into this and the ongoing support. It is the nature of Pi projects to have occasional problems!
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
So the plot thickens..

When I try run the line provided above I got a permissions issue which really shouldn't happen with pi and sudo.

I opened it with pico using sudo and when I try to save I get:

[ Error writing /sys/class/pwm/pwmchip0/pwm0/duty_cycle: Invalid argument ]

I also tried stopping the reef-pi service and that did not help.

So something is preventing us from updating the file.



No worries at all, we appreciate the work that went into this and the ongoing support. It is the nature of Pi projects to have occasional problems!
if change permissions same problem:
pi@raspberrypi:/sys/class/pwm/pwmchip0/pwm0 $ sudo chmod 777 duty_cycle
pi@raspberrypi:/sys/class/pwm/pwmchip0/pwm0 $ ls
capture duty_cycle enable period polarity power uevent
pi@raspberrypi:/sys/class/pwm/pwmchip0/pwm0 $ sudo echo 10000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo: write error: Invalid argument
 

trackerit

Community Member
View Badges
Joined
Apr 11, 2019
Messages
71
Reaction score
137
Rating - 0%
0   0   0
ok, i try the version 2.2 of reef-pi and work fine, but with
So the plot thickens..

When I try run the line provided above I got a permissions issue which really shouldn't happen with pi and sudo.

I opened it with pico using sudo and when I try to save I get:

[ Error writing /sys/class/pwm/pwmchip0/pwm0/duty_cycle: Invalid argument ]

I also tried stopping the reef-pi service and that did not help.

So something is preventing us from updating the file.



No worries at all, we appreciate the work that went into this and the ongoing support. It is the nature of Pi projects to have occasional problems!

I installed version 2.2 and it works perfect, but ne 2.3 continues the problem
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,941
Reaction score
3,329
Location
Sacramento, CA area
Rating - 0%
0   0   0
@theatrus ^^ I suspect reef-pi/rpi pwm changes

Quite likely. It’s possible the kernel driver gets in a weird state, hence the invalid argument error. The various knobs have to be knobbed in a specific order.

If you get in the state, try rebooting the whole Pi (reboot, not reload).
 

A worm with high fashion and practical utility: Have you ever kept feather dusters in your reef aquarium?

  • I currently have feather dusters in my tank.

    Votes: 76 38.0%
  • Not currently, but I have had feather dusters in my tank in the past.

    Votes: 68 34.0%
  • I have not had feather dusters, but I hope to in the future.

    Votes: 25 12.5%
  • I have no plans to have feather dusters in my tank.

    Votes: 29 14.5%
  • Other.

    Votes: 2 1.0%
Back
Top