Giter Site home page Giter Site logo

node-red-bluemix-nodes's People

Contributors

annaet avatar dceejay avatar hindessm avatar jthomas avatar knolleary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-bluemix-nodes's Issues

Trying to read a wav file for speech to text conversation node in node Red

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

weather_insights result in "Weather Insights service call failed with error HTTP response"

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?

Weather Insights API is incorrect.

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 ¿?¿?

Handle invalid message.payload types

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)

Translation Service not working if target is different from English

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.

Weather insights node is not working in United Kingdom region

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."

Documentation for adding a new node

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?

This palette cannot be added in Cloud deployment

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.

mongodb node - aggregates documentation

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 call failed with error HTTP response.

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!

Add Weather company node to NODE RED

Please can you add a new node "Weather" which is bound to the Weather Service in Bluemix ?

I have many requests for that :

  • in input, when a threshold of a value like temperature is over , then do something
  • in input, when storms are expected in the next x hours, then do something

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

weather insights node doesn't work in "United Kingdom" bluemix region.

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.

Cannot catch "Feature Extract" node error

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.

Change file type in Speech to Text node

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"?

Move Watson nodes to their own repo

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.

Steps

  1. Create new watson node module
  2. Update this repo
    • remove watson nodes from this repo, including README etc
    • publish new 1.0.0 version to npm - version bump important to preserve existing installs
  3. Update Bluemix templates

Outstanding items

@jthomas need your input on these...

  • tone_analyzer nodes not in package.json
  • weather nodes not in package.json
  • should this include the alchemy nodes?

MQLight node can't detect IBM MessageHub service

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.

Adding output to the mongo-out nodes

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.

Speech to Text crashing Node-Red when receiving Wav audio stream

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

Use shared configuration nodes for credentials

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.

Add new Language translation node

machine translation service is deprecated and there is a new language translation service. Need node-red nodes for the language translation service.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.