Comments (34)
it's impossible to create a dropdown menu with nextion screens, but I will see what I can do
from nspanel-lovelace-ui.
callback bug should be fixed in v1.8.4
from nspanel-lovelace-ui.
@hatran0884
on current main/dev version
from nspanel-lovelace-ui.
looks great, i guess we can change the device by that arrow ?
from nspanel-lovelace-ui.
Just update in HACS to main (redownload, select main, wait a sec until HACS finished loading, press download) and try yourself. Arrow let's select you a speaker, click on the name of the speaker to confirm the change. (Not really intuitive, but no idea to make it better)
from nspanel-lovelace-ui.
Just updated but my unit doesnt show the speaker, i have updated both hacs and nspanel.tft. What might be wrong?
from nspanel-lovelace-ui.
Strange, did you restart AppDeamon?
from nspanel-lovelace-ui.
yes, i forgot to restart Appdaemon, now its working. the problem is now the media card is unable to play spotify songs by itself, i will have to start playing by smartphone first. it happens both on HASS and this media page. so i guess it is the problem of spotify component itself.
i have a BOSE soundtouch and it has an entity named media_player.soundtouch, so i am thinking is it okay to have another media page for this device and then i can play spotify indirectly through this device ?
from nspanel-lovelace-ui.
yes, I'm just using the HomeAssistant API, so this is a limitation of the spotify integration in HA
it doesn't have to be spotify, that's just the only thing I can test with, you can use any media_player in HA
from nspanel-lovelace-ui.
i have just tried and it worked, however it brings up another small issue, this soundtouch media player has a power button, on HASS dasboard, i will have to turn it on first to play spotify, so could you pls add a power button on the media page ? the spotify media page should be distingushed from other media page, so only spotify page should have a speaker selection and should not have a power button.
sorry if i have requested too much, it is up to you to code it further.
from nspanel-lovelace-ui.
I don't have such a speaker can you send pictures of the development section in Homeassistent in different states of that speaker (off, on, playing)
from nspanel-lovelace-ui.
Here u go, it seems it does not have an ON state, whenever i turn it on, its state changes to playing.
from nspanel-lovelace-ui.
from nspanel-lovelace-ui.
No idea how to detect if the device has the capability to turn it on or off.
Would this be a Solution? Could simply turn it on in case it's off
if button_type == "media-pause":
player = self._ha_api.get_entity(entity_id)
if player.state == "off":
player.call_service("turn_on")
player.call_service("media_play_pause")
from nspanel-lovelace-ui.
it should be okay, any chance I can test it now ?
from nspanel-lovelace-ui.
This change is pushed, just update to main
from nspanel-lovelace-ui.
it worked like a charm, i just need to press play button to turn on the media player and start playing songs, but there is a litte issue with the speaker selector, this media player has 03 selections: AUX, Bluetooth and Spotify, but if i change to AUX or Bluetooth, the Spotify will disappear and i wont be able to change it back to Spotify. So could you code to remove the speaker selector or has an option in the config to disable this selector ?
from nspanel-lovelace-ui.
the selector will be displayed if there is more than one source in this list
as you can see spotify isn't in that list, so it's also not selectable
from nspanel-lovelace-ui.
Yes, there are actually 4 modes : AUX, Bluetooth, Airplay and Spotify, but the modes: Airplay and Spotify will only be visible once the smartphone or iphone actives that mode. or if the bose soundtouch is off and then turns on, it will change to Spotify.
thats why i was asking if you could make an option in the config to disable or hide this selector? or create a power button.
from nspanel-lovelace-ui.
page should now show a power button if the device supports it, but I cannot test that, because I don't have such a device, if it's not working I will release a bugfix for v1.9.1
from nspanel-lovelace-ui.
i have just tested , the power button does not show on the media page. and the play button also does not turn it on to play.
from nspanel-lovelace-ui.
can you send me the mqtt message that is generated for the media page from the appdaemon log
from nspanel-lovelace-ui.
here is what i got from Appdaemon log:
2022-03-29 20:57:00.014358 INFO nspanel: Sending MQTT Message: time,20:57
2022-03-29 20:56:11.617634 INFO nspanel: Sending MQTT Message: entityUpd,|media_player.soundtouch_living_room|Soundtouch Living Room|0|||0|9||AUX?BLUETOOTH|disable
2022-03-29 20:56:11.607027 INFO nspanel: Started rendering of page 2 with type cardMedia
2022-03-29 20:56:07.805965 INFO nspanel: Sending MQTT Message: weatherUpdate,?12?21.4��C?Wed?12?27.8 ��C?Thu?20?29.2 ��C?Fri?20?22.6 ��C?Energy?32?10.23 kWh
2022-03-29 20:56:07.799205 INFO nspanel: Forecast 1 is overrriden with {'sensor.nang_luong_hom_nay': {'name': 'Energy', 'icon': 'solar-power'}}
2022-03-29 20:56:07.788105 INFO nspanel: Received Message from Screen: event,screensaverOpen
2022-03-29 20:56:04.068900 INFO nspanel: Sending MQTT Message: entityUpd,|media_player.soundtouch_living_room|Soundtouch Living Room|0|AMEE - thay m���i c�� g��i y��u anh|AMEE|25|8|SPOTIFY|AUX?BLUETOOTH|disable
2022-03-29 20:56:04.058851 INFO nspanel: Started rendering of page 2 with type cardMedia
2022-03-29 20:56:00.014374 INFO nspanel: Sending MQTT Message: time,20:56
2022-03-29 20:55:51.781165 INFO nspanel: Sending MQTT Message: entityUpd,|media_player.soundtouch_living_room|Soundtouch Living Room|0|||25|9|INVALID_SOURCE|AUX?BLUETOOTH|disable
2022-03-29 20:55:51.760638 INFO nspanel: Sending MQTT Message: pageType,cardMedia
2022-03-29 20:55:51.756971 INFO nspanel: Started rendering of page 2 with type cardMedia
2022-03-29 20:55:51.753951 INFO nspanel: Button Press Event; entity_id: screensaver; button_type: bExit; value: 1
from nspanel-lovelace-ui.
can you update to v2.0.0 and try again?
from nspanel-lovelace-ui.
no, unfortunately, still the same, now the switch items also gone and replaced by:
switch
switch
delete
from nspanel-lovelace-ui.
i think you dont need to waste your time to create a power button, just go back to the way of pressing the play button to turn it on and play. i am okay with that.
from nspanel-lovelace-ui.
did you restart appdaemon?
I implemented it the same way, I did for the alarm panel, it should work ..., waht does the appdaemon log say?
from nspanel-lovelace-ui.
sorry, i only updated the display firmware, forgot to update the appdaemon backend. it working now, the power button now shows up but nothing happens when i press this power button.
from nspanel-lovelace-ui.
here the appdaemon logs:
022-03-29 21:46:51.572585 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-OnOff; value: None
2022-03-29 21:46:51.569402 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-OnOff
2022-03-29 21:46:50.881949 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-pause; value: None
2022-03-29 21:46:50.872052 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-pause
2022-03-29 21:46:50.061881 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-pause; value: None
2022-03-29 21:46:50.059039 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-pause
2022-03-29 21:46:49.749979 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-back; value: None
2022-03-29 21:46:49.746960 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-back
2022-03-29 21:46:49.534696 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-next; value: None
2022-03-29 21:46:49.531916 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-next
2022-03-29 21:46:49.504115 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-pause; value: None
2022-03-29 21:46:49.501396 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-pause
2022-03-29 21:46:48.530273 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-OnOff; value: None
2022-03-29 21:46:48.527600 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-OnOff
2022-03-29 21:46:48.502761 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-pause; value: None
2022-03-29 21:46:48.500101 INFO nspanel: Received Message from Screen: event,buttonPress2,media_player.soundtouch_living_room,media-pause
2022-03-29 21:46:47.590602 INFO nspanel: Button Press Event; entity_id: media_player.soundtouch_living_room; button_type: media-OnOff; value: None
from nspanel-lovelace-ui.
hmm, media-OnOff looks good
it's calling the same api I did with the play button before
if button_type == "media-OnOff":
if player.state == "off":
self._ha_api.get_entity(entity_id).call_service("turn_on")
else:
self._ha_api.get_entity(entity_id).call_service("turn_off")
from nspanel-lovelace-ui.
nevermind found the issue, update to v2.0.1, restart appdaemon and try again
from nspanel-lovelace-ui.
yes, now the button works but only with turn off event, whenever i press turn on, the source says: invalid_source, then i tried to turn it on by HASS dashboard, the media player turns to unavailable. i checked the HASS log and found this:
Soundtouch Living Room became unavailable by Tran Manh Ha
i tried to restart HASS without help, i am not sure if this NSpanel version is doing smt that causes the media player to become unavailble ? i remember yesterday i can easily turn on or turn off this media player using HASS dashboard without issue.
pls correct me if i am wrong
from nspanel-lovelace-ui.
it's calling the exact same api from HA
this is the power button:
if button_type == "media-OnOff":
if player.state == "off":
self._ha_api.get_entity(entity_id).call_service("turn_on")
else:
self._ha_api.get_entity(entity_id).call_service("turn_off")
and the play button did somthing like this
if player.state == "off":
self._ha_api.get_entity(entity_id).call_service("turn_on")
does it also become unavalibe when you are calling the turn_off service from HA developer tools?
from nspanel-lovelace-ui.
strange, i tried to call turn off and turn on services from HA developer tools for a few times, now i can turn on and turn off the media player using both HA and NSpanel without issue. so i will keep testing it further. thank you
from nspanel-lovelace-ui.
Related Issues (20)
- [BUG] HA 2024.4 - cannot display forecast properly HOT 4
- [Help] Waiting for Content HOT 4
- [Help] entity no refresh the same time screensaver2 HOT 2
- no weather icons [BUG] HOT 17
- NSpanel home screen stopped showing icons HOT 1
- [Help] Waiting for Content HOT 3
- [Feature Request] Preview of rendering apps.yaml HOT 3
- [BUG] Panel Screen doesn't show Entities correctly or strong delayed HOT 1
- [Feature Request]
- [BUG] Display suddently black HOT 5
- [BUG] NSPanel screensaver no longer displays icons for weather forecast HOT 3
- [BUG] Getting WARNING AppDaemon: No app description found from Appdaemon HOT 11
- [Help] Waiting for Content HOT 12
- [BUG] Error while initial flashing tft file HOT 7
- [Feature Request] Change font color under icons on screensaver HOT 1
- [BUG] Auto Update Nextion from 53 / V4.3.3 to 54 / V4.4.0 update run no error but not installed HOT 2
- [Feature Request] Support Snoff MQTT HOT 2
- [Feature Request] More Colors for Icons on Screensaver HOT 2
- [Help] event1 beim Abfallkalender HOT 1
- Adding NSPanel buttons to Home Assistant as entites HOT 3
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 nspanel-lovelace-ui.