Thanx, I am discovering that debian server has some issues with Opi Zero Wifi interface, your fork should work on Armbian just the same right?
Yep, it is based on debian, so should be ok
I couldnt get much working on debian so I flashed up Armbian image and updated etc
setup my wifi all good, everything seems to go great up to the setup.sh - then all I get is command not found but when I ls I can see the file is there…
Can you help me work out whats going on with this?
root@orangepizero:~/AstroBox# sudo /AstroBox/setup.sh
sudo: /AstroBox/setup.sh: command not found
root@orangepizero:~/AstroBox# sudo setup.sh
sudo: setup.sh: command not found
root@orangepizero:~/AstroBox# ls
LICENSE README.md requirements_dev.txt requirements.txt run set-initial-hostname setup.sh src toInstall
root@orangepizero:~/AstroBox#
you need to clone it to root directory /
now you have it in ~/AstroBox and should be in /AstroBox
Now I saw also that I forgot to add correct rights to file setup.sh. I will fix it on my git in a minute.
UPDATE:
I made some changes to the script files. So it is better for you to clone repository one again.
so:
sudo rm ~/AstroBox -rf
cd /
sudo git clone https://github.com/bula87/AstroBox.git
sudo /AstroBox/setup.sh
seems to be some difference from from BBB to OpiZero this is what I get at the end of the setup.sh
Setting up haproxy…
Setting up local DNS
Enabling powercheck to start on bootup…
Enabling astrobox to start on bootup…
debian
Failed to disable unit: No such file or directory
Failed to disable unit: No such file or directory
then it locks up and wont respond to anything. I have to reflash the armbian image to get back in…
Hi,
This two are ok, I added 2 commands for beaglebone but if there are no such processes it is still fine.
How are you connecting your Orange Pi to router? via wifi or ethernet?
There is no VM for arm processors and unfortunately armbian doesn’t support any of my boards
You can do 2 things, on the beginning try to comment out last command from setup.sh (reboot) and without rebooting try to run astroprint manually:
sudo python -OO /AstroBox/run --config /etc/astrobox/config.yaml --host 127.0.0.1
and see if it will fail.
And other thing is, if you are able to expose your orange pi to internet I can ssh to it and check what is going on.
I am only working on this every here and there as its a family weekend and I gotta do the dad/husband thing
priorities
I dont mind letting you into the opi but I will try to get things going as you last put it first, maybe tomorow…
thanx I will PM you after I give those things a go
Oh I forgot to answer your question! I am starting with wired to my network and first thing I do is set it up to go via wifi. Same subnet and everything, I can SSH in from either just fine, then when wifi is in place and working I disconnect wired and move onto sudo apt update/upgrade and then I do your GIT CLONE.
Thanks for access to your orange pi, I already fixed your instalation, so you can start to configure your AstroBox via http at port 80
The problem was lack of python-gobject in armbian, so I just installed it and now everything should work.
I also alredy fixed setup.sh script on github, so now everything should be automagically installed.
Enjoy!
Thanx for all your help Wojtek!
I put together a set of instructions to help other newbies with this, I have tested and this does work on my Orange Pi Zero!
Use Etcher to flash this image to your microSD card (I used a 16gb kingston and I dont think you should use smaller than 8gb): Armbian_5.38_Orangepizero_Debian_stretch_next_4.14.14.img
You can get that image here:
https://www.armbian.com/orange-pi-zero/
Connect via wired lan first, then power it up!
boot up OpiZ and SSH into wired lan IP (get this from router or from ipscan tool)
Get thru the first run stuff, then these two steps:
sudo apt update - this will take 5 min or so
sudo apt upgrade - 10 to 15 min or so
once these are done, do your wifi if you want to use the wifi instead of wired ethernet. Skip if you want ethernet.
Use this command to setup wifi
sudo nmtui
once your wifi is setup shutdown the Opi and unplug the ethernet cable. Boot back up and find your new wifi IP and SSH into that.
to use the shutdown command:
shutdown now
Up to this point what you have done is pretty standard first run stuff for any Rpi, Opi, BBB etc
Download/clone AstroPrint repo with this command but CD / first to ensure your in root dir
cd /
sudo git clone https://github.com/bula87/AstroBox.git
Install/Setup with this command:
sudo /AstroBox/setup.sh
When its all done you should be able to open AstroPrint on your web browser via your Wifi IP like any other build.
No problem, I am happy that this works
One tip:
I think it is better to do installation of astroprint via ethernet cable, and during first boot of astrobox, configure wifi connection via astroprint wizard. At least it is easier for me, I hate all this console stuff on linux to connect to secure network
ok, I was not aware of being able to do the wifi stuff from the astroprint interface, no wifi on Rpi3 and thats what I am familiar with, this is my first taste of Opi zero
I will try it next time I reload it.
Hi. I did this procedure on my orange pi ONE and it all worked fine. I had to change a file to get it recognise ethernet as valid internet but that’s fine. Only thing is everytime I try to update astroprint using the update screen it gets to the checking package stage and then just says it failed. Any ideas?
Hi Dion,
When did you setup your orange pi? Astroprint team added new dependence to gstreamer plugin and it is the reason why it is failing. I already committed changes to my git repo to fix the issue. You can try to do git pull to get my new changes and run setup again.
Thanks Wojtek! however unfortunately my orange pi died last week so I decided to get a Zero. However now im having issues with that. at the very end of the procedure im getting the following…
E: Unsupported file /AstroBox/toInstall/gstreamer1.0-omx_1.2.0-1_armhf.deb given on commandline
rm: cannot remove ‘/AstroBox/toInstall/gstreamer1.0-omx_1.2.0-1_armhf.deb’: No such file or directory
Enabling powercheck to start on bootup…
Enabling astrobox to start on bootup…
debian
Failed to disable unit: No such file or directory
Failed to disable unit: No such file or directory
and then when visiting the ip on a browser I am constantly shown the ‘Your Astrobox is still booting up’ screen.
any ideas?
PS…
root@astrobox-1118:~# systemctl status astrobox.service
- astrobox.service - LSB: AstroBox
Loaded: loaded (/etc/init.d/astrobox; generated; vendor preset: enabled)
Active: active (exited) since Fri 2019-07-05 16:10:27 UTC; 17s ago
Docs: man:systemd-sysv-generator(8)
Process: 1972 ExecStop=/etc/init.d/astrobox stop (code=exited, status=0/SUCCESS)
Process: 1977 ExecStart=/etc/init.d/astrobox start (code=exited, status=0/SUCCESS)
Jul 05 16:12:01 astrobox-1118 systemd[1]: Starting LSB: AstroBox…
Jul 05 16:10:25 astrobox-1118 astrobox[1977]: Starting astrobox: astroboxFri Jul 5 16:10:25 UTC 2019
Jul 05 16:10:27 astrobox-1118 astrobox[1977]: .
Jul 05 16:10:27 astrobox-1118 systemd[1]: Started LSB: AstroBox.
looks fine but still says that its still booting.
UPDATE!
I have fixed this issue, their appeared to be some kind of variable type error when the init scrip ran.
heres how you fix it…
edit file as below…
sudo nano /AstroBox/src/astroprint/printerprofile/init.py
Press CTRL+_ to goto live 70 (input 70 and press enter)
change from this…
def merge_dict(a,b):
for key in b:
if isinstance(b[key], dict):
merge_dict(a[key], b[key])
else:
a[key] = b[key]
to this…
def merge_dict(a,b):
for key in b:
if isinstance(b[key], dict):
if isinstance(key, int):
merge_dict(a[key], b[key])
else:
a[key] = b[key]
press ctrl + X and y to save
restart astrobox (sudo service astrobox restart)
I’m not sure what you’re trying to achieve with that fix but it doesn’t seem valid. The line you added will only continue the merge if the key is an integer… Not really sure why you would want that. My guess is that the problem you had is something else and this fix just obscures it albeit it likely breaks something else.
Yes that right the error coming out from the astroprint py file was that the key must be an integer and then the program exited. So I’m making sure it is an integer.
That might be the error which probably should have been fixed in the source file being parsed not the code parsing it. What you did simply leaves out anything that’s not an integer which will not work as many settings won’t be read.
fair enough, I’m not exactly used to python so its all guesswork from me, any suggestions?
I just added this in case others tried to advice people that this approach might lead to other problems. As I have said before we don’t support the Orange Pi and don’t have any resources available to help with it at the moment