Help with transmit needed
animavitis opened this issue · comments
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 :)
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.
` 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
unfortunately I don't think RC switch is compatible with the protocol supported by Newremotetransmitter.
Are you using an arduino or an esp8266?
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.
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
@animavitis did you modify the newremote library to make it work with esp8266?
only few simple changes:
-
in NewRemoteReciever.h extend #define MQTT_CALLBACK_SIGNATURE for ESP8266 with group unit & switchtype
-
in NewRemoteReciever.cpp extend #define CALLBACK_SIGNATURE for ESP8266 with group unit & switchtype
And its works :) maybe not 100% stable, but enough to caputre RF signal from remote. For transmission no changes made at all
great, could you edit a pull request? This means that now we have an ESP8266 library for new kaku protocol
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.
Great and are you able to receive also?
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