Same, no response from my PC running HApyAudio and nothing in the status window besides Connected!. If I manually play something in VLC I hear the output. How can I tell if HApuAudio is connected to VLC?
The application uses a vlc dependency for python so there is nothing to configure and I don’t think the application will actually run without it. Did you edit the settings.json file? Does the application report the correct broker and port in the window? If the mqtt message is received by the application it will also show in the window. I may need to add some debugging logs to assist.
Yep, pointed to my MQTT broker IP in HA which shows New connections from the HApyAudio IP. As mentioned, I do not see see any info in the status window when a message is sent to the topic configured. How would I go about gathering debug logs for this?
There are no debug logs in the program at this point beyond what is shown in the status windows. I did confirm however that the program will not run if MQTT does not connect so I would say you are connected to your Broker. What port do you have configured for MQTT?
Can you try something like this on your windows PC to ensure you are getting the published data with a tool other than my program? http://mqtt-explorer.com/
At this point it looks like HApyAudio is connecting to the broker but not receiving any data on its subscribed topic. I will look to make a couple button items on the qui to test the tts and other items to ensure that that portion is working as expected.
Getting a little closer. Installed MQTT Explorer and noticed that I was not seeing the HApyAudio topic popup. So I decided to switch to my MQTT broker running on Centos 8 and bingo, now I see the connection and messages from my node-red client.
Unfortunately, I still get no status on the MERCURY PC and not update in the HApyAudio console via TTS or Audio response. Something still seems it’s not connected right.
Ok, I am making a few changes to try and get more status information and have noticed a couple things to clean up. Will try to push an update Wednesday with some better troubleshooting. I appreciate the testing you are doing, I am determined to get this working.
Bingo!!! So I forgot the one important step to re-configure my HA MQTT integration to point to my Centos 8 MQTT Broker. Once I did that, I started to see the messages in HApy Audio which then played on my PC speaker. Not sure why the HA MQTT Add-on doesn’t work!
Glad you got it working. During my testing in the last 24 hours I have discovered a few issues.
I have a few updates that I am going to push in the next day or two.
It should automatically create a Home Assistant Sensor that will provide status of the HApy Audio player - This is not working in my first release.
I am updating the settings.json file to include MQTT authentication if required by the broker.
I am updating the settings.json file to allow the selection of different tts options as I have been having some issues with the google one. Options will be, google, windows 10 built in tts.
I am adding more intuitive status messages to the console to assist in troubleshooting.
Thanks for working through this and let me know if there are any “features” you think would be useful.
Cheers!
Great! I’ve setup a Home Assistant automation to test this out and it works well. One thing I would say is that it’s a little slow on the response side. Using MQTT Explorer, I notice that the message gets there in a spit sec, but takes about 4-6 seconds for the audio to play.
If you’re going to set this up as a Home Assistant entity, will it be a media_player entity? That way we would be able to use any HA tts service against it. I currently use google_cloud as it’s more natural sounding due to WaveNet.
The 4-6 second delay is due to the fact that I am actually using Google TTS services called from python directly on your windows pc. The TTS is currently not being done by HA, this was my motiviation for using the built in tts services of windows. Ideally It would be great if HA could pass the mp3 file that it creates with it’s own tts engine via MQTT to HApyAudio. I currently don’t know how to do this but there are plenty of smart people in this forum who may be able to point me in the right direction.
Honestly I don’t know what is required to create a media_player entity. I am very new to HA development but am pretty familiar with the MQTT side of things. Again if there is someone in the community that can point me to some documentation on this that would be great.
I know that @thanksmister has created a great tool (wallpanel) that utilizes MQTT and is also exposed as a media_player to HA. Maybe they could be so kind as to point me in the direction to have my application show up as a Media Player in HA.
Yep, very familiar with @thanksmister, currently using Wallpanel for my HA fire tablet. I’m sure someone will chime in for a tip. This integration is very promising though, thanks for your effort.
Hmm…it seems that we can also use VLC directly via Telnet which exposes it as a media_player in Home Assistant. I’ve tested with with music as well as TTS which works great. Always good to have options!
Hi @Sireone, How can you config VLC on window so that can play media via it.
I’m using HAOS via VMWare and also want to play media via PC
I find out Hass.Agent can play media via Pc but It can’t get media_duration, media_position and volume or state of media so that I can’t match when media finish.
Do you find out any otherway to play media via PC ?
I’ve actually switched over to running the MPD addon in HA as I’m running my instance on a NUC. I’ve also ran it on a Pac as well. See here for the downloads…
@Sireone I also look at that, but I only can get media when I added microphone/usb speaker to PC and connect this device to VMware. I still don’t know how to play media direct on PC with onboard Intel speaker.
With mpd addon, if I set default input/output audio, there is no sound.
Do you run PC window with VMWare or install HASSOS dirrect to NUC ?
An elegant alternative is using Miracast technology, and everything is built-in already on most portable computers. This has been tested with a Windows 11 installation on a Lenovo Yoga 7i 15 (ideapad), but I believe it will equally work on Windows 10 and on any modern computer that supports Miracast. Ensure the optional Windows feature Wireless Display is properly installed and working (it can be verified by selecting Launch the Wireless Display app to project to this PC from Windows > Settings > System > Projecting to this PC). When the target computer is on the same network as your Home Assistant instance, it will automatically be detected by HA and appear under Integrations and offer to configure DLNA Digital Media Renderer for yourpcname (see more info at DLNA Digital Media Renderer - Home Assistant). Once this device is successfully submitted, head to your Music Assistant settings, under Player providers select Home Assistant MediaPlayers (this must have been previously added of course), and under Generic Settings add your computer from the Player entities (it will look something like media_palyer.yourpcname) and Save. From the MA Home screen the computer can now be selected as a Player. Turn it On, and play a song. On the computer the new Media Player application should automatically open and play the music (streaming music to a queue named playtoreceiversource:). While functionality of the queue is limited, it may be possible to tweak a few settings, and this is an easy installation. Enjoy!