@bertreb thanks!
-
New plugin pimatic-sounds
-
The pimatic-sounds plugin is now split into 2 versions:
- basic version called pimatic-sounds-basic. This version is based on version 0.1.20 of pimatic-sounds.
- a development version with new features called pimatic-sounds. Adding features (like integrating catt) will take place in the pimatic-sounds plugin. The latest version here is 0.2.13
-
I discovered that catt with another way of addressing is capable of casting to groups.
I change the code to that => version 0.2.14The advantage of using pimatic-sounds with assistant-relay active:
- real announcement of text (interrupt whatever is playing)
- you can get answers to questions (like talking to an assistant). To get the actual time use the rule ‘play ask “what is the time” on <your sounds device>’
- you can control devices like you would do talking to google assistant. To switch on the lights in the living room use rule ‘play ask “switch lights livingroom on” on <your sounds device>’
- casting of streaming video. Cast the stream of a security camera after detecting motion, use for example rule ‘when motion detected’ then ‘play site “<streaming url>” on <google device with screen> for 20 seconds’
When updating to version 0.2.14 you need to change the already added devices names to the friendly name. The friendly name is the text behind the ‘-’. After changing the name and saving the device it should initialise again. Check and change your rules if the old device names are used. This change is allowing catt to cast to groups.
-
@bertreb sounds great! Maybe I will look into it this weekend. I do see one cool advantage in assistant relay and that is that I can control tuya devices that way 😉.
But haven’t looked into assistant relay and how to configure it.
I will let you know if I can get it to work 👍👍
-
First thx for all the work you put in here!
A question regarding the basic version. Why you choose 0.1.20? In 0.1.22 you have fixed the duration fix which was really nice.
20201009, v0.1.21 small fix 20201010, v0.1.22 fix duration timer
One thing I am missing in the new regular version is that the text which should be cast to a Hub is not more shown in the Hub display. This was really nice. At the moment just the file name is displayed which is created for the related device.
Before:
Now:
-
Hi, the choice for 0.1.20 was a suggestion of @djmvt, but i will update to 0.1.22
I will see if the display of the text can be smarter. For a play file or site is will stay the filename. But for text of text-variable it should show the content.
I will make updates today for both plugins.
-
Really nice. I changed now to this plugin. It works better for me at the moment. I haven’t the initialization problem with this one after startup were no announcment will be played.
play text | file
works fine for me. For site casting I create a script some days before, because I recognized that the group casting works only be addressing the friendly name as well. Due to all the problems I had in my envirnmont I haven’t pointed it out here. I have kept you busy enough (sorry for that).Nevertheless I will try to get the assistant relay working somehow!
-
@bertreb said in New plugin pimatic-sounds:
Pimatic-sounds-basic is updated to version 0.1.22
Hi Bert,
would you be so kind and only if it is possible to add the function which lets show the announced text in a Nest Hub. Currently in this version just “pimatic announcement” is shown. I know from some 2.x version it was there. -
Thanks for creating this plugin. I am testing it currently and used pimatic-chromecast previously.
My scenario is the following:
- Contact Sensor at the bath room’s window
- Contact Sensor at the front door
- Google Home Mini next to the front door.
I have a rule that when the front door is opened and the bath room window is open, the Mini should say “Please close the window”.
The rule is working, but it takes some seconds before the Mini starts speaking. This could be to late when somebody leaves the house. Any ideas how I could speed this up?{ "port": 4088, "language": "de", "debug": true, "assistantRelayIp": "", "plugin": "sounds", "active": true }
Thanks in advance for your tips.
-
Are you using the rule ‘play text “Please close the window” on …’ ?
If so, you could speed up a bit by using the already translate audio file and use the rule 'play file “<filename>” on …'
The audio file should be already in the sounds directory (/home/pi/pimatic-app/sounds). Just test which one of the files it is and use the full filename(+ext) in the rule (no path!). This will save the time google uses to convert text to audio.The rest can’t be controlled:
- the speed pimatic is detecting the contact sensor and executing the rule
- the casting time to the Mini; my experience is that this takes between 2-5 seconds.
As an extra option you could also send a Telegram message to alert that the window is still open.
-
Thanks for your quick reply @bertreb!
I switched to ‘play file’ as suggested, but I didn’t notice any difference. I found out that even when I use catt from the command line this takes a similar amount of time. So it seems to me that the bottleneck is there and not within the sounds plugin itself.
The pimatic-chromecast managed to solve this specific task better for me as the announcement from the Mini comes almost immediately. But my coffescript reading skills aren’t to so good to find the reason for that. -
ChromecastDevice, here’s the config of the Mini device.
{ "class": "Chromecast", "name": "Chromecast Diele", "ip": "192.168.178.31", "id": "chromecast-diele" },
-
As far as i know pimatic-chromecast and pimatic-sounds-basic use the same approach for casting to chromecast devices. I did some refactoring some of the code for pimatic-sounds towards assistant-relay and catt. That could cause the delay.
Did you use pimatic-sounds or pimatic-sounds-basic? -
I use pimatc-sounds, not pimatic-sounds-basic. I will try with pimatic-sound-basic and report back, if this changes anything
Could you please explain to me, what the differences between these two plugins are?Test successful. With pimatic-sounds-basic the Mini reacts as quickly as pimatic-chromecast. Thanks for the hint @bertreb!
-
Pimatic-sounds-basic is a frozen version (0.1.23) of pimatic-sounds. It uses a chromecast solution for casting and not catt.
I’m using pimatic-sounds to develop some features like support of google assistant. You can send text commands like you would talk to a google device.
For example. Now iffft stopped interfacing with Google/Nest, I use a text command to set the temperature in a rule. -
@bertreb said in New plugin pimatic-sounds:
Hi, I changed it to display the announcement text -> version 0.1.23
Unfortunately it does not work. During init sound “init sounds” ist shown, but when I sent a text still “Pimatic Announcement” is shown.