![]() |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Quote:
Quote:
Quote:
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Thanks for your blind work :)
The application seems to handle neatly cell towers. I can confirm that there are settings to handle the possibility to use 2 sims. You can activate one or two sims, and then you can choose one or the other for mobile data. So activating mobile data for 'situations' needs likely to add which one... |
Re: Situations app - bugs, questions, answers, help etc..
I have been using Situations for a while.
It works well with switching wifi on and off depending on whether I'm home or not. Now I am trying to activate BatteryBuddy when the charger is connected, and deactivate it when the charger is disconnected. I figured out that I need the Command module for both actions, because I just want to launch the daemon. So I have: Name: Charging When: Device = Charger What: Command: harbour-batterybuddy-daemon What: log to situations-buddy-on.txt This works as expected. (*) Name: Not Charging When: Device != Charger What: Command: /home/nemo/situations/kill-batterybuddy-daemon <=== Problem here What: log to situations-buddy-off.txt This works so far that the situation changes correctly when I disconnect the charger, but the command does not: first I just used "killall harbour-batterybuddy-daemon". This works when executed on the command line (ssh), but not through Situations. Then, I wrapped it in a shell script. Again, this works when executed on the command line but not through situations. (*) Nothing helpful in the logs (just START/STOP messages). I told the kill script to log its activity, too, but it logs only when executed manually. Which leads me to believe that Situations does not execute the kill script at all. Why? (*) I am confirming with 'ps aux | grep buddy'. |
Re: Situations app - bugs, questions, answers, help etc..
Progress.
The command script now executes. I had to use the full path when calling it. I had to change the script so that it takes a START and STOP option, and added full paths to all commands just to be sure, as well as some narrative for the logs: Code:
#!/bin/bash When executed manually, "$HOME/situations/situations-batterybuddy.txt" contains: Code:
nemo Code:
nemo PS: this is academic; at this point itwould be much more practical to just leave BatteryBuddy running and do its thing without help from Situations, but I want to know why the Command plugin isn't doing what I think it should. |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Hard to say what the problem is, since I had no problems running your script with the command action. I'm running Situations 3.2.258 on Sailfish 3.3.0.16 (Jolla 1). Which Situations & Sailfish version are you on? Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
By the way, you don't need two situations to execute the scripts. You can add one command action with the "START" argument and another command action with "STOP" argument to the same situation. You just need to select "At situation end" for the latter one.
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
^ thanks for the tip, already implemented!
SailfishOS 3.3.0.16 Situations v3.2.258 Sonar 0.0.5 I solved it! Something weird happened to the input field for the command for When = Charger. I moved around in it with arrow keys (special keyboard layout) and suddenly there was more text than there was before. I erased it. Still didn't work. Then I looked at ~/.local/share/harbour-situations2application/harbour-situations2application/situations2/situations.json and found that the command entry had a superfluous '\n' at the end, like so: ... START\n Apparently this was passed to the shell script _literally_ so that the case/esac did not match. I removed it manually (edit the .json in nano). Solution: - no newlines at the end of the command and/or - add a * to the case/esac options: START*) STOP*) It is working now, batterybuddy-daemon is active when I plug the charger in, and stops when I unplug it. It just takes a couple of minutes to switch states; I guess that's by design (taking less resources). |
Re: Situations app - bugs, questions, answers, help etc..
I am trying to implement the following _without GPS_:
- switch on the Wifi when I'm home - switch it off when I'm away I have been using the Network cells condition; it scans and finds 2 cells - does that mean cell towers? It's been working so-so, sometimes it recognizes when I'm home, sometimes not. Is there a better way? I guess I cannot scan for my home wifi ssid when wifi is off? Additionally I cannot concatenate the 2 Home/Elsewhere conditions into 1 because I cannot choose Wifi state a 2nd time in the same condition (to switch it off at condition end, instead of switching it off in a separate condition, as hhaveri told me). Why? |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
First of all, if I remember correctly. it does not work well on Sailfish when the device is sleeping -> Situations might recognise cell changes only after user wakes up the device. Secondly you need to cover (record) cells in all network technologies (2G/3G/4G/...) and over a long time span to make it as reliable as possible. But of course the location accuracy then suffers. Quote:
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
So does that mean more is better (when Situations is scanning network cells)? I collected 8 cells with 2 sim cards, switching all available network modes (2G/3G/4G - took almost half an hour), and still Situations immediately recognizes my "Home" Situation, so that proves that logic wrong. I will now test how it fares when I leave home, and if it generally switches Wlan off reliably. |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Quote:
With 8 cells recorded now, I need to move pretty far from my house before Wifi switches off (looong after it looses connection to my access point) but that's OK because I live in a residential area where it's unlikely that Wifi access points scan who's moving about (like e.g. in a mall). I guess I can still fine-tune this by re-recording the cells under slightly stricter conditions (yesterday I even held out the phone over my balcony). ______________________________ One more thing I'd like to ask: When I start Situations it often seems to think that the phone is charging (What = Charger) even though no cable is connected. Any idea what could be going on there? |
Re: Situations app - bugs, questions, answers, help etc..
One question:
I do not have Device- Charger even all feature modules installed and on v3.2.258 Where/how to enable? |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
After connecting to the Computer it still has no content - well, it takes as long as it took me to write this to change state, it's now 'usb'. However, there's another file in that directory called 'IsCharging' - that one is '0' with no charger connected, and immediately changed to '1' with a charger connected. The same happens when I disconnect the charger - 'IsCharging' changes to '0' immediately, 'ChargerType' takes longer to become empty again. It's the same with a wall plug although the lag is shorter for 'ChargerType'. Wouldn't 'IsCharging' be more reliable, since Situations doesn't differentiate between types of chargers anyhow? ________________________________________ Since I have your attention, one more question: Erasing network cells seems to be taking as long as recording them. In fact, atm it seems to be stuck on 5 cells (was 8). Why? Isn't it just erasing files? ________________________________________ BTW, my Sailfish device is a Sony Xperia XA2. ________________________________________ Thank you for all the good work. |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Quote:
Not having erased all the 8 cells just shows how different internal & external conditions may affect which cells the device connects to. Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Quote:
Quote:
Anyhow, thanks again. Glad to be using this app. |
Re: Situations app - bugs, questions, answers, help etc..
I upgraded to the newly released 3.4 (OS update) and situations seem not to work anymore. It launches but then vanishes.
|
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Could someone try installing the new release package at https://github.com/pastillilabs/pack...leases/tag/268 ?
Not quite sure what was causing the problems with the latest platform. I recompiled against the latest SDK and app seems to start again at least for me. There have been some very small changes since the previous official release - perhaps the most significant one being a new "night" icon. Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Thanks.
Did not have much time to dig but it still did not seem to work. I could see 'updating plugins' and then the app disappeared. A retry failed again. |
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
I try uninstalling and reinstalling the latest release you shared .And it did work . Would be nice to see if someone else has the same issue.
|
Re: Situations app - bugs, questions, answers, help etc..
Quote:
|
Re: Situations app - bugs, questions, answers, help etc..
Quote:
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
I've not had any issues with Situations after upgrading to 3.4 on xperia x.
|
Re: Situations app - bugs, questions, answers, help etc..
Quote:
|
Re: Situations app - bugs, questions, answers, help etc..
FYI: Updated v268 packages available at https://github.com/pastillilabs/pack...leases/tag/268
Contains latest Sonar update, which should in principle support the new defaultuser account (instead of nemo) for new Sailfish installations. Haven't really tested it though. And proper multi-user support is something that is left for later updates. |
Re: Situations app - bugs, questions, answers, help etc..
Hi,
I have a problem on my XA2 with a fresh installed Saiflish 3.4.0.24 and the feature Display on/off. I couldn't use the display feature. The Situations App didn't detect if the Display is on or off. I have tested different Situations Version, but no success. With my Xperia X it it is no problem, but there is the old defaultuser nemo. I have read in the comments from the App, that another user have the same problem. Has anyone the same Problem? Could it be the problem with new defaultuser? Many thanks. Kind regards enai |
Re: Situations app - bugs, questions, answers, help etc..
I do not know but if you think that thdle new user name may be the culprit just create a symlink from /home/nemo to /home/defaultuser
devel-su ln -s /home/defaultuser /home/nemo |
Re: Situations app - bugs, questions, answers, help etc..
Hi peterleinchen,
many thanks for the answer. I try this before, but this not solved the problem. I don't know if the username is the problem. It was only an idea. Kind regards enai |
Re: Situations app - bugs, questions, answers, help etc..
Hi,
There's a new pre-release that should fix many of the problems with latest SF OS versions, available here: https://github.com/pastillilabs/pack...leases/tag/271 Actually it has been sitting there already for a while. I'm updating the Android version at the same time but it has been stuck in the Play Store publishing process, so the Sailfish version got forgotten there also... Can you pleas try that version and report back? Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Hi Heikki,
many thanks for the response. I have tested this version before I post. But now I have tested this version again. It didn't work. Situations didn't detect if the display is on. Has anyone the same problem with an XA2? Many thanks. kind regards einai |
Re: Situations app - bugs, questions, answers, help etc..
Hi enai,
I only have Xperia 10 to test with and there the display condition works (with 271). If you (or anyone) can find out where to read & get notified of display state changes on XA2, I can try to add it also to the app. The app is currently monitoring '/var/run/state/providers/mce/Screen/Blanked' (which is deprecated) and '/sys/class/backlight/panel0-backlight/brightness' which seems to work for Xperia 10. Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
On XA2 with SFOS 3.2 (DualSIM, no Plus/no Ultra) following path reports 0 when on and 1 when blanked:
/var/run/state/providers/mce/Screen/Blanked /sys/class/ does not have a path for backlight/.... On a X with SFOS 3.4 it is absolutely the same |
Re: Situations app - bugs, questions, answers, help etc..
Hi Heikki,
many thanks for the Info, that was the information that I need. I have no other directories under /var/run/state/providers/ und no directory /sys/class/backlight , that should be the problem. But if I use the programm mcetool, I get the correct information about the display state. I try to find out where mcetool get this information about the display state. I have found a display state in /sys under /sys/devices/soc/c900000.qcom,mdss_mdp/c900000.qcom,mdss_mdp:qcom,mdss_fb_primary/leds/lcd-backlight/brightness There a the correct state. Edit: I found the solution. The problem was the statefs-provider-mce package was not installed. pkcon install statefs-provider-mce and reboot solved the problem. After reboot I have /var/run/state/providers/mce/Screen/Blanked I read that statefs is deprecated and this should be the problem. It is not default installed in new(3.4.0.24) fresh Sailfish installation. https://irclogs.sailfishos.org/logs/...11-24.log.html Kind regards enai |
Re: Situations app - bugs, questions, answers, help etc..
Thanks, I'll check if it would make sense to switch to using mce dbus api.
Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Switched (almost) all file system based conditions to dbus now:
https://github.com/pastillilabs/pack...leases/tag/272 Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Mildly celebrating 10000 downloads of Situations in Jolla Store with an internal viewer for Log action + 64bit arm build. Available here:
https://github.com/pastillilabs/pack...leases/tag/273 And naturally / hopefully soon in Jolla Store. Br, Heikki |
Re: Situations app - bugs, questions, answers, help etc..
Next alpha version with Do Not Disturb support added:
https://github.com/pastillilabs/pack...leases/tag/275 Br, Heikki |
All times are GMT. The time now is 15:35. |
vBulletin® Version 3.8.8