Reef Pi - Help

Discussion in 'Do It Yourself (DIY)' started by ReefLuck1123, Jul 2, 2019.

  1. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    First post, hope this hits the right place. I'm getting this error on my reef-pi...

    7/2/2019, 12:26:58 PM UI ERROR {"error":"Failed to create. Error: write /sys/class/pwm/pwmchip0/pwm0/period: invalid argument"} | HTTP 500

    I haven't made it past the testing portion to check that my led dims... What am I missing here? I have a pretty limited understanding of this circuitry. Any help is appreciated!
     
    Ranjib likes this.

  2. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    If I check the HTTPS box, I can't seem to reconnect to reef-pi either, my browser just says there's no connection to that site but connects to others. I'm using hostname.local (with my actual "hostname" reef-bud) over wifi. If I disconnect from wifi I also can not access reef-pi UI while directly connected (not headless....?) Sorry, I'm trying to understand new lingo here.
     
  3. crusso1993

    crusso1993 Valuable Member Partner Member 2019 Hospitality Award

    Joined:
    Oct 21, 2018
    Messages:
    3,561
    Likes Received:
    18,651
    Location:
    Chicago, IL, USA
    Last edited: Jul 2, 2019
    ReefLuck1123, Ranjib and saltyhog like this.
  4. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    Thank you crusso, for the welcome & turning on the "bat signal", much appreciated!
     
  5. DirtDiggler2823

    DirtDiggler2823 Valuable Member R2R Supporter Delaware Reef Club Build Thread Contributor

    Joined:
    Jul 31, 2018
    Messages:
    1,407
    Likes Received:
    1,827
    Location:
    Gambrills
    If you can get back into the machine, leave the https box unchecked. Also, what lights are you using? Some lights require an adaptor to work correctly.
     
    ReefLuck1123, Ranjib and crusso1993 like this.
  6. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    I ended up resetting the database & starting over, leaving the https box unchecked this time. How can I back up the database for future issues? I've tried to copy it (in raspbian gui) & I get an error that it can't open it. After doing that I was able to keep rocking, but I'd like to secure this connection still.

    I don't have this on my reef tank yet, just testing it out for the first time. I was following the guides on ada fruit and was unable to successfully complete the led test for the pwm/lighting control part of the guide. (I have 1 green led on a breadboard that came with a raspberry 3b+ starter kit) I wired up the blinking led to test out the equipment just fine, I am confident I have the circuit correct for the pwm test, yet I get this error...

    ERROR {"error":"Failed to create. Error: write /sys/class/pwm/pwmchip0/pwm0/period: invalid argument"} | HTTP 500

    ...when I try to create a jack for pin 0.

    I have limited experience, but I have walked thru the guides to get to this point & a little more to get a temp probe & vnc working. But, as I was typing this, I've lost connection to reef-pi again... I'm getting an "unable to connect" thru firefox esr...
     
    crusso1993 and Ranjib like this.
  7. Ranjib

    Ranjib Valuable Member R2R Supporter R2R Excellence Award Reef Squad Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    6,653
    Likes Received:
    11,407
    Location:
    Palo Alto, Bay Area
    What version of reef-pi you are using? Theres known bug, which can cause this when you update the rpi pwm frequency. Reboot should resolve this, as long as the pwm freq is set to something invalid.
     
    ReefLuck1123 and crusso1993 like this.
  8. Ranjib

    Ranjib Valuable Member R2R Supporter R2R Excellence Award Reef Squad Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    6,653
    Likes Received:
    11,407
    Location:
    Palo Alto, Bay Area
    stop reef-pi before you copy/move the database,
    Code:
    sudo systemctl stop reef-pi.service
    sudo cp /var/lib/reef-pi/reef-pi.db /home/pi
    sudo systemctl start reef-pi.service
    
    And a warm welcome to reef2reef :)
     
    ReefLuck1123 and crusso1993 like this.
  9. Ranjib

    Ranjib Valuable Member R2R Supporter R2R Excellence Award Reef Squad Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    6,653
    Likes Received:
    11,407
    Location:
    Palo Alto, Bay Area
    regarding the http thing, when you enable https and dont update the address (ip:port), that leaves reef-pi running in https mode while using the normal http port (80), As a result you have to access it like this: https://<your reef-pi ip>:80 . If you change the address to "0.0.0.0:443" , than this should be fixed and you can access reef-pi with just "https://reef-pi-ip" .
     
    ReefLuck1123 and crusso1993 like this.
  10. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    I'm using 2.4 on a pi 3B+. Is there a safe freq to set it at while testing?
     
    Ranjib likes this.
  11. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    I'm using 2.4 on a pi 3B+. Is there a safe freq to set it at while testing?
     
    Ranjib likes this.
  12. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    Ok, thank you for the clarification!
     
    Ranjib and crusso1993 like this.
  13. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    Thanks again Ranjib, your expertise is a welcome sight for someone new to all of this!
     
    Ranjib and crusso1993 like this.
  14. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    So I reset the database and put in the proper address for https, all good there. I have access to reef-pi again. While I was rebuilding, I got the same error for the PWM after creating a new jack for it. Is this due to using 2.4, and should I upgrade to 3.0?

    If so, do I save the work I've done to rebuild it by copying the database file like above?
     
    Ranjib likes this.
  15. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    Installed the next version, putting in my specs and so far so good! No more errors & working led, thanks for the assistance & warm welcome every one!
     
    Ranjib, Michael Lane and crusso1993 like this.
  16. Ranjib

    Ranjib Valuable Member R2R Supporter R2R Excellence Award Reef Squad Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    6,653
    Likes Received:
    11,407
    Location:
    Palo Alto, Bay Area
    Sorry for getting back late. How are things going ? Let us know if you need any help
     
    ReefLuck1123 likes this.
  17. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    Hey thanks for asking, it's coming along. I have gathered more parts for the build & wanted to go with a pi zero wh. After downloading the latest release onto the 3b+ I was back on track, thanks again for that. I am having a hard time updating the pi zero using the command line. Could you post what I should type there exactly, for the zero? Sorry, I'm out of my element here & your help is appreciated here. What you guys are doing here is quite admirable.
     
    crusso1993 and Ranjib like this.
  18. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    Alright I've figured my way thru by using the browser on the Rpi zero itself to download the latest release & install it. I actually didn't expect it to be that easy. I'm still curious about using the command line instead & what I would have to punch in there. So, I'm back to square one on filling in connectors, equipment etc but I'm getting that part down if nothing else lol. This has been a fun challenge to learn!
     
    Ranjib, crusso1993 and Michael Lane like this.
  19. Ryan115

    Ryan115 Well-Known Member

    Joined:
    Dec 28, 2010
    Messages:
    569
    Likes Received:
    1,063
    Location:
    Mississippi
    You said that you used the browser on the pi zero? Are you running the fill install with the Raspbian GUI? If so, it is recommended to run on the lite version of Raspbian when running on the zero, as it can be too much for that system to do both the GUI and reef-pi.
     
    Michael Lane likes this.
  20. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    I'm going to say yes... It's raspbian buster with desktop, but not including recommended software.
     
    Ranjib likes this.
  21. ReefLuck1123

    ReefLuck1123 Member

    Joined:
    Jul 1, 2019
    Messages:
    15
    Likes Received:
    26
    @Ryan115 Do you know the line of code to punch into the command prompt for updating without the browser?
     
Draft saved Draft deleted