Ninja Blocks Contrib

168 views
Skip to first unread message

Mike Biddell

unread,
Jul 30, 2015, 9:53:25 AM7/30/15
to Node-RED
My son has very kindly written the NinjaBlocks 433 meg RX and TX modules for node (for Beaglebone Black). This allows Ninjas to have local actuations without any cloud reliance. It works very well.
Node-red gives Ninja functionality and a lot more. Please enjoy.

Here are some flows just in case it's not obvious:-

[{"id":"bf7237a7.408dc8","type":"serial-port","serialport":"/dev/ttyO1","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"59527f82.a6ad8","type":"serial in","name":"read port","serial":"bf7237a7.408dc8","x":64,"y":218,"z":"4471196e.bb8ee8","wires":[["47c06a72.b83f94"]]},{"id":"e0107aaa.1fef88","type":"debug","name":"","active":true,"console":"false","complete":"payload","x":1057.500015258789,"y":136.50000953674316,"z":"4471196e.bb8ee8","wires":[]},{"id":"41d56431.be2a9c","type":"serial out","name":"","serial":"bf7237a7.408dc8","x":519,"y":48,"z":"4471196e.bb8ee8","wires":[]},{"id":"6a20fc0f.95df04","type":"inject","name":"","topic":"rf","payload":"0x155157","payloadType":"string","repeat":"","crontab":"","once":false,"x":121.33333587646484,"y":134.00000476837158,"z":"4471196e.bb8ee8","wires":[["1a86320f.e579ce"]]},{"id":"a2691f03.5d96e","type":"inject","name":"Status LED","topic":"999","payload":"FFFF00","payloadType":"string","repeat":"","crontab":"","once":false,"x":134.3333339691162,"y":43.333333015441895,"z":"4471196e.bb8ee8","wires":[["1a86320f.e579ce"]]},{"id":"47c06a72.b83f94","type":"ninja-receive","name":"receive","x":202,"y":222,"z":"4471196e.bb8ee8","wires":[["ec9ca91f.136358"]]},{"id":"1a86320f.e579ce","type":"ninja-send","d":"eyes","da":"0","x":352.6666564941406,"y":76.33333015441895,"z":"4471196e.bb8ee8","wires":[["41d56431.be2a9c"]]},{"id":"1c9137ca.e36ec8","type":"inject","name":"","topic":"eyes","payload":"FF0000","payloadType":"string","repeat":"","crontab":"","once":false,"x":131.33333587646484,"y":88.3333330154419,"z":"4471196e.bb8ee8","wires":[["1a86320f.e579ce"]]},{"id":"ec9ca91f.136358","type":"switch","name":"Device categories","property":"payload.D","rules":[{"t":"eq","v":"31"},{"t":"eq","v":"30"},{"t":"eq","v":"11"},{"t":"eq","v":"1007"},{"t":"eq","v":"999"}],"checkall":"true","outputs":5,"x":370.00000762939453,"y":222.25000381469727,"z":"4471196e.bb8ee8","wires":[["58e033cb.a71fcc"],["a668b779.599748"],["7169b301.8e964c"],["ef438690.10bc78"],["7571be54.8a8e4"]]},{"id":"58e033cb.a71fcc","type":"switch","name":"Temperatures","property":"payload.G","rules":[{"t":"eq","v":"0101"},{"t":"eq","v":"0201"},{"t":"eq","v":"0301"}],"checkall":"true","outputs":3,"x":598.0000076293945,"y":122.25000190734863,"z":"4471196e.bb8ee8","wires":[["6e288360.91d77c"],["5c1a8bc.fa3e574"],["6c39fc24.93c604"]]},{"id":"6e288360.91d77c","type":"change","name":"temp 1","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":795.2500114440918,"y":80.25000190734863,"z":"4471196e.bb8ee8","wires":[["e0107aaa.1fef88"]]},{"id":"5c1a8bc.fa3e574","type":"change","name":"temp 2","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":801.25,"y":131.25,"z":"4471196e.bb8ee8","wires":[["e0107aaa.1fef88"]]},{"id":"6c39fc24.93c604","type":"change","name":"temp 3","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":805.0000114440918,"y":180.00000190734863,"z":"4471196e.bb8ee8","wires":[["e0107aaa.1fef88"]]},{"id":"a668b779.599748","type":"switch","name":"humidity","property":"payload.G","rules":[{"t":"eq","v":"0101"},{"t":"eq","v":"0201"},{"t":"eq","v":"0301"}],"checkall":"true","outputs":3,"x":592.5000114440918,"y":205.00000381469727,"z":"4471196e.bb8ee8","wires":[["7b51b18b.84ae5"],["f919c3e6.06e64"],["fb61f513.049e08"]]},{"id":"7b51b18b.84ae5","type":"change","name":"humidity 1","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":803.7500114440918,"y":230.00000095367432,"z":"4471196e.bb8ee8","wires":[["e0107aaa.1fef88"]]},{"id":"f919c3e6.06e64","type":"change","name":"humidity 2","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":815.0000152587891,"y":268.75000381469727,"z":"4471196e.bb8ee8","wires":[["e0107aaa.1fef88"]]},{"id":"fb61f513.049e08","type":"change","name":"humidity 3","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":812.5,"y":323.75,"z":"4471196e.bb8ee8","wires":[["e0107aaa.1fef88"]]},{"id":"7169b301.8e964c","type":"change","name":"433 RX","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":665,"y":385,"z":"4471196e.bb8ee8","wires":[["5c3bab0b.a3c454"]]},{"id":"5c3bab0b.a3c454","type":"debug","name":"","active":true,"console":"false","complete":"false","x":1062.5,"y":387.5,"z":"4471196e.bb8ee8","wires":[]},{"id":"ef438690.10bc78","type":"change","name":"Ninja Eyes","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":668.7500114440918,"y":433.75000762939453,"z":"4471196e.bb8ee8","wires":[["5c3bab0b.a3c454"]]},{"id":"7571be54.8a8e4","type":"change","name":"Ninja Status LED","rules":[{"t":"set","p":"payload","to":"msg.payload.DA"}],"action":"","property":"","from":"","to":"","reg":false,"x":686.25,"y":497.5,"z":"4471196e.bb8ee8","wires":[["5c3bab0b.a3c454"]]}]

Mike Biddell

unread,
Jul 30, 2015, 9:59:22 AM7/30/15
to Node-RED, mike.b...@googlemail.com

Mark Setrem

unread,
Jul 30, 2015, 10:13:37 AM7/30/15
to Node-RED
Have you added the flows to http://flows.nodered.org ?

Mike Biddell

unread,
Jul 30, 2015, 10:20:03 AM7/30/15
to Node-RED, mse...@gmail.com
mark

My son Luke will lob them on tonite.
He's finished the support documentation, apart from putting the flows up.

I hope it helps the several thousand Ninjas who are teetering on the brink of extinction, because NinjaBlocks has run out of money and it really is only a matter of time before they switch Ninja cloud off. So Node-red should give them a safe harbour and with such active support,and extended functonality, I think they will like it !!!!

mike

Mike Biddell

unread,
Jul 30, 2015, 10:28:45 AM7/30/15
to Node-RED, mse...@gmail.com, mike.b...@googlemail.com
forgot I can share flows, so I've put them on

Dave C-J

unread,
Jul 30, 2015, 10:44:57 AM7/30/15
to node...@googlegroups.com

Nice one !
Presumably they also have a mailing list / forum you can cross post to, to point them at Node-RED.
Thanks.

Mike Biddell

unread,
Jul 30, 2015, 11:11:52 AM7/30/15
to Node-RED, dce...@gmail.com
Dave

I shall do that

mike

Julian Knight

unread,
Jul 31, 2015, 11:46:20 AM7/31/15
to Node-RED, mike.b...@googlemail.com
Whilst I don't have any Ninja blocks, I think you should buy him a beer on us!


On Thursday, 30 July 2015 14:53:25 UTC+1, Mike Biddell wrote:

Mike Biddell

unread,
Jul 31, 2015, 12:22:10 PM7/31/15
to Node-RED, mike.b...@googlemail.com, j.kni...@gmail.com
Blimey Julian

Over the years.... I have spoiled him rotten (well as much as I could).  The bit that amazes me is that he doesn't have a Ninjablock .... he has set up some sort of dev setup to do it. I am the one with the Ninjablock... so my role has been tester.

It effectively does the same as Max's PT2262 effort, but without the RFXcom.

Mike

Julian Knight

unread,
Jul 31, 2015, 1:47:07 PM7/31/15
to Node-RED, mike.b...@googlemail.com, j.kni...@gmail.com
Best buy him 2 beers then!! :)

But only AFTER he's finished coding and documenting - ha ha!!

Luke Biddell

unread,
Jul 31, 2015, 7:27:53 PM7/31/15
to Node-RED, mike.b...@googlemail.com, j.kni...@gmail.com
Documentation was never my strong point. But there's always room for more beer!

Florian Richter

unread,
Apr 21, 2017, 11:05:28 AM4/21/17
to Node-RED, mike.b...@googlemail.com, j.kni...@gmail.com


Hello,
What do I do wrong when I get between BBB and the NinjaBlock seemingly no communication? So, no 433MHz sending and receiving.
"Npm install node-red-contrib-ninja" Is installed.

I'm stuck and can not find the mistake. Unfortunately, I also have only rudimentary Linux knowledge.

Can someone help me?
Many Thanks!

Mike Biddell

unread,
Apr 27, 2017, 3:02:44 AM4/27/17
to Node-RED, mike.b...@googlemail.com, j.kni...@gmail.com
Florian

Could you wire your serial port directly to a debug node (by-passing Ninja-rx).

Now press yr 433 transmitter (make sure the Ninja eye blinks). If the eye doesn't blink, yr 433 transmitter is not working.

If the eye does blink, look in the debug window and you should get a long set of characters with a lot of brackets.

If you don't get that, then yr cape may be broken, or yr serial port is not set up properly.

If you do get it, then Ninja rx is not set up properly. I have never tested it with Beagle Bone White.

Cheers

Mike Biddell

Mike Biddell

unread,
Apr 27, 2017, 3:03:48 AM4/27/17
to Node-RED


On Thursday, 30 July 2015 14:53:25 UTC+1, Mike Biddell wrote:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages