Problem getting the UI to work, PFC2


#1

Hi,

I’ve been having some issues with getting the openag_ui to work on my Raspberry Pi. When I tried to install the UI following the instructions on the github, nodejs/npm doesn’t seem to install properly. For some reason npm doesn’t install along with nodejs and when I manually try installing npm, it gives me errors and warnings when I’m installing the openag_ui (All errors/warnings are about the version of nodejs and npm I’m running). Manually trying to remove both and reinstalling doesn’t seem to change anything.

I’ve also tried to launch the UI with this here http://openaginitiative.github.io/openag_ui/ but I was never able to press save so far (it’s greyed out, even though name and web are filled in and are correct)

Does anyone have any advice how I should try to resolve this issue or had this problem in the past? I’ve tried with both the 2017-06-21 and 2017-07-05 version of Raspbian Jessie so far with the development version of openag_brain (dockers doesn’t seem to be working for some reason, “Unable to locate package docker-hypriot” along with another package it can’t find).

Thanks in advance!

Riggi.


#2

Update:

This morning I decided to mess around with the online openag_ui a bit more and I finally decided to check the code/console and stuff in Google Chrome. It seems like once it found the IP adress, the following error shows up in the console:

main.js:22040 Database has a global failure DOMException
guardedConsole @ main.js:22040
idb.onabort @ main.js:13509
main.js:12118 Uncaught (in promise) DOMException: Failed to execute ‘transaction’ on ‘IDBDatabase’: The database connection is closing.
at openTransactionSafely (http://openaginitiative.github.io/openag_ui/scripts/main.js:12118:16)
at PouchDB.api._getLocal (http://openaginitiative.github.io/openag_ui/scripts/main.js:13296:21)
at PouchDB. (http://openaginitiative.github.io/openag_ui/scripts/main.js:17840:17)
at PouchDB. (http://openaginitiative.github.io/openag_ui/scripts/main.js:21768:21)
at PouchDB. (http://openaginitiative.github.io/openag_ui/scripts/main.js:15:18)
at http://openaginitiative.github.io/openag_ui/scripts/main.js:21705:21
at new Promise ()
at PouchDB. (http://openaginitiative.github.io/openag_ui/scripts/main.js:21692:19)
at PouchDB.get (http://openaginitiative.github.io/openag_ui/scripts/main.js:15:18)
at updateCheckpoint (http://openaginitiative.github.io/openag_ui/scripts/main.js:16334:13)

Any of you have any idea what’s causing this error?

Riggi.


#3

Update update:

I tried to install the nodejs once more and I found the culprit. It seems like because the time and date were way off on my Raspberry Pi, “curl” commands never verified. I also installed nodejs in root access/super user and it seems like it’s working now. The webbrowser here http://openaginitiative.github.io/openag_ui/ still doesn’t work though so I’m still not sure what’s up with that.

Hope this will help someone :slight_smile:

Riggi.


#4

@Riggi take a look at this thread and see if it helps. You may have to use a rosrun command to initialize the creation of the database.

Also, the web address to test locally should be

http://localhost:5984/app/_design/app/_rewrite


#5

Hi @ekoziol, thanks for the reply. I am running that command without the --screen though, although it doesn’t seem to make a difference. I got the web adress to test locally working yesterday. Now it’s just that the other one that doesn’t seem to be working, although I don’t think it’s that big of an issue?

Here are some screenshots of both. The local one is rather empty now though as there are currently no sensors connected.


#6

@Riggi you need to run the following in the command line

rosrun openag_brain main personal_food_computer_v2.launch

That will startup the openag process. I’m assuming you installed via the setup here https://wiki.openag.media.mit.edu/contributors/rob.baynes/rpisetup and not the docker. Once that process has initialized you can add a new recipe by clicking where it says None. Here is a link to example recipes that you can use or modify as you see fit. https://github.com/OpenAgInitiative/openag_recipe_bag


#7

Hi @ekoziol,

Everything seems to be working fine as adding recipes and starting a recipe seem to work. Now it’s time to just wait for the last components to arrive so I can assemble everything and start growing :slight_smile:

Riggi.