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
mysensors live raw data debug
Moderator: leecollings
-
- 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
Try strace, e.g.:
You will see serial calls among others and can narrow down to specific file descriptor that corresponds to interested serial port device.
Code: Select all
sudo strace -s 1000 -e trace=writev,readv -fp "`pidof domoticz`"
Re: mysensors live raw data debug
Here is a way to make the output compatible with mysensors parser
Then in another tab/window
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.
Code: Select all
strace -s 1000 -e trace=writev,readv -fp "`pidof domoticz`" -o output.txt
Code: Select all
cat output.txt | awk -F '"' '{print $2}' | tr -d "\n" | sed 's/\\n/\n/g'
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.
Who is online
Users browsing this forum: No registered users and 0 guests