Calling Shell command

I also live in Europe … I tried a Broadlink Serial Number S / N: RM34H…
I read on other forums that many peaople have had problems since the 33 series … with RF Broadlink…

(Even with Broadlink Manager for windows, there are no problems with IR, but it does not work with RF.
Please, do you remember the serial number of the Broadlink you installed?)

Yes RM3322247096.

You do know these units were dogged with problems for quite a while. Have you managed to track down a working firmware for your unit.

Just a link to the unit I set up. It’s working fine with IR https://m.gearbest.com/smart-home-controls/pp_255607.html?wid=1433363&currency=EUR&vip=49402249&gclid=Cj0KCQiAk7TuBRDQARIsAMRrfUb4gHDrBZXOWZ9oyt1gBDcL_WfPWB5OuJ0a-ZRAgdbvXaH5ntsLjvwaAg_AEALw_wcB

The broadlinks RMs abillity for Rf is tied to the firmware i had same issue originaly with mine though not the same model. Contacting the company and asking if there was a newer firmware i was told there was none. When I stated Rf didnt work they sent me the newer version which appearently didnt exist :crazy_face:

Yes but we are talking about two different products. One for the US/Canadian Market and one for the Euro market. That’s why I asked where Roberto was based. We have GDPR to deal with in Europe. We have a completely different firmware in the Euro Zone.

Yes I realize that. My post was to emphasize the need for the right firmware and that they may need to contact the company for the newest firmware directly.

@roberto1979 what firmware version is your RM at now. The econtrol or ihc apps will tell you. Others with working units can see if there version is newer or olderthen what your using.

My Friends,
thanks for your suggestions.
I believe you have already understood, but I would like to specify that there are no problems learning and sending RM code via App.

PS.The current Firmware version is the V43. There are no other Firmware updates to upload.
(I have another RMMini3, (so without RF capability), on which the V.55 Firmware is installed, with the possibility of updating to the 56 version. I believe that the Version numbers for the two models do not match).

However, I agree with Peter that sending RF codes via an RF trasmitter by Gpio, is more versatile than using Broadlink. Even thinking about long-term and future changes, you never depend on the app, which you would always need even just to change your wifi password. I therefore believe that it would be very interesting to integrate the python script Rf-rpy in HG.

@roberto1979 this is something I used a while back with HG. Read through it. It’s easy enough to set up and obviously everything can run on the same RPI. It’s a neat solution for for TX/RX of RF signals. https://www.instructables.com/id/RF-433-MHZ-Raspberry-Pi/

Thanks Peter, I’ll try it right away.

Hello Peter,
I looked at the link. It’s the same project I used to send and receive RF Code the way I’m doing now. I had already tried to use this phyton script on HomeGenie, but because I failed, I created several Bash scripts that I now call from HG with the method you helped me solve here:

That’s perfect. Do you have it all working now. If so please share your efforts with the forum for others to see.

Sure,
except the problem encountered with the execution of the Shell command from HG, it is very simple:

  1. Purchased the “RF transmitter XL-R03A” card on Amazon;
  2. Connected it to Gpio 20 and I installed Rpi-Rf following the guide from this link: https://pypi.org/project/rpi-rf/ (This require Python3 Installed);
  3. Copied send.py file inside HG Directory, than created many Bash files, (how many devices I have to control) with this content:

#! /bin/bash
cd /
/usr/bin/python3 /usr/local/bin/homegenie/send.py 000000 (“0000” is the RF code, learned as indicated in the previous link).

  1. I made the newly created Bash files executable by typing the following code from Shell:

sudo chmod +x FileBash.sh

  1. Created C# programs in HG (each of which contains one of the Bash Scripts that control my RF devices) with this content:

var proc = new System.Diagnostics.Process {
StartInfo = new System.Diagnostics.ProcessStartInfo {
FileName = “/bin/bash”,
Arguments = "-c “sudo -H -u pi " + “”/usr/local/bin/homegenie/FileBash.sh”,
UseShellExecute = false,
RedirectStandardOutput = true,
}
// end ProcessStartInfo
};
//end Process
proc.Start();
Program.Notify("Alarm System: ", “complete”);

That’s all. If I had not encountered the difficulty of recalling the Bash file from HG, it is a job that can be completed in about 30 minutes.

That’s really useful. You now have a fully functioning RF TX/RX RPI setup. I assume it’s running off the same RPI that HG is installed on.

Yes Peter, it is running on 1 of the 3 Rpi that HG is installed on

In my case… I don’t use the RX unit … Just because I don’t need it.
I only connected it the first time to read the RF codes of my devices.

At least you have most of the work done so if you ever need to implement RX it shouldn’t be too difficult. It’s nice to create a home brew solution too.

I agree with you Peter,
I didn’t go into the question, because I just needed to learn the RF codes to send, but it shouldn’t be at all complicated to be able to even receive them.

Furthermore by being able to run the send.py code in an HG program, it could make it even easier to install RF for all users.

And that’s definitely needed here. The more contributions the better. Particularly organic ones. I love solutions that involve the GPIO pins too.