How to Debug Gateway and Node connection
-
Hi,
I am new to mysensors and mycontroller, and have now spend several evenings on getting it all running
Do anyone have a good guide to debug my setup, step by step, so that I can get an idea of why my setup wont work.
My setup:
a) I have installed mycontroller (1.0.0.Final) and have the server/interface running on my Rpi (Jessie).
b) Have a serial gateway programed ( Arduino Uno + nRF24l01+) and attached to the Rpi.
c) A Node (Arduino pro Mini + NRF24L01+ + DHT22) programmedIssue 1) I am missing some indication of how the system is performing.
The mycontoller says it has connected to the Gateway.... but how often is this connection chekced? If I unplug the gateway, the Mycontroller still says OK connection....Issue 2) My Node seems to work OK, in the debug log (serial conn. to Arduino) I can see that the Node finds the gateway... but it do not get an ID from Mycontroller....
How do I get debug log from the Serial Gateway controller.. (I know I have to enable debug in mysensors code, but how to monitor this data?)
Thanks,
Monics. -
@monics said in How to Debug Gateway and Node connection:
Issue 1) I am missing some indication of how the system is performing.
The mycontoller says it has connected to the Gateway.... but how often is this connection chekced? If I unplug the gateway, the Mycontroller still says OK connection....By default, MyController checks node alive status every 30 minutes once,
Issue 2) My Node seems to work OK, in the debug log (serial conn. to Arduino) I can see that the Node finds the gateway... but it do not get an ID from Mycontroller....
Change
Resource logs level
toNotice
orTrace
, Will report incoming and outgoing messages onStatus >> Resources logs
. Sometimes Gateway message might not reach your node. Check the node coverage between your node and gateway.
How do I get debug log from the Serial Gateway controller.. (I know I have to enable debug in mysensors code, but how to monitor this data?)
When you enable
Resource logs level
toNotice
orTrace
as mentioned above you can see it onStatus >> Resources logs
-
Mycontroller has really great ways to troubleshoot!, if you want to look at OS level.
If mycontroller is not running you can start the command
sudo tail -f /dev/ttyUSB0
This shows you all data that comes in from the sensor network
-
Why is it that 'sudo tail -f /dev/serial0' does not work?
-
What exactly does not work?
I guess you see no output,
- ensure you are looking at the correct device file, it should be the same as is used for the gateway in the mycontroller software
- make sure mycontroller is not running.
- if all works okay, you should see similar output like below:
root@orangepizero:~# tail -f /dev/ttyMySensorsGateway 3;0;1;0;17;351 3;5;1;0;26;0 3;0;1;0;17;516 3;5;1;0;26;0 10;0;1;0;0;29.0
-
@Tag
You are correct, I see no output on the screen (but I didn't realise that you have to turn off myc first!)... I will try again soon.I guess it is the problem with mysgw on arduino. When mysgw was on pi with radio attached I could tail the mysgw with the system live. That was a help in debugging over ssh. For now though I either have to stop myc or attach pc to the gw by removing connections to pi. It's never as easy as you think it would be, is it?
-
@skywatch said in How to Debug Gateway and Node connection:
Once you know it its always easy
It might be that the ttyUSB gets locked exclusively by mycontroller, so it might have to be released first. -
I am not using USB. I am using direct arduino serial -> pi serial.
About to try this as it's crashed again!
-
Could it be the oinclusion botton from another post,
What happens if you setup everything without any inclusion stuff?