Is it possible to send a predifined string of ascii characters out of the serial port (or usb) when a specific switch is activated ?
Thx
serial data string out if switch activated
Moderators: leecollings, remb0
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: serial data string out if switch activated
Did you try this bash command? (after changing /dev/ttyUSB0 to the port you want)Dave21w wrote: Sunday 19 July 2020 9:31 Is it possible to send a predifined string of ascii characters out of the serial port (or usb) when a specific switch is activated ?
Code: Select all
sudo echo "predefined string" > /dev/ttyUSB0Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Dave21w
- Posts: 407
- Joined: Sunday 29 November 2015 21:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: UK
- Contact:
Re: serial data string out if switch activated
Thanks for the quick response Waaren, I'll give that a try later and report back 
-
Dave21w
- Posts: 407
- Joined: Sunday 29 November 2015 21:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: UK
- Contact:
Re: serial data string out if switch activated
Hopefully some one can give me a quick answer on this, I have an FTDI USB to serial converter plugged into the USB port, it's being seen as:-
Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
I've followed the previous instructions in this thread, I'm seeing nothing coming out but not getting any errors on screen either, what am I missing?
Thx
Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
I've followed the previous instructions in this thread, I'm seeing nothing coming out but not getting any errors on screen either, what am I missing?
Thx
-
Dave21w
- Posts: 407
- Joined: Sunday 29 November 2015 21:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: UK
- Contact:
Re: serial data string out if switch activated
Really need some help here guys, trying to send my txt string as per Warren's instructions, the data gets sent but ignored because of some extra characters that are being appended to the start, here is what I'm sending:-
sudo echo -en "#A,0,1,0442187,0,test message" > /dev/ttyUSB0
And this is what is coming out:-
^@0#A,0,1,0442187,0,test message
The first three characters should not be there, does anyone have any ideas?
Thx
sudo echo -en "#A,0,1,0442187,0,test message" > /dev/ttyUSB0
And this is what is coming out:-
^@0#A,0,1,0442187,0,test message
The first three characters should not be there, does anyone have any ideas?
Thx
Who is online
Users browsing this forum: No registered users and 0 guests