1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
Commit Graph

237 Commits

Author SHA1 Message Date
Dave Conway-Jones
af4eefa5fb
revert changes to WOL node, bump package
to close #528
2019-05-26 14:52:19 +01:00
Dave Conway-Jones
344d2bfdde
Fix serialport split on hex char
to close #541
2019-05-13 13:01:36 +01:00
Dave Conway-Jones
d40f433332
remove extraneous debug messages from serialport 2019-04-11 16:33:17 +01:00
Dave Conway-Jones
0b11d68c02
Let serialport wiatfor a char before starting output 2019-04-04 22:20:21 +01:00
Dave Conway-Jones
b91f61d56f
Add serialport request node to readme (docs only) 2019-03-06 17:45:45 +00:00
Dave Conway-Jones
9bfce43b1f
Bump mdns package version for discovery node 2019-02-27 21:12:51 +00:00
Dave Conway-Jones
3d06102d1e
Clarify tha snmp node oids must be numeric
docs only
2019-02-15 22:15:33 +00:00
Dave Conway-Jones
602586ad82
Bump serialport to latest 0.7 2019-02-12 13:31:06 +00:00
Dave Conway-Jones
73e4ae574c
Set WOL node to use more generic broadcast address byt default 2018-12-09 11:01:18 +00:00
Dave Conway-Jones
d0f36dcda1
update ping node readme
(how to run in snap)
2018-12-07 16:55:16 +00:00
Dave Conway-Jones
89d7853891
Better error catching in ping node for spawn errors... 2018-12-05 13:46:08 +00:00
Dave Conway-Jones
739e8cd9b6
bump stomp package to pick up PR fix for bad msg reuse 2018-11-28 18:42:44 +00:00
Arnaud Marchand
d73d5f1af3 Save point (#506) 2018-11-28 18:39:52 +00:00
Dave Conway-Jones
a5f29e3445
bump wake on lan package 2018-09-13 12:00:53 -04:00
rappsi
8d77028b4a Update 39-wol.js (#488)
allow lowwercase letters in MAC adress
2018-09-13 11:53:50 -04:00
Dave Conway-Jones
85ddffb98f
Ensure stomp retconnect retry default
to close #478
2018-08-15 22:17:32 +01:00
Dave Conway-Jones
73a7b2bc41
bump serialport version 2018-08-11 14:06:25 +01:00
Dave Conway-Jones
8f83e471b8
let snmp nodes specify optional :port
to close #462
2018-07-17 09:41:52 +01:00
iurly
27a1038993 Serial request (#426)
* 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.
2018-07-09 11:14:08 +01:00
Dave Conway-Jones
76a221919a
Update Readme to remove NMA node
and add 2018 to serialport copyright
2018-06-13 22:13:22 +01:00
Dave Conway-Jones
997458c78e
Fix serial port add char logic
to close #450
2018-06-02 13:24:57 +01:00
Dave Conway-Jones
dca9dfccc1
bump serial port and arduino nodes 2018-05-09 22:04:29 +01:00
Dave Conway-Jones
025f97206f
tidy some labels 2018-04-14 22:43:14 +01:00
borpin
99b83ea4bd io/emoncms - Modify HTTP Timeout (#430)
* Modify HTTP timeout

Increase the HTTP Timeout values from 1000 to 6000.
Modify error message.
2018-04-10 12:19:41 +01:00
borpin
cf48039427 Improve HTTP response handling and error reporting (#419)
Improve HTTP response handling and error reporting of emoncms node
2018-03-29 08:53:12 +01:00
Dave Conway-Jones
0253f67882
Add msg.port to serial port input node 2018-03-01 18:21:22 +00:00
Dave Conway-Jones
127fb6ac0c
clarify serial port timeout doc info 2018-02-19 19:21:52 +00:00
Dave Conway-Jones
a89379c631
add android platform to ping node
to close #402 by hand
2018-02-08 15:44:38 +00:00
Dave Conway-Jones
f664fa0e31
pin back net-snap version 2018-01-31 10:33:27 +00:00
Dave Conway-Jones
6da469e49b
fix missing timeout variable from SNMP node 2018-01-30 21:57:44 +00:00
Dave Conway-Jones
b3fd755527
Add timeout option to snap nodes
to address #397
2018-01-28 17:50:41 +00:00
Dave Conway-Jones
17886b7296
don't add time value to output when not asked for
to Close #399
2018-01-28 17:00:48 +00:00
Dave Conway-Jones
65c3c9c2ff
bump emoncms package to npm 2018-01-07 15:43:28 +00:00
borpin
dbea8a484a Updates to match API changes (#392)
* 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
2018-01-07 15:37:28 +00:00
Dave Conway-Jones
51124f456d
bump serial package 2017-12-18 18:32:51 +00:00
1ft-seabass
98dd2b858f Update 25-serial.json (#381)
For serial.label.serial , I adapted the name to the current jp translate rule.
2017-12-18 18:31:50 +00:00
Nathanaël Lécaudé
22888cd8bd node-red-node-discovery: Add status information (#383) 2017-11-30 23:34:49 +00:00
Dave Conway-Jones
8c0c7ee272
bump serial port package 2017-11-23 20:58:56 +00:00
1ft-seabass
d11e8d5b15 Update ja 25-serial.json (#377)
* Add English messages of serialport node
2017-11-23 21:58:10 +01:00
Nathanaël Lécaudé
c153024c91 Corrections to node-red-node-discovery (#380)
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)
2017-11-23 21:53:44 +01:00
Dave Conway-Jones
ab99139ce3
bump emoncms version for nom 2017-11-18 23:34:39 +00:00
4f96a64d
72f6c03e00 changed nodegroup field validation (#376)
Allows letters, numbers, spaces, and ( _ . - ) to more closely align with node names in emoncms.
2017-11-18 23:33:05 +00:00
Dave Conway-Jones
5018a3625f
bump package versions for ping, msg pack and base64 2017-11-10 15:25:49 +00:00
Kazuhito Yokoi
377cfbba92 Modify ping, base64 and msgpack node to support multi-language (#364)
Thanks again Yokoi-san

* Internationalize ping node

* Internationalize base64 node

* Internationalize msgpack node
2017-11-10 15:17:05 +00:00
Dave Conway-Jones
388ad11b72
Upgrade to latest underlying npm to support node8.x LTS 2017-11-04 17:12:48 +00:00
Dave Conway-Jones
bb469fd710
small bump to emoncms pack to align with nom 2017-10-07 22:28:24 +01:00
Dave Conway-Jones
9a17460b0e
fix as proposed to close #319
(assuming this node is still relevant :-)
2017-08-27 17:53:44 +01:00
Dave Conway-Jones
f6e71bf962
"revert" serial port and base64 nodes forwards....
undo buffer syntax updates
2017-06-30 19:52:20 +01:00
Dave Conway-Jones
0609645375
bump snap node version for incoming PR 2017-06-26 23:04:20 +01:00
mscbpi
24b0cd60bb SNMP Set Node (#325)
* 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
2017-06-26 23:02:34 +01:00
Dave Conway-Jones
6c3c16f210
update "core" extra nodes to use newer Buffer syntax 2017-06-24 13:53:22 +01:00
Dave Conway-Jones
f1fa9524f6
revert snmp version mixup.
Apologies to all !
to close #326
2017-06-05 17:15:40 +01:00
Dave Conway-Jones
fcdcbe4118
better error handling in mdns node
bump package for npm
2017-05-31 22:02:41 +01:00
Dave Conway-Jones
b18be401ec
bump snmp package (correctly) 2017-05-31 20:40:46 +01:00
Dave Conway-Jones
80760af36a
bump snmp package for nom 2017-05-31 20:25:43 +01:00
bimalyn-IBM
78a6af1770 Fix snmp community default issue (#324) 2017-05-31 20:24:01 +01:00
Dave Conway-Jones
31769472fa
Bump package and publish to nom 2017-05-30 17:17:13 +01:00
bimalyn-IBM
2204d5835f Fix: SNMP fails to close/destroy sessions when it errors (#318)
* 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>
2017-05-30 17:15:36 +01:00
bimalyn-IBM
a3211a5e80 Update documentation for snmp nodes (#301)
* 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>
2017-04-22 15:53:04 +01:00
Dave Conway-Jones
4168fe7845
bump snap package to release PR 2017-04-15 12:14:34 +01:00
bimalyn-IBM
0f7e8385b8 Allow msg to set parameters for snmp nodes. (#299)
* 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>
2017-04-15 12:04:47 +01:00
Dave Conway-Jones
ec96d3622b
patch mdns resolver sequence to stay working on Pi. 2017-04-12 20:33:55 +01:00
Dave Conway-Jones
8abfd4841d
pin mins pre-req to old working level
new one breaks with a deprecation…
need to look for another library
2017-04-12 09:35:26 +01:00
Dave Conway-Jones
100cf9a38d
bump levels and mins dependancies 2017-04-12 09:21:05 +01:00
Dave Conway-Jones
a06ad8f1a7 line up discovery node wording in docs
to close #290
Thanks @ukmoose
2017-04-03 19:51:49 +01:00
Dave Conway-Jones
7e421db642 emoncms - improve check for no input
to close #275
2017-02-06 22:30:00 +00:00
Julian Hille
0ad4a7bc4d Add freebsd as a valid platform (#274)
Freebsd ping command equals darwins ping command
2017-02-06 22:13:19 +00:00
Dave Conway-Jones
316a2fd272 Re-lint a load of nodes 2017-01-29 17:45:44 +00:00
Dave Conway-Jones
b2634ab4f2 fix error logging in snap node
to close #267
2017-01-18 18:55:10 +00:00
Dave Conway-Jones
dcd2ede2c4 bump serial port package 2017-01-09 20:53:43 +00:00
Nathanaël Lécaudé
5c1edc641a node-red-node-wol: add host field to set target IP address (#252)
Thanks @nlecaude
2016-11-13 09:51:31 +00:00
Dave Conway-Jones
dd685209d9 fix MQlight out topic to close #251
Thanks @mkpurcell
2016-11-10 20:02:24 +00:00
Dave Conway-Jones
a7247e898a Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
Dave Conway-Jones
36e834fdf1 bump serial port to 4.0.3 library 2016-10-13 14:12:08 +01:00
Dave Conway-Jones
f70cd1d640 snap node - remove extraneous console logging 2016-09-01 11:17:18 +01:00
Dave Conway-Jones
0321bf8150 add a v0.3 serial port to help with node5/6 2016-05-26 19:41:47 +01:00
Dave Conway-Jones
49b9277c26 Bump underlying serial port nam version 2016-04-14 09:17:40 +01:00
Dave Conway-Jones
d087281a11 slight edits to snmp to pass jslint-ing 2016-04-12 19:18:48 +01:00
Mika Karaila
163345cf5c Added subtree and walker nodes. (#200)
Thanks @mikakaraila  - very useful.
2016-04-12 18:39:19 +01:00
Dave Conway-Jones
48bcd3c7df load of tiny listing fixes, undef, unused, etc 2016-04-09 18:00:20 +01:00
Dave Conway-Jones
68bd4cc036 Add "other" baud rates to serialport
to Close #194
Uses typed widget so needs NR 0.13.4.
2016-04-01 08:55:58 +01:00
Dave Conway-Jones
0880ad3987 update io nodes info style 2016-03-02 13:27:52 +00:00
Dave Conway-Jones
eff8327971 Info/Doc style updates to core/pi nodes 2016-03-02 13:27:52 +00:00
Dave Conway-Jones
c000993be8 revert ping node package to remove dep not needed 2016-02-22 18:58:34 +00:00
Dave Conway-Jones
73269848ba revert ping node experimental changes
oops…
2016-02-13 11:15:02 +00:00
Dave Conway-Jones
dd250a77bc core to Pi node-red-nodes info updates
to be more consistent style
2016-02-12 13:14:12 +00:00
Dave Conway-Jones
5a95e9c404 update snap node docs to make outputs more obvious 2016-02-11 22:50:30 +00:00
Dave Conway-Jones
d5b95cf7a7 flag current error with ping command on Pi 2016-01-11 21:23:23 +00:00
Dave Conway-Jones
9e9a5e21be Updated mins node to use default resolve order
Should help remove issue #159
2016-01-01 14:31:55 +00:00
Dave Conway-Jones
ce677d221b tidy up Ping node close 2015-12-26 19:21:24 +00:00
Dave Conway-Jones
5f1513bed3 update Stomp to support v1.1
Thanks @ozomer - to close #141
2015-12-17 17:15:01 +00:00
Dave Conway-Jones
f74a2f4d04 Revert emoncms label change 2015-12-13 09:47:26 +00:00
Dave Conway-Jones
c28f46ec9d Fix mins Name resolution ordering - thanks @PTS93
Fix to close #155
Pushed to npm as 0.0.10
2015-12-10 17:03:20 +00:00
Dave Conway-Jones
d1e5025566 Finally upgrade serial port to serialport2
To address #139
2015-12-10 12:49:12 +00:00
Dave Conway-Jones
bbed4bab9a Emoncms - drop time if not a number
and update docs.
2015-12-09 13:21:42 +00:00
Dave Conway-Jones
25eab38abc bump emoncms package number 2015-11-30 16:56:53 +00:00
Dave Conway-Jones
396173525b let emoncms node accept simple objects 2015-11-30 14:23:52 +00:00
Dave Conway-Jones
b6bbcbd52f Stop serialport open loop 2015-11-09 15:57:10 +00:00
Nick O'Leary
d82ce7c58a Tidy up emoncms json parse on success 2015-11-03 11:03:02 +00:00
Nick O'Leary
f5950211af Merge pull request #136 from glynhudson/master
Add 'Emoncms in' to fetch latest feed value from emoncms server
2015-11-03 10:52:10 +00:00