While measuring, the ultransonic sensor’s LED quickly flashes blue for a few seconds, right before the transmitter box’ LED then indicates the data transmission by flashing green. Shortly after I receive the “no sensor” message on TTN. The sensor’s blue flashing accompanied by some (very quiet) sounds for me as a layman looks like the sensor is working and measuring. Why doesn’t the payload include the value? Could there be anything wrong with the wiring? I haven’t touched that, it is right out of the box:
Nor have I changed any settings on the node itself.
Do you have any ideas? Searching this forum and the Dragino Google Group didn’t give me any answer yet
Good morning.
I may be completely wrong here!
But as the sensor LiDAR is an active Radar, it would be using power as soon as you connect the battery .
And I would expect to see a link so this is turned on once it is setup on the network equipment first. And then turn on the LiDAR sensor. So would look at all the links.
I am very keen on your success of your project and keen to keep in touch about it.
I am looking at a project very soon to use a lot of them and without them working on the TTI and TTN V3 I will have failed, before I start.
I am lyndon.george@live.co.uk & lyndon.george@reading.gov.uk, and have been working to roll out the Smart Berkshire TTI & TTN. And have been working on use cases we can adopt for local authorities, so the network can stay in use longer, and survive budget cuts.
So am very keen to learn, and like you no expert in stacks and programming, but I do have a very long history in electrical, machanical structural engineering.
So if I can help you please let me know, and I would very much like to know how you are getting on with this.
the wiring is loose, even if you haven’t touched it
or there’s nothing in range of the sensor
You’d have to check the last and preferably the actual payload data against documentation, is the specific value field transmitted one that indicates a fault only, or can it indicate either a fault or a lack of any reflection within the range window?
@Lyndon_George : As @kersing mentioned, the LDDS75-8 is combined with an ultrasonic sensor. I started the device as I understood the user manual: By setting the power-jumper. Everything else, including the battery wire, was already connected.
@cslorabox : Thank you for your suggestions! You pushed me in the right direction to dig further and finally find the solution. It seems to be a bug (or a feature or just a wrong firmware version of my device or whatever) in the decoder that Dragino provides for TTN.
I triggered the node twice while putting it in two different distanced from a wall. Those are the payloads:
There is that if(len==5) condition, that otherwise returns the “No Sensor” value. But the length of the payload in my case is always 8 byte… so I just replaced the 5 with an 8 and it runs just fine
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var len=bytes.length;
var value=(bytes[0]<<8 | bytes[1]) & 0x3FFF;
var batV=value/1000;//Battery,units:V
var distance = 0;
if(len==8)
{
value=bytes[2]<<8 | bytes[3];
distance=(value);//distance,units:mm
if(value<20)
distance = "Invalid Reading";
}
else
distance = "No Sensor";
var interrupt = bytes[len-1];
return {
battery:batV ,
distance:distance,
interrupt_status:interrupt
};
}