Problems with node-red-node-ui-microphone / Rly need HTTPS?

Well, I tried to get my voice recorded from dashboard and found this nice node:

node-red-node-ui-microphone

After reading the closed thread a bit I found out that the node == microphone is only accessible with "https" enabled what I dont have. I use a VPN to connect to my local network and havnt seen a need to buy a domain for certificating things or so. I ve never certificated anything and am not sure whats the minimal effort to get my microphone to work from any dashboard. Do I need a domain ? This guide says so :Node-RED SSL using Letsencrypt & Certbot
Is there another way to get it work or is it really so laborious / needs a domain ?
Thx!

If it’s just your local network and your fine with neither using an iphone nor chrome than you can just use self signed certificates. Otherwise have a look at @BartButenaers experimental node:

unfortunately the https requirement is from the browser side so the uni mic has no influence on it. The only way to access it with http is when your browser is on the same machine through local host :slightly_frowning_face:

1 Like

thank you for your fast help my friend!
I managed to get https work with the self signed certificate. The recording seems to work now. BUT I have some webcams (mobile phones with IP webcam software) running in an iframe / http. These will not work because it is restricted running http-iframed stuff on an https secured website. :frowning:
I guess its better to go back to http and buy a microphone for my raspberry and scream or so if I am not in the same room ....hmmmpf

You can either with siri shortcuts on ios or with tasker on android build shortcuts that record audio on your phone and send it to nodered over an http request. At least for ios there is an example how to do it in the node-red-contrib-voice2json documentation right at the bottom.

1 Like

You have a solution for everything :slight_smile: Nice... I will try tasker sice I ve no iOS. And report back... Thanx again!

Don't get node-red involved in security , use stunnel ( there is a stunnel javascript version too )

1 Like

I installed sox -> sudo apt-get install sox
Then node-red-contrib-voice2json and node-red-contrib-sox-utils:

pi@raspi4B:~ $ npm install johanneskropf/node-red-contrib-voice2json
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

+ node-red-contrib-voice2json@1.0.0
updated 1 package and audited 292 packages in 6.854s

15 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

pi@raspi4B:~ $ npm install johanneskropf/node-red-contrib-sox-utils
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

+ node-red-contrib-sox-utils@0.2.2
updated 1 package and audited 292 packages in 6.18s

15 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

.... But none of the nodes provided in the examples where available after installation in my node red dev enviroment. Did I miss something ?

EDIT1:I updated NR from V1.02 to V1.06 and tried to reinstall/repeated the installation but that didnt help

EDIT2: I changed the path to my node red install dir in the CLI and that seems to fix that error but leads me to the next:

pi@raspi4B:~/.node-red $ npm install johanneskropf/node-red-contrib-voice2json
npm WARN ifttt@0.1.2 requires a peer of express@~4.16 but none is installed. You must install peer dependencies yourself.
npm WARN ts-jest@24.3.0 requires a peer of jest@>=24 <25 but none is installed. You must install peer dependencies yourself.

+ node-red-contrib-voice2json@1.0.0
added 1 package from 2 contributors and audited 621 packages in 12.7s

6 packages are looking for funding
  run `npm fund` for details

found 13 vulnerabilities (4 low, 2 moderate, 7 high)
  run `npm audit fix` to fix them, or `npm audit` for details
pi@raspi4B:~/.node-red $ npm install johanneskropf/node-red-contrib-sox-utils
npm WARN ifttt@0.1.2 requires a peer of express@~4.16 but none is installed. You must install peer dependencies yourself.
npm WARN ts-jest@24.3.0 requires a peer of jest@>=24 <25 but none is installed. You must install peer dependencies yourself.

+ node-red-contrib-sox-utils@0.2.2
added 1 package from 1 contributor and audited 622 packages in 11.695s

6 packages are looking for funding
  run `npm fund` for details

found 13 vulnerabilities (4 low, 2 moderate, 7 high)
  run `npm audit fix` to fix t

this has actually nothing to do with the installation of the nodes its just npm warnings for everything and all and you can safely ignore them. You will get them if you install anything with npm.
It looks like they installed just fine in your last try :+1:
Yes if you install node-red nodes with npm you have to install them from your node-red folder where your settings.js and flow file and so on are located otherwise they are installed globally and of no use to nodered. Mostly that’s located at ~/.node-red.
Don’t forgetting install voice2json. I really recommend the debian package as it will always have better performance than the docker, although we did adapt quite a lot of strategies in the nodes to negate the bigger overhead especially at start up that the docker container brings.
Im happy to answer any and all questions and feel free to leave issues on the github as i’m really sorely lacking testers :pensive:

1 Like

OK, all these warnings where normal and I dont have to install these packages listed in the output (ifttt, jest ...etc) ?
If so: I still have the problem that none of the installed nodes are available an the left-pannel (http://puu.sh/G25Lx/658d68ba3d.png). When I import your example nodes it still looks like this: http://puu.sh/G25QQ/166146a814.png
So something must be wrong with the installation.

Ok silly question but did you restart nodered?
The order is:

cd ~/.node-red
npm install johanneskropf/node-red-contrib-sox-utils
npm install johanneskropf/node-red-contrib-voice2json
sudo systemctl restart nodered 

I just set up a fresh rockpro64 board with armbian this morning to test it and did exactly the above and it worked :thinking:

1 Like

Yes, but I do use: node-red-start and node-red-stop
I even rebooted the raspi.

Thats very strange as i have set it up exactly like this a few times on like six different raspberries and other boards. As has @BartButenaers.
You can try uninstalling it with:

npm uninstall node-red-contrib-voice2json

And than do a git clone to your home directory or somewhere and try installing from that:

git clone https://github.com/johanneskropf/node-red-contrib-voice2json.git
cd ~/.node-red
npm install ~/node-red-contrib-voice2json

and than restart.

2 Likes

that worked ! thx! I will annoy you with problems in future my friend :smiley: ....

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.