Is it possible to see a live feed between the Homeduino and Pimatic ?
I know I can see the serial on the homeduino with ‘make monitor’ but then pimatic is unable to communicate with the homeduino and needs to restart.
Can someone help me in the direction of getting to see what’s happening between these two parts ?
-
How to see communication between Homeduino and Pimatic
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl Did you try to set the debug flags as documented in https://github.com/pimatic/pimatic-homeduino/blob/master/homeduino-config-schema.coffee ? According to the description it logs “information for debugging, including received messages”. I haven’t tried it myself and there may be other options I am not aware of.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Debug is default set to true, I guess you will only see exact the same as in messages console with debug enabled.
I’m more curious on the actual messages between the arduino and pimatic. Will try setting debug to true to see what it does, byt I expect the same as in messages to appear in the pimatic-deamon.logLike my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl said:
Will try setting debug to true to see what it does,
Yes please give it a try. I know the default is defined as true, but as far as I can see it is not implemented this way. Plugin defaults need to be handled manually in the code as far as I know.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I see not difference in my pimatic-deamon.log with this option on true
{ "plugin": "homeduino", "driver": "serialport", "driverOptions": { "serialDevice": "/dev/ttyUSB0", "baudrate": 115200 }, "receiverPin": 0, "transmitterPin": 4, "debug": true, "repeats": 10 },
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Did you try
sudo cat /dev/ttyUSB0
?
Maybe you can see some messages there? -
@Cryonic90 said:
sudo cat /dev/ttyUSB0
If this works you better use some filter for output, e.g. hexdump
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
@Cryonic90 said:
Did you try
sudo cat /dev/ttyUSB0
?
Maybe you can see some messages there?Yes , did try but it also breaks the communication between pimatic and the homeduino
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
What did you need exactly?
I had started a version, which logs every string between the arduino and pimatic but had some trouble with the environment.But I can give you the protocol for communication with the arduino.
pimatic rocks!!!
-
It is possible to trace system calls with strace, allowing to see the communication without interrupting anything.
You first have to find out the pid of the pimatic node process, and the file descriptors in question. The following commands will need some modifications for your setup; I did it like this:
$ pidof node $ lsof -p 9093 | grep ttyUSB $ strace -f -p 9093 -y -etrace=read -e read=12,13 -P /dev/ttyUSB1 2>&1 | grep -v '\(tached\|SIG\|exited with\)'
Interrupt with Ctrl-C.