mysensors live raw data debug

Moderator: leecollings

Post Reply
haaxema
Posts: 3
Joined: Thursday 06 April 2017 11:14
Target OS: Linux
Domoticz version: 3.8153
Location: NL
Contact:

mysensors live raw data debug

Post by haaxema »

Hi all,

I have build a USB gateway (connected to a linux machine) with 2 local attatched sensors (Gasmeter-pulse and kWh pulse)
All is working wel BUT I'd like to see the raw (serial) data so I can verify the reading of the sensors. (just to be sure)

Used hardware:
- Arduino nano
- reed sensor (gas pulse)
- LDR (kWh pulse)
- Mysensors 2.2.1
- Domoticz 3.5877
- NRF24L01 (work in progress, just local sensors right now)

Is is possible to save/show the raw serial messages in a 'live' system?

Martin
RidingTheFlow
Posts: 72
Joined: Friday 11 March 2016 18:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Essex, UK
Contact:

Re: mysensors live raw data debug

Post by RidingTheFlow »

Try strace, e.g.:

Code: Select all

sudo strace -s 1000 -e trace=writev,readv -fp "`pidof domoticz`"
You will see serial calls among others and can narrow down to specific file descriptor that corresponds to interested serial port device.
dmonty
Posts: 1
Joined: Wednesday 17 May 2017 23:23
Target OS: Linux
Domoticz version:
Contact:

Re: mysensors live raw data debug

Post by dmonty »

Here is a way to make the output compatible with mysensors parser

Code: Select all

strace -s 1000 -e trace=writev,readv -fp "`pidof domoticz`" -o output.txt
Then in another tab/window

Code: Select all

cat output.txt | awk -F '"' '{print $2}' | tr -d "\n" | sed 's/\\n/\n/g'
Copy and the output into
https://www.mysensors.org/build/parser

NOTE: For some reason I could not pipe the strace into sed. So it is done in 2 steps.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests