Hi,
I've got an RFLink that can successfully send and receive signals for various 433MHz items in RFLinkLoader.
However, trying to use Python (a library python-rflink, I think) or pySerial I can receive signals, but send doesn't do anything (no error, but device not triggered - tried with blinds and a remote that sends to a different RF433 device plugged into my OpenHab system).
I've also tried on a Raspberry Pi running Ubuntu and get the same; working receive, not working send.
Can anyone suggest what I'm missing in trying to send direct to the "com" port?
I'm presuming some sort of formatting or CR/LF is missing, although I have tried adding various combinations of \n \r without success.
Thanks in advance for any help.
Richie
Unable to Send Commands to RFLink
Moderators: rtenklooster, Voyager, BertB, Stuntteam
Re: Unable to Send Commands to RFLink
It for sure needs cr/lf on commands..
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8
-
- New user
- Posts: 3
- Joined: 09 May 2023, 18:06
Re: Unable to Send Commands to RFLink
Hi,
Yeah, I thought as much, but not found a way to make it work in Python.
Have just had some success with miniterm:
miniterm [/dev/ttyUSB0] 57600 -e --eol CRLF
Pasting in any of these does work for one of my blinds:
10;BofuMotor;e20202;03;DOWN;
10;BofuMotor;e20202;03;UP;
10;BofuMotor;e20202;03;STOP;
So, I just need to work out how to get pySerial to do it.
Any idea what else I can try?
Thanks,
Richie
Yeah, I thought as much, but not found a way to make it work in Python.
Have just had some success with miniterm:
miniterm [/dev/ttyUSB0] 57600 -e --eol CRLF
Pasting in any of these does work for one of my blinds:
10;BofuMotor;e20202;03;DOWN;
10;BofuMotor;e20202;03;UP;
10;BofuMotor;e20202;03;STOP;
So, I just need to work out how to get pySerial to do it.
Code: Select all
import serial
ser = serial.Serial("/dev/ttyUSB0",57600,timeout=2)
# none of these work
ser.write(b'10;BofuMotor;e20202;03;DOWN;')
ser.write(b'10;BofuMotor;e20202;03;DOWN;\n')
ser.write(b'10;BofuMotor;e20202;03;DOWN;\r\n')
ser.flush()
ser.close()
Thanks,
Richie
-
- New user
- Posts: 3
- Joined: 09 May 2023, 18:06
Re: Unable to Send Commands to RFLink
Hi,
After some "playing around" I've got it to work, but is a bit strange.
This works:
Is this how it's supposed to work?
Thanks,
Richie
After some "playing around" I've got it to work, but is a bit strange.
This works:
Code: Select all
import serial
ser = serial.Serial("/dev/ttyUSB0",57600,timeout=2)
ser.readline() # this just before the "write" makes it work
ser.write(b'10;BofuMotor;e20202;03;DOWN;\r\n')
ser.flush()
ser.close()
Thanks,
Richie
Who is online
Users browsing this forum: No registered users and 1 guest