ibmresearchuk / node-red-bluemix-nodes Goto Github PK
View Code? Open in Web Editor NEWA collection of node-red nodes for the IBM Bluemix platform
License: Apache License 2.0
A collection of node-red nodes for the IBM Bluemix platform
License: Apache License 2.0
These nodes are now available through the IBM Bluemix platform.
It would be great to add these as extra palette nodes.
There are a number of services.
http://www.alchemyapi.com/api
IBM Watson has now added the NLC service.
http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/nl-classifier.html
We should add this node to the palette.
Hello
I'm trying to read a blob file (wav audio file recorded in a web page) that i'm sending from a javascript, pass it to speech to text node and return the result. Problem is that i couldn't figure our which is the correct way to process data in node red. Here's how i'm sending info:
function createDownloadLink() {
recorder && recorder.exportWAV(function(blob) {
var url = URL.createObjectURL(blob);
//TODO
var fd = new FormData();
//fd.append('fname', 'test.wav');
fd.append('data', blob);
$.ajax({
type: 'POST',
cache: false,
url: '<nodered_url>/audioTest/',
data: fd,
processData: false,
contentType: false,
success: function(data) {
var r = JSON.stringify(data);
console.log(r)//This is where Your users are
}
});
});
Browser recognizes info as following (developer console):
Request Headers
Accept:/
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8,es;q=0.6
Connection:keep-alive
Content-Length:344285
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryIpSdL2SfBA5pIOWx
Host:testjj.mybluemix.net
Origin:null
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Request Payload
------WebKitFormBoundaryIpSdL2SfBA5pIOWx
Content-Disposition: form-data; name="data"; filename="blob"
Content-Type: audio/wav
In node red after the http node i have a function node with following code:
const buf = new Buffer( msg.payload, 'hex');
msg.payload = buf;
return msg;
But as soon as info pass to speech to text node following error appears
TypeError: Cannot read property 'ext' of null
Appreciate your comments on this issue
Best Regards
Hi,
I'm trying to use weather_insgihts node in a Node-Red flow for very basic flow of getting current obervations for the lat,lon values of 45.42,75.69. I'm using the credentials from the bluemix service entered in to weather_insgihts node within Node-Red flow. When I deploy and request for weather data (I"m using trigger to request through Inject Node), the call fails and results with the error message - "Weather Insights service call failed with error HTTP response", even it does not say the HTTP Status Code.
I added node.log with in the weather_insights.js code to dump response.statusCode to find out that the returned HTTP Status Code is 401 which is UnAuthorized found from API page. I used the same credentials with the REST API to get current observations - https://username:[email protected]:443/api/weather/v1/geocode/45.42/75.69/observations.json?units=m&language=en-US , I"m able to get the result with response code 200.
Am I missing anything to use weather_insights node?
It fails with a message: Weather Insights service call failed with error HTTP response.
Investigating, the code uses:
/api/weather/v2/forecast/daily/10day
when the API documentation (https://twcservice.mybluemix.net/rest-api/#) says:
/api/weather/v1/geocode/33.40/-83.42/forecast/daily/10day.json
being first number "latitude" and second one "longitude".
In general, seems that weatherinsights in bluemix uses V1 API while here seems it is using a V2 ¿?¿?
Sending the QA node a non-string message.payload causes the application to crash. We should handle this error state without dying.
2015-04-22T11:27:08.07+0200 [App/0] OUT 22 Apr 09:27:08 - [error] [watson-question-answer:e3c97ae0.1c3688] API responses with error: [object Object]
2015-04-22T11:27:08.08+0200 [App/0] OUT 22 Apr 09:27:08 - [red] Uncaught Exception:
2015-04-22T11:27:08.08+0200 [App/0] OUT 22 Apr 09:27:08 - TypeError: Cannot read property '0' of null
2015-04-22T11:27:08.08+0200 [App/0] OUT at /home/vcap/app/node_modules/node-red-bluemix-nodes/watson/qa.js:58:33
2015-04-22T11:27:08.08+0200 [App/0] OUT at Request._callback (/home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/watson-developer-cloud/lib/requestwrapper.js:68:5)
2015-04-22T11:27:08.08+0200 [App/0] OUT at Request.self.callback (/home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/watson-developer-cloud/node_modules/request/request.js:360:22)
2015-04-22T11:27:08.08+0200 [App/0] OUT at Request.emit (events.js:98:17)
2015-04-22T11:27:08.08+0200 [App/0] OUT at Request.<anonymous> (/home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/watson-developer-cloud/node_modules/request/request.js:1202:14)
2015-04-22T11:27:08.08+0200 [App/0] OUT at Request.emit (events.js:117:20)
2015-04-22T11:27:08.08+0200 [App/0] OUT at IncomingMessage.<anonymous> (/home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/watson-developer-cloud/node_modules/request/request.js:1150:12)
2015-04-22T11:27:08.08+0200 [App/0] OUT at IncomingMessage.emit (events.js:117:20)
2015-04-22T11:27:08.08+0200 [App/0] OUT at _stream_readable.js:944:16
2015-04-22T11:27:08.08+0200 [App/0] OUT at process._tickCallback (node.js:448:13)
I got this error if I try to change the target to another language than English (on runtime / debug tab) :
{ "error_code": 404, "error_message": "cannot find service matching the request data" }
Could you please fix it :)
PS: the bug was discovered during an IBM workshop session with students and potential customers.
The Weather insights node is not working in United Kingdom region. When using a bound service the following error is given : "Weather Insights service call failed due to non-200 HTTP response to API call."
When not using a bound service there is no configuration field available to add the host (https://twcservice.eu-gb.mybluemix.net) and looking at the node code it is hard coded to US region instance (https://twcservice.mybluemix.net), so all credentials for services deployed in United Kindom region will fail with "Weather Insights service call failure due to authentication failure."
I imagine this is one of the most common types of Pull Requests you might get ... do you have the steps to add a node for a new service to node-red written down anywhere?
An option for specifying the language programmatically needs to be added to the weather service. Currently, this can only be set in the plugin panel. One possibility would be to add msg.language as one of the supported configurable variables.
Once you deploy Node-RED via the Node-RED starter in IBM Cloud catalog, you are not able to install this palette. In the install tab next to the node-red-bluemix-nodes it says "conflict" instead of the "install" button.
I wanted to install it because of the weather service but was not able to.
About the only doc on aggregates on mongodb via node-red is in a closed issue.
It would be useful to have some code examples.
I am making a big assumption: that the mongodb option in node-red on Bluemix is supported for use with mongodb on Compose and with the Time Series on Bluemix.
I think it should/ may be possible to provide a group parameter (without which AFAIK aggregates can't happen). I guess this could be done with an array or in a function.
so I tried adding this to my function:
msg.group={"value":{"$sum":"$value"},"count":{"$sum":1}}
so the payload going into the aggregate option of the mongo node is:
{
"topic": "",
"payload": { "id": 1234 },
"_msgid": "6ee585c5.911a7c",
"projection": { "pcfree": 1, "_id": 0 },
"group": {
"value": { "$sum": "$pcfree" },
"count": { "$sum": 1 }
}
}
This doesn't seem to be a good guess. I get:
MongoError: Index: 0, Size: 0
The same thing happens without the $ signs that we need for mongo cli.
I think I should stop guessing and see if anyone has a suitable code example for aggregates, maybe to add to the documentation for the mongodb node help text.
Also, if my assumptions about mongo and time series are wrong it would be great to know.
Thx.
Weather insights service was previously working for me a few days ago and now suddenly doesn't work anymore, and I don't believe I changed anything on my side. I tried deleting the service and binding a brand new one, restaged my app and got the same result.
Msg doesn't flow through the node and here's what I'm seeing in the debug panel: "Weather Insights service call failed with error HTTP response."
I took a look at the code:
if (!error && response.statusCode == 200) {
var results = JSON.parse(body);
msg.forecasts = results.forecasts;
msg.observation = results.observation;
msg.observations = results.observations;
node.send(msg);
} else {
var message3 = 'Weather Insights service call failed with error HTTP response.';
node.error(message3, msg);
}
so shouldn't the msg be shown in the debug panel, too? Without knowing what we're getting back from the Weather Insights service itself, it's hard to know if this is a problem with the node, or the Weather Insights service is having problems or if they changed their API interface. Please help!
So far there is no way to connect compose mongodb created from Bluemix. There is no SSL field and cannot connect with SSL enabled.
Please can you add a new node "Weather" which is bound to the Weather Service in Bluemix ?
I have many requests for that :
If I understand clearly, today if i want to do that i need to do a GET on the Weather API and use credentials. It could have been great to use the api directly in NodeRed without passing credentials if the service is already bound
Thanks
Ben
User has reported that the credentials aren't being automatically discovered on IBM Bluemix. They have noticed the default service name now includes underscores, which fails the regex we were using.
I think this is a shortcoming, having a default voice and language is good, but it should be overidable through some msg.voice parameter(s)
AFAICT, current code always puts in config.voice
directly.
Hi,
My bluemix region = "United Kingdom" and not "US South".
FYI my bluemix URL = console.eu-gb.bluemix.net
Allthough I have bound the "Weather Company Data" service to my node-red application and restaged node-red, I still have to specify a user name and password when configuring a "weather insights" node in node-red.
As a test, I tried the same things in region "US South" and then I don't have this issue.
This is actually the same problem as reported in following link:
[http://stackoverflow.com/questions/36905385/bluemix-weather-node-of-nodered-is-always-throwing-call-failed-with-error-http]
The root cause of this problem is already identified by T. Smith in the first comment to this problem where he stated that
"As you can see on line 20, the weather service host is hardcoded (twcservice.mybluemix.net) for the US-South region".
kr
Jan.
I am using the "Feature Extract" node and when I reach my daily limits I can see the following error in the logs:
OUT 8 Dec 14:17:38 - [error] [alchemy-feature-extract:12082910.edf7d7] Alchemy API request error: daily-transaction-limit-exceeded
But I don't catch this error in the Catch node. I believe the second argument (msg) is missing when sending this error with node.error function.
Hi, thank you or this library.
I'm trying to use the Speech to Text node to parse Telegram Bot API voice notes, but the node supports only WAV, while Telegram sends audio/ogg.
There is a way to put an option to select the file type, direct on node or through "msg"?
There's considerable interest in having the Watson nodes available to be installed outside of Bluemix. Whilst that is possible with the node-red-bluemix-nodes
module, it does drag in the other Bluemix-specific nodes that aren't needed.
This issue is to track migrating the Watson nodes over to their own repo and ensure that everyone involves knows what's happening.
node-red-node-watson
repository - https://github.com/node-red/node-red-node-watsonnode-red-node-watson
to npm1.0.0
version to npm - version bump important to preserve existing installsnode-red-node-watson
to:
node-red-bluemix-nodes
dependency to 1.x
node-red-bluemix
to
@jthomas need your input on these...
tone_analyzer
nodes not in package.json
weather
nodes not in package.json
alchemy
nodes?It doesn't allow me to set ruleset path in node configuration
Hi,
I want to consume and publish message from/to IBM Message Hub service but unfortunately the current MQLight node (from the node-red-bluemix-nodes) only able to detect "MQ Light service". I'm using the MQLight node that come with the default Bluemix.
Thanks.
Hi,
the Machine Translation uses the node configuration for the source/destination languages.
It could be very interesting to override the node configuration using msg.srcLang and msg.destLang.
Mongo-db node is not persisting db credentials in database, each time i restart the credentials of mongodb gets lost. (I am using mongo by compose on bluemix to save flows)
The node-mongodb-native package is using callbacks for the write commands, with values that can be useful.
For example, when a save command finished and we want to know if it inserted a new document or updated an existing one - the callback is called with the new document on inserting or with 1 on update.
I agree that when a callback is called with an error, the error should simply be logged.
Please remove the IBM Watson Machine Translation and Language Identification nodes.
This is related to #19 which is the service that replaces them.
I'm generating an audio stream from a Raspberry pi into a file, then using Node-RED I'm monitoring that file with the "tail in" node and sending that via a websocket to a Node-Red in Bluemix. I can see my stream coming to Bluemix's node-red just fine, but when I connect that stream to Watson's Speech-to-Text, my Node-red crashed. I imagine Watson S2T does not like the WAV stream format.
I record using:
arecord -vv -r 16000 -f S16_LE -c1 -D plughw:1 -d 3600 ./micStream/capture.wav
and below is the cf log for my app:
2016-02-18T23:26:05.25-0600 [App/0] OUT 19 Feb 05:26:05 - [red] Uncaught Exception:
2016-02-18T23:26:05.25-0600 [App/0] OUT 19 Feb 05:26:05 - Error: Invalid URI "RIFF$��WAVEfmt%20�%3E}data��"
2016-02-18T23:26:05.25-0600 [App/0] OUT at Request.init (/home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/request/request.js:413:31)
2016-02-18T23:26:05.25-0600 [App/0] OUT at new Request (/home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/request/request.js:264:8)
2016-02-18T23:26:05.25-0600 [App/0] OUT at request (/home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/request/index.js:50:10)
2016-02-18T23:26:05.25-0600 [App/0] OUT at stream_url (/home/vcap/app/node_modules/node-red-bluemix-nodes/watson/s2t.js:147:9)
2016-02-18T23:26:05.25-0600 [App/0] OUT at /home/vcap/app/node_modules/node-red-bluemix-nodes/watson/s2t.js:156:9
2016-02-18T23:26:05.25-0600 [App/0] OUT at /home/vcap/app/node_modules/node-red-bluemix-nodes/node_modules/temp/lib/temp.js:252:7
2016-02-18T23:26:05.25-0600 [App/0] OUT at Object.oncomplete (fs.js:108:15)
2016-02-18T23:26:05.30-0600 [RTR/1] OUT node-redxxx.mybluemix.net - [19/02/2016:05:25:09 +0000] "GET /mic HTTP/1.1" 101 0 0 "-" "-" 192.155.222.111:49260 x_forwarded_for:"74.192.222.111, 192.155.237.119" x_forwarded_proto:"http" vcap_request_id:5476b179-892b-4363-425b-a713e86aa2b0 response_time:56.049387974 app_id:1b7f997a-3d4a-4797-a31c-73d30955e7c8 x_global_transaction_id:"1936539453"
2016-02-18T23:26:05.30-0600 [App/0] ERR
2016-02-18T23:26:05.40-0600 [API/3] OUT App instance exited with guid 1b7f997a-3d4a-4797-a31c-73d30955e7c8 payload: {"cc_partition"=>"default", "droplet"=>"1b7f997a-3d4a-4797-a31c-73d30955e7c8", "version"=>"5cca8298-6cb9-4e26-9540-3409f13188fc", "instance"=>"36924296bab443b59c67c6d5fbb3ffb9", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"app instance exited", "crash_timestamp"=>1455859565}
2016-02-18T23:26:21.44-0600 [DEA/174] OUT Starting app instance (index 0) with guid 1b7f997a-3d4a-4797-a31c-73d30955e7c8
2016-02-18T23:26:35.98-0600 [App/0] OUT Detected 1024 MB available memory, 512 MB limit per process (WEB_MEMORY)
2016-02-18T23:26:35.98-0600 [App/0] OUT Recommending WEB_CONCURRENCY=2
2016-02-18T23:26:37.17-0600 [App/0] OUT Welcome to Node-RED
2016-02-18T23:26:37.17-0600 [App/0] OUT ===================
2016-02-18T23:26:37.17-0600 [App/0] OUT 19 Feb 05:26:37 - [info] Node-RED version: v0.11.2
2016-02-18T23:26:37.17-0600 [App/0] OUT 19 Feb 05:26:37 - [info] Node.js version: v0.10.40
2016-02-18T23:26:37.17-0600 [App/0] OUT 19 Feb 05:26:37 - [info] Loading palette nodes
2016-02-18T23:26:39.49-0600 [App/0] OUT iotf-service-staging credentials not obtained...
2016-02-18T23:26:39.49-0600 [App/0] OUT neither iotf-service nor iotf-service-staging credentials were obtained...
2016-02-18T23:26:39.82-0600 [App/0] OUT 19 Feb 05:26:39 - [info] Settings file : /home/vcap/app/bluemix-settings.js
2016-02-18T23:26:39.84-0600 [App/0] OUT 19 Feb 05:26:39 - [info] Server now running at http://127.0.0.1:62927/red/
2016-02-18T23:26:42.96-0600 [App/0] OUT 19 Feb 05:26:42 - [info] Starting flows
2016-02-18T23:26:43.03-0600 [App/0] OUT 19 Feb 05:26:43 - [info] [inject:Tick every 5 secs] repeat = 5000
2016-02-18T23:26:43.05-0600 [App/0] OUT 19 Feb 05:26:43 - [info] Started flows
The +
in node.share?+
is useless and messes the log text (+"some text"
gives NaN).
https://github.com/node-red/node-red-bluemix-nodes/blob/master/mqlight/mqlight.js#L77
https://github.com/node-red/node-red-bluemix-nodes/blob/master/mqlight/mqlight.js#L82
The Watson Machine Translation Node links to the Language Identification documentation. The correct link should be http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/machine-translation.html
Using multiple Watson nodes of the same type means I have to separate input the same user account details. Credentials should be shared across nodes of the same type using the configuration node.
machine translation service is deprecated and there is a new language translation service. Need node-red nodes for the language translation service.
I was trying to pass query msg.skip = 25
when I realise there is no skip option available in mongodb node. It is available in node-red-node-mongodb
Can't seem to get the Relationship Extraction node to work - can someone supply some simple test to confirm it is working ?
Hi,
Thanks for producing many excellent IBM nodes, yet I would definitely like to fire off business processes based on node red flows. Can you make a node red wrapper for the IBM BPM service?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.