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

I have a very similar case. It didn’t work for me too, that’s why I also took a 4g router stick to solve my problem.

Next I stuck due to bad internet connection in the underground. Therefore I had to install a external antenna for my 4g router.

All that effort only because i didn’t get the pHAT running with node red.

As a final step I will spend some money on Fiverr to get this project working the way I want it.

this is the same point with my project.
currently two wifi extenders and a separate 4G modem.

I would rather set up another 4G Lora Gateway and cover the area for everyone. Than to fool around with the 4G here.

Let me know if you do, I would also contribute financially here.

Look up the TTN fair use policy.

Will the data from all of your sensors joined together for radio transmission fit in packet sizes / intervals allowed under that policy? Because you only have one radio, as far as TTN policies (not to mention radio regulations) are concerned, it’s one device and only gets one allowance, not many.

Also I would like to control a fan via a relay on this Raspberry, mostly it does this by itself (regarding the values from above) but it would be nice to be able to control it manually.

You’d basically only be able to queue a request which would be sent down in response the next time the node sends one of its uplinks.

This would fit in my case, as I said I only want to transmit the average value, as well as alarms if necessary. This would be perfectly in line with TTN’s fair use policy.
This is maybe two uplinks a day with a small payload like the average temperature of all sensors.

With the new TTN V3 it is possible to run a class C node, which is always on receive I would like to solve it like this. If this is at all possible with this node, otherwise I would take a second node for this operation.

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.