1technophile / NewRemoteSwitch

NewRemoteSwitch library v1.2.0 (20140128) for Arduino 1.0 Made by Randy Simons http://randysimons.nl/
GNU General Public License v3.0
38 stars 19 forks source link

Cant compil Retransmitter.ino when i select a ESP8266 mudule in arduino IDE #5

Closed hugodu21 closed 4 years ago

hugodu21 commented 4 years ago

Hello,

does the Retransmitter.ino should work with ESP8266 NodeMcu module ? I got the following error

This line is highlighted

void setup() { // See example ShowReceivedCode for info on this NewRemoteReceiver::init(0, 2, retransmitter); }

error message

\Arduino\libraries\NewRemoteSwitch-master/NewRemoteReceiver.h:73:15: note: static void NewRemoteReceiver::init(int8_t, byte, NewRemoteReceiverCallBack)

   static void init(int8_t interrupt, byte minRepeats, NewRemoteReceiverCallBack callback);

               ^

Thanks for your support ! The ShowReceivedCode works perfectly !

Now i want to reproduce the code received to retransmit it on demand :)

Thanks again

1technophile commented 4 years ago

Hello, does the Retransmitter.ino should work with ESP8266 NodeMcu module ? I got the following error

Hello, In the orange log of your arduino IDE you can see that the IDE find several libraries for newremoteswitch Are you sure it takes the good one?

hugodu21 commented 4 years ago

hello,

yes, i removed it to be sure but its the same issue.

with esp8266 selected: retransmitter_esp8266

with arduino selected: retransmitter_arduino

I found a solution with another code, so if you dont have time, dont worry about me!

Thank you for your response.

hugodu21 commented 4 years ago

in fact your program is better, i cant have the good code with the other code in found.

Is there a way to get the receivedCode un your showCode function easyly ?

1technophile commented 4 years ago

Is there a way to get the receivedCode un your showCode function easyly ?

Do you succeed in compiling ShowReceivedCode.ino

hugodu21 commented 4 years ago

yes, i think its ok for the receive code,

i use the showcode function to get the code and update the status of the lights in jeedom using a http get.

i used:


void showCode(unsigned int period, unsigned long address, unsigned long groupBit, unsigned long unit, unsigned long switchType) {
      BoutonID = address;
      BoutonID *= 2;
      if (groupBit) BoutonID += 1;
      BoutonID *= 2;
      if (switchType) BoutonID += 1;
      BoutonID *= 16;
      BoutonID += unit;
...

and i use another library to send this code with the 433mhz transmiter
1technophile commented 4 years ago

If you want to integrate with jeedom you could use OpenMQTTGateway directly. and interface through MQTT.

The gateway corresponding to NewRemoteSwitch library is ZgatewayRF2

hugodu21 commented 4 years ago

thanks i will try it :)

I already tryed rflink with Jeedom plugin, but im starting to enjoy the electronic and i would like to include my own little noobs beginer code inside the esp8266 (or arduino)

in parallel i began the openclassroom tutorials for C learning

is it possible to include easy my own code inside the MQTT gateway ?

1technophile commented 4 years ago

is it possible to include easy my own code inside the MQTT gateway ?

Yes you can see there https://docs.openmqttgateway.com/participate/development.html