Astroprint on Orange Pi Zero

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

:slight_smile: 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