* allow custom tokenizers
allows use of tokens object to specifiy custom tokenizers
updated mlsentiment to v2.0.0 (with temporary fix for comparative score applied)
updated documentation
* update unit tests
* add msg.stop handler and docs, msg.start restarts process as per existing doc
* stop process using configured signal
* fix grunt complaint
* remove extra debug, make start only start and change doc to match
* TTL Functionality
Pick up msg.ttl and pass it to REST API, checking it is a positive integer first.
* Update help doc
Reference ttl parameter in api docs
* Fix: Warnings with no ttl
Check if ttl exists before sanitizing
* Add: Allow string ttl
If ttl is a string, parse to integer and check validity
---------
Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
Not all platforms have the user button supported, so dynamic
to add the user button label.
Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
Signed-off-by: chao zeng <chao.zeng@siemens.com>
Co-authored-by: chao zeng <chao.zeng@siemens.com>
* Bugfix: only execute node register callbacks after connection to the server has been made
* Bugfix: only execute direct callback of register node register when connected to STOMP server
* Doc: Add tip about reconnection to server
* TTL Functionality
Pick up msg.ttl and pass it to REST API, checking it is a positive integer first.
* Update help doc
Reference ttl parameter in api docs
* Bugfix: not responsive to msg.topic on input of STOMP out node
* Bugfix: not responsive to msg.topic on input of STOMP ack and out node
* Bugfix: backward compatible node.topic has prio + Docs: added info about msg.topic in ACK node docs
* Typo fix
* Bugfix: show connected state after reconnect
* Bugfix: show connected state for stomp out node after reconnect
* Add support for ACK messages
* Add optional subscription id
* Typo fix
* Subscription ID not required
* Bugfix "node.ack is not a fuction"
* Use shared client connection
* Bugfix shared connection
* Improvements & bugfixes to shared connection
* Bugfix connecting state
* Set connected state in connect callback
* Typo fix
* add server shared connection variables
* Bugfix for shared state
* WIP
* Complete refactor based on MQTT nodes to be able to share server connection between nodes
* Change address back to server for backwards compatibility
* Fixes for race conditions on node closing
* Add disconnect timeout of 2s to avoid "Error stopping node"
* If not connected, do not try to disconnect
* Fix for disconnecting log
* Styling fix for ack select form row
* Typo fixes
* Typo fix
* Bugfix: subscription before connected
* Bugfix: stringify payload before sending to be able to send numbers etc
* Bugfix: not saving ack field
* Bugfix: ack
* Bugfix: ack
* Bugfix: ack & better docs regardign ack
* BugFix: reconnect delay
* Improvements regarding cleanup on close
* Handle connect and reconnect event in the same way
* Typo fix
* Fix backwards compatibility
* Update PULL_REQUEST_TEMPLATE.md
* Add new UI elements to Email In node
Locale for en-US
Added Auth type and Token field to Email IN
Dynamically appear based on selection
* XOAUTH2 IMAP
Minor UI changes. Exposing only XOAuth2. Picks up raw access token from input message specified.
Only works for IMAP
Token formatted by node for Exchange and GMail, won't work on other providers.
Only works on trigger, not timer
TODO:
Add POP XOAUTH2 capability
Add SMTP XOAUTH2 capability
Add option to pass SASL XAOUTH2 token rather than raw OAUTH2 token
* SASL Format
Added checkbox to turn off SASL formatting if the user wants to do this themselves
* XOAuth2 forces input
Using XOauth2 forces triggered node, and automatic trigger sets auth to basic;
XOAuth2 needs token from flow
* Error reporting
Password missing error only occurs if set to basic authentication.
Token missing only occurs if set to XOAuth2.
* Unit tests
Make sure basic authentication is selected by default, and that an additional input is created and timed triggers are turned off for XOauth2
* Cleanup and README
Remove old code, update readme
* XOauth2 IMAP Release
Prevent XOAuth2 being used for POP. Update PR Template.
Updated help file.
Bumped version to 1.19-beta
* Update POP3 dependency
Removed dependency to poplib.js, moved to node-pop3. Re-wrote checkPOP3 function asynchronously using the new library. Added some node.status changes to mimic IMAP behaviour.
* XOAUTH2 POP3
Added checking for authentication type to allow XOauth2 tokens to be sent to POP server. Turned off UI restrictions for this functionality.
* XOAUTH2 POP3 Release
Updated help docs and version to reflect changes.
* Add new UI elements to Email Out node
Add option for XAouth2 for SMTP node
* XOAUTH2 SMTP
Exposing functionality for OAuth2 through Nodemailer. Added some error reporting if credentials are missing to match the Email-In node.
* XOAUTH2 SMTP Release
Updated help file to reflect changes.
* Unit Tests for Email Out
Modified tests to allow these unit tests to pass, but does not address the fault caused by the Node Test Helper - credentials only loaded after the flow has been loaded.
---------
Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
Separation of class LED selection and state control.
The label of the LED corresponds to the silk screen of the iot2050.
Before we use one list to enumerate all the led and its state.
like: User1 Led Red User1 Led Green User1 Led Orange
User2 Led Red User2 Led Green User2 Led Orange
if we need to add or delete the LED, we should change this list
After Separation of class LED selection and state control
one is Led selection: USER1 USER2
the other is status selection: Green Red Orange
For this structure, if the led or status changes, We don't need
to enumerate all the states.
Also there is a problem with the old version:
When we use one node to control led show green, then we use another node to control
led show red. The result we expect is led red, but the actually result is led orange.
This is caused the previous green do not turn off. State change is wrong.
This refact would also fix it.
Signed-off-by: chao zeng <chao.zeng@siemens.com>
Signed-off-by: chao zeng <chao.zeng@siemens.com>
Based on eclipse/mraa@a9f0ff22 iot2050 platform add.
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-led: add led
This patch introduces LED node in GPIO category.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-ain: add iot2050 board
Add IOT2050 board in list of possible boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-dout: add iot2050 board
Add IOT2050 board into list of possible boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-pwm: add iot2050 board
Add IOT2050 board into list of possible boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio: clean up on close for ain, pwm, dout
Required as nodejs will only lazily delete the node objects, and we may
race with the next user requesting the resources.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add USER button
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
Co-authored-by: Jan Kiszka <jan.kiszka@siemens.com>
* Initial fixes before testing and reformatting
* Put sun event offset back in; reformat
* Tabs to spaces
* Fix "Start+X" OFF time; add more comments
* Undo some formatting changes
* Add contributors to package.json
* mraa-gpio-din: add iot2050 board
This patch adds iot2050 board in possible list of boards.
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add cleanup on close
Required as nodejs will only lazily delete the node objects, and we may
race with the next user requesting the resources. ISR thread release.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: extend GPIO lines
Signed-off-by: zengchao <chao.zeng@siemens.com>
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add configurable GPIO mode for DIN
GPIO mode wasn't set correctly, it was set from Pinmuxes modes instead
of GPIO. Add way to control GPIO modes on DINs from Node-RED with
possible values from mraa : Strong, Hiz, Pull-down, Pull-up.
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* mraa-gpio-din: add support for initial message from digital input
This allows to send out an initial message with the current digital pin
state on startup, simplifying initializations of certain flows.
Based on siemens/meta-iot2000@5fc2bbe patch 0003.
Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
* Email Mta Node added security and authentication
* Documentation updated
* Original formatting restored
* email-mta added note for port security
hide fields when not relevant
* Attempt to catch errors from wemo-lookup
This is to catch errors when device is offline
* Put request back
Will look at making it all http.request later
* Fix some messages
* Bump wemo version
* Fix typo
* Attempt to catch errors from wemo-lookup
This is to catch errors when device is offline
* Put request back
Will look at making it all http.request later
* Fix some messages
* Bump wemo version
* Use mysql2 lib
* fix pool on acquire event cause MaxListenersExceededWarning (#854)
before: every query need to register pool on acquire event to specify queryFormat based on payload type
will cause MaxListenersExceededWarning
after:
from https://www.npmjs.com/package/mysql#pooling-connections
pool.query is a shortcut for pool.getConnection() -> connection.query() -> connection.release()
so use pool.getConnection and then
set queryFormat before query method be called
Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
* fix mysql require
* Add decimalNumbers flag true to mysql beta
* mysql remove old Timeout option, clarify timezone options
* add mysqlConnectionLimit settings option.
Co-authored-by: saknarak <saknarak@gmail.com>
* Add files via upload
* Update pimcp3008.js
implementation of the discussion
* Update pimcp3008.js
Co-authored-by: Dave Conway-Jones <dceejay@users.noreply.github.com>
* social-pushover: Add "tags" parameter.
Add "tags" for emergency prio (2) messages, so you're able to cancel them by tag. (see doc / Pushover API)
* Add msg.tags to readme.
* Added decimal places option + bugfix + keywords
Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility.
Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then.
Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
* Added decimal places option + bugfix + keywords
Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility.
Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then.
Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
* Added decimal places option + bugfix + keywords
Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility.
Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then.
Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
* Added "blink1 in" node
* sets msg.payload to current RGB value or "off" if RGB = 0,0,0
* can also be used to pipe msg.payload to blink1 out
* blink1 category created
* blink1 label set to "blink1 out"
* Bumped version to 0.1.0
* Modified readme
* Added msg.advertising = true/false to enable/disable advertising
* Fixed comparison with bool
* physical- web: Added status
Added status (lost, updated, found) as msg.topic. Added checkbox to allow duplicates or not.
* Re-added optional topic to avoid breaking compatibility
* Cleaner topic slection
* node-red-node-wol: added address field
* node-red-node-wol: remove warning
* node-red-node-wol: bump version
* node-red-node-wol: typo in version
* Ensure service is stopped before being created
* Bump version of node-red-node-discovery to 0.0.19
* node-red-node-discovery: correction to Readme
* node-red-node-discovery: Add stop method and show status
* node-red-node-discovery: bump version to 0.0.20
* node-red-node-discovery: remove status text
* serial: ensure serialReconnectTime has a default value
* physical-web: update dependencies to make it work with recent node versions
* physical-web: update package.json
* Big Update
Includes:
- New lookup node to check state of a device
- Fix dimming control for lights
- Fix light group control
- Set the node label to match the device name
- The event now includes the text description of the light capability
* Add extra check for empty results in discovery
* Attempt to catch errors from wemo-lookup
This is to catch errors when device is offline
* Put request back
Will look at making it all http.request later
* Add more error handling and reporting
* Try and not crash with subscriptions
Failed subscriptions will try agian in 1 min
* Fix some messages
* Remove most of the console.logs
* Last of console.logs
* timeswitch node: a) do not mark node as misconfigured if sunrise and
sunset are not used and latitude/longitude are not given. b) support for
specifying time zone when on and/or off times are not specified as
sunrise and/or sunset.
* Replaced moment dependency with spacetime
* Timezone defaults to UTC for compatibility with previous node version
* Insight power parameters
* Insight power parameters
* Insight power parameters
* Insight power parameters
* Insight power parameters
* Bump version 0.2.0
* Add option to dynamically pass in 'From' and 'To' - fixed bug when 'From' was greater than 'To' by flipping the two
* Set initial values of 'From' and 'To to "" to allow dynamic overriding them
Applications pending approval will return a different response body than what is presently supported.
Below is a copy of the actual response that comes back in this scenario:
```
{"status":401,"rateLimitTimeout":null,"body":{"request":"/1.1/statuses/update.json","error":"Read-only application cannot POST."}}
```
Whereas the current implementation assumes the presence of an `errors` array, reading off the first element (i.e. `result.body.errors[0]`), the above scenario throws an exception as `result.body.errors` is now `undefined` and cannot be indexed).
The proposed update seeks to account for this while retaining existing functionality and has been tested (error message in debug now properly says "Read-only application cannot POST."
Added support for version 3.
All the existing issues with v1 and v2c are also with v3 e.g.
https://github.com/node-red/node-red-nodes/issues/679
snmp walker will not return more than 1000 objects, all following objects cannot be accessed
Incorrect encryption (privacy) passphrase gives a timeout and not an error (protocol limitation?)
Incorrect community string gives a timeout and not an error (protocol limitation?)
Changes to the node are made with following details:
Node-red v1.2.2
Node.js v12.6.0
Windows_NT 10.0.19841 x64 LE
Pushbullet dev here. Around 36 hours ago we started receiving around 750 additional requests per second to connect to our stream server. I blocked around 50 - 100 IP addresses to mitigate the spam. This spam traffic has continued unchanged since then.
I don't know for sure what caused this, but one user came forward reporting issues with their Node-Red setup after I banned the IPs (status code is my banned IP status code which is pretty compelling evidence). I can't be sure what is causing the issue since no User-Agent is included in the requests, but it for sure is at least partly Node-Red API users. I'd like to work on mitigating this since mitigating the spam traffic costs money.
My first theory here is in this PR. I am not aware of any guarantees that you'll never get multiple 'error' events, so it makes sense to clear the timeout before setting a new one to reconnect. Even if it is just defensive, it may not have much cost? If you do get multiple error events without this change, it is possible to trigger many connect() requests which can error out and then trigger many more connect() requests with lots of timeouts, which is not good.
Another thing to consider is that this library's dependency for PB (https://github.com/alexwhitman/node-pushbullet-api) already has code to reconnect if a websocket connection is lost without having been properly closed. I think an even better solution is verifying this works and then deleting the reconnect logic from here.
I'm not an expert on Node-Red though so I am only trying to offer suggestions to ensure everyone is a good citizen when using our API :) Thanks!
* Enable the use of environment variables to define GPIO pin number
* Pin field moved below table. Field width made the same as table. Restored
fa-icon and "Pin" label. Closed validation escapes.
* On error throw a catchable
Throws an catchable exception if there is any error in sending the message. So you can react to it with a catch node
* Updated errorhandling
Updated the error handling process to be in compliance with the Node-RED Api
* Reduce resubscription time
Halve the resubscrciption timeout to make sure event
subscriptions get renewed
* Big Update
Includes:
- New lookup node to check state of a device
- Fix dimming control for lights
- Fix light group control
- Set the node label to match the device name
- The event now includes the text description of the light capability
* Fix groups properly
* Fix travis error with comparitor
* Bump node-ssdp version
* Add extra check for empty results in discovery
* Bump twitter to 280 chars
fixes#371
* Bump twitter node version
* Remove extra whitespace
* Add catch for HTTP timeout
If the device drops off line then with no catch for the timeout
Node-RED will crash
Should fix#616
* More timeout catch blocks
* Version bump
* Bump Wemo version
* Reduce resubscription time
Halve the resubscrciption timeout to make sure event
subscriptions get renewed
* Big Update
Includes:
- New lookup node to check state of a device
- Fix dimming control for lights
- Fix light group control
- Set the node label to match the device name
- The event now includes the text description of the light capability
* Fix groups properly
* Fix travis error with comparitor
* Bump node-ssdp version
* Add extra check for empty results in discovery
* Bump twitter to 280 chars
fixes#371
* Bump twitter node version
* Remove extra whitespace
* Add catch for HTTP timeout
If the device drops off line then with no catch for the timeout
Node-RED will crash
Should fix#616
* Move English help about e-mail node to en-US directory
* Move English help about rbe node to en-US directory
* Move English help about tail node to en-US directory
* Move English help about twitter node to en-US directory
* Move English help about feedparse node to en-US directory
* Move English help about sentiment node to en-US directory
* Fix alignment of baud rate setting.
* Add flow control flags DTR and RTS.
* Add flags for flow control RTS and DTR.
* Add pin states for flow control flags
* Change pinstates to linestates
* Remove help text about DTR/RTS defaulting to low.
* Collect flow control setting into one single command.
* Add curly braces.
* Add more curly braces.
* Add CTS and DSR settings. Add default none option. Change settings layout for flow control.
* Allow input
Added input point, removed requirement for data on data point 'filename' and added help text for new input parameter.
* Added filename parameter as an input
Handling of input msg add for parameter 'filename'. Monitoring will stop if no filename is defined either at the node level or as an input.
* Added 'state' to locale
Messages for node state added for en_US language
* Replaced messages with pointers to locale file
* Typo fixed
* Made inputs dynamic
Input bullet only available if filename is empty
* Visually separated the list of control values from the example.
This will aid people who are quickly skimming the readme. There wasn't anything wrong in the doc. Everything would be clear if the reader is reading thoughtfully. But if they're skimming and looking for what to supply to the node for the first time, their eye is drawn to the JSON example. Since many nodes accept JSON input, and supplying `{"state": "off"}`, `{"state": 0}`, or `{"state": 1}` works, it might take them awhile to realize their oversight.
* Clarification
* Update README.md
* Update README.md
* email optionally uses criteria from message
Allows for generation of detailed queries through flows when triggering an email
fetch in IMAP.
* use the same default as a new email node
When the criteria is set from a message, if there is no criteria use the same default as a new node.
* serial: simplify serialPool.get
serialPool.get() has a lot of arguments.
Just pass the whole serialConfig object instead.
Also introduce early termination to remove one level of indentation.
(Just set your diff tool to ignore all whitespace changes to see
how very little this patch changes)
* serial: move splitting logic onto serialPool
All SerialIn and SerialOut nodes for a given port
share the same splitting logic as it is indeed
set by the common configuration node.
Move the code from SerialIn into serialPool so that
it can be reused by the serial request node.
Notice how the 'data' event will no longer carry
single bytes, but the whole payload instead.
Also move the output encoding logic into serialPool.
* serial: add serial request node
Add a "serial request" node to handle simple request/response
protocols. This node allows for multiple instances, all
sharing the same underlying device.
Responses coming from the serial line will only be propagated
to the output of the node where the request was originally received
(contrary to the "serial in" nodes which all emit the data
received from the serial line).
Every request received as an input to the node, is transmitted
to the serial line, and a matching response must be received
before the next one can be transmitted.
Any input message received in the meantime is internally enqueued.
The node is essentially a merge of serial in and serial out.
It shares the same configuration with serial in and serial out
for any given port and will not affect the behavior of the
existing nodes.
This means you can use, alongside with the request node:
- as many serial in nodes as you want -- e.g. to "sniff"
- serial out to inject mailicious/tampering data onto the serial
line, skipping the queueing mechanism
* serial request: provide some visual feedback on the node
add status indication:
- yellow "waiting" when a message is enqueued for sending
- green "OK" after an answer is received
- red "timeout" after a timeout occurs
More sofisticated output would include an indication of the number of messages
enqueued and the actual timeout remaining after sending.
* serial request: make default response timeout configurable
Notice it's a global setting (i.e. stored in the configuration node)
as opposed to per-node, but it can be overridden by setting msg.timeout.
* serial request: cosmetic changes
- added documentation about msg.port
- timeout field made wider so to accommodate default value of 10000ms
- replaced harcoded text with localizable strings for
"waiting" and "timeout" messages
* serial: cleanup: remove node.tout
this was probably some leftover code from previous implementations.
Now all timeouts are handled within the connection objects.
* serial: cleanup: set obj.tout to null after clearing it
clearing a Timeout without setting it back to null *might* have
adverse effects on later code which would check its null-ity.
Let's just do it.
* serial: cosmetic: add some comments
* serial request: fix "split on timeout" case
In the case of "split on timeout" case, we're reusing the same
.tout for two different purposes:
1) to send a timeout message, in case no answer is received at all [request]
2) to split messages, after receiving the first character [in+request]
So in the case of serial request, checking whether .tout is already
set is no longer a valid condition for 2).
Let's just check whether i === 1, and clear the timeout set up by 1)
if it's already there.
* serial: add "split on silence" behavior
add a fourth logic to split incoming data into messages.
The existing "split on timeout" logic starts the timeout upon
reception of the first character.
This might lead to unwanted behavior if for instance Node-RED is
restarted, as data might accumulate into OS buffers (see #410).
A different logic might be to only emit a message when enough time
has passed, without any new data being received (line silent), a.k.a.
interbyte timeout.
I mentioned this a while ago
Following changes to Pi firmware/kernel, the DMA channel 5 is not reliable for use anymore. Other repositories have changed to use channel 10. https://github.com/jgarff/rpi_ws281x/pull/266/commits
I've been running 3 of my Pi on DMA 10 (1 new Pi3B+ and 2 older PiZeros running Jessie) for 2 months now without any issues so I'm making this pull request now
* Update the 'Node Help'
Expanded the explanation for using multiple commands.
Provided examples for Rotate, Flip and Display.
Added examples for rotate, flip and screen brightness and added line to multiple messages explaination.
changed the Flip format from 'R' to 'F'
* use new test-helper add test to package.json
* try to fix travis build with new test helper
* install coveralls globally
* work around travis issue with adding node_modules/.bin in PATH
* add Japanese info text of twitter node
* add Japanese info text of feedparse node
* add Japanese info text of email node
* add Japanese info text of rbe node
* minor fix of Japanese info text of email node
* minor fix of Japanese info text of email node
* Updates to match API changes
Update to the node to match the server API changes. An attempt has been made to leave a legacy path for existing installations that may have not updated the server side.
* Updated following comments.
Update following comments.
Output removed and node.warn or error used.
oneeditprepare added.
Name moved to last item.
In addition, a check added to ensure nodegroup has valid value.
Question: I have added a 'return' as I do not want data posted if there is not a valid nodegroup. Is this the best way to exit the function? Always taught that multiple exits was a bad idea. I wondered about raising an error / exception and then catching it but not sure how to do that.
* Update documentation for revised node
* Update version of node-ssdp and use explicitSocketBind option to
work with multiple network interface cards. Based on discussion
in [node-ssdp issue #34](https://github.com/diversario/node-ssdp/issues/34)
* Bumping the version number
1- Ensure we stop advertising before creating a new advertiser if the object exists
2- Allow bool false to stop advertising
3- Documentation correction (state is in msg.payload, not in msg)
* Print error on exception and tweak GPIO setup
* Restart script on timeout
* Add GPIO.cleanup to restart() function
* Use interrupts instead of polling input pin state
* snmp set node
* updated readme
* readme
* added missing {}
* corrected naming in variables, removed unused ones
* Use snmpObjectType to map types in SnmpSNode
* added varbinds as node property
* edit priority between node and message
* edit help
* updated doc
* try catch JSON.parse§
* corrected typo in html
* Error message in case of JSON parsing error
* removing try/catch on JSON.parse for varbinds, as a wrong varbinds will be
catched/handled in Session.set() method
* edit doc for better presentation
* I've modified the snmp libraries so that the server and the community can be defined by the msg.
Error will be thrown if you try to override what was defined in the node.
Verified that the contents of msg is no longer clobbered.
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Replaced tabs with 4 spaces.
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* fix extra spacing
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Standardise node.error to include msg so that errors can caught
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Update documentation for snmp nodes
fixed documentation as noted, removed conflict and iff from documention
remove node.warns if host or community are set in both the node config and msg
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* FIX: Close net-snmp sessions
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Fix 2: The previous push did not cleanly address the problem.
This commit uses a singleton aproach to create socket.
It still needs to be tested to see if there is any issue to the never-close,
but reuse socket model. My only concern is if a socket dies, do we need to do something to reestablish it?
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* I've modified the snmp libraries so that the server and the community can be defined by the msg.
Error will be thrown if you try to override what was defined in the node.
Verified that the contents of msg is no longer clobbered.
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Replaced tabs with 4 spaces.
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* fix extra spacing
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Standardise node.error to include msg so that errors can caught
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Update documentation for snmp nodes
fixed documentation as noted, removed conflict and iff from documention
remove node.warns if host or community are set in both the node config and msg
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* I've modified the snmp libraries so that the server and the community can be defined by the msg.
Error will be thrown if you try to override what was defined in the node.
Verified that the contents of msg is no longer clobbered.
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Replaced tabs with 4 spaces.
Signed-off-by: Bryan Malyn <bimalyn@us.ibm.com>
* Reduce resubscription time
Halve the resubscrciption timeout to make sure event
subscriptions get renewed
* Big Update
Includes:
- New lookup node to check state of a device
- Fix dimming control for lights
- Fix light group control
- Set the node label to match the device name
- The event now includes the text description of the light capability
* Fix groups properly
* Fix travis error with comparitor
* Bump node-ssdp version
* Let email out node connect to SMTP without authentication
Add the possibility to connect to local SMTP without authentication.
* Adapt test to connect to SMTP without credentials
Adapt test to connect to SMTP without credentials
* Add coverage for social email out node
Add coverage for social email out node
* Add more coverage to email out node
Add more coverage to email out node
* Add support for search terms passed in through msg.payload
* Add support for dynamic left ping connector
* Suggestions from David Conway-Jones
* Better error message
* Add green status indicator when msg.payload is dynamically passed in and revised warning messages
* Replacing the original wemo node with the wemo-ng node
* Added install instructions
* Fix name of wemo out node
* Fix some jshint errors
More jshint fixes
fix jshint
last jshint fix
Fix last jshint error
* Adds proper url length detection
* fix up the extra line added in the merge
* Fix some jshint errors
More jshint fixes
fix jshint
last jshint fix
Fix last jshint error
load of tiny listing fixes, undef, unused, etc
fix slight wrinkle in new Wemo node
Fix wemo package name for npm.
Add contribution.md to node-red-nodes
to make it more obvious.
correct spelling in readme.md
revert .jshintrc
Added subtree and walker nodes. (#200)
Thanks @mikakaraila - very useful.
slight edits to snmp to pass jslint-ing
Bump underlying serial port nam version
correct BBB callback response to check exists
To Fix#198
* Adds proper url length detection
fix up the extra line added in the merge
* Added some more error checking in discovery
* Adds proper url length detection* fix up the extra line added in the merge
* Adds proper url length detection
* fix up the extra line added in the merge
Add line output mode for Daemon node
to address #202
Email rework (#195)
* Rework of Node-RED email nodes
tidy up email listing - no code changes
add latest email node dips
and update email node libs - bump version
update package version for nodes tests
add a few tests
geohash, smooth, base64, msgpack
correct path of source file
Thanks @Ltrlg
Fix typo in node-red-node-smooth (#205)
node-red-node-physical-web: Added msg.advertising = true/false to enable/disable advertising (#204)
* Added msg.advertising = true/false to enable/disable advertising
* Fixed comparison with bool
Don't use get_compass as it breaks get_orientation
add envelope to email node options
as part of node-red#875
Physical-web: Added status (found, updated and lost) as msg.topic (#206)
Added msg.advertising = true/false to enable/disable advertising
Added status (lost, updated, found) as msg.topic, if not already set
Added checkbox to allow duplicates or not.
* Re-added optional topic to avoid breaking compatibility
* Cleaner topic slection
add a v0.3 serial port to help with node5/6
let PI try to enable sensorTag access on install
Add cc and bcc options to email node
to close#209
updates to email node to better handle
different mail types. Still not great - but does the basics… To close
Better email node parsing (again)
Fix indent
fixed formating
* Fix heading in README.md
Fix node name in README.md
* Silences warnings about too many listeners
* Fixed#222 - RFC error with invalide FROM address forcing userid config value
* Added user help text for #222 fix and pull request
* Fixing tab spacing for #222 fix before pull request acceptance
* Replacing the original wemo node with the wemo-ng node
* Added install instructions
* Fix name of wemo out node
* Fix some jshint errors
More jshint fixes
fix jshint
last jshint fix
Fix last jshint error
* Adds proper url length detection
* fix up the extra line added in the merge
* Fix some jshint errors
More jshint fixes
fix jshint
last jshint fix
Fix last jshint error
load of tiny listing fixes, undef, unused, etc
fix slight wrinkle in new Wemo node
Fix wemo package name for npm.
Add contribution.md to node-red-nodes
to make it more obvious.
correct spelling in readme.md
revert .jshintrc
Added subtree and walker nodes. (#200)
Thanks @mikakaraila - very useful.
slight edits to snmp to pass jslint-ing
Bump underlying serial port nam version
correct BBB callback response to check exists
To Fix#198
* Adds proper url length detection
fix up the extra line added in the merge
* Added some more error checking in discovery
* Adds proper url length detection* fix up the extra line added in the merge
* Adds proper url length detection
* fix up the extra line added in the merge
Add line output mode for Daemon node
to address #202
Email rework (#195)
* Rework of Node-RED email nodes
tidy up email listing - no code changes
add latest email node dips
and update email node libs - bump version
update package version for nodes tests
add a few tests
geohash, smooth, base64, msgpack
correct path of source file
Thanks @Ltrlg
Fix typo in node-red-node-smooth (#205)
node-red-node-physical-web: Added msg.advertising = true/false to enable/disable advertising (#204)
* Added msg.advertising = true/false to enable/disable advertising
* Fixed comparison with bool
Don't use get_compass as it breaks get_orientation
add envelope to email node options
as part of node-red#875
Physical-web: Added status (found, updated and lost) as msg.topic (#206)
Added msg.advertising = true/false to enable/disable advertising
Added status (lost, updated, found) as msg.topic, if not already set
Added checkbox to allow duplicates or not.
* Re-added optional topic to avoid breaking compatibility
* Cleaner topic slection
add a v0.3 serial port to help with node5/6
let PI try to enable sensorTag access on install
Add cc and bcc options to email node
to close#209
updates to email node to better handle
different mail types. Still not great - but does the basics… To close
Better email node parsing (again)
Fix indent
fixed formating
* Fix heading in README.md
Fix node name in README.md
Added msg.advertising = true/false to enable/disable advertising
Added status (lost, updated, found) as msg.topic, if not already set
Added checkbox to allow duplicates or not.
* Re-added optional topic to avoid breaking compatibility
* Cleaner topic slection
* Replacing the original wemo node with the wemo-ng node
* Added install instructions
* Fix name of wemo out node
* Fix some jshint errors
More jshint fixes
fix jshint
last jshint fix
Fix last jshint error
New version of nma package available
Thanks @madeddie
Yes - nailing down the pre-reqs is a decision we have made... even if (as in this case) it does break us occasionally.
* Ability to select BlinkStick by serial number
* Look up serial numbers of connected BlinkSticks
* Ability to set blink, morph and pulse animations
* Ability to control the parameters of those animations like duration,
* steps, repeats and delay
* Repeat blink and pulse animation until new payload is received
* Automatically find BlinkStick if it was removed and then plugged back in
* Connectivity status when "Node Status" is enabled in the menu
* Override parameters with payload object
* Improved text in the info pane
These changes affect the settings of hue node through the message input.
msg.lamp sets the lamp ID
msg.color sets the lamp color (e.g., msg.color="DF0101" will set the
color to red)
msg.brightness sets the lamp brightness (e.g., msg.brightness=50)
msg.payload is used to se the lamp status (on/off/alert) (e.g.,
msg.payload="alert" will flash the Lamp once)
msg.topic can be still used to set the color (compatibility with
previous versions)
We must not store passwords in the regular flows file as this gets exchanged with the browser regularly and would leave things vulnerable.
The credentials mechanism is there to all a write-once-don't-need-to-read approach that allows the runtime access to the credentials without exposing them to the browser.
This issue tracker is for problems with the extra nodes maintained by the Node-RED project.
If your issue is:
- a general 'how-to' type question,
- a feature request or suggestion for a change,
- or problems with 3rd party (`node-red-contrib-`) nodes
please use the [Node-RED Forum](https://discourse.nodered.org) or [slack team](https://nodered.org/slack), or ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/node-red) and tag it `node-red`.
That way the whole Node-RED user community can help, rather than rely on the core development team.
## So you have a real issue to raise...
To help us understand the issue, please fill-in as much of the following information as you can:
Copyright 2013 IBM Corp. under [the Apache 2.0 license](LICENSE).
Copyright JS Foundation and other contributors, http://js.foundation under [the Apache 2.0 license](LICENSE).
# Extra Node Information
### Analysis
**72-wordpos** - Analyses the payload and classifies the part-of-speech of each word. The resulting message has msg.pos added with the results. A word may appear in multiple categories (eg, 'great' is both a noun and an adjective).
**74-swearfilter** - Analyses the payload and tries to filter out any messages containing bad swear words. This only operates on payloads of type string. Everything else is blocked.
### Hardware
**37-rpi-piface** - Adds support for the PiFace interface module for Raspberry Pi.
**78-ledborg** - A simple driver for the LEDborg plug on module for Raspberry Pi.
**60-wemo** - Basic node to drive a WeMo socket and switch. Does not use discovery.
**76-blinkstick** - Provides support for the BlinkStick USB LED device.
**77-blink1** - Provides support for the Blink1 USB LED from ThingM.
**78-digiRGB** - Provides support for the DigiSpark RGB USB LED.
**79-sensorTag** - Reads data from the Ti BLE SensorTag device.
**101-scanBLE** - Scans for a particular Bluetooth Low Energy (BLE) device.
### IO
**26-rawserial** - Only really needed for Windows boxes without serialport npm module installed.
Uses a simple read of the serial port as a file to input data. You **must** set the baud rate etc externally *before* starting Node-RED. This node does not implement pooling of connections so only one instance of each port may be used - so in **or** out but **not** both.
**39-wol** - Sends a Wake-On-LAN magic packet to the mac address specified. You may instead set msg.mac to dynamically set the target device mac to wake up.
**88-ping** - Pings a machine and returns the trip time in mS. Returns false if no response received within 3 seconds, or if the host is unresolveable. Default ping is every 20 seconds but can be configured.
### Social
**69-mpd** - MPD music control nodes. Output node expects payload to be a valid mpc command. Currently only simple commands that expect no reply are supported. Input node creates a payload object with Artist, Album, Title, Genre and Date.
**57-notify** - Uses Growl to provide a desktop popup containing the payload. Only useful on the local machine.
**57-prowl** - Uses Prowl to push the payload to an Apple device that has the Prowl app installed.
**57-pushbullet** - Uses PushBullet to push the payload to an Android device that has the PushBullet app installed.
**92-xmpp** - Connects to an XMPP server to send and receive messages.
### Storage
**67-leveldb** - Uses LevelDB for a simple key value pair database.
**68-mysql** - Allows basic access to a MySQL database. This node uses the **query** operation against the configured database. This does allow both INSERTS and DELETES. By it's very nature it allows SQL injection... *so be careful out there...*
### Time
**79-suncalc** - Uses the suncalc module to generate an output at sunrise and sunset based on a specified location. Several choices of definition of sunrise and sunset are available,
**NPM name** - *File-link* - Description
### Misc
**99-sample** - A sample node with more comments than most to try to help you get started without any other docs...
**N/A** - *[99-sample](./)* - A sample node with more comments than most to try to help you get started without any other docs...
### Analysis
**node-red-node-badwords** - *[74-swearfilter](analysis/swearfilter)* - Analyses the payload and tries to filter out any messages containing bad swear words. This only operates on payloads of type string. Everything else is blocked.
**node-red-node-wordpos** - *[72-wordpos](analysis/wordpos)* - Analyses the payload and classifies the part-of-speech of each word. The resulting message has msg.pos added with the results. A word may appear in multiple categories (eg, 'great' is both a noun and an adjective).
### Function
**node-red-node-datagenerater** - *[datagenerator](function/datagenerator)* - A node that can generate dummy data in various formats, names, addresses, emails, numbers, words, etc
**node-red-node-pidcontrol** - *[pidcontrol](function/PID)* - A PID control node for numeric inputs - provides simple contoll loop feedback capability.
**node-red-node-random** - *[random](function/random)* - A simple random number generator - can generate integers for x to y - or floats between x and y.
**node-red-node-rbe** - *[rbe](function/rbe)* - A simple node to provide report by exception and deadband / bandgap capability for simple inputs.
**node-red-node-smooth** - *[17-smooth](function/smooth)* - A simple node to provide various functions across several previous values, including max, min, mean, high and low pass filters.
### Hardware
**node-red-node-arduino** - *[35-arduino](hardware/Arduino)* - A collection of analogue & digital input & output nodes for the Arduino board - uses firmata protocol to talk to the board.
**node-red-node-beaglebone** - *[145-BBB-hardware](hardware/BBB)* - A collection of analogue & digital input & output nodes for the [Beaglebone Black](http://beagleboard.org/black).
**node-red-node-blink1** - *[77-blink1](hardware/blink1)* - Provides support for the [Blink1](http://blink1.thingm.com/) USB LED from ThingM.
**node-red-node-blinkstick** - *[76-blinkstick](hardware/blinkstick)* - Provides support for the [BlinkStick](http://www.blinkstick.com/) USB LED device.
**node-red-node-digirgb** - *[78-digiRGB](hardware/digiRGB)* - Provides support for the DigiSpark RGB USB LED.
**node-red-node-heatmiser** - *[100-heatmiser-in](hardware/heatmiser)* - Read and writes settings for temperature and frost protection to Heatmiser thermostats.
**node-red-node-intel-galileo** - *[mraa-spio](hardware/intel)* - A collection of analogue & digital input & output nodes for the Intel Galileo and Edison.
**node-red-node-ledborg** - *[78-ledborg](hardware/LEDborg)* - A simple driver for the [LEDborg](https://www.piborg.org/ledborg) plug on module for Raspberry Pi.
**node-red-node-makeymakey** - *[42-makey](hardware/makey)* - A Node-RED node to read from a [MakeyMakey](http://www.makeymakey.com/) input device.
**node-red-node-pi-gpiod** - *[pigpiod](hardware/pigpiod)* - An alternative to the default PI GPIO nodes that allows remote access - so a host machine can access a remote Pi (via network) and is better for driving multiple servos.
**node-red-node-pi-mcp3008** - *[pimcp3008](hardware/mcp3008)* - Allows A Raspberry Pi to node to read from MCP300x series Analogue to Digital Converter chips via the SPI bus.
**node-red-node-pi-neopixel** - *[neopixel](hardware/neopixel)* - Allows A Raspberry Pi to drive a strip of NeoPixels directly.
**node-red-node-pi-unicorn-hat** - *[unicorn](hardware/unicorn)* - Lets a Raspbeery Pi control a Pimorini Unicorn HAT 8x8 LED display.
**node-red-node-pibrella** - *[38-rpi-pibrella](hardware/Pibrella)* - Controls a [Pibrella](http://pibrella.com/) add-on board for a Raspberry-Pi.
**node-red-node-piface** - *[37-rpi-piface](hardware/PiFace)* - Adds support for the [PiFace](http://www.piface.org.uk/) interface module for Raspberry Pi.
**node-red-node-piliter** - *[39-rpi-piliter](hardware/PiLiter)* - Controls a Pimorini Pi-LITEr 8 LED add-on board for a Raspberry-Pi.
**node-red-node-sensortag** - *[79-sensorTag](hardware/sensorTag)* - Reads data from the Ti Bluetooh Low Energy (BLE) SensorTag device.
**node-red-node-wemo** - *[60-wemo](hardware/wemo)* - Basic node to drive a [WeMo](http://www.belkin.com/us/Products/home-automation/c/wemo-home-automation/) socket and switch. Does not use discovery.
**N/A** - *[101-scanBLE](hardware/scanBLE)* - Scans for a particular Bluetooth Low Energy (BLE) device.
### I/O
**node-red-node-discovery** - *[mdns](io/mdns)* - discovers other Avahi/Bonjour services on the network.
**node-red-node-emoncms** - *[88-emoncms](io/emoncms)* - Adds node to post to an [Emoncms](http://emoncms.org/) server.
**node-red-node-mqlight** - *[mqlight](io/mqlight)* - Adds nodes to send and receive using MQlight.
**node-red-node-ping** - *[88-ping](io/ping)* - Pings a machine and returns the trip time in mS. Returns false if no response received within 3 seconds, or if the host is unresolveable. Default ping is every 20 seconds but can be configured.
**node-red-node-serialport** - *[25-serial](io/serialport)* - Node to send messages to and receive messages from a physical serial port.
**node-red-node-snmp** - *[snmp](io/snmp)* - Adds simple snmp receivers for single OIDs or OID tables.
**node-red-node-stomp** - *[18-stomp](io/stomp)* - A Node-RED node to publish and subscribe to and from a [STOMP server](https://stomp.github.io/implementations.html#STOMP_Servers).
**node-red-node-wol** - *[39-wol](io/wol)* - Sends a Wake-On-LAN magic packet to the mac address specified. You may instead set msg.mac to dynamically set the target device mac to wake up.
**node-red-node-what3words** - *[what3words.js](parsers/what3words)* - Encodes or Decodes a lat, lon position into what3words text format.
### Social
**node-red-node-dweetio** - *[55-dweetio](social/dweetio)* - Uses [dweetio](https://dweet.io/) to send/receive messages.
**node-red-node-email** - *[61-email](social/email)* - Sends and receives simple emails from services like gmail or smtp or imap servers.
**node-red-node-feedparser** - *[32-feedparse](social/feedparser)* - Reads messages from an atom or rss feed.
**node-red-node-irc** - *[91-irc](social/irc)* - Connects to an IRC server to send and receive messages.
**node-red-node-nma** - *[57-nma](social/nma)* - DEPRECATED as NMA closed down operations.
**node-red-node-notify** - *[57-notify](social/notify)* - Uses [Growl](http://growl.info/) to provide a desktop popup containing the payload. Only useful on the local Apple machine.
**node-red-node-prowl** - *[57-prowl](social/prowl)* - Uses [Prowl](http://www.prowlapp.com/) to push the payload to an Apple device that has the Prowl app installed.
**node-red-node-pushbullet** - *[57-pushbullet](social/pushbullet)* - Uses [PushBullet](https://www.pushbullet.com/) to push the payload to an Android device that has the [PushBullet](https://www.pushbullet.com/) app installed.
**node-red-node-pusher** - *[114-pusher](social/pusher)* - Publish-Subscribe to a [Pusher](http://pusher.com/) channel/event.
**node-red-node-pushover** - *[57-pushover](social/pushover)* - Sends alerts via [Pushover](https://pushover.net/).
**node-red-node-twilio** - *[56-twilio](social/twilio)* - Uses [Twilio](https://www.twilio.com/) service to send/receive text messages.
**node-red-node-twitter** - *[27-twitter](social/twitter)* - Listens to Twitter feeds and can also send tweets. (**NOTE**: this will break soon when Twitter remove their streaming API)
**node-red-node-xmpp** - *[92-xmpp](social/xmpp)* - Connects to an XMPP server to send and receive messages.
### Storage
**node-red-node-leveldb** - *[67-leveldb](storage/leveldb)* - Uses LevelDB for a simple key value pair database.
**node-red-node-mysql** - *[68-mysql](storage/mysql)* - Allows basic access to a MySQL database. This node uses the **query** operation against the configured database. This does allow both INSERTS and DELETES. By it's very nature it allows SQL injection... *so be careful out there...*
**node-red-node-sqlite** - *[sqlite](storage/sqlite)* - Supports read and write to a local sqlite database.
### Time
**node-red-node-suncalc** - *[79-suncalc](time/suncalc)* - Uses the suncalc module to generate an output at sunrise and sunset based on a specified location. Several choices of definition of sunrise and sunset are available.
**node-red-node-timeswitch** - *[timeswitch](time/timeswitch)* - Lets the user set simple repeating timers for example for simple heating control, etc.
### Utility
**node-red-node-daemon** - *[daemon](utility/daemon)* - starts up (calls) a long running system program and pipes STDIN, STDOUT and STDERR to and from that process. Good for monitoring long running command line applications,
**node-red-node-exif** - *[94-exif](utility/exif)* - Extracts GPS and other EXIF information from a passed in jpeg image,
A <ahref="http://nodered.org"target="new">Node-RED</a> node that scores incoming words
using the AFINN-165 wordlist and attaches a sentiment.score property to the msg.
This is similar to the default sentiment node but supports many more languages at the cost of using more disk space. (approx 11MB)
Install
-------
Either use the Menu - Manage palette - Install option in the editor or run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-multilang-sentiment
Usage
-----
Uses the AFINN-165 wordlist to attempt to assign scores to words in text.
Attaches `msg.sentiment` to the msg and within that `msg.sentiment.score` holds the score.
Supports multiple languages. These can be preselected in the node configuration. You can also set it so that `msg.lang` can be used to set the language dynamically if required. The cldr language codes supported are:
af, am, ar, az, be, bg, bn, bs, ca, ceb, co, cs, cy, da, de, el, en, eo, es, et, eu, fa, fi,
fr, fy, ga, gd, gl, gu, ha, haw, hi, hmn, hr, ht, hu, hy, id, ig, is, it, iw, ja, jw, ka, kk, km, kn, ko, ku, ky, la, lb, lo, lt,
<dd>besides sending a raw string in msg.payload, an object of words and scores to override or add words can be supplied - <code>{ word:score,... }</code>.</dd>
msg.sentiment.comparative=msg.sentiment.score/msg.sentiment.tokens.length;// temporarily addresses an issue in v2.0.0: https://github.com/marcellobarile/multilang-sentiment/issues/10
node.send(msg);
});
}
else{node.send(msg);}// If no matching property - just pass it on.
A <ahref="http://nodered.org"target="new">Node-RED</a> node that scores incoming words
using the AFINN-165 wordlist and attaches a sentiment.score property to the msg.
NOTE: There is also a multi-language version available - **node-red-node-multilang-sentiment**.
Install
-------
This is a node that should be installed by default by Node-RED so you should not have to install it manually. If you do then run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-sentiment
Usage
-----
Uses the AFINN-165 wordlist to attempt to assign scores to words in text.
Attaches `msg.sentiment` to the msg and within that `msg.sentiment.score` holds the score.
A score greater than zero is positive and less than zero is negative. The score typically ranges from -5 to +5, but can go higher and lower.
See the <ahref="https://github.com/thisandagain/sentiment/blob/develop/README.md"target="_blank">Sentiment docs here</a>.</p>
A <ahref="http://nodered.org"target="_new">Node-RED</a> node that attempts to filter out messages containing swearwords.
Install
-------
Run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-badwords
Usage
-----
Uses the badwords npm to attempt to filter out messages containing swearwords.
Analyses the `msg.payload` and tries to filter out any messages containing bad swear words. If the payload contains a bad word then the whole message is blocked.
**Note** : this only operates on payloads of type <b>string</b>. Everything else is blocked.
A <ahref="http://nodered.org"target="_new">Node-RED</a> node to create dummy
data values from a template. Useful for building test-cases.
Install
-------
Either use the Manage Palette option in the Node-RED Editor menu, or run the following command in your Node-RED user directory - typically `~/.node-red`
npm i node-red-node-data-generator
Usage
-----
Creates dummy data based on a handlebars-style template.
Uses the <i><ahref="https://github.com/webroo/dummy-json/blob/master/README.md"target="_new">dummy-json</a></i>
module, which can create rich sets of dummy data for testing or other uses.
It will build a **string**, or a **parsed JSON object**, creating values based
A <ahref="http://nodered.org"target="_new">Node-RED</a> node that when triggered generates a random number between two values.
## Install
Either use the Manage Palette option in the Node-RED Editor menu, or run the following command in your Node-RED user directory - typically `~/.node-red`
npm i node-red-node-random
## Usage
A simple node to generate a random number when triggered.
If set to return an integer it can include both the low and high values.
`min <= n <= max` - so selecting 1 to 6 will return values 1,2,3,4,5 or 6.
If set to return a floating point value it will be from the low value, up to, but
**not** including the high value. `min <= n < max` - so selecting 1 to 6 will return values 1 <= n <6.
You can dynamically pass in the 'From' and 'To' values to the node using msg.to and/or msg.from. **NOTE:** hard coded values in the node **always take precedence**.
**Note:** This returns numbers - objects of type **number**.
<p>A simple node to provide various functions across several previous values, including max, min, mean, high and low pass filters.</p>
<p>Messages arriving with different <code>msg.topic</code> can be treated as separate streams if so configured.</p>
<p>Max, Min and Mean work over a specified number of previous values.</p>
<p>The High and Low pass filters use a smoothing factor. The higher the number the more the smoothing. E.g. a value of 10 is similar to an α of 0.1. It is analagous to an RC time constant - but there is no time component to this as the time is based on events arriving.</p>
<p>Enabling the Reduce option causes the node to only emit one message per N values (available for the Max, Min and Mean functions). E.g. if set to Mean over 10 values, there will only be one outgoing message per 10 incoming ones.</p>
<p>If <code>msg.reset</code> is received (with any value), all the counters and intermediate values are reset to an initial state.</p>
<p><b>Note:</b> This only operates on <b>numbers</b>. Anything else will try to be made into a number and rejected if that fails.</p>
A <ahref="http://nodered.org"target="_new">Node-RED</a> node to talk to an
Arduino running standard firmata 2.2 or better.
Install
-------
Either use the Menu - Manage Palette option or run the following command in your Node-RED user directory - typically `~/.node-red`
npm i --unsafe-perm node-red-node-arduino
Usage
-----
The Firmata firmware must be loaded into the Arduino.
See the [main documentation](http://nodered.org/docs/hardware/arduino.html) for
details and examples of how to use this node.
### Input Node
Connects to local Arduino and monitors the selected pin for changes.
You can select either **Digital**, **Pullup**, **Analogue**, or **String** input type.
Outputs the value read as `msg.payload` and the pin number as `msg.topic`.
It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle. For example you could use a `delay` node set to rate limit and drop intermediate values, or an `rbe` node to only report when it changes by a certain amount.
### Output Node
Connects to local Arduino and writes to the selected pin.
You can select
- **Digital** - accepts 0, 1, true, false, on, off
- **Analogue** (PWM) - accepts Integer 0 to 255
- **Servo** - accepts Integer 0 - 180
- **String** - to send a *String* to the Arduino
Expects a numeric value in `msg.payload`. The pin number is set in the properties panel.
*Note* - some servos will not travel a full 180 degree range so may only accept 30 - 150 degrees for example.
Please use the `range` node to scale the input appropriately.
### Example
Simple flow to blink Pin 13
[{"id":"d7663aaf.47194","type":"arduino-board","device":""},{"id":"dae8234f.2517e","type":"inject","name":"0.5s tick","topic":"","payload":"","payloadType":"date","repeat":"0.5","crontab":"","once":false,"x":150,"y":100,"z":"359a4b52.ca65b4","wires":[["56a6f8f2.a95908"]]},{"id":"2db61802.d249e8","type":"arduino out","name":"","pin":"13","state":"OUTPUT","arduino":"d7663aaf.47194","x":570.5,"y":100,"z":"359a4b52.ca65b4","wires":[]},{"id":"56a6f8f2.a95908","type":"function","name":"Toggle output on input","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"noerr":0,"x":358,"y":100,"z":"359a4b52.ca65b4","wires":[["2db61802.d249e8"]]}]
<p>Arduino input node. Connects to a local Arduino and monitors the selected pin for changes. Uses <ahref="http://firmata.org/"target="_new"><i>Firmata</i>.</a></p>
<p>The Arduino must be loaded with the Standard Firmata sketch available in the Arduino examples.</p>
<p>You can select either Digital or Analogue input. Outputs the value read as <code>msg.payload</code> and the pin number as <code>msg.topic</code>.</p>
<p>It only outputs on a change of value - fine for digital inputs, but you can get a lot of data from analogue pins which you must then handle.</p>
<p>For example you could use a <code>delay</code> node set to rate limit and drop intermediate values, or an <code>rbe</code> node to only report when it changes by a certain amount.</p>