Comments (7)
I don't have any devices at my hand which can be "turned off" thus I can't test this scenario myself. Can you please test these two commands when the speaker is off and, respectively is on, and post back the results?
http://spe.ak.er.ip/httpapi.asp?command=getStatusEx
http://spe.ak.er.ip/httpapi.asp?command=getPlayerStatus
Also, if you unplug the power cable and power it back up, does it start truned off or on?
Also, when you run from dev tools the service linkplay.snapshot
only, does the speaker turn on by itself?
from home-assistant-custom-components-linkplay.
There doesn't seem to be any difference in the response that's usable for detecting if the thing is on.
json.zip
Please also note that if the player is turned on and not playing the output is exactly similar. When the player is on and not playing, it'll turn off if within a few minutes.
snapshot
does not turn on the player. I've played around with httpapi.asp?command=IOSimuRead:x
to see if it is controlled by GPIO but not come to any conclusion :-(
Best I've come up with is the script below.
announce_linkplay:
sequence:
- service: linkplay.snapshot
data_template:
entity_id: "{{ entity_id }}"
- choose:
- conditions:
- condition: template
value_template: "{{ is_state(entity_id, 'idle') }}"
sequence:
- service: media_player.play_media
data_template:
entity_id: "{{ entity_id }}"
media_content_id: 'https://raw.githubusercontent.com/anars/blank-audio/master/1-second-of-silence.mp3'
media_content_type: url
- delay: '00:00:05'
- service: media_player.volume_set
data_template:
entity_id: "{{ entity_id }}"
volume_level: "{{ volume }}"
- service: tts.google_cloud_say
data_template:
entity_id: "{{ entity_id }}"
message: "{{ message }}"
- delay: "{{ delay }}"
- service: linkplay.restore
data_template:
entity_id: "{{ entity_id }}"
from home-assistant-custom-components-linkplay.
Please grab the component from the testing branch and see if it fixes your problem.
from home-assistant-custom-components-linkplay.
Doesn't seem to make any difference. I guess you tried to make it power on when calling snapshot?
from home-assistant-custom-components-linkplay.
Yes there's a similar situation when you're on a Line-In source, it takes time for the speaker to switch to network stream source (which TTS is) and you get first part of audio cut off in that case. It fades out and in etc. Needs some fiddling with delays to properly handle this.
Unfortunately I don't have such a device at hand, which is able to turn off by itself and needs wake up, so I can't do thorough tests.
I was about to suggest to play a silence file first but I see that you already thought about that. I could suggest to store your 1-second-of-silence.mp3 on hass server itself, so that the player doesn't need to reach outside on the internet just for that.
from home-assistant-custom-components-linkplay.
Yes, it was just to make a POC.
Let's close this for now. I'll let you know if I figure something out.
from home-assistant-custom-components-linkplay.
I am happy to help testing on my speakers DOSS Cloufox A1, FW 3.6 who do not appear on the wifi router if they are turned off, i guess there is no Wake On WiFi possible here?
from home-assistant-custom-components-linkplay.
Related Issues (20)
- Not displaying the envelope when playing from DLNA server
- Joining multiroom group does not work, if host is a resolvable name HOT 2
- Muting the master of a multi-room group does not seem to work HOT 4
- Is there any way to power the device on/off? HOT 1
- Failure to setup integration if device is not turned on. HOT 3
- Unable to use tts HOT 1
- Up2stream becomes unavailabe HOT 3
- Group/Ungroup toggle inconsistent with 2 slaves
- Rakoit M50 unavailable HOT 5
- Example config doesn't pass checks on 2023.11.2 HOT 1
- led_off doesn't work for Arylics anymore HOT 2
- Using deprecated constants for supported features HOT 1
- Integration problems with Harman Kardon Allure HOT 1
- NameError when connection is lost via UPnP
- Updating linkplay media_player took longer than the scheduled update interval HOT 3
- Announcements/TTS: how to use the resume feature? HOT 2
- The integration is not working with 2024.5.0b0 HOT 8
- linkplay' calls async_register from a thread at custom_components/linkplay/__init__.py, line 171: hass.services.async_register HOT 2
- Add MTLS-support HOT 5
- Add command to Command service
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home-assistant-custom-components-linkplay.