Home of the Squeezebox™ & Transporter® network music players.
Page 11 of 22 FirstFirst ... 91011121321 ... LastLast
Results 101 to 110 of 212
  1. #101

    Player Controls pane

    What is the toggle switch at the top of this pane? I assumed it was going to be power on/off on the player selected below, but it doesn't seem to do anything, or react to on/off done in any other ways (even through voice control).

  2. #102
    Senior Member
    Join Date
    Sep 2017
    Posts
    134
    Quote Originally Posted by ynot1234567890 View Post
    I guess so if that's how your system is configured. I am using docker and in that install it's simply /config/shell. You may need to update the path to the shell files in configuration.yaml file to ensure they get executed. For the next revision I will try to use relative paths to avoid this issue,

    Code:
      shell_command:
      lms_qry_alb: 'bash /config/shell/qry_alb.sh {{text1}} {{text2}}'
      lms_qry_alb_song: 'bash /config/shell/qry_alb_song.sh {{text1}} {{text2}} {{text3}}'
      lms_spot_art: 'bash /config/shell/spot_art_top.sh {{text1}}'
      lms_spot_art_alb: 'bash /config/shell/spot_art_alb.sh {{text1}} {{text2}}'
      lms_spot_art_alb_song: 'bash /config/shell/spot_art_alb_song.sh {{text1}} {{text2}} {{text3}}'
      lms_spot_playlist: 'bash /config/shell/spot_playlist.sh {{text1}}'
    You will know if the shell files get executed if the album_id, song_id sensors get updated and obviously if the song and album functions are queuing to LMS properly.
    I'm pretty close to getting this working. I've got everything in Home Assistant and I can change songs, pause, etc. However the shell scripts aren't working I don't think. I have home assistant installed on a synology NAS using docker. The home assistant folder is accessible through the web folder which allows you to access through windows. Do I have the shell scripts installed in the correct place? They are located under /volume1/web/HomeAssistant/shell. How do I test the scripts? I tried to follow thetroubleshooting but not sure how to do it. I used putty to get the /volume1/web/HomeAssistant/shell folder and tried to run the commands but they didn't work. It came back with -sh: bash-4-4#: command not found. No idea if I'm doing this correctly. Thanks for the help and for creating this!

    Also this line:

    Update https://HA_Link.duckdns.org/api/states/sensor.art_ID? -H "Authorization Bearer $HA_Token" with you're HA_Link (must be accessible from the internet)

    I assumed this meant to change "HA_Link" to what you created in duck dns and also to replace "Authorization Bearer $HA_Token" with the duck dns token leavin the quotes. Is that correct?
    Last edited by grimmace92; 2018-12-30 at 13:01.

  3. #103
    Senior Member
    Join Date
    Apr 2014
    Posts
    239
    Quote Originally Posted by grimmace92 View Post
    I'm pretty close to getting this working. I've got everything in Home Assistant and I can change songs, pause, etc. However the shell scripts aren't working I don't think. I have home assistant installed on a synology NAS using docker. The home assistant folder is accessible through the web folder which allows you to access through windows. Do I have the shell scripts installed in the correct place? They are located under /volume1/web/HomeAssistant/shell. How do I test the scripts? I tried to follow thetroubleshooting but not sure how to do it. I used putty to get the /volume1/web/HomeAssistant/shell folder and tried to run the commands but they didn't work. It came back with -sh: bash-4-4#: command not found. No idea if I'm doing this correctly. Thanks for the help and for creating this!
    Try: bash qry_alb.sh _supertramp _breakfast_in_america

  4. #104
    Senior Member
    Join Date
    Sep 2017
    Posts
    134
    Quote Originally Posted by CypherMK View Post
    Try: bash qry_alb.sh _supertramp _breakfast_in_america
    Thanks. Progress but following error

    Getting closer. I created a cert via lets encrpyt and then exported them and placed them in my homeassistant folder where my configuration.yaml file is. I can access home assistant via https. This query is giving me the following error. Im guessing maybe because I exported the certificates and exported them to the folder where my configuration.yaml file is?

    curl (60) SSL certificate problem: unable to get local issuer certificate

    **EDIT**

    I'm stuck. I can access HA from https over 4g. However I can only access over my LAN by https as well and it gives me a warning that its not secure. Not sure where to go from here. When I do the troubleshooting it complains about my certificate.
    Last edited by grimmace92; 2018-12-30 at 16:26.

  5. #105
    Senior Member
    Join Date
    Feb 2017
    Posts
    134
    Quote Originally Posted by ColH View Post
    What is the toggle switch at the top of this pane? I assumed it was going to be power on/off on the player selected below, but it doesn't seem to do anything, or react to on/off done in any other ways (even through voice control).
    It should not be there at all. Serves no purpose at this time. To make it disappear add control: hidden in the group file see below:

    Code:
      my_player:
        name: LMS Music Player Controls
        control: hidden
        entities:
        - input_select.lms_player
        - input_number.lms_volume
        - input_number.lms_sleep_time
        - input_select.lms_source
        - input_text.lms_artist
        - input_text.lms_album
        - input_text.lms_song
        - input_text.lms_playlist
        - input_select.lms_command
        - script.lms_cmd_pause_player
        - script.lms_cmd_start_player
        - script.lms_cmd_next_track
        - input_boolean.lms_shuffle
        - input_boolean.lms_repeat
    Ynot.
    Software - Logitech Media Server Version: 7.9.1, Home Assistant 0.84.6, DialogFlow - V.1 API, LMS Controls App - Voice Control of LMS, OpenMediaVault 4.1.17 - Storage
    Add-ons - Spotty, UPnP / DLNA Bridge, ChromeCast Bridge,
    Players - Sonos, UPNP, PI3 - PI Core Player 3.5.0, Android- SB Player V1.4.0, AirPlay to GoogleHome and Minis
    Hardware - Server - i7-3.4Ghz, 4GB Ram, 6TB storage, Debian - 4.18

  6. #106
    Senior Member
    Join Date
    Feb 2017
    Posts
    134
    Quote Originally Posted by grimmace92 View Post
    I'm pretty close to getting this working.
    Update https://HA_Link.duckdns.org/api/states/sensor.art_ID? -H "Authorization Bearer $HA_Token" with you're HA_Link (must be accessible from the internet)

    I assumed this meant to change "HA_Link" to what you created in duck dns and also to replace "Authorization Bearer $HA_Token" with the duck dns token leavin the quotes. Is that correct?
    Hi,

    • The HA_Link is to be replaced with your domain line name. So mine might be (but isn't) ynotmylink.duckdns.org
    • The HA Token needs to be generated for your application. It is a long lived access token and allows other applications (shell scripts and DialogFlow app) to access the HA instance. It's the new security model implemented as of version 0.80. You can create it from your profile page (click on your initials) in HA. When you create it you will be given the HA token code, copy it and keep it secure it's the only time you get to see it. Then for each shell script, it needs to be copied into the line HA_Token=Your_Long_Lived_Token_Here
    • Also note that some systems require a : between "Authorization: Bearer $HA_Token"
    Software - Logitech Media Server Version: 7.9.1, Home Assistant 0.84.6, DialogFlow - V.1 API, LMS Controls App - Voice Control of LMS, OpenMediaVault 4.1.17 - Storage
    Add-ons - Spotty, UPnP / DLNA Bridge, ChromeCast Bridge,
    Players - Sonos, UPNP, PI3 - PI Core Player 3.5.0, Android- SB Player V1.4.0, AirPlay to GoogleHome and Minis
    Hardware - Server - i7-3.4Ghz, 4GB Ram, 6TB storage, Debian - 4.18

  7. #107
    Senior Member
    Join Date
    Feb 2017
    Posts
    134
    Quote Originally Posted by grimmace92 View Post
    Thanks. Progress but following error

    Getting closer. I created a cert via lets encrpyt and then exported them and placed them in my homeassistant folder where my configuration.yaml file is. I can access home assistant via https. This query is giving me the following error. Im guessing maybe because I exported the certificates and exported them to the folder where my configuration.yaml file is?

    curl (60) SSL certificate problem: unable to get local issuer certificate

    **EDIT**

    I'm stuck. I can access HA from https over 4g. However I can only access over my LAN by https as well and it gives me a warning that its not secure. Not sure where to go from here. When I do the troubleshooting it complains about my certificate.
    Ensure your router is forwarding internet port 443 to HA_IP port 8123
    Software - Logitech Media Server Version: 7.9.1, Home Assistant 0.84.6, DialogFlow - V.1 API, LMS Controls App - Voice Control of LMS, OpenMediaVault 4.1.17 - Storage
    Add-ons - Spotty, UPnP / DLNA Bridge, ChromeCast Bridge,
    Players - Sonos, UPNP, PI3 - PI Core Player 3.5.0, Android- SB Player V1.4.0, AirPlay to GoogleHome and Minis
    Hardware - Server - i7-3.4Ghz, 4GB Ram, 6TB storage, Debian - 4.18

  8. #108
    Senior Member
    Join Date
    Sep 2017
    Posts
    134
    Quote Originally Posted by ynot1234567890 View Post
    Hi,

    • The HA_Link is to be replaced with your domain line name. So mine might be (but isn't) ynotmylink.duckdns.org
    • The HA Token needs to be generated for your application. It is a long lived access token and allows other applications (shell scripts and DialogFlow app) to access the HA instance. It's the new security model implemented as of version 0.80. You can create it from your profile page (click on your initials) in HA. When you create it you will be given the HA token code, copy it and keep it secure it's the only time you get to see it. Then for each shell script, it needs to be copied into the line HA_Token=Your_Long_Lived_Token_Here
    • Also note that some systems require a : between "Authorization: Bearer $HA_Token"
    Here is what I'm doing in putty and what I see. Something with my certificate is causing an issue. I just have no idea what else to check. Port 443 is forwarded to 8123. For this line is it supposed to stay like this or is the whole thing supposed to be replaced with the token?

    For example this:

    https://HA_Link.duckdns.org/api/states/sensor.art_ID? -H "Authorization: Bearer $HA_Token"

    should become this?

    https://mynameused.duckdns.org/api/states/sensor.art_ID? -H "Authorization: Bearer $HA_Token"

    or this

    https://mynameused.duckdns.org/api/s...sensor.art_ID? -H "Authorization: the_token_generated_from_duckdns"

    Name:  lmscontrols1.PNG
Views: 146
Size:  51.9 KB
    Last edited by grimmace92; 2018-12-30 at 21:30.

  9. #109
    Senior Member
    Join Date
    Feb 2017
    Posts
    134
    Quote Originally Posted by grimmace92 View Post
    Here is what I'm doing in putty and what I see. Something with my certificate is causing an issue. I just have no idea what else to check. Port 443 is forwarded to 8123. For this line is it supposed to stay like this or is the whole thing supposed to be replaced with the token?

    For example this:

    https://HA_Link.duckdns.org/api/states/sensor.art_ID? -H "Authorization: Bearer $HA_Token"

    should become this?

    https://mynameused.duckdns.org/api/states/sensor.art_ID? -H "Authorization: Bearer $HA_Token"

    or this

    https://mynameused.duckdns.org/api/s...sensor.art_ID? -H "Authorization: the_token_generated_from_duckdns"
    The line is supposed to be this: https://mynameused.duckdns.org/api/s...sensor.art_ID? -H "Authorization: Bearer $HA_Token"
    The second line of the shell script files (ie: qry_alb.sh) should read HA_Token=Your_Long_Lived_Token_Here. Replace "Your_Long_Lived_Token_Here" with the Home Assistant generated token using the procedure I sent yesterday. You should create a dedicated long lived access token for the Dialogflow / shell scripts.

    As for the output from the script, a few things:
    • Looks like your system does not have the command "nc" installed. You need this to make it work or you can use "socat" but that would require some minor changes in the query statements
    • Also the results did not get posted because the curl statement got a certificate error which could be due to several different things. Improper HA_Token which is likely if you used the duckdns certificate as your HA token. Also make sure you can access HA GUI directly from the internet using https://yourdomain.duckdns.org. The https: part is important and it won't work otherwise in dialogflow.


    Re-reading your previous posts I notice that you created certificates and such for let's encrypt. Generally if your just using the duckdns addon, all that let's encrypt stuff should just happen automatically provided you accepted the terms in the config file when setting up HA's duckdns addon package. Carefully check the duckdns setup part.

    Ynot

    Ynot.
    Software - Logitech Media Server Version: 7.9.1, Home Assistant 0.84.6, DialogFlow - V.1 API, LMS Controls App - Voice Control of LMS, OpenMediaVault 4.1.17 - Storage
    Add-ons - Spotty, UPnP / DLNA Bridge, ChromeCast Bridge,
    Players - Sonos, UPNP, PI3 - PI Core Player 3.5.0, Android- SB Player V1.4.0, AirPlay to GoogleHome and Minis
    Hardware - Server - i7-3.4Ghz, 4GB Ram, 6TB storage, Debian - 4.18

  10. #110
    Senior Member
    Join Date
    Sep 2017
    Posts
    134
    Quote Originally Posted by ynot1234567890 View Post
    The line is supposed to be this: https://mynameused.duckdns.org/api/s...sensor.art_ID? -H "Authorization: Bearer $HA_Token"
    The second line of the shell script files (ie: qry_alb.sh) should read HA_Token=Your_Long_Lived_Token_Here. Replace "Your_Long_Lived_Token_Here" with the Home Assistant generated token using the procedure I sent yesterday. You should create a dedicated long lived access token for the Dialogflow / shell scripts.

    As for the output from the script, a few things:
    • Looks like your system does not have the command "nc" installed. You need this to make it work or you can use "socat" but that would require some minor changes in the query statements
    • Also the results did not get posted because the curl statement got a certificate error which could be due to several different things. Improper HA_Token which is likely if you used the duckdns certificate as your HA token. Also make sure you can access HA GUI directly from the internet using https://yourdomain.duckdns.org. The https: part is important and it won't work otherwise in dialogflow.


    Re-reading your previous posts I notice that you created certificates and such for let's encrypt. Generally if your just using the duckdns addon, all that let's encrypt stuff should just happen automatically provided you accepted the terms in the config file when setting up HA's duckdns addon package. Carefully check the duckdns setup part.

    Ynot

    Ynot.
    Iĺm using the using the home assistant package available on synology diskstation through docker not HASSIO. I just add duckdns to my configuration.yaml file. Do I need HASSIO for this to work?
    Last edited by grimmace92; 2018-12-31 at 06:02.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •