Automation with Home Assistant

Pokerbarlo

New member
Joined
Jan 30, 2023
Messages
3
If anyone from WiiM is reading this. I am sure this advice will bring in a lot of sales and beat Bluesound Node to a pulp. Since your target market are the more technical, practical and objective side of the home audio industry. Who like science good measurements and technical data. It would be wise to target the same type of people in the Smart Home Automation side of things. I am part of both.

Most objective, technical and practical Smart Home Enthusiats use Home Assistant because it is open source and works with high quality low priced devices like Zigbee. If you guys can get your streamers integrated into the Home Assistant eco system wherein clients can create automations that trigger certain songs or playlists in any music zone in their house I am sure you will be selling more than 3 to unlimited units per client.

Imagine these scenarios:
1. Home intrusion triggers motion, window, door and camera sensors then Home Assistant plays Highway to hell in all zones at high volume.
2. Person forgets to turn off the oven, stove or some appliance the Home Assistant plays a certain song in whichever room the client is as a reminder.
3. At a certain time Home Assitant plays dinner playlist at the dinning room zone

Automation with Home Assistant and other smart devices can be endless.
 
You can use virtual sensors and do much of that with WiIM’s existing Alexa integration using Alexa routines triggered by those virtual sensors. This can be done using Smartthings or IFTTT with Voicemonkey, Mkzense etc and is well known to experienced Alexa users. I don’t need to use things like Home Assistant but I’m sure there’s a similar mechanism there than could be pressed into use without any further development by WiiM.

Edit: see https://community.home-assistant.io/t/triggering-alexa-routines-with-virtual-sensors/470435
 
You can simply call WiiM http api commands in the HA environment if you only need to use it in your automations.
 
You can use virtual sensors and do much of that with WiIM’s existing Alexa integration using Alexa routines triggered by those virtual sensors. This can be done using Smartthings or IFTTT with Voicemonkey, Mkzense etc and is well known to experienced Alexa users. I don’t need to use things like Home Assistant but I’m sure there’s a similar mechanism there than could be pressed into use without any further development by WiiM.

Edit: see https://community.home-assistant.io/t/triggering-alexa-routines-with-virtual-sensors/470435
Some of us prefer to use local and open source tools like Home Assistant. Plus one for strong Home Assistant integration. Its the 2nd most active open source project right now. There is already a start.


Great that Wiim has the api, so that integrations are possible
 
Last edited:
Some of us prefer to use local and open source tools like Home Assistant. Plus one for Home assistant integration. Its the 2nd most active open source project right now
And some of us are happy using Alexa for the limited requirements they have :)
 
And some of us are happy using Alexa for the limited requirements they have :)
Sure :) and its great there are options for folks. The OP was talking about his specific use case, using Home Assistant in this case. For some integration via Alexa, vs a native HA integration, is actually more involved (setting up Amazon Developer account and AWS). Native integration means you can simply use the device like any other media player for automation. For example, I have an amp turn on when a media player status changes to playing.

alias: Wiim playing
trigger:
- entity_id:
- media_player.Wiim
platform: state
to: playing
action:
- data:
entity_id: input_boolean.toggle_onyko
service: input_boolean.turn_on
mode: single
 
Last edited:
If anyone from WiiM is reading this. I am sure this advice will bring in a lot of sales and beat Bluesound Node to a pulp. Since your target market are the more technical, practical and objective side of the home audio industry. Who like science good measurements and technical data. It would be wise to target the same type of people in the Smart Home Automation side of things. I am part of both.

Most objective, technical and practical Smart Home Enthusiats use Home Assistant because it is open source and works with high quality low priced devices like Zigbee. If you guys can get your streamers integrated into the Home Assistant eco system wherein clients can create automations that trigger certain songs or playlists in any music zone in their house I am sure you will be selling more than 3 to unlimited units per client.

Imagine these scenarios:
1. Home intrusion triggers motion, window, door and camera sensors then Home Assistant plays Highway to hell in all zones at high volume.
2. Person forgets to turn off the oven, stove or some appliance the Home Assistant plays a certain song in whichever room the client is as a reminder.
3. At a certain time Home Assitant plays dinner playlist at the dinning room zone

Automation with Home Assistant and other smart devices can be endless.
This has already gotten some attention. Though not sure whether your scenarios are achievable with the current APIs.
 
Though not sure whether your scenarios are achievable with the current APIs.
With Onlyoneme's integration, this is implemented very simply. File address can be tracked through developer tools.

For example, for internal storage it looks like this:
event_type: call_service
data:
domain: media_player
service: play_media
service_data:
entity_id: media_player.soundwm
media_content_id: >-
media-source://media_source/local/Royksopp-ft.-Robyn-vs-Lady-Gaga-Bloody-Monument.mp3
media_content_type: audio/mpeg

The HA has problems with playing playlists, so it's easier to implement the functionality by calling a preset.
I tested playing album/folders from a local dlna server, everything works as expected. But then I preferred to launch the preset with Spotify. This gives more variability.
 
Only the most basic functions are supported but at least it works. Just use beta branch instead of master to get better Pro support.
 
Hey guys - I need some help with a decision betw a Wiim Pro or an Arylic (im at a need for immediate purchase).

My minimum requirements are to be able to use Home Assistant (local control) and change the input source betw analog or optical as well as volume_up and volume_dn as a minimum.

Currently, it looks like the Arylic supports it, but from this discussion thread, it appears that the WiiM Pro isnt quite there yet.

I really LOVE the fact that the WiiM has a road map and is continually being developed and from a hardware/cost perspective so it IS my preference, however, without my minimum HA requirements being met - its a deal breaker (regretfully)

From what I can see in the Github page, volume control is suppoprted, but I cant see anything to do with the source/input selection.


Can someone shed some light?
 
Hey guys - I need some help with a decision betw a Wiim Pro or an Arylic (im at a need for immediate purchase).

My minimum requirements are to be able to use Home Assistant (local control) and change the input source betw analog or optical as well as volume_up and volume_dn as a minimum.

Currently, it looks like the Arylic supports it, but from this discussion thread, it appears that the WiiM Pro isnt quite there yet.

I really LOVE the fact that the WiiM has a road map and is continually being developed and from a hardware/cost perspective so it IS my preference, however, without my minimum HA requirements being met - its a deal breaker (regretfully)

From what I can see in the Github page, volume control is suppoprted, but I cant see anything to do with the source/input selection.


Can someone shed some light?
The explanation is simple - it's not available because I didn't need such feature :)
 
hey @onlyoneme
I posted this in the HA forums but theres not a lot of help over there.

Ive got this in my config.yaml

rest_command:
wiim_pro_bluetooth:
url: "https://192.168.1.55/httpapi.asp?command=setPlayerCmd:switchmode:bluetooth"
verify_ssl: false

When I type the URL into a browser it works BUT when I call the RESTful Command: wiim_pro_bluetooth

service: rest_command.wiim_pro_bluetooth
data: {}

in developer/services it doesnt work. Seems pretty simple and straightforward but obviously I am missing something?

Nothing shows up in the logs.
 
hey @onlyoneme
I posted this in the HA forums but theres not a lot of help over there.

Ive got this in my config.yaml

rest_command:
wiim_pro_bluetooth:
url: "https://192.168.1.55/httpapi.asp?command=setPlayerCmd:switchmode:bluetooth"
verify_ssl: false

When I type the URL into a browser it works BUT when I call the RESTful Command: wiim_pro_bluetooth

service: rest_command.wiim_pro_bluetooth
data: {}

in developer/services it doesnt work. Seems pretty simple and straightforward but obviously I am missing something?

Nothing shows up in the logs.
Hmm. I've tried with setPlayerCmd:switchmode:wifi and it seems to work for me when executed from the Developer tools. The same way you've tried, just a service name and empty data.
 
So heres the stupid bit.

Ive switched to using curl commands because it works in the CLI.
In config.yaml

shell_command:
wiim_pro_optical: curl -k "https:xxx.xxx.xx.x/httpapi.asp?command=setPlayerCmd:switchmode:eek:ptical"
wiim_pro_volume_set: curl -k "https://xxx.xxx.xx.x/httpapi.asp?command=setPlayerCmd:vol:{{ states("input_number.wiim_volume") }}"


In automations


This works.

alias: set_wim_volume
trigger:
- platform: state
entity_id: input_number.wiim_volume
action:
- service: shell_command.wiim_pro_volume_set
data: {}


This DOES NOT WORK and returns with an error code 3

alias: wiim optical
trigger:
- platform: state
entity_id:
- input_boolean.wiim_optical
to: "on"
condition: []
action:
- service: shell_command.wiim_pro_optical
data: {}



If I call the same URL in a browser they both work and come back with a response of "OK."
If I use the curl command in the HA CLI - they both also work correctly
 
So heres the stupid bit.

Ive switched to using curl commands because it works in the CLI.
In config.yaml

shell_command:
wiim_pro_optical: curl -k "https:xxx.xxx.xx.x/httpapi.asp?command=setPlayerCmd:switchmode:eek:ptical"
wiim_pro_volume_set: curl -k "https://xxx.xxx.xx.x/httpapi.asp?command=setPlayerCmd:vol:{{ states("input_number.wiim_volume") }}"


In automations


This works.

alias: set_wim_volume
trigger:
- platform: state
entity_id: input_number.wiim_volume
action:
- service: shell_command.wiim_pro_volume_set
data: {}


This DOES NOT WORK and returns with an error code 3

alias: wiim optical
trigger:
- platform: state
entity_id:
- input_boolean.wiim_optical
to: "on"
condition: []
action:
- service: shell_command.wiim_pro_optical
data: {}



If I call the same URL in a browser they both work and come back with a response of "OK."
If I use the curl command in the HA CLI - they both also work correctly
Is it "https:xxx.xxx.xx.xxx" or "https://xxx.xxx.xx.xxx" for switching?
 
+1 for a WiiM supported home assistant integration

@onlyoneme can you publish your integration via HACs please? It makes life so much easier and i think you’ll get more support with broader distribution
 
Back
Top