jgibbon / yikes

yi action camera application for sailfish os
GNU General Public License v2.0
6 stars 4 forks source link

Yi Action Camera 1 compatibility #16

Open jgibbon opened 5 years ago

jgibbon commented 5 years ago

As with #15, @clausmichele offered to check if yikes did anything with the first Yi action camera. Thanks so much for the offer!

I hope some of the tests are possible with just one minute of wifi connectivity. You should be able to just leave the application open while restarting the camera/reconnecting to its wifi. :)

A Pre-release is available here: https://github.com/jgibbon/yikes/releases/tag/0.1-1

Things to test (mostly copy/paste from the release info):

  1. Connection: Manually connect to the camera via wifi. Does the application recognise a connection? (It should hide the "trying to connect" screen and enter the normal interface.)
  2. Does the cameras video stream get shown?
  3. Change between video and photo: Please test if changing the switch (top of the interface) changes the mode on the camera, as well.
  4. Sub modes: There should be buttons on the left side of the interface if the camera advertises them as supported. They should differ between video and photo mode. Are those buttons visible? If so, do they change the mode on the camera, as well?
  5. Shutter: The big button should start a recording/take a photo. Does it?
  6. Options: Enter the camera options via pulley menu. Are there any settings visible? Are any of those advertised as "changeable" (white text, tapping them goes to a sub menu to change them)? Does changing them work?
  7. Existing files: In the main interface, there should be an indicator for existing files on the camera if there are any files on its SD card. Is it there? Does tapping it go to an overview interface for existing files? Do they load?
  8. File transfer: Try to transfer a single file (pulley after tapping on a media entry) to the phone. Does it work? If you have enough space in your home partition: Try downloading all files from the media overview pulley. (Files should land in "Pictures/Yi"). Do "raw" photos get transfered (if the camera supports them)?

If some of the steps do not work, it may be helpful to start the application via ssh and save the terminal output. Beware: There may be a lot of output for the current version. Also, there may be more or less sensitive information in it (like file names on the sd card in your camera).

The command to start it is sailfish-qml yikes (there is no binary as of yet). You'll have to connect via usb because wifi is obviously used by the camera connection.

Again, thank you!

clausmichele commented 5 years ago

So, using a Xiaomi Yi 1st version and a Jolla 1. When I've tried your first build months ago it was working, what did you change? The wifi is connected with the camera but it does not connect in the application, it shows me this error:

Sailfish OS 2.2.1.18 (Nurmonjoki)
'---
[nemo@Sailfish ~]$ sailfish-qml yikes
[D] unknown:0 - Using Wayland-EGL
[W] unknown:0 - Could not find any zN.M subd
irs!
[W] unknown:0 - Theme dir "/usr/share/themes
/jolla-ambient/meegotouch/z1.0/" does not ex
ist
[D] unknown:0 - Got library name:  "/usr/lib
/qt5/qml/io/thp/pyotherside/libpyothersidepl
ugin.so"
[D] initialize:27 - DB initialized
[D] unknown:0 - "PyOtherSide error: Tracebac
k (most recent call last):\n\n  File \"/usr/
share/yikes/qml/python/yi.py\", line 44, in
connect\n    camera = YiAPI()\n\nNameError:
name 'YiAPI' is not defined\n"
[D] onError:350 - Python failure: Return val
ue of PyObject call is NULL: Traceback (most
recent call last):

File "/usr/share/yikes/qml/python/yi.py",
line 44, in connect
camera = YiAPI()

NameError: name 'YiAPI' is not defined
clausmichele commented 5 years ago

Update: the folder /usr/share/yikes/qml/python/YiAPI is empty, is it supposed to be so? I've tried to copy manually the source file into it, you're also appending the foder to the path in your python code. However, it still cannot find the YiAPI file.

jgibbon commented 5 years ago

Hi @clausmichele, that's a bit embarrasing, to be honest. I have messed up the python part a bit by trying to add it as a submodule and renaming it badly. Also, there seems to be a uninstall bug which resulted in me not noticing.

I have replaced the .rpm in the release with a version that should work better – alternatively you could try the OBS build at http://repo.merproject.org/ which Nokius already updated.

I'm sorry to have wasted your time with this error.

Nokius commented 5 years ago

just to be on the correct side the Yi one is the this model Yi one

clausmichele commented 5 years ago

Now I get the following error, with a single Beep coming from the camera.

Sailfish OS 2.2.1.18 (Nurmonjoki)
'---
[nemo@Sailfish ~]$ sailfish-qml yikes
[D] unknown:0 - Using Wayland-EGL
[W] unknown:0 - Could not find any zN.M subd
irs!
[W] unknown:0 - Theme dir "/usr/share/themes
/jolla-ambient/meegotouch/z1.0/" does not ex
ist
[D] unknown:0 - Got library name:  "/usr/lib
/qt5/qml/io/thp/pyotherside/libpyothersidepl
ugin.so"
[D] initialize:27 - DB initialized
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
cmdsend {'heartbeat': 0, 'token': 0, 'msg_id
': 257}
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
cmdsend {'heartbeat': 0, 'token': 0, 'msg_id
': 257}
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
WARNING:root:Camera error -3
Nokius commented 5 years ago

did the heartbeat ID change unexpected ?

clausmichele commented 5 years ago

Mmm, doesn't seem so:

_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
cmdsend {'heartbeat': 0, 'token': 0, 'msg_id
': 257}
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
WARNING:root:Camera error -3
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
cmdsend {'heartbeat': 0, 'token': 0, 'msg_id
': 257}
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
cmdsend {'heartbeat': 0, 'token': 0, 'msg_id
': 257}
notificationCB {'param': '10', 'msg_id': 7,
'type': 'adapter'}
[D] :133 - notification {
"msg_id": 7,
"param": "10",
"type": "adapter"
}
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
WARNING:root:Camera error -3
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
cmdsend {'heartbeat': 0, 'token': 0, 'msg_id
': 257}
_cmdPrep 2 {'heartbeat': 0, 'token': 0, 'msg
_id': 257}
clausmichele commented 5 years ago

Any update on this?