Announcement

Collapse
No announcement yet.

Tasker shortcuts (json control)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tasker shortcuts (json control)

    > My understanding (or misunderstanding, as the case may be) is that Apple
    > does not allow scripting engines to be accessible by the user in iOS. A
    > scripting engine might be part of an app, but only for that app's
    > internal use. The result is that nothing like Tasker can be available on
    > iOS.


    You can achieve some level of automation with Shortcuts and/or
    Scriptable (a JS scripting environment for iOS).

    --

    Michael

    #2
    Tasker shortcuts (json control)

    shortcuts for controlling players, volume, synchronization, and etc.
    Getting information from the server and displaying it on icons(widgets).

    updated 08.06.2022 fixed some bugs.

    Features:
    - all player volumes are displayed under the icons on home screen
    - the icon changes if the player is playing, paused or synchronized, the color is red if the player is playing, the color is green if there is a pause.
    - auto resets the volume of all speakers after stopping after a while. to prevent sudden shock. reset to normal value during the day, reset to minimum value in the evening.
    - auto unsync of some speakers at a specified time, for example in the evening.
    - better synchronization management than in the app. all players continue to play after unsync.
    - one button to stop all players, even if they are not synchronized
    - volume presets for all players.
    - auto change volume step, 2 if vol<20, 5 if vol>20.
    - shortcuts to radio streams, working with playlists m3u, pls.
    - sync favorites, settings and volume presets between devices (phone, tablet, tvbox) syncing via SyncThing




    new version (json) required AutoTools

    old version (array)


    AutoTools


    Tap on the player widget and select an action:

    Select (*) select a default *player for tasker actions:
    - intent to SqueezeCtrl select player
    - set default player for tasker action (%HEAD)
    - player widget label will be marked with an *asterisk

    Separate (/) unsync the player and continue playing:
    - unsync player
    - intent to SqueezeCtrl select player
    - set default player for tasker action (%HEAD)
    - player will continue to play as before (if he has played before)
    - everyone else continues to play as before (if they has played before)
    - player widget label will be marked with an *asterisk

    Just one (1) play music only on this player:
    - unsync player
    - intent to SqueezeCtrl select player
    - set default player for tasker action (%HEAD)
    - player will continue to play as before (if he has played before)
    - everyone else stop (if they has played before)
    - player widget label will be marked with an *asterisk

    Unlink (-)
    - unsync player
    - stop player
    - everyone else continues to play as before (if they has played before)

    Link (+)
    - unsync player (if he was connected to another group)
    - sync player to default *player


    Click image for larger version

Name:	Screenshot_2022-05-22-23-17-09-396.jpeg
Views:	1
Size:	114.6 KB
ID:	1575114
    Player actions:
    Click image for larger version

Name:	Screenshot_2022-05-22-23-17-32-130.jpeg
Views:	1
Size:	117.1 KB
ID:	1575115
    Settings:
    Click image for larger version

Name:	Screenshot_2022-05-22-23-17-59-087.jpeg
Views:	1
Size:	128.9 KB
ID:	1575116
    Last edited by Errik128; 2022-06-09, 23:08.

    Comment


      #3
      Nice [emoji106]
      Used to tried tasker for LMS control but abaddoned it.. Maybe will revisit, thanks
      3x Squeezebox Touch, 4x Squeezebox Radio, Squeezelite (RPi 3B with HiFiBerry DAC+Pro on OSMC), Material Skin Apk, Squeeze Commander, Logitech Media Server Version: 8.2.0 with Material Skin (Docker in DS218+)

      Comment


        #4
        another problem is the chromcast speaker (JBL Playlist). it is not possible to change the volume when they are sleeping. when you turn on after sleeping, it may suddenly be loud!!!!!
        to solve the problem, SILENCE is sent to the speaker, a delay of 15 seconds, the speaker wakes up, the volume changes. ok

        another goal, the bedroom speaker (JBL Black), should be aumatic disconnected at 20.00! and no longer sync until 7.00

        still unfinished quiet music launch in the morning. (because of the problem with the chromecast, see above)
        Last edited by Errik128; 2022-05-19, 16:16.

        Comment


          #5
          add Youtube

          Comment


            #6
            I have done the storage of volume data and favorites in json format, but this requires the AutoTools plugin. so there will be two versions Squeeze (array), Squeeze (json)

            settings.txt (json version)
            Code:
            {"settings": [
            {"volumes": [
                {
                    "vol_mrg": "15",
                    "vol_hi": "50",
                    "name": "Behringer",
                    "vol_low": "25"
                },
                {
                    "vol_mrg": "10",
                    "vol_hi": "35",
                    "name": "JBL white",
                    "vol_low": "20"
                },
                {
                    "vol_mrg": "3",
                    "vol_hi": "30",
                    "name": "JBL black",
                    "vol_low": "10"
                },
                {
                    "vol_mrg": "5",
                    "vol_hi": "35",
                    "name": "Bathroom",
                    "vol_low": "10"
                },
                {
                    "vol_mrg": "10",
                    "vol_hi": "35",
                    "name": "JBL white2",
                    "vol_low": "20"
                }
            ]},
            {"favorites": [
                {
                    "fav_title": "DI.FM - Chill EDM",
                    "fav_nom": "1",
                    "fav_url": "http://prem2.di.fm:80/chilledm_hi?780a.......a2"
                },
                {
                    "fav_title": "JAZZRADIO.com - Smooth Lounge",
                    "fav_nom": "2",
                    "fav_url": "http://prem2.jazzradio.com:80/smoothlounge_aac?780a.......a2"
                },
                {
                    "fav_title": "JAZZRADIO.com - Smooth Jazz",
                    "fav_nom": "3",
                    "fav_url": "http://prem2.jazzradio.com:80/smoothjazz_aac?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - Breaks",
                    "fav_nom": "4",
                    "fav_url": "http://prem2.di.fm:80/breaks_hi?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - LoFi Hip-Hop",
                    "fav_nom": "5",
                    "fav_url": "http://prem2.di.fm:80/lofihiphop_hi?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - Future Garage",
                    "fav_nom": "6",
                    "fav_url": "http://prem2.di.fm:80/futuregarage_hi?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - LoFi Hip-Hop",
                    "fav_nom": "7",
                    "fav_url": "http://prem2.di.fm:80/lofihiphop_hi?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - Atmospheric Breaks",
                    "fav_nom": "8",
                    "fav_url": "http://prem2.di.fm:80/atmosphericbreaks_hi?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - Minimal",
                    "fav_nom": "9",
                    "fav_url": "http://prem2.di.fm:80/minimal_hi?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - Atmospheric Breaks",
                    "fav_nom": "10",
                    "fav_url": "http://prem2.di.fm:80/atmosphericbreaks_hi?780a.......a2"
                },
                {
                    "fav_title": "DI.FM - Minimal",
                    "fav_nom": "11",
                    "fav_url": "http://prem2.di.fm:80/minimal_hi?780a.......a2"
                }
            ]},
            {"data": [{
                "head": "Behringer",
                "time_sleep": "20.00",
                "file_playlist": "DI.FM - Favorites 320.pls",
                "server_ip": "192.168.1.56"
            }]}
            ]}
            settings.txt (array version)
            Code:
            SERVER http://192.168.1.56:9000
            HEAD Behringer
            
            VOLNAMES Behringer;JBL white;JBL black;Bathroom
            VOLH 50;35;30;35
            VOLL 25;20;10;10
            VOLU 15;10;3;5
            
            FAV http://prem2.di.fm:80/chilledm_hi?780.....3a2;http://prem2.jazzradio.com:80/smoothlounge_aac?780.....3a2;http://prem2.jazzradio.com:80/smoothjazz_aac?780.....3a2;http://prem2.di.fm:80/chillout_hi?780.....3a2;http://prem2.di.fm:80/lofihiphop_hi?780.....3a2;http://prem2.di.fm:80/futuregarage_hi?780.....3a2;http://prem2.di.fm:80/futuresynthpop_hi?780.....3a2;http://prem2.di.fm:80/atmosphericbreaks_hi?780.....3a2;http://prem2.di.fm:80/minimal_hi?780.....3a2;http://prem2.di.fm:80/deephouse_hi?780.....3a2
            
            FAVNAMES DI.FM - Chill EDM;JAZZRADIO.com - Smooth Lounge;JAZZRADIO.com - Smooth Jazz;DI.FM - Chillout;DI.FM - LoFi Hip-Hop;DI.FM - Future Garage;DI.FM - Future Synthpop;DI.FM - Atmospheric Breaks;DI.FM - Minimal;DI.FM - Deep House
            
            UTRO http://prem2.di.fm:80/lofihiphop_hi?780.....3a2
            UTRONAME DI.FM - LoFi Hip-Hop
            
            TIMEBLACK 20.00
            Last edited by Errik128; 2022-05-31, 10:40.

            Comment


              #7
              Spotify playlist shortcut

              I wondered how to make a shortcut for a Spotify playlist, that's the solution, the link will be in this form,
              spotifylaylist:37i.....5USnM
              you can get it by adding a playlist to Favorites, and click edit. next, you can shortcut to the main screen or to the remote control button.Click image for larger version

Name:	Screenshot_2022-07-08-01-52-14-891.jpeg
Views:	1
Size:	140.8 KB
ID:	1575422
              Click image for larger version

Name:	Screenshot_2022-07-08-01-53-35-295.jpeg
Views:	1
Size:	110.1 KB
ID:	1575423
              Click image for larger version

Name:	Screenshot_2022-07-09-11-38-47-886.jpg
Views:	1
Size:	101.1 KB
ID:	1575424
              Last edited by Errik128; 2022-07-09, 10:42.

              Comment


                #8
                Spotyfi shortcut on iPhone ?

                how to make such a Spotify shortcut on iphone?

                Comment


                  #9
                  I don't think the same Tasker app is available on iOS.
                  (this thread is about Tasker)
                  Paul Webster
                  Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
                  and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

                  Comment


                    #10
                    Originally posted by Paul Webster View Post
                    I don't think the same Tasker app is available on iOS.
                    (this thread is about Tasker)
                    my wife has an iphone, and she wants the same shortcuts as I have on my phone and tablet. but I don't understand in ios

                    Comment


                      #11
                      Originally posted by Errik128 View Post
                      my wife has an iphone, and she wants the same shortcuts as I have on my phone and tablet. but I don't understand in ios
                      Are you phone and tablet running Android and using Tasker?

                      If yes - then that is why it works.
                      As far as I know, Tasker (with the shortcut ability) is not available on iOS (iPhone, iPad).
                      Paul Webster
                      Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
                      and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

                      Comment


                        #12
                        Originally posted by Paul Webster View Post
                        Are you phone and tablet running Android and using Tasker?

                        If yes - then that is why it works.
                        As far as I know, Tasker (with the shortcut ability) is not available on iOS (iPhone, iPad).
                        My understanding (or misunderstanding, as the case may be) is that Apple does not allow scripting engines to be accessible by the user in iOS. A scripting engine might be part of an app, but only for that app's internal use. The result is that nothing like Tasker can be available on iOS.
                        Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players (Squeezelite and Airplay bridge). Occasionally using SB Radio, Boom or Classic.

                        Comment


                          #13
                          Originally posted by Errik128 View Post
                          how to make such a Spotify shortcut on iphone?
                          About two years ago, I tried to control my LMS via apples Shortcut app. It allows to POST json coded data to a server, see here:

                          https://forums.slimdevices.com/showt...-and-Shortcuts

                          Since some time Siri doesn't understand me very well, so I stopped to use the voice control, but you could get the idea from there.

                          Regards
                          karlek

                          Comment


                            #14
                            Originally posted by mherger View Post
                            > My understanding (or misunderstanding, as the case may be) is that Apple
                            > does not allow scripting engines to be accessible by the user in iOS. A
                            > scripting engine might be part of an app, but only for that app's
                            > internal use. The result is that nothing like Tasker can be available on
                            > iOS.


                            You can achieve some level of automation with Shortcuts and/or
                            Scriptable (a JS scripting environment for iOS).

                            --

                            Michael
                            Thanks for that bit of enlightenment. It's good to know that options are available.
                            Usually running latest beta LMS nightly on Raspberry Pi OS with virtual players (Squeezelite and Airplay bridge). Occasionally using SB Radio, Boom or Classic.

                            Comment

                            Working...
                            X