Active Topics

 


Reply
Thread Tools
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#1
Hi to everyone,
I have a Xiaomi YI camera and a Nexus 5 with Sailfish.
There is an android app to control the camera but on sfdroid doesn't work (can't connect even if it is connected to the camera with wifi in Sailfish).
There is also a Windows client (written in Python) that can do the same things.

Now the question: i have the Python script of that ( https://github.com/deltaflyer4747/Xiaomi_Yi ) , but how can i run it on Sailfish?

Thanks in advance.
 

The Following User Says Thank You to claustn For This Useful Post:
Posts: 89 | Thanked: 314 times | Joined on Feb 2016
#2
There are multiple hickups here. If you are surre that SFOS doesn't need any special driver, and you can connect generally, then You need to set the GUI right as well.

Script uses Tkinter for GUI. I don't know if usable in SFOS at all. If no (somebody please tell) Then you need to purge the GUI part as well and use it from terminal or cerate a SFOS gui yourself.

Anyway a good coding excecise, but I personally can't say if threre could be any blockers.

I have thr feeling that even if you could connect the Camera to be usable via SFOS, you would need to rewrite py scripts to be used with GUI.

Last edited by Merienth; 2016-12-19 at 22:21.
 

The Following 3 Users Say Thank You to Merienth For This Useful Post:
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#3
even only some terminal command to mamage the basic settings it will be nice. It connects via wifi, so maybe i can telnet something
 

The Following User Says Thank You to claustn For This Useful Post:
BluesLee's Avatar
Posts: 411 | Thanked: 1,105 times | Joined on Jan 2010 @ Europe
#4
Originally Posted by claustn View Post
even only some terminal command to mamage the basic settings it will be nice. It connects via wifi, so maybe i can telnet something
I don't know what you're talking about Python Gui's for Yi software, just connect to the Yi via wifi, telnet to the device and run well known shell scripts to configure the Yi. Search for it ..
 

The Following 2 Users Say Thank You to BluesLee For This Useful Post:
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#5
I tried to use telnet with success, but it is used to modify only settings that will be charged after a reboot.
The Python application can modify settings in real time, as video quality, decide what type of photo mode to use (time lapse, burst and so on), things that with telnet I can't do. Maybe there is a method but is not used yet.
 

The Following 2 Users Say Thank You to claustn For This Useful Post:
BluesLee's Avatar
Posts: 411 | Thanked: 1,105 times | Joined on Jan 2010 @ Europe
#6
Originally Posted by claustn View Post
I tried to use telnet with success, but it is used to modify only settings that will be charged after a reboot.
The Python application can modify settings in real time, as video quality, decide what type of photo mode to use (time lapse, burst and so on), things that with telnet I can't do. Maybe there is a method but is not used yet.
Regarding reboots you might be right, can't check now, but to be sure we are talking about the same script https://github.com/alex-agency/XYC/b...ster/README.md has all the goodies...
 

The Following User Says Thank You to BluesLee For This Useful Post:
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#7
yes, it's the same code i tried.
Is it possible to access the memory card via telnet/ftp? if I try common commands like cd, ls, dir after connecting in telnet nothing happens.

edit: it is a bit confusing the use of both the settings of the official app and the ones added using the script charged on boot.
For example, if i set time lapse from the official app and the with the script too i obtain: first (official) time lapse + 2nd time lapse and then takes the photo, causing a loop of time lapse photos that never ends
only deleting the configuration file solve it.

Last edited by claustn; 2016-12-20 at 19:34.
 

The Following User Says Thank You to claustn For This Useful Post:
velox's Avatar
Posts: 394 | Thanked: 1,341 times | Joined on Dec 2009
#8
This is quite a late reply (necromancing a bit here) and, to be honest, I don't know how much of the original "YI Action Camera" will work but perhaps the following sneak peek might be interesting for you: https://www.youtube.com/watch?v=bkWT_YpaP_s

It's going to be a bare bones python/qml yi cam controller app for Sailfish OS I finally started making after a bit of motivation and with a good amount of debugging/reverse engineering/testing help from Nokius. The first "YI 4k Action Camera" is the only one I have, so it's obviously optimized for that at this point, but we're trying to enable at least some features for the YI Discovery, as well.

You might find its source (or a build that may or may not be current) if you search the net a bit, but it's not ready for broad release, so I won't put a link here yet to not dissappoint anyone trying it.

If anyone has another Yi action cam, a bit of technical expertise and time and interest in testing, please PM me to help debugging weird behaviour, because some of those cameras APIs seem to react really differently than the 4k.

cheers!
__________________
slumber: sensors enabled sleep timer for SFOS (translations/input/… appreciated if you've got some spare time)
talefish: directory based audiobook player for SFOS
nofono: ofono restart for SFOS
___
list of i486/noarch packages on openrepos (jolla tablet)

Last edited by velox; 2018-08-15 at 12:17.
 

The Following 2 Users Say Thank You to velox For This Useful Post:
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#9
Thanks for sharing! However, my YI wifi stopped working more than 6 months ago...now, thanks to some modded settings loaded at boot, I can change mode by pressing two times the power button, without the need of any app. Even better than before
 

The Following 2 Users Say Thank You to claustn For This Useful Post:
Posts: 1,335 | Thanked: 3,931 times | Joined on Jul 2010 @ Brittany, France
#10
The video is really exciting. Are you planning on putting that on Openrepos when it's ready? I have a Yi 2 too, and I think I got it working with the Android application with Alien (haven't tried in months though), but it would be so much better to do the same with a native application.
 

The Following 2 Users Say Thank You to Kabouik For This Useful Post:
Reply

Tags
nexus5, sailfish, sfdroid, xiaomi, xiaomiyi


 
Forum Jump


All times are GMT. The time now is 15:34.