rc-switch plugin

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
kniazio
Normal user
Posts: 49
Joined: 12 Jun 2016, 11:12

Re: rc-switch plugin

#51 Post by kniazio » 17 Jun 2017, 12:16

The _P111_RF.ino plugin do not compile in dev10 https://github.com/letscontrolit/ESPEasy/releases.

Code: Select all

'irReceiver' was not declared in this scope
if (irReceiver != 0) break;
In dev7 version the plugin compiles
I need the dev10 version
Please help
Also use the _P035_IRTX.ino and _P016_IR.ino plugins, then it will work.
It is working now.
Thanks

JKD
Normal user
Posts: 8
Joined: 27 Jan 2017, 10:04

Re: rc-switch plugin

#52 Post by JKD » 19 Jun 2017, 21:23

oisisi wrote:
13 Jun 2017, 17:57
JKD wrote:
10 Jun 2017, 10:56
"RC,ON=1000010000,5" should work

Code: Select all

375247309 : MQTT : Topic: home/esp014/cmd
375247309 : MQTT : Payload: RC,ON=1000010000,5
Is your first controller "OpenHAB MQTT" ???

oisisi
Normal user
Posts: 38
Joined: 06 Jul 2016, 13:47

Re: rc-switch plugin

#53 Post by oisisi » 20 Jun 2017, 20:21

JKD wrote:
19 Jun 2017, 21:23
Is your first controller "OpenHAB MQTT" ???
No, I use PiDome MQTT format with Controller Subscribe: "home/%sysname%/#". %sysname% is esp014 and therefore I assume "home/esp014/cmd" should be interpreted.

JKD
Normal user
Posts: 8
Joined: 27 Jan 2017, 10:04

Re: rc-switch plugin

#54 Post by JKD » 20 Jun 2017, 21:38

oisisi wrote:
20 Jun 2017, 20:21
JKD wrote:
19 Jun 2017, 21:23
Is your first controller "OpenHAB MQTT" ???
No, I use PiDome MQTT format with Controller Subscribe: "home/%sysname%/#". %sysname% is esp014 and therefore I assume "home/esp014/cmd" should be interpreted.
That's the problem!
The log you see comes from controller.ino which is common for all controllers.
The syntax descriped above is only implemented in "OpenHAB MQTT" (CPlugin 5).
In "PiDome MQTT" (CPlugin 6) it is implementet differently - as I understand the code you must use "/Home/Floor/Location/device/<systemname>/RC,ON=1000010000,5" (<sysname> must be the 5th element!!!) - don't ask me why...

You/I/any should request a common MQTT-command handling independent of the active plugin
Last edited by JKD on 21 Jun 2017, 16:12, edited 1 time in total.

oisisi
Normal user
Posts: 38
Joined: 06 Jul 2016, 13:47

Re: rc-switch plugin

#55 Post by oisisi » 21 Jun 2017, 11:16

JKD wrote:
20 Jun 2017, 21:38
That's the problem!
The log you see comes from controller.ino which is common for all controllers.
The syntax descriped above is only implemented in "OpenHAB MQTT" (CPlugin 5).
In "PiDome MQTT" (CPlugin 6) it is implementet differently (...)
Thanks for tenaciously investigating the cause. Since I use plain MQTT / Node RED and not really a specific controller I can find a workaround.

sebi2003
Normal user
Posts: 6
Joined: 11 Aug 2017, 07:38

Re: rc-switch plugin

#56 Post by sebi2003 » 11 Aug 2017, 08:17

i try to compile dev11 with Arduino IDE 1.6.12 as suggested here: https://www.letscontrolit.com/wiki/inde ... are_Upload
Compiling is possible for dev11 without any plugins from the playground.
When I add _P111_RF.ino and _P112_RFTX.ino or only one of them I get exit status 1.

any suggestions? It would be nice if someone can upload a already compile dev11.bin for Nodemcu board.

Hope somebody can help

oisisi
Normal user
Posts: 38
Joined: 06 Jul 2016, 13:47

Re: rc-switch plugin

#57 Post by oisisi » 11 Aug 2017, 12:25

I used the latest files with the most recent Arduino IDE, took out a few plugins that added too much to the size, I added the two mentioned plugins and it compiled with only one warning. Try fetching the latest Arduino IDE.

sebi2003
Normal user
Posts: 6
Joined: 11 Aug 2017, 07:38

Re: rc-switch plugin

#58 Post by sebi2003 » 11 Aug 2017, 12:29

ok...i will try it this afternoon.
Can U upload your compiled .bin?

sebi2003
Normal user
Posts: 6
Joined: 11 Aug 2017, 07:38

Re: rc-switch plugin

#59 Post by sebi2003 » 11 Aug 2017, 19:24

I tried compiling the latest github ESPEasy mega source with Arduino IDE 1.8.3 and can compile ESPEasy (dev11).


When I copy _P144_RC-Switch-TX.ino from the playground it works for me, too. Same for _P112_RFTX.ino.

But when I add _P111_RF.ino i get the following error message:
exit status 1
'irReceiver' was not declared in this scope

I also considered the suggestion "Also use the _P035_IRTX.ino and _P016_IR.ino plugins, then it will work." mentioned in the post of kniazio.

Any Idea

sebi2003
Normal user
Posts: 6
Joined: 11 Aug 2017, 07:38

Re: rc-switch plugin

#60 Post by sebi2003 » 08 Nov 2017, 14:35

ok. I fixed it myself. As mentioned above (by by oisisi in post #57), I had to delete many standard plugins (more than 5 depends on the size) to get It compiled. It´s also necessary to get a really clean portable version of Arduino IDE with the necessary libraries. Very important to do exactly what is described in the tutorial.

OMJ
Normal user
Posts: 3
Joined: 10 Apr 2017, 17:38

Re: rc-switch plugin

#61 Post by OMJ » 14 Jan 2018, 11:57

Hi.

First, thanks a lot to the developer(s) for the rc-switch plugin. I have used it for more than a year with my RC sockets in combination with MQTT and Openhab and found it very stable.

However, for some reason, my commands are always repeated 3 times it seems. Despite the device setup is made with repeat=1 and the mqtt payload is always with 1

example: mymosquitto:/IOT_MASTER/cmd:command:Up:rfsend,16059141,1,24

For the control of RF sockets it does not matter to repeat a few times or more. However, in setting up LED light control with some min RF controllers, and when toggling light on/off, repeating the command is making the light blinkering and leaving the controller in and unkown state, which makes it difficult.

I have not gone trough the code in details for some easy parameters adjustments, i wanted to hear if i'm the only one having theese issues?

I found about about the minimum 3 repeats by recieving the RC signals with the original RC-switch code for arduino "RecieveDemo_Advanced":

Code: Select all

/*
  Example for receiving
  
  http://code.google.com/p/rc-switch/
  
  If you want to visualize a telegram copy the raw data and 
  paste it into http://test.sui.li/oszi/
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(0);  // Receiver on inerrupt 0 => that is pin #2
}

void loop() {
  if (mySwitch.available()) {
    output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
    mySwitch.resetAvailable();
  }
}

hugo11
Normal user
Posts: 17
Joined: 08 Nov 2016, 20:30

Re: rc-switch plugin

#62 Post by hugo11 » 04 Mar 2018, 15:01

I have also issues compiling with the _P111_RF.ino included. I tried reinstaling the IDE + removed the libraries folder and only included the ones from the ESP Easy distribution.

Still the same, any other ideas?

User avatar
enesbcs
Normal user
Posts: 427
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: rc-switch plugin

#63 Post by enesbcs » 26 Oct 2018, 22:20

sebi2003 wrote:
11 Aug 2017, 19:24
But when I add _P111_RF.ino i get the following error message:
exit status 1
'irReceiver' was not declared in this scope

I also considered the suggestion "Also use the _P035_IRTX.ino and _P016_IR.ino plugins, then it will work." mentioned in the post of kniazio.

Any Idea
Old thread, but... Apply this patch to the head of _P111 enables it to compile:

Code: Select all

#ifndef USES_P016
 int irReceiver = 0; // make sure it has value even if plugin not found
#endif    

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests