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

Help with transmit needed #2

Closed animavitis closed 7 years ago

animavitis commented 7 years ago

Hi,

I was able to decode RF signal with NewRemoteSwitch, but dont know how to transmit this data via RF-Switch. Maby U can help me with this:

Code: 31505394 Period: 257
 unit: 14
 groupBit: 0
 switchType: 1

This is what i got from NewRemoteReceiver. Can U provide me some tips for transmit it RF-SWITCH??

thx for help :)

1technophile commented 7 years ago

Hello,

Did you get it working on esp8266 or arduino?

Take a look at this example (retransmitter function): https://github.com/1technophile/NewRemoteSwitch/blob/master/examples/Retransmitter/Retransmitter.ino Not tested but with some modification you should be able to send your data.

animavitis commented 7 years ago

` NewRemoteTransmitter transmitter(31505394, 12, 258); transmitter.sendUnit(15, false); delay(1000); transmitter.sendUnit(15, true); delay(1000); } Sadly sendUnit & sendGroup is not working :/

EDIT:

After changing GPIO in NewRemoteTransmitter to 15 its working fine..... but my goal is to use rf-switch library for transmission

1technophile commented 7 years ago

unfortunately I don't think RC switch is compatible with the protocol supported by Newremotetransmitter.

Are you using an arduino or an esp8266?

animavitis commented 7 years ago

esp8266 nodemcu v3 & was using OpenMQTTGateway, but now i try to make my own firmware that is inspiered by OpenMQTTGateway & https://github.com/mhaack/mqtt-433mhz-gateway-homie.

Im already implemented alarm workflow that is compatible with Home Assistant MQTT Alarm component (it can be triggered by Home Assistant or by cheap PIR/DOOR sensor that works with RF_SWITCH). Now i try to make use of my old RF controlled outlets.

1technophile commented 7 years ago

I have done also an alarm solution, it's a good thing I think to keep alarm function a microcontroler level like esp8266 or arduno. One work that I could do is to integrate newremoteswitch unfortunately it is GPL licensed not compatible with my current licensing MIT

1technophile commented 7 years ago

@animavitis did you modify the newremote library to make it work with esp8266?

animavitis commented 7 years ago

only few simple changes:

And its works :) maybe not 100% stable, but enough to caputre RF signal from remote. For transmission no changes made at all

1technophile commented 7 years ago

great, could you edit a pull request? This means that now we have an ESP8266 library for new kaku protocol

animavitis commented 7 years ago

I found one RC-Switch fork that is working with my power outlets: https://github.com/dok-net/rc-switch/tree/intertechnoselflearning This version have TypeE of outlets and its works for me:)

example: mySwitch.switchOn(31505394, true, 15); mySwitch.switchOff(31505394, true, 15);

where first int is Address, bool is group (if true then all sockets will ON), last one is Unit number.

1technophile commented 7 years ago

Great and are you able to receive also?

animavitis commented 7 years ago

i can receive rawData, but i think this data are not correct.... i need more time to investigate it. My first thought is that rc-switch have problem with inverted protocol recognition