Jeedom Rhasspy plugin (beta)

Just wanted to let rhasspy user know that you can now connect your rhasspy and your jeedom to let jeedom handle scenarios with all intents data when rhasspy recognize an intent.

https://www.jeedom.com/market/index.php?v=d&p=market&type=plugin&plugin_id=3869

Documentation (no ui screen before stable, which could take a while as I would have base/satellite supported into) -> https://kiboost.github.io/jeedom_docs/plugins/jeerhasspy/fr_FR/

Ideally we should have remote settings (the url for the remote) inside http settings to be even easier.

41090678c0b506e848c1c32e72fbe23bf58dfad9

The declared goal is to have a complete replacement for snips/jeedom combo. And I really would keep the Jeedom plugin lightweight without mqtt dependancies on jeedom, as this caused some problems with snips plugin with lot of users.

So I guess the Jeedom plugin will take time for stable version, as I want to be sure rhasspy can run in production before.

4 Likes

Merci chef pour ce plugin, je vais pouvoir tester ça !

I just install rhasspy docker container and it doesn’t have api/intents yet so it won’t work before a new image is published. Works with venv only actually :frowning:

Just some patience: the latest published Docker image is 2 days old, the /api/intents endpoint has been added 23 hours ago :slight_smile:

Yes no problem just for information for user testing it

Good morning all,
I cannot install the plugin to test it, I am with version 4.0.35 of jeedom, it does not appear in the market.
Is this normal?

Yes, there is no stable version, only beta.
On your jeedom, go to plugins, market, and enter rhasspy into search input. You should see it, if you have check the option to install beta plugins in your market account.

KiboOst,
thank you for the info
Ok that’s better, just go to https: //www.jeedom.com/market 
 log in, modify my profile and check the box Activate access to beta plugins.
For now the plugin is installed, I give the Ip address of my jeedom it is on this same machine that I install rhasspy, I saw the message in the plugin "Please import your Rhasspy assistant. “, I click on” import the assistant “and select” keeping all the intents “, I got the message” Could not connect to Rhasspy! "
Where would the problem come from?

Ah! that’s it it works, I changed the port number to 80, the intents
I do not know what to do !
Okay, I’ll take it up tomorrow, stop for tonight. you have to sleep

Hi,

So, you get your intents in Jeedom, right ?

I will try to set an example scenario in the doc. And maybe make an english version of the doc if more users need it :wink:

Basically:

For an intent, you set a callback scenario that will start when this intent is recognized, with action start.
Under that you check all intent information that will be passed to the scenario as tags.
Then in your scenario, you use these tags as usual in Jeedom, to do whatever you want.

For example, IF tag(room) matches “/kitchen|house/” -> turn kitchen light on
Here it all depends on what entities/slots you use in rhasspy

You can also set several intents to start same scenario and check which intent it comes from:
IF tag(intent) == ‘lightsTurnOnJeedom’ THEN 


Hope it helps

EDIT : I have updated the doc with some explanation and screens. Still french only for the moment

If you have Jeedom in english, is the plugin in english in Jeedom ?

I have just added a new command on rhasspy device : dynamic Speak

I have updated the doc, but for those not talking french, it is the same function I had done (and use everyday in production) for snips so you can get the doc from here :

I has to be created on devices in Jeedom, you just have to reimport your assistant to get it.

Hello KiboOst,
Ok I understand that you speak French, I am French, my jeedom is in French, I try to speak in English so that all visitors can follow the conversation and have the maximum details on the development of the plugin.
It is true it lacked a tutorial, I see that here advance by giving examples, I will get back to it a little later in the day.
By cons by going into the management of the plugin, I have something in the assistant, in the middle I have the message: Not Found

The requested URL was not found on this server.
"/>

In devices, I have a Master Rhasspy icon which when I click on it tells me successful test.
In the itentions nothing.
As said above, I come back in the day, I would start from scratch, I need to troubleshoot a pc in an emergency.
See you later.

Ok no problem :wink:
If you use docker container the intents won’t load yet, we use wait next update of rhasspy.

Could you post a screen of the not foud message ? If TTS works (does you hear it?) you shouldn’t see such message

Good evening KiboOst,
I reinstalled the plugin, it didn’t change anything.
I still get the message “Could not connect to Rhasspy!” if i leave the port at 12101, i’m even going to my box to open the port, but it’s not better.
So I set the port to 80 and there is a loading of parameters except intentions.
I also always have in the assistant tab the message “The requested URL was not found on this server”.
Below a screenshot:


And other screenshots for you to see what is displayed:


For information my jeedom works under Kubuntu on a Mini PC simply and it works.
That’s waiting to read you again.
Best regards

In https://kiboost.github.io/jeedom_docs/plugins/jeerhasspy/fr_FR/
In the use part which says:
A l’important il y a trois options possible:

I do not understand this sentence

Also at the end of this chapter:
It says: “By clicking only one Rhasspy Device, you can run a TTS test on that device.” the test is successful.
What exactly is going to happen, should I hear a sound or something?
Since I have errors, I did not go further as creating a scenario.

Clicking in the device should make rhasspy say a test message on the device

Don’t put port into the address, go to configuration and sent adresse port there.

Will do some tests to see what show this message never seen it

Ok I tested there is no sound or message.
I entered the port only one place in the configuration only.
I can do it only at this location.

When you enter the entire url with port in your browser does you get rhasspy interface ??

No, it’s like when I click on the green button in the Assistant tab, if I put myself on it, my browser gives me the link to my jeedom.
It shows me the jeedom page, I think it’s because of port 80, I couldn’t get it to work with port 12101, I don’t think it’s my router since I opened the port and I have no better.
It is as if I entered the IP address of my Jeedom without putting 80. Example: 192.168.2.100 or 192.168.2.100:80 it’s the same.
But in my opinion something is missing behind the port, like:
192.168.2.100:80 / 

I also just tested the link at the bottom of the assistant tab:
http://192.168.2.100:80/core/api/jeeApi.php?plugin=jeerhasspy&apikey=xxxxxxxxxxxxxxxxxxxxxxxx&plugin=jeerhasspy&type=jeerhasspy
I have a blank page.

So which address do you enter in your browser to access your rhasspy console / settings ? What if you enter this url in jeedom plugin config ?

Just to be clear, your jeedom and your rhasspy are on the same pi ?
Never tested this and wouldn’t do that anyway, just to understand.

I have entered the address http://192.168.20.100/index.php?v=d&m=jeerhasspy&p=jeerhasspy in the browser to access the console and I also tested instead of the IP address in the config, I have errors like “Invalid access token” in the configuration tab there is a window that is displayed is my jeedom login page.
and it crashed, I will have to restart.

Ok otherwise it will be all for tonight, we are looking at the rest tomorrow, so I am also starting to be quite busy because the end of year celebrations are approaching, so I have to make preparations.

message " Token d’accùs invalide "

The message “The requested URL was not found on this server” comes from the version info that seems to get a wrong url, I will add a check on this. Seems jeedom never reached your rhasspy at all and entered a stored a wrong version information.

So:

You just need the url to go to your rhasspy.

When you are on this page, note the url and the port

For example http://192.168.0.10:12101
In jeedom plugin configuration enter:
Adresse : http://192.168.0.10
Port : 12101

That’s all you need on jeedom side.
Then import your assistant

Back into rhasspy interface, settings, enter the plugin url into (Assistant panel, internal url):
Use a remote HTTP server to handle intents

EDIT : I can reproduce what you have / see (<html lang= in version field etc), this is because you enter your Jeedom url into configuration adresse for rhasspy. Will set definitely set a check here !
So all you need is your rhasspy url

I just published a new Beta of the plugin, that now check when importing the assistant if the version returned is really a version number, in case the user didn’t entered the right rhasspy url into plugin configuration.

@Mytika you should update the plugin, then import the assistant. If you finnally got your rhasspy url right, it will be right, else it will reset to rhasspy version to 0.0.0 in the plugin so it won’t give errors.

Salut,

Got it working the last plugin update.
Now i’m waiting for the rhasspy DEV to add the intents API and also to fix the dividedByZero issue.
I see you are evolved to test the new rhasspy-nlu version
is it working for you ?

Hello,
I reinstall the plugin,
it’s the same below some pictures
I changed the port to 12101 it has changed nothing, it does not want to connect.

Like the red message say it, you IP or port for rhasspy isn’t correct.

Once more, can you open rhasspy interface in your browser ? What is this url then ?

Pourrais tu me dire comment ?
“an you open rhasspy interface in your browser ? What is this url then ?”

The url you use to go here :face_with_raised_eyebrow:

3afbf887e342138d2ca45e24269819d00079f7a9_2_517x188

How are you on this image and what is its url?
I never had this image appear here

Did you checked the rhasspy documentation ? How did you installed Rhasspy ?

https://rhasspy.readthedocs.io/en/latest/usage/

Yes if you use Docker, we need an update :wink:

The nlu update works in venv installation, but not in docker, I guess we need another docker update.

Must say it’s not easy to install, which version etc and get it up to date :disappointed_relieved:
Hope things will get better with continual integration and such

1 Like

Ok thx @KiboOst 
i’ll try to switch to python env.
How did you get the Intents API ? is it also available on the venv integration ?

FYI

[INFO:2373880] quart.serving: 172.17.0.1:45266 GET /api/intents 1.1 500 13 33823
[ERROR:2373855] main: NotFound(404)
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/quart/app.py”, line 1471, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/usr/local/lib/python3.6/dist-packages/quart/app.py”, line 1519, in dispatch_request
return await handler(**request_.view_args)
File “/usr/local/lib/python3.6/dist-packages/quart/static.py”, line 85, in send_static_file
return await send_from_directory(self.static_folder, filename)
File “/usr/local/lib/python3.6/dist-packages/quart/static.py”, line 134, in send_from_directory
raise NotFound()
quart.exceptions.NotFound: NotFound(404)

Edit :
Forget it
it is working with the venv integration ==> The dev must update the docker platform accordingly.

Ah, seen like that I said to myself from the start that something was missing, I look and I come back to you.
:wink:

Ah, it’s not the same there!
it’s better no ? we are progressing. I’m not sure you told me there was something to do before.

Merci pour ce plugin
 :grinning:

1 Like

Would I really have to say that you need to have a running rhasspy installation to run rhasspy ? :face_with_raised_eyebrow:

Not real, I’m going to get the plugin in the market and for me it was clear that the rest had to be done alone, it’s my dream.
In short, it was I who did not follow the movement

New beta

I’ve added a way to load intents even in actual docker version which does not have /api/intents.
No problem for next version as it first check for api/intents, and of not there, use another solution.

Updated the doc to say that
 well
 you need rhasspy to use rhasspy :rofl: :innocent:

New beta

You can now use Jeedom Ask command with Rhasspy

So, rhasspy can ask you something, like a confirmation before turning alarm on and so on :beers:

Documentation updated /sorry still in french only.

2 Likes

Last beta show intents a bit better, witch intents having callback scenario or not, and on hover, which scenario is set and its tags. Which avoid having to open each intent to check that.

Now looking for a solution to be notified when wakeword is detected so Jeedom can mute sound in the room before we start talking to rhasspy. Will help the asr greatly, do it with snips and it works great.

If Jeedom can have this notification, then next big step for the plugin will be supporting base/satellite configuration when things get sorted on rhasspy side :wink:

1 Like

Hi,

Just published a new beta of the Jeedom plugin.

Some bugfix on filter jeedom intent option, better UI (intents now in groups like scenarios, and some minor stuff).

And new option to set two variables rhasspyWakeWord / rhasspyWakeSiteId when rhasspy detect wakeword ! This allow you to start a scenario when wakeword is detected, to mute music for example when you are talking to rhasspy. Many thanks @synesthesiam for this !

:grin:

2 Likes

New beta

Automatically configure Rhasspy profile from the plugin

1 Like

@KiboOst , thanks for this plugn :slight_smile: I didn’t test it as I didn’t migrate from Snips to Rhasspy. About this migration, do you have a quick tutorial, some tips, or whatever, to easily migrate from Snips to Rhasspy

New Beta

  • You can set a minimal confidence for each intent (you can of course always let it to 0 and check it in the scenario)
  • Summary view for mass editing intents

:wink:

I finally got my rpi zero and got a satellite working. Not so easy on a pi 0 buster but all works fine now.
So I’ve integrated satellites into the plugin.

They are automatically created once you ask something on one of them. Indeed when one device post an intent to Jeedom I can get its IP inside Jeedom and create the device. But I don’t have its port so I create it with default 12101 port. Let’s see in the future if we can get all devices from a master endpoint or such.

Capture

All works nice, scenario can answer with tts on the satellite where the intent was asked :+1:

Just for fun:

  • top: my jeedom alpha, on which I develop plugins and the Jeedom core V4 :wink:
  • Bottom left : rhasspy master, with docker container. It handle all asr/nlu/intents and such (picoTTS, kaldi)
  • Bottom right : rpi 0WH, rhasspy venv with only wakeword and TTS.
    Both with HermesLedControl and custom snowboy

Not sure I will publish this beta, as I prefer waiting for the next full hermes/services rhasspy ! I guess I will have to re-install everything to test and adapt the plugin.
Hope all hermes topics will be published like snips/amice to HermesLedControl can finally work as advertise. I also have a rhasspy_logger that listen to MQTT topics to log wake/think/speak for entire system (master+sats). Works perfect with snips, so will all mqtt topics it will works the same with rhasspy.

With next Rhasspy big step, this plugin could go to stable version soon :beers:

I have written several tools beside the plugin that everyone could benefit. Once all this is stable I will write some doc and share everything.

  • Rhasspy batcher : python tool to batch test intents after a new training
  • Rhasspy logger : python tool that listen mqtt and write a log file with wakewords, thinking / intents recognized, speak so you can read/show it anywhere and keep history of master/satellites interactions.
  • Snowboy custom wake tool : python tool to record samples and generate pmdl file.
  • For jeedom users, a way to handle intents with python directly inside Jeedom.
    And different tips here and there :innocent:

@synesthesiam the ball is in your court :rofl: Give us full standard hermes topics and rhasspy-satellite container :hugs:

4 Likes

I use venv and had to edit some file to get snowboy. There are other subject for this, which isn’t related to the plugin itself :wink:

Many thanks, I will search for the other threads.
Also, delete my post.

New beta

Satellites can now be added manually.
Each device, being master or a satellite, have a set of buttons to automatically edit rhasspy profile, open interface, test tts etc.

1 Like

Iya,

New beta, supporting english language :wink:

Still waiting for Rhasspy 2.5 to fully test/support it before stable version :hugs:

3 Likes

@KiboOst has been my #1 v2.5 tester so far!

2 Likes

Hi,

I just posted a new plugin beta version.

It is now english ready for english jeedoms.

Attention : this beta now support only Rhasspy v2.5 and up !

2 Likes

Wow, not updated this topic for a while.

I must say I have a bit out of Rhasspy lately, covid situation, other stuff to do etc.

Since a few weeks, I’m back trying to replace my Snips production assistant by Rhasspy :+1:

On the Jeedom Rhasspy plugin side:

  • It has been published to stable (for a while now, sorry not mentionning it here), and ever used by around 300 persons :hugs:
  • It supports since May, sending a TTS sentence to multiple devices all at once
  • Now have ledOn / ledOff commands for those having HLC !
  • New SetVolume command (between 0 and 1) to follow rhasspy 2.5.8!
  • Just added new repeatTTS command. So you can do an intent to repeat what rhasspy said, and just call this command in your scenario

repeatTTS in only in the last beta right now.

Simple intent for repeat:

[repeat]
tu peux répéter
qu'est-ce que tu a dit
répÚte s'il te plait
peux tu répéter

Finally, just a note to say that jeeRhasspy fully support Jeedom Core v4.0 and v4.1 (even next one :speak_no_evil:) and I’m not able to test it on Jeedom v3. It shouldwork, but I won’t spend time on Jeedom v3 anymore.

Once more, many thanks to @synesthesiam and everyone working on this wonderful assistant!

:wink:

5 Likes

Hello @KiboOst, thanks a lot for your great job on this plugin :slight_smile:
I just migrated from Snips to Rhasspy.
I am not using any custom wakeword and with Rhasspy I didn’t find any wakeword engine working as good as snips hotword 

So I install Rhasspy on Docker and I also install snips-satellite package on docker to handle wakeword engine.
All is working fine except the ASK function because my snips-satellite cannot be declare as a satellite in jeerhasspy . I see in jeerhasspy logs that you are using Rhasspy HTTP API .
I am not sure but may be if your plugin used the MQTT websocket it will work ?

Hi,
Indeed jeerhasspy plugin won’t work with a snips satellite. It doesn’t install any dependency and doesn’t listen on mqtt.

Maybe you could try a plugin such a jmqtt but you would handle that with a code block I guess, making your own message on right mqtt topics to handle that. A starting point could be the snips plugin.

Rhasspy provide a lot of http handler/endpoints which allow the jeerhasspy plugin to stay dependancyless, being very simple and not requiring any daemon running, which is a strong point I think.

Thanks for your feedback :slightly_smiling_face:
I am not skilled enough to do such integration but thanks for the suggestion !

Rhasspy provide a lot of http handler/endpoints which allow the jeerhasspy plugin to stay dependancyless, being very simple and not requiring any daemon running, which is a strong point I think.

Make sense ! :slightly_smiling_face:

This is not the topic ofthis thred but did you manage to find a suitable wakeword engine to put rhasspy in production ?
I tested Raven with 3 reccords of “hey snips” but it works 1 in 10 and wake up when I don’t ask him 

Snowboy no more usable 


Raven with thraa custom wakeword actually works pretty well yes. After tunning settings (there is some bug on global/per wakewords parameters).

Raven in production

Only problem preventing me to put rhasspy in production actually is the inability to recognize anything or even stop listening with bakground music once the wakeword has been recognized.

Hope @synesthesiam and other sound gurus are working on this, because apart this, all is just awesome.

Recognize command with music

1 Like

I finally manage to achive what I want to do :slight_smile: (just need to perform some more tests to validate it)
I manage (via asound.conf) to share my microphone between my rhasspy docker’s container and my snips-satellite docker’s container
By that way, I can use Snips wakeword engine and, when I want to use a #[Rhasspy-Intents][TTS-#profile#][Ask]# command, the answer is recorded via Rhasspy

One question @KiboOst, when a ASK is awaiting an answer there is no “beep” sound is it an expected behanioour ?

Hi, just a word to say that jeeRhasspy beta has receive an update to supporte Jeedom v4.2 table display mode.

Here is a subject about coming v4.2 : https://community.jeedom.com/t/teasing-core-v4-2/49539

:beers:

4 Likes

New beta with new function for sentence string to vocal one.

For example, if rhasspy profil is french it will transform:

La temperature est de -9.8 degrés

To

La temperature est de moins 9 virgule 8 degrés

If other languages needs such transformations, let me know :wink:

New beta published yesterday

We can now rename and move rhasspy devices in other objects, to show them on Dashboard/Design etc.

change: The SetVolumen command is now from 0 to 100 to better handle interface sliders. In Jeedom v4.2 we can set sliders like we want, but wanted to support actual version :wink: To find where this command is used in scenarios and such, just go to domotic overview, open the equipment and this command, it will provide a link to anything using it. You can also use Tools/Search and search for this command.

Capture d’écran 2021-02-19 143600

changelog

I use Jeedom in english, but actually plugin documentation is in french only. If several people need it, I could translate documentation to english (the plugin itself ever support english Jeedom).

:beers:

1 Like

Ok, big update in beta!

  • Complete rewrite of intent management inside Jeedom. They are not anymore stored as equipments, but now as rhasspy_intent as a whole with their own code and DB table inside Jeedom.
  • So, no more need for the Rhasspy-Intents object, which was there only to get intent equipments.
  • Updating the plugin will migrate intents in new system, and delete Rhasspy-Intents object. Devices won’t have parent object then.
  • You can now access device settings (name, parent object, category) and advanced configuration.

UI and under the hood code is now a lot more jeedomian and won’t evolve a lot now.

  • Intent handling now support multiple entities. For example, if you ask to turn on light in the kitchen and living-room, your scenario will receive your tag with “kitchen,living-room”.
    For example:
    Tags : {"#intent#":"TurnOn","#confidence#":"1","#wakeword#":"ravenCustom","#siteId#":"Salle","#house_room#":"kitchen,living-room"}

So you can check in your scenario:
IF tag(house_room) matches "/kitchen|downstair/" THEN turn kitchen on
IF tag(house_room) matches "/living-room|downstair/" THEN turn living-room on

It will then turn both light on.

Just for fun, a fast presentation (sorry for poor gif encoding)

:beers:

4 Likes