Lawrence Griffiths
Forum Replies Created
-
AuthorPosts
-
Lawrence Griffiths
ParticipantMike thanks am using AT+PN=1
Just starting dinging when I was seeing the join and packet_sent on MQTT on AEP but the Dot was failing to join.
Will go back to defaults.
April 7, 2017 at 4:36 am in reply to: LORA Packet not received by Node-Red, on a conduit power cycle. #18195Lawrence Griffiths
ParticipantAjay, I’ve seen this the LoRa server still working receiving packets but LoRa-in node not processing them. One thing that seemed to upset things was connecting to external MQTT broker which would drop connections. This seemed to upset the LoRa-in node!
And yes I always wait at least 3 mins for node-red to boot. The LoRa network server has grater priority. We won’t see any improvement until new hardware.
Lawrence Griffiths
ParticipantAjay not sure if it’s more efficient but it’s more obvious about what’s going on. E.g. you have to know about how NR processes arrays sent to an output. So it should be more maintainable for other/future devs looking at the code.
Lawrence Griffiths
ParticipantHi if fact it’s a different modbus package my friend got working https://www.npmjs.com/package/node-red-contrib-modbustcp-no-pooling
Lawrence Griffiths
Participantlorawan2016 node.send is Node-RED method for sending outputs from a Javascript function node http://nodered.org/docs/writing-functions
In a NR function the msg object passes the following.
So to get to payload you reference msg.payload on the LoRaIn you can specify your payload type UTF8 or bytes.“msg”: {
“chan”: 5,
“codr”: “4/5”,
“datr”: “SF7BW125”,
“freq”: “903.3”,
“lsnr”: “85”,
“modu”: “LORA”,
“rfch”: 1,
“rssi”: -55,
“size”: 12,
“timestamp”: “2015-04-09 16:22:12”,
“tmst”: 67346764,
“payload”: “hi mike”,
“eui”: “00:11:22:33:44:55:66:88”
}Lawrence Griffiths
ParticipantYou can send asyn withing the function using
node.send();// This should do it
var msgpayload = JSON.parse(msg.payload);for(i=0;i<msgpayload.length;i++) {
var downlinkPackets = {eui: msgpayload[i].EUI, payload: msgpayload[i].DataPacket.data};
node.send(downlinkPackets);
}Lawrence Griffiths
ParticipantMichael when you install using npm it takes the latest npm package.
node-red-contrib-modbus has been completely re-written and has a number of discrepancies which means it won’t run on AEP.I think I used version 0.7.0 which only does modbus TCP you wan’t get RTU working on AEP.
To install old npm versions use the following
npm install node-red-contrib-modbus@0.7.0To see a list of all versions
npm view node-red-contrib-modbus versionsI have friend that is running 3 or more AEP’s using node-red-contrib-modbus I will ask what version they got working.
Lawrence
Lawrence Griffiths
ParticipantYoussuf all I’ve been able to hand build my own UI with a mix of HTMLx/Jquery mobile & highcharts as demo. The current Node-RED dashboard won’t run on Conduit AEP also it’s a real memory hog as all charting data is held in Node-REd. So even if Conduit had correct nodejs/NR version it would still struggle to run on AEP.
The way we do this now is to use http://fred.sensetecnic.com/ which hosted node-red there is a free tier and paid is only $10 per month. We use both MQTT and REST to push & pull data from FRED where we build demo UIs using NR Dashboard. FRED supports SQLite DB too.
Lawrence
Lawrence Griffiths
ParticipantJeffery, still the same but hoping that 2nd generation Conduit will be with us soon and these constraints will be a thing of the past.
Lawrence Griffiths
ParticipantOk can the AT cmd guide be updated please to include the meaning of the Link Check result.
// From LoRaWAN spec!
A value of 0 means that the frame was received at the demodulation floor (0 dB or no margin) while a value of 20 for example, means that the frame reached the gateway 20 dB above the demodulation floor.Thanks
-
This reply was modified 8 years, 4 months ago by
Lawrence Griffiths.
Lawrence Griffiths
ParticipantJason, thanks as non RF type apologies for dumb questions but pondering how I use this data.
So for example on BW125 from your post
1. I’m seeing approx -12.0dBm on SF9 I should consider using SF10?
2. I’m seeing approx -9.0dBm on SF9 I could consider using SF8?I do hope someone is working on the “How to Commission a LoRaWAN” book
Lawrence Griffiths
ParticipantJason, thanks just out of interest if six end-nodes transmitted at the same time on same channel all with different DR/SF e.g. DR0/1/2/3/4/5 would they all be received.
Lawrence Griffiths
ParticipantMike, thanks but I find “No enabled channel” more ambiguous and confusing as It implies that it’s been Disabled!
Lawrence Griffiths
ParticipantMike, thanks but this leaves me and others I bet now needing to update firmeware on devices in the field as I check for No Free channel and wait for next Free Chn. Also NFC has been replaced “Join Backoff” on AT+JOIN.
What can’t old messages be kept and enabled/disabled for API backwards compatibility? And why doesn’t the change log mention these changes?
Disappointed by the lack of coms on these changes!
November 3, 2016 at 9:12 am in reply to: Conduit for Industrial Automation: modbus, EthernetIP, OPC-UA #15287Lawrence Griffiths
ParticipantEric, if your using AEP the only protocol you can use in this context is Modbus.
It’s more of a limitation of Node-RED, than the Conduit. I’ve tried the OPC-UA node a while ago and it was bit buggy. No Profibus but someone has wrapped Ethernet/IP see node-red-contrib-ab https://www.npmjs.com/package/nodepcccAlso Node-RED on the AEP has a restriction on the node.js version which means it runs a old version of Node-RED and some npm modules might require a later version of node.js
Lawrence Griffiths
ParticipantAjay, remember you can use the (single level wild card) lora/+/packet_sent in you topic to see all down link messages. http://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices
@Jason is the “Request an ACK for downstream packets from the end-device?” a LoRaWAN or mDot feature? e.g if my customer is using a Microchip RN2483 can I use this feature?
Lawrence Griffiths
ParticipantAjay, >>is there a way to read the data stored in a file before the flows begin processing any data?
Yes is Node-RED evaluates nodes as defined in the flows JSON config. So the the first node you add to the first workspace should be the first node to be evaluated. That said I have feeling the config nodes might get processed before.
Lawrence
July 27, 2016 at 11:23 am in reply to: issue require nodejs module in functionGlobalContext doesn't work #14339Lawrence Griffiths
ParticipantJeff, my post of 21st July is just letting others know the outcome of my testing with 1.2.2 as there is no Manual for the AEP most Node-Red’s would head to /opt/node-red/settings.js
And in my case I need to access nodejs modules in my function nodes which I can now do.
July 21, 2016 at 10:24 am in reply to: issue require nodejs module in functionGlobalContext doesn't work #14270Lawrence Griffiths
ParticipantHi, I’ve just got round to trying out 1.2.2 mods to settings.js
From precious posts we are told that only stuff in /var/config/ isn’t over written on firmware upgrade./var/config/app/current link directory takes you
/var/config/app/install/development/settings.js
This is nothing like the standard Node-Red settings.js file adding bcrypt
functionGlobalContext: {bcrypt: require(“/opt/node-red/node_modules/bcrypt”)}NB. you have to specify the full path in “quotes” not ‘single’
If you make a mistake Node-RED won’t load you will see the Disco Loading Node-RED page constantly refreshingLawrence
-
This reply was modified 8 years, 9 months ago by
Lawrence Griffiths.
Lawrence Griffiths
Participantyou need the npm sqlite3 package which needs to be built using node-gyp which I belive isn’t installed on the AEP due to storage/performance constraints?
The lack of a local DB is a short coming. I’ve considered https://www.npmjs.com/package/lokijs which a purse Javascript JSON DB.
But what I do is now store data in JSON format in context.global Array and then use a periodic write (inject node) to the file system of Array and re-load in Node-RED start. Not ideal but better than nothing.
Lawrence Griffiths
ParticipantSean are these nodes you have written yourself ? if so have you packaged them as per http://nodered.org/docs/creating-nodes/packaging if so or they are nodes then it’s simple case of NPN install package name as you would do if you were running Node-RED on a PC or Raspberry PI.
You can also use the old pre NPM method and copy your nodes to /opt/node-red/nodes and then re-start AEP.
Also be aware custom nodes are not preserved on AEP firmware update.
Lawrence
Lawrence Griffiths
ParticipantRicardo, any node make sure your running AEP 1.2.2 as it has NPM included 1.1.2 doesn’t.
In terms of Modbus we have this version running on-site for 1 month with 40 LoRaWAN sensors https://www.npmjs.com/package/node-red-contrib-modbus
Be careful the AEP is an ARM7 and installing and running a lot of custom nodes can slow the AEP down.
Lawrence
June 24, 2016 at 10:59 am in reply to: LoRa : MTDotBox can join network but packets are not received #13630Lawrence Griffiths
ParticipantBryan Tran, I seen the same issue (Conduit AEP (firmware 1.2.2 & MTDotBox firmware 2.0.0) then it started working. Bryan I’m about to send units out for a site survey. Should I Hold and put new firmware on Box??
Lawrence Griffiths
ParticipantYou have to be on latest RN2483 firmware to get OTAA.
I have tested with customer who is using OTAA.
We have also tested downlink to RN2483 all workin.Lawrence Griffiths
ParticipantJeff sorry I had a Senior moment!
I Don’t need 1.0.33 I just read it as 1.3.3 🙂 just wishing…Lawrence Griffiths
ParticipantJeff ok will schedule that in for next week thanks
Lawrence Griffiths
ParticipantBrandon thanks for this
Lawrence Griffiths
ParticipantJeff thanks for the heads up.
Makes sense as @wojek says we can get it to work but it does slow things down.
Can live with it for now, assume that openembedded is Libux OS the AEP uses?Also can we have a separate Forum where you announce NEW releases please for all products. There were 2 last week AEP & Box the first I knew about because of a ticket the 2nd I found by chance!
But keep up great work
Lawrence
Lawrence Griffiths
Participant@wojek I have same question as part of open ticket too. I wonder if this a storage constraint issue as they’ve added LoRa packet forwarder, so something had to go.
Lawrence Griffiths
Participant@wojtek update to previous
just copy custom node & discrepancies to /opt/node-red/node/nodes/
And restart device. A node-red re-start doesn’t seem to pic up new nodes. -
This reply was modified 8 years, 4 months ago by
-
AuthorPosts