Hi All,
In the wiki with url https://www.domoticz.com/wiki/MQTT I found the sound sensor section.
I do have a working Audio stream from my foscam camera in VLC.
But I get stuck with the wiki instructions.
"Assuming you have node and npm installed, all you need to do is run: sudo npm install -g domoticz-sound-detection"
Could anyone tell me what 'node' and 'nmp' is?
Thanks!
What is Node & NMP for making a sound sensor?
How to use built-in mic from camera as sound sensor?
Moderator: leecollings
-
- Posts: 20
- Joined: Friday 23 October 2015 22:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5974
- Location: Amsterdam, Netherlands
- Contact:
How to use built-in mic from camera as sound sensor?
-----
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
-
- Posts: 140
- Joined: Wednesday 17 December 2014 17:30
- Target OS: Linux
- Domoticz version: V3.8650
- Location: Jyväskylä, Finland
- Contact:
Re: How to use built-in mic from camera as sound sensor?
NPM - package manager for Node.js
NODE - Amateur Packet Radio Node program
So with this command
NODE - Amateur Packet Radio Node program
So with this command
you install domoticz-sound-detection package to nodejs server?sudo npm install -g domoticz-sound-detection
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
-
- Posts: 20
- Joined: Friday 23 October 2015 22:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5974
- Location: Amsterdam, Netherlands
- Contact:
Re: How to use built-in mic from camera as sound sensor?
hi,
thanks for your reply, but I'm still not sure what to do yet.
I want to execute 'sudo npm install -g domoticz-sound-detection' on the rpi running domoticz, but first I need NMP and NODE.
But how do I install that?
thanks for your reply, but I'm still not sure what to do yet.
I want to execute 'sudo npm install -g domoticz-sound-detection' on the rpi running domoticz, but first I need NMP and NODE.
But how do I install that?
-----
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
-
- Posts: 140
- Joined: Wednesday 17 December 2014 17:30
- Target OS: Linux
- Domoticz version: V3.8650
- Location: Jyväskylä, Finland
- Contact:
Re: How to use built-in mic from camera as sound sensor?
This might work:
It depends what distro you have on rpi.
Code: Select all
sudo apt-get install npm node
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
-
- Posts: 20
- Joined: Friday 23 October 2015 22:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5974
- Location: Amsterdam, Netherlands
- Contact:
Re: How to use built-in mic from camera as sound sensor?
Hi Pj-r,
i'm using the standard domoticz raspberry pi image, so that's 'wheezy' right?
I Get the following message when I execute it:
Seems it's installed by default.
pi@domoticzpi ~ $ sudo apt-get install npm node
Reading package lists... Done
Building dependency tree
Reading state information... Done
node is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: nodejs (>= 0.6.19~dfsg1-3) but it is not going to be installed
Depends: nodejs-dev
Depends: node-request but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-abbrev but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-fstream but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
pi@domoticzpi ~ $
I guess I could continue now.
i'm using the standard domoticz raspberry pi image, so that's 'wheezy' right?
I Get the following message when I execute it:
Seems it's installed by default.
pi@domoticzpi ~ $ sudo apt-get install npm node
Reading package lists... Done
Building dependency tree
Reading state information... Done
node is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: nodejs (>= 0.6.19~dfsg1-3) but it is not going to be installed
Depends: nodejs-dev
Depends: node-request but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-abbrev but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-fstream but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
pi@domoticzpi ~ $
I guess I could continue now.
-----
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
-
- Posts: 140
- Joined: Wednesday 17 December 2014 17:30
- Target OS: Linux
- Domoticz version: V3.8650
- Location: Jyväskylä, Finland
- Contact:
Re: How to use built-in mic from camera as sound sensor?
I think you have to add some repository to apt where you can get older npm package or newer nodejs. Looks like in te repositories you have the nodejs package is too old and cannot be installed with the npm found from there.
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
-
- Posts: 20
- Joined: Friday 23 October 2015 22:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5974
- Location: Amsterdam, Netherlands
- Contact:
Re: How to use built-in mic from camera as sound sensor?
Hi Guys, one year later.... I still have this wish.
I am using a USB Logitech c920 HD Pro Camera. Accessing the camera stream within Domoticz is no problem.
This time I got a little further w/ the sound detection fortunately!
The repo's are installed. but when I run the command i get this error:
pi@domoticzpi ~ $ sudo domoticz-sound-detection -u http://localhost/audio.cgi -i 433
buffer.js:494
throw new RangeError('index out of range');
^
RangeError: index out of range
at checkOffset (buffer.js:494:11)
at Buffer.readInt16LE (buffer.js:629:5)
at null._decoder (/usr/local/lib/node_modules/domoticz-sound-detection/node_modules/sound-detection/node_modules/pcm-boilerplate/lib/utils.js:89:38)
at _.extend.read (/usr/local/lib/node_modules/domoticz-sound-detection/node_modules/sound-detection/node_modules/pcm-boilerplate/lib/utils.js:34:33)
at processBlock (/usr/local/lib/node_modules/domoticz-sound-detection/node_modules/sound-detection/index.js:16:35)
at emit (events.js:104:17)
at emitReadable_ (_stream_readable.js:424:10)
at emitReadable (_stream_readable.js:418:7)
at readableAddChunk (_stream_readable.js:174:11)
at Readable.push (_stream_readable.js:126:10)
pi@domoticzpi ~ $
I am using a USB Logitech c920 HD Pro Camera. Accessing the camera stream within Domoticz is no problem.
This time I got a little further w/ the sound detection fortunately!
The repo's are installed. but when I run the command i get this error:
pi@domoticzpi ~ $ sudo domoticz-sound-detection -u http://localhost/audio.cgi -i 433
buffer.js:494
throw new RangeError('index out of range');
^
RangeError: index out of range
at checkOffset (buffer.js:494:11)
at Buffer.readInt16LE (buffer.js:629:5)
at null._decoder (/usr/local/lib/node_modules/domoticz-sound-detection/node_modules/sound-detection/node_modules/pcm-boilerplate/lib/utils.js:89:38)
at _.extend.read (/usr/local/lib/node_modules/domoticz-sound-detection/node_modules/sound-detection/node_modules/pcm-boilerplate/lib/utils.js:34:33)
at processBlock (/usr/local/lib/node_modules/domoticz-sound-detection/node_modules/sound-detection/index.js:16:35)
at emit (events.js:104:17)
at emitReadable_ (_stream_readable.js:424:10)
at emitReadable (_stream_readable.js:418:7)
at readableAddChunk (_stream_readable.js:174:11)
at Readable.push (_stream_readable.js:126:10)
pi@domoticzpi ~ $
-----
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
Raspberry Pi Model 2 B w/ Domoticz 3.5974 + Monit + Pi-Hole + RaZberry Z-wave module + RFXcom 433 USB
Re: How to use built-in mic from camera as sound sensor?
Did you get this working? I get the same error but my camera doesn't have a separate audio stream so I tried with the video stream.
-
- Posts: 48
- Joined: Tuesday 03 January 2017 0:37
- Target OS: Linux
- Domoticz version: 13939
- Location: USA
- Contact:
Re: How to use built-in mic from camera as sound sensor?
My house is crawling with foscams. I wanted to use them as the ears and mouths of my digital assistant. I found it doesn't work well. I did some tests and got the digital assistant listening through them but the the output was beyond what I could do. The biggest issue was the delay, the cameras have a considerable delay in transmitting the audio. Also the quality of the audio is fairly low making the speech recognition difficult. In the end found it was easier to repurpose my old defunct coax network for speakers and mics than to program a work around for my foscams.
Who is online
Users browsing this forum: No registered users and 1 guest