Hi, did you try to send the image?
-
Yes I did, as a file, but it didn’t show on the hub.
-
Ah yes of course, forgot about the fixed map for sounds. Working now, thanks!
-
I was wondering if you could make the path to the folder which contains sounds and picture configurable? Further s.th. like
play file picture.jpg" for x seconds on device
currently I useplay file picture.jpg" on device and play stop on device
which works, but the other one is more intuitive. -
The folder for sounds and pictures is used for an internal webserver to stream the content. It can be changed to another directory, but what would be the advantage, all the file still need to be in that one directory.
As an alternative I could copy any path/file to the sounds directory for streaming. That way you can use per play command different file locations.I will look into a rule duration option for playing content. Not sure if the for x seconds can work.
-
and you probably know that you can copy with shell-execute a file from anywhere to the sounds directory with
execute "cp \"/x/y/z/filename.ext\" \"/home/pi/pimatic-app/sounds/filename.ext\" 2>/dev/null"
-
But i made the sounds directory also configurable in the plugin settings.
The default is a directory called sounds in the pimatic home directory.
-> version 0.1.10If you want to change the default sounds directory, you can put in any relative or absolute path/directory name. The relative path defaults from /home/pi/pimatic-app.
-
@bertreb said in New plugin pimatic-sounds:
I added a duration option in the rules. Syntax is
play file "..." on <device> for xxx [seconds, minutes, ...]
version 0.1.9
Thx for the update. It works for me on my hubs. Only on my Android TV after the image was shown it comes back to the so called “default media receiver”. When I send it once more it comes back to my previous app (netflix, waipu…). Seems that every 2nd try works.
Before I usedplay file "klingel_haustuer.jpg" vol 100 on mi-box-4s-tv after 500 ms and play stop on mi-box-4s-tv after 15 seconds
what worked fine. No idea what is different there. But I can simple keep the old style for the Android TV.@bertreb said in New plugin pimatic-sounds:
But i made the sounds directory also configurable in the plugin settings.
Thx for this. Works fine. I asked for this due to my structure I have on my system. Maybe other users as well has some specials which they now can configure…
-
One more thing I found on my system). Scenario as follows, let us say when a speaker is on vol 30 and I send a sound to be played with 50 the speaker gets not back to 30. I have compensate it by resetting the speaker to a default value after the sound is play. This is not a new problem. I think you have handled this in the past.
Example:
play file "dingDong.mp3" vol 50 on google-nest-hub-wohnzimmer and play main vol $standardVol on google-nest-hub-wohnzimmer after 5 seconds
-
The volume and content of playing stream should resume after an announcement.
I will check that also.Be aware that not all streams can be restarted because they originated from a source like netflix or spotify. Only services with an url (like TuneIn) can be restarted.
If you want to use a better announcement function you should use assistant-relay with a sound GoogleDevice -
Thx. Seems to work. First tests were successful!
BTW: The pimatic-sounds plugin is missing in your signature …
@bertreb said in New plugin pimatic-sounds:
Be aware that not all streams can be restarted because they originated from a source like netflix or spotify. Only services with an url (like TuneIn) can be restarted.
You are right. Netflix was a bad example. The stream gets stopped than, but important for me is that after a picture was shown it comes back to the app where it was before.
@bertreb said in New plugin pimatic-sounds:
If you want to use a better announcement function you should use assistant-relay with a sound GoogleDevice
I will got for it when I will have more time. Currently I am not that much in front of my keyboard…
Did you check the mentioned problem which I have regarding the volume resume after accouncing s.th. with higher vol?
-
I did some edits on assistant-relay and fixes on volume handling. New version 0.1.16
If you install assistant-relay and use the related GoogleDevice you get 2 extra’s:
- real text announcements as an interrupt of whatever is playing. After the annoucement, the playing stream resumes
- you can send text commands to google assistant, as if you where talking to an assistant device.
The rule command for that is (with an example question) “play ask 'whats the time?’ on <GoogleDevice>”. Your google mini, hub, etc will respond with the current time.
This way you can even control in google home known devices. For example ‘switch … on’, ‘set temperature to …’ . This is of course a 1-way interface to those devices.
-
Seems that the
play file "X" on device for Y seconds
feature doesn’t supports time variables. Could you add this? -
Wow nice. You are so fast. Too fast for me… I forgot one thing yesterday. It would be nice to get the current volume setting in the pimatic GH device, beside status and info?