Control IoT LoRa Node pHAT for Raspberry Pi through Node-RED?

Seems like you’re well on your way to researching the things you’d need to consider; which implies you’re also capable of figuring out how to do it.

I have a question regarding the Raspberry Pi LoRa Node pHAT… After reading every tutorial I tried the example scripts and tried connecting to TTN over the shell - but:

pi@raspberrypi:~ $ rak811v3 --debug join
DEBUG:rak811.serial:Serial initialized
DEBUG:rak811.serial:Sending: >at+join\r\n<
DEBUG:rak811.serial:Received: >ERROR: 99<
RAK811 response error 99: LoRa join failed

Whenever I change to:

pi@raspberrypi:~ $ rak811v3 -v set-config lora:join_mode:1
Configuration done
pi@raspberrypi:~ $ rak811v3 --debug join
DEBUG:rak811.serial:Serial initialized
DEBUG:rak811.serial:Sending: >at+join\r\n<
DEBUG:rak811.serial:Received: >OK Join Success<

it seems to work - but NO data is collected within TTN and I don’t get any response. Any ideas please? :slight_smile:

You actually need to send some data - all you’ve done is ask for some session keys from the network server.

I did! „Message sent“ but nothing within TTN

Where does it say that in your log above?

pi@raspberrypi:~ $ rak811v3 --debug -v send ‘Hello’
DEBUG:rak811.serial:Serial initialized
DEBUG:rak811.serial:Sending: >at+send=lora:1:48656c6c6f\r\n<
DEBUG:rak811.serial:Received: >OK <
DEBUG:rak811.rak811_v3:No downlink
Message sent.
No downlink available.

Just to be clear, “no downlink” is normal - you’d have to ask the console to send something to the device.

  • What gateway do you have?
  • Looking on the gateway at its activity log, does it hear the transmission?
  • Does anything appear on the TTN gateway console?
  • Which version of TTN are you set up on?
  • How far apart is the Pi & the gateway?

To progress I’ll need answers to all of the above please.

Hmm… now I am confused. I have this device a Raspberry Pi LoRa Node pHAT and I thought that’s to be used as gateway, isn’t it?

Nothing on the TTN Gateway console…

I am confused as well. The page you link to states right at the top of the page:

Our IoT LoRa Node pHAT allows you to create an inexpensive LoRa node

It clearly states the hardware is for a node, not a gateway.

Given your earlier “join success” message there seems to be a gateway nearby. So you should see the join and and uplinks in the TTN console IF you registered the node in TTN, used the EUIs and Key listed during registration AND have the console data page open during transmission. (The console has no ‘memory’ of any earlier data exchanges,)

Now we’ve established you don’t have a gateway but that one is likely to be near enough to hear your device, next set of questions:

  • Did you register your device on the TTN console?
  • Which version of the console?
  • Can you see any in the Traffic / Live Data when you do a send on your device?

If you can give us a reasonably accurate indication of where you are, without giving us your address, we can show you where to look on the mapping tools for local gateways. We will need either a street or landmark within 100m of where you are.

You will do yourself a huge favour if you take a few minutes to read:

Read all of: https://www.thethingsnetwork.org/docs/lorawan/
The devices section of: https://www.thethingsnetwork.org/docs/devices/
The gateways section of: https://www.thethingsnetwork.org/docs/gateways/
The network section of: https://www.thethingsnetwork.org/docs/network/
The applications and API sections of: https://www.thethingsnetwork.org/docs/applications/

1 Like

I am looking for an IoT node (Generic off the shelf) which can be connected to a control panel of a machine and send data/signals to any gateway via Lora Protocol.

Can you please help me by providing reputed company name.

Thanks in advance.

Welcome to the Things Network Forum :slight_smile:
We focus on TTN and the use of the LoRaWAN implementation. If you are looking to use LoRa only (RF phy solution with an associated proprietary or self generated protocol), then that is out of scope here. If you are looking to use LoRaWAN then your question is a bit ‘how long is a piece of string?’…we will need a lot more information to help you narrow your selections. What signals are you monitoring? Will you be doing any processing or analysis of those signals at the node - e.g. checking fluid levels or temperatures or positions etc. before then just sending an alarm or summaryy based on that analysis? What is your power source? Available $budget?, How often will the messages need to be sent etc… think hard on your requirements then come back when you something solid we can base any advice on. There are lots of folk on the Forum with a wide and varied level of experience who should be able to help you…

Have you researched LoRa/LoRaWAN and read associated documentation to determine the limits and use cases for the technology to see if it fits your needs? In addition, besides legal and technical constraints the use of the shared community resource that is TTN comes with additional limits and responsibilities - check the FUP (Fair Use Policy) - Forum search (top right) is a good place to start as is the thethings network and thethings industries documentation and guides :slight_smile:

Thanks for your message.

I am looking for a off the shelf - LoRa Generic Node to connect the following sensors for industrial usage.

  1. Proximity Sensors
  2. Contactor
  3. Pressure transducer
  4. Current Transducer
  5. Motor Drivers
  6. Temp Sensor
  7. State Relays
  8. Linear / rotary encoders
  9. Push Switch
  10. Tower Lights
  11. Press
  12. Limit Switches

Do let me know if you know any products

A good place to start is the Things Marketplace…

With recent site redesign think this is now the device repository, though I expect that is a subset where device profiles have been set up to assist registration process in TTS(CE) aka V3… haven’t check for a time…

https://www.thethingsnetwork.org/device-repository/

Thanks a lot

Keep in mind that LoRaWan in general and The Things Network in particular is primarily geared towards low-bandwith measurement reporting. The capability for downlink control is very limited, in particular it’s not really possible to do so in a timely fashion.

To control industrial machinery, you’re really going to need to use some other technology.

The applicability of LoRaWan would be more to “nice to know” monitoring of autonomous, unattended setups, and maybe making desired but non-critical adjustments to the rules of a closed-loop control system. Eg, you wouldn’t send a command to open or close a valve, but you might ask a remote, autonomous feedback control system to switch between a more or less aggressive strategy for controlling the valve in response to its sensors.

Hello,
sorry for necro-posting.

I have the same problem of @symon .
I used a pi3 with Lora Node pHAT, it’s configured on TTN as application with the datas shows (DevEUI, etc…) by CLI.

If the join mode is OTAA, I can’t join at Lora Network (error 99), but if the join mode is ABP, I can join on the netowork, but on TTN I don’t show anything, why?

Do you have your own gateway?

No …
because I thought that for trasmit datas on TTN I just need to use only a Lora Node, so I bought this LoraNode pHAT and following the getting started instruction, but I am new with LoraWAN Universe …

So, I need necessarily a Lora Gateway to trasmit on TTN?

That is right if there is a gateway near you that receives the transmissions. If there isn’t you will need your own gateway.