Closed Hermesfrank closed 5 years ago
Hi,
Yes sure, I can make an exception this time ;)
Part of this skill is written in C and compiled when you install it.
The file the binary is looking for are the hw description files of the different flavours of piHAT
a little grep
in the repo pointed me to this file
The code seems to look for a relative path ./hardware_specs/%s.json
and replace %s by the parameter model in the config.ini of your skill (should be model=respeaker_2_mic_hat
)
So, my piece of advice are:
By the way, make sure to launch the snips-skill-server using the user _snips-skills, otherwise you could obtain some permission issues.
sudo -u _snips-skills snips-skill-server -v
I'm closing this one, see you on the forum.
@cpoisson Thanks le pote!
I appreciate your insight - looks like both of my recent issues relate to permissions, so I will bone-up a bit there (not yet a Linux guy) and hopefully figure out a resolution...
I checked the config.ini file and the "model=" is correct (2-mic hat)...I am fairly familiar with C and had already followed the path you cited to the _loadhw.c file, and so then looked at the config.ini file to confirm, but checked again just now to be sure...so, it must be a permission issue as you suggest...I will follow this lead...
Curious though: it appears to me that during the snips install, and subsequent "sam setup audio" section, that if I state that I am using a Respeaker device, that Sam then goes ahead and installs the Respeaker audio scripts, AND, sets up an automatic install of the _ledanimation app that then runs without prompting - i.e., I do not install it as a separate app when I use Sam to install any assistant - even if I delete the snips-skill-respeaker folder from the /var/lib/snips/skills directory, it automatically re-installs when I load a new assistant - my point is, that if there are permissions to deal with that I am missing to run that JSON file, the snips/Sam install should take care of it/them just as it does when installing the app and assistants code - right??
Anyway, I do really appreciate the clues/solutions help...Frank
Hello @cpoisson
OK, so here's my latest on this issue...
I uninstalled the snips-skill-respeaker folder from the /var/lib/snips/skills directory and did a Sam-based re-install - no change, it still could not read the JSON file...
I uninstalled the folder again and did a manual install per the site you referenced using this:
Firstly, add your current user to the snips-skills-admin group: sudo usermod -a -G snips-skills-admin $USER Secondly, add _snips-skills user to the spi, gpio, audio groups: _sudo usermod -a -G spi,gpio,audio snips-skills Finally, clone the repository and manually run setup.sh: git clone https://github.com/snipsco/snips-skill-respeaker.git cp -r snips-skill-respeaker /var/lib/snips/skills/ cd /var/lib/snips/skills/snips-skill-respeaker ./setup.sh
After the manual install, whenever I went to re-install the assistant, I got the attached in the Node.js window on my PC re the inability to create the virtual envirnment...
and, when I re-booted the RPi, I got wild LEDs on the hat and the trigger-word and intent recognition phases did not work for snips...I did not get the can't read the JSON file error when running the snips-skill-server...
So, I again re-installed the LED app via Sam and got back to where I was originally, i.e., can't read the JSON file, but my assistant runs OK...
So, it seems that again I have some sort of user/permission issue but not sure what's going on - do these new clues offer you any suggestion? Maybe I should re-install snips? I hate to go back to a re-install of ROS because I always wind up fighting issues with getting the Respeaker hat to work properly...
Thoughts?
Regards, Frank [BTW, I retract what I said earlier about a forced installation by snips of the led_animation app - that was happening because I never removed it from the directory on the RPi...]
@cpoisson - Howdy!
OK, so I started from scratch and used a new RPi 3 A+ and a new image of Raspbian Stretch...
Installed the OS first, then the 2-mic-hat and both were working...
Then installed snips and allowed the snips install to also install the 2-mic-hat...when it finished, it appeared that the hat was working - the LEDs initialized and it was "breathing" at idle...
I then installed my app...all looked like it was going fine on the PC/ssh side, but then the LEDs quit...I re-booted...the app worked but I was back to the point when running the snips-skill-server, I got the "...can't load the JSON file..." status...
I checked the permissions on the respeaker directories and files and they are set to Anyone...
I do not think it is my app that breaks things - I guess I could do all over again and see what happens when I install the prime Relay&Temp&Humidity app, or maybe I should try installing the upgraded snips version of that app (Voice Interaction Dev Kit (EN)) and see if maybe that's why you guys revised the original app from SEEED - can you check with whoever did that and ask them if anything going on here makes sense?
Thanks, Frank
I have been admonished once prior for using this issue reporting mode, but I have described this in the Forum and have had no response, so please bear with me as I have researched all the dos, Forum(s), have reinstalled, have total restarts from RPi install, and explored the files on git...
What's the issue? A clear and concise description of what the bug is. Also please provide an estimation of its frequency (always, frequently, from time to time, rare)
I am using the generic Relay&Temp&Humidity app...I have an RPi running Raspbian Stretch (not lite) with A SEEED 2-mic hat...my LED_animation does not run, apparently because it cannot load the respective JSON file:
This occurs every time I run the app...
It appears to me that there is some path issue, but I cannot seem to find where the specific call is made to load the file...._/hardware_specs/./hardware_specs/respeaker_2_michat
Can you please take a look at the log and see if you see something?
Thanks, Frank