Hi, I am new to RFlink and also Arduino. I am trying to use Mega2560 to listen to a specific Infrared signal and then send an pre-assigned RF 433mhz signal. My problem is the RF portion.
1. I managed to learn the RF 433mhz signal using "RFLink Loader.exe" (20;29;BrelMotor;ID=770518;SWITCH=21;CMD=STOP;) on my PC.
2. I am able to send this command (10;BrelMotor;770518;21;STOP;) using "RFLink Loader.exe" and the equipment works.
Now I need to hardcode this inside my Mega2560 and I am not sure how to SEND the (10;BrelMotor;770518;21;STOP;) using Mega2560. Any kind soul can guide me please? Thanks.
Send CMD For RFlink+Mega2560
Moderators: rtenklooster, Voyager, BertB, Stuntteam
Re: Send CMD For RFlink+Mega2560
AFAIK RFLink is a tool to be used from outside using its own protocol http://www.rflink.nl/blog2/protref. As it says on that page:
OR you can also use RFLink through network http://www.rflink.nl/blog2/faq#Network
So attach your Mega to Raspberry Pi running Domoticz or Home Assistant or any other automation tool. (Search for "Supported Automation software" at http://www.rflink.nl/blog2/faq) Or you can send those serial commands straight to Megas port as all those automation softwares actually do..."Data is send serial (via USB) as "text" at a speed of 57600 baud (N,8,1) It is sufficient for a server to open a port and listen to the RFLink data. Each incoming text line contains information about data that has been received via RF signals. In order to talk back to RFLink to issue RF commands or to make changes to settings, a text line has to be send that is terminated with CR/LF."
OR you can also use RFLink through network http://www.rflink.nl/blog2/faq#Network
-
- New user
- Posts: 2
- Joined: 22 Jan 2018, 17:21
Re: Send CMD For RFlink+Mega2560
Thanks alot for the reply. The RFLink Loader has a "send command" function where i can send my (10;BrelMotor;770518;21;STOP;). Now instead of using RFLink Loader, I wish to know how to send this message in arduino? using command line like digitalwrite()? serial.write()?
Re: Send CMD For RFlink+Mega2560
Well, that's just what the Rflink firmware on the Arduino is doing for you. Arduino can not do it on it's own.
Re: Send CMD For RFlink+Mega2560
If you have a second Mega that connects to the Arduino you can send such commands though..
-=# 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
Re: Send CMD For RFlink+Mega2560
So to call RFLink yourself directly use any serial port terminal as it says in http://www.rflink.nl/blog2/development
Here is how (one way).
0. Install Python and PIP if somehow it is not already in your system
https://www.python.org/downloads/
https://pip.pypa.io/en/stable/installing/
1. Install miniterm.py (PySerial)
2. Then attach Arduino to your USB-port and connect to it calling
As in my Mac having Ceecreit Arduino Mega (Not a genuine, so it uses Virtual Com Port drivers from http://www.ftdichip.com/Drivers/VCP.htm
then the command line is
3. Send your command as you did...
4. Close the connection by pressing CTRL-[ (And it is by the layout not char. So ex. in scandinavian keyboard it is ctrl-å)
https://superuser.com/questions/398/how ... x-terminal
**
To use all this automatically: program your own client to do what ever you like RFLink to do OR you can use home automation softwares to do all the heavy lifting.
**
Here is how (one way).
0. Install Python and PIP if somehow it is not already in your system
https://www.python.org/downloads/
https://pip.pypa.io/en/stable/installing/
1. Install miniterm.py (PySerial)
Code: Select all
python -m pip install pyserial
Code: Select all
miniterm.py [YOUR/USB-DEVICE] 57600 -e --eol CRLF
then the command line is
Code: Select all
miniterm.py /dev/cu.usbmodem1461 57600 -e --eol CRLF
4. Close the connection by pressing CTRL-[ (And it is by the layout not char. So ex. in scandinavian keyboard it is ctrl-å)
https://superuser.com/questions/398/how ... x-terminal
**
To use all this automatically: program your own client to do what ever you like RFLink to do OR you can use home automation softwares to do all the heavy lifting.
**
Who is online
Users browsing this forum: No registered users and 16 guests