App developing on OS 2.0

  • What package and version are you using ?
    Amiga OS 2.0
  • Please, describe the issues you are seeing ?
    Not sure how to create an App. In the previous version (1.2) there was a template that I can move to the apps folder and that was it. Now, I found the apps on /opt/farmng/apps . I tried to create a new app, just by coping the recorder_v2 in the same path with a different name, but it is not showing up on the screen. Even more, after I reboot the Amiga that new folder got deleted.

How can I create a new app and keep the changes for this OS?

** Any possible information will make the live of the community members easy to reply and provide a solution.

Thanks in advance!

1 Like

Hello @dariojavo ,

Thank you for reaching out with your question. You have been given access to the Amiga OS 2.0 pre-release, so we are still working on documentation and full support for user app development. This should not prevent you from getting started though!

Some information that will help you get developing in the meantime:

  • The Amiga OS 2.0 works by resetting the disk, besides the /mnt drive, at every reboot of your brain. This means any changes you make or development you do outside of /mnt will be erased.

We recommend to create and develop in a directory called: /mnt/local_dev/<my_app> (where you replace <my_app> with the name of your new app)

  • Your app will not yet appear on the home screen with the farm-ng apps like recorder_v2. This means you will need to launch it manually from the command line for the time being. Your app should launch from a file called main.py, so to launch your app you can use:
export DISPLAY=:0
. /opt/farmng/venv/bin/activate
python /mnt/local_dev/<my_app>/main.py

Good luck!
– Kyle

Hi,

I tried to migrate the app to V2.0 but I have the error like this.

DEBUG:CanbusClient: CanbusClient on port: 50060 state is: UNAVAILABLE
[DEBUG ] [ CanbusClient on port] 50060 state is: UNAVAILABLE

Is it possible that the CAN bus port has been changed?

FYI: Here’s the sample app I was testing

Thank you!

Hi @Heesup_Yun ,

You are correct about the port change. You should now find the canbus on 6001. However…

The service / client API has changed for the new, pre-release AmigaOS v2.0. The grpc client / service connection has been made more general so there is no more CanbusClient class. Now you will only use the generic EventClient found in: https://github.com/farm-ng/farm-ng-core/blob/main/py/farm_ng/core/event_client.py

Using this is not yet documented for the pre-release OS. We will let you know once we’ve created documentation and/or examples for this.

If you want to try before this documentation is available:

  • The working farm-ng-core branch is main
  • The working farm-ng-amiga branch is main-v2

– Kyle