Closed ynot123 closed 6 years ago
This looks awesome! I see you updated the code - I will replace the old stuff tomorrow evening with the new code and test drive it... I will let you know!
Just realized I forgot to create a DF for syncing / unsyncing players. Will try to take care of that later next week. Thinking:
The player "kitchen" in the example above would be the master and uses the DF entity @lms_player
and a new DF entity @lms_sync_player
would be created containing the 5 sync able players.
Also a chunk of new code will be required in LMS_script.yaml
to handle the requests. It should be pretty straight forward as the leg work is already done in the automation of the GUI.
I will let you know when that gets done. You can simply import the specific items (4 intents and 1 entity) into DF and update lms_script.yaml to accomplish this.
Ynot
Hi,
I updated the stuff and it works great - found one bug, but I believe it is lovelace related - The dropdown to choose the action e.g. play playlist sometimes come up blank.
I made a few notes, while installing but left the little piece of paper at my office I will capture it Monday morning. Nothing major that I found, and for interest sake it took about 35 min to set up from scratch.
Looking forward to the syncing of devices - on th DF side perhaps also something like add kitchen to media room, remove kitchen from mediaroom. Not sure if it will interfere with other commands using the "add" and "remove"
I see these in my logs - not sure if its related to the changes yet.
components/sensor/template.py (WARNING) "Could not render template Master Speaker, the state is unknown"
Thanks, the DF for linking will likely be "sync or link" so as not to interfere with other functions.
Haven't experienced any Lovelace issues as far as I am aware (and I use it all the time) but will look for it. It should always return to ____ when the command gets issued. Make sure you don't have any blank elements listed in the options section of your input_select.lms_command
in the configuration.yaml file.
Finally, I don't get the error listed above so perhaps its something in your setup. You would need to do more troubleshooting to figure out when it happens exactly. If its related to the LMS Controls app and I can duplicate it, likely can fix it too. Let me know.
Thanks for your feedback and have a good weekend. Ynot
I just updated HA - I see lovelace changed the tap-action from "turn-on" to "toggle"
That is correct. Same for repeat. Lovelace simply toggles the input_boolean from on to off (or vice versa) and the script looks at the input_boolean status to set the shuffle or repeat modes. I've had it that way for sometime now.
Upgraded my HA installation last night and now see what you mean about tap action. Had to change them all to toggle to make it work. Will update that in the next little release.
Just testing the DF for sync / unsync (link / unlink) and should release it in the next day or two hopefully. It will consists of new DF, small update to the LMS script and the update to lovelace UI.
Shouldn't take more than 10 minutes to update hopefully.
I will await your notes as well in case there is something additional to add.
Hi, Here i the notes I took while setting it up:
Thanks for the notes. I will updated the items as outlined below.
configuration.yaml
, add the additional triggers in the automation.yaml
and script_lms_controls.yaml
files to deal with the extras. Finally, update groups.yaml
and ui-lovelace.yaml
to display them in HA. I had thought five (5) was enough :). I actually have eight (8) devices some squeezeplayers, some UPNP, some SONOS and some CAST. .Glad to hear you're using it, makes the work worth while. Enjoy and thanks for the help and suggestions. If you're good I will close this item now.
Ynot.
Thx! I use it extensively - My HASS started out just to control a few led lights where my wife didn't want switches visible and it quickly escalated into a beast of another colour with main focus on AV stuff... Started off on openhab, and had something similiar to this, much more crude though. So glad I spotted this in a forum somewhere - believe it was slimdevices forum.
I'll try and beef up the sync device amount without breaking it, currently on 5 media_players, but soon it will be closer to 8 or 9 depending if I pimp the garage.
Again - Thx for all the effort!
I hacked in a radio station cheat into the UI. Just thought I'll share it if you want to incorporate it. It is easily customisable.
I added an input_select with the radio station names, and added a script which launches on its change.
radio_station:
name: 'Select Radio Station:'
icon: mdi:radio
initial: _____________________
options:
- _____________________
- Jacaranda
- Highveld 94.7
- Impact
- 702
- RSG
- Groot FM
- Classic FM
- Radio 538
- Veronica
- Sky Radio
- SLAM! Hardstyle
- Sleep Radio
- Ambient Sleeping Pill
- Radio Art - Sleep
- Calm Radio - Sleep
- Dinamo.FM Sleep
- input_select.radio_station
lms_cmd_play_radio2:
alias: "LMS command to play radio station"
sequence:
- service: media_player.volume_set
data_template:
entity_id: "media_player.{{states.input_select.lms_player.state}}"
volume_level: '0.50'
- service: media_player.play_media
data_template:
entity_id: "media_player.{{states.input_select.lms_player.state}}"
media_content_id: >
{% if is_state("input_select.radio_station", "Jacaranda") %} http://opml.radiotime.com/Tune.ashx?id=s6410&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2d444aedc36f4d5f2d3e7d45d67d7683
{% elif is_state("input_select.radio_station", "Highveld 94.7") %} http://opml.radiotime.com/Tune.ashx?id=s6400&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2d444aedc36f4d5f2d3e7d45d67d7683
{% elif is_state("input_select.radio_station", "Impact") %} http://opml.radiotime.com/Tune.ashx?id=s6412&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2d444aedc36f4d5f2d3e7d45d67d7683
{% elif is_state("input_select.radio_station", "702") %} http://opml.radiotime.com/Tune.ashx?id=s25727&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2d444aedc36f4d5f2d3e7d45d67d7683
{% elif is_state("input_select.radio_station", "RSG") %} http://opml.radiotime.com/Tune.ashx?id=s143888&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2d444aedc36f4d5f2d3e7d45d67d7683
{% elif is_state("input_select.radio_station", "Groot FM") %} http://opml.radiotime.com/Tune.ashx?id=s8386&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2d444aedc36f4d5f2d3e7d45d67d7683
{% elif is_state("input_select.radio_station", "Classic FM") %} http://opml.radiotime.com/Tune.ashx?id=s24967&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=2d444aedc36f4d5f2d3e7d45d67d7683
{% elif is_state("input_select.radio_station", "Radio 538") %} http://vip-icecast.538.lw.triple-it.nl:80/RADIO538_MP3
{% elif is_state("input_select.radio_station", "Veronica") %} http://8543.live.streamtheworld.com/VERONICACMP3
{% elif is_state("input_select.radio_station", "Sky Radio") %} http://8623.live.streamtheworld.com:80/SKYRADIOAAC_SC
{% elif is_state("input_select.radio_station", "SLAM! Hardstyle") %} http://vip-icecast.538.lw.triple-it.nl/WEB17_MP3
{% elif is_state("input_select.radio_station", "Sleep Radio") %} http://37.59.28.208:8722/stream
{% elif is_state("input_select.radio_station", "Ambient Sleeping Pill") %} http://perseus.shoutca.st:8447/h
{% elif is_state("input_select.radio_station", "Radio Art - Sleep") %} http://live.radioart.com/fSleep.mp3
{% elif is_state("input_select.radio_station", "Calm Radio - Sleep") %} http://streams.calmradio.com/api/39/128/stream
{% elif is_state("input_select.radio_station", "Dinamo.FM Sleep") %} http://channels.dinamo.fm/sleep-aac
{% endif %}
media_content_type: 'audio/mp4'
User ekkesa suggested a few new features which will be implemented in the near future:
Once completed, I will update the original posts in the HA and squeezebox forums and of course the code here.
Cheers, Ynot.