Share My Creation B4J WebApp to execute commands on a Raspberry Pi

Discussion in 'B4J Share Your Creations' started by rwblinn, Apr 13, 2015.

  1. rwblinn

    rwblinn Well-Known Member Licensed User

    B4J WebApp to execute commands on a Raspberry Pi.
    To manage a Raspberry Pi via WebBrowser on devices running f.e. Windows or Android or Raspberry Pi. This app has a jQuery Mobile Interface and communicates via WebSockets.
    Tested with serveral Raspberry Pi's (also accessed from public domain).

    Download the B4J source here. Read readme.txt first. Example commands included in the file settings.txt.

    [​IMG]

    B4J is Great.

    20150430: Project attached
     

    Attached Files:

    Last edited: Apr 30, 2015
    JakeBullet70, luke2012, Beja and 6 others like this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Great work!
     
    rwblinn likes this.
  3. Michael1968

    Michael1968 Member Licensed User

    Hi Rob,
    use your sample and get this error when i open the bowser:

    ReadSettings :: Start
    ReadSettings :: End
    Error occurred on line: 29 (rpiconsole).
    java.lang.RuntimeException: Object should first be initialized (JavaObject).
    at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:28)
    at anywheresoftware.b4j.object.JavaObject.getCurrentClass(JavaObject.java:257)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:117)
    at b4j.example.rpiconsole._websocket_connected(rpiconsole.java:324)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:563)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:221)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)


    best regards
    Michael
     
  4. Michael1968

    Michael1968 Member Licensed User

    I have found the problem.
    I have compiled the programm in debug Mode.
    in release Mode it works
     
  5. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi Michael,

    thanks for letting me know - will exploere why this error occurs during Debug = not sure for now.
     
  6. Beja

    Beja Expert Licensed User

    Hi,
    Thanks and Chrome didn't allow me to download it.. would you upload it in the first post here?
     
  7. rwblinn

    rwblinn Well-Known Member Licensed User

    Thanks Beja, Post #1 updated.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice