Code Monkey home page Code Monkey logo

rflink32's People

Contributors

adesin-fr avatar andyboeh avatar chm26 avatar cossey avatar couin3 avatar cpainchaud avatar cpawelko-aviti avatar crazyserver avatar cyrilpawelko avatar martinusgh avatar northernman54 avatar obones avatar petkov avatar plasq avatar schmurtzm avatar simonhyde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rflink32's Issues

Plugin 049 send strange values

Hi, first of all great software.

I have a wind sensor and the new Plugin 049 now receive the messages, but the output is not correct:

20;AA;LaCrosse-TX141THBv2;ID=1d5fd0;TEMP=fffffe61;HUM=52;BAT=OK;

Currently I am using OpenMQTT to receive the Signal and the values that I get back are OK:
{"model":"LaCrosse-TX141W","id":382461,"channel":0,"battery_ok":1,"temperature_C":9.8,"humidity":81,"test":0,"mic":"CRC","protocol":"LaCrosse TX141-Bv2, TX141TH-Bv2, TX141-Bv3, TX141W, TX145wsdth sensor","rssi":-68,"duration":696436}

Br. Frank

it is not possible to turn on and off the Plugins section

Good afternoon.

  1. нет возможности включать и выключать раздел Plugins(кнопка save не активна)
  2. OTA ссылается на 404 ошибку. =)

  1. it is not possible to turn on and off the Plugins section (the save button is not active)
  2. OTA refers to a 404 error. =)

NewKaku (Plugin_004.c) transmission issue (switch/unit)

Hi,

Big thanks @ all of you who made this possible.

There seems to be a switch/index problem with the transmission of NewKaku.

when I receive for example
20;89;NewKaku;ID=00f0ac76;SWITCH=1;CMD=ON;

I need to send the following to switch the plug
10;NewKaku;00f0ac76;0;ON;

1->0 , 2->1 , 3->2 and so on.

in Plugin_004.c I have changed
bitstream |= Switch_bitstream; // Complete transmitted address
to
bitstream |= Switch_bitstream-1;

it fixes the problem, but I do not know if there are side effects ;)

and since I have very poor programming skills,
I would be extremely happy about an integration of Kaku Transmit PLUGIN_TX_003
(tried commenting out #define PLUGIN_TX_003 and some other changes without success).

Config CC1101 sur NodeMCU V3 ESP12

Can you give me the configuration parameters for a CC1101 to put in the json
And confirm that my connection to my ESP12 is OK ->
GD00 - D1
GD02 - D2
SCK-D5
MOSI-D7
MISO-D6
CSN-D8
VDC - 3.3v
GND-GND
Thanks in advance

Serial output does not always use the proper line ending

Using the latest sources, here is the output I get on the serial line:

Trying to connect WIFI SSID netssid. A status will be given whenever it occurs.
Connected to AP!
SSID: netssid
             BSSID: 01:23:45:67:89:AB
                                     Channel: 1
Auth mode: 4
RFM69 initialized with Freq = 433.92
                                    Radio pin RF_RX_VCC :       27
Radio pin RF_RX_GND :   13
Radio pin RF_RX_NA :    14
Radio pin RF_RX_DATA :  25
Radio pin RF_TX_VCC :   4
Radio pin RF_TX_GND :   16
Radio pin RF_TX_DATA :  25
20;00;RFLink_ESP;VER=5.1;
Starting WebServer... OK
WiFi Client has received a new IP: 1.2.3.4
                                          Message arrived [Serial] 10;RFUDEBUG=ON;
20;01;RFUDEBUG=ON;

This comes from the fact that those new messages use Serial.printf with a trailing \n instead of using \r\n.
However, to avoid constant proliferation, I believe it is much more recommended to use Serial.println wherever needed, which is what I have done in the following patch:

diff --git a/RFLink/10_Wifi.cpp b/RFLink/10_Wifi.cpp
index f8dd42b..453b410 100644
--- a/RFLink/10_Wifi.cpp
+++ b/RFLink/10_Wifi.cpp
@@ -313,8 +313,9 @@ void eventHandler_WiFiStationConnected(WiFiEvent_t event, WiFiEventInfo_t info)
     for(int i=0; i<info.connected.ssid_len; i++){
       Serial.print((char) info.connected.ssid[i]);
     }
+    Serial.println();
  
-    Serial.print("\nBSSID: ");
+    Serial.print("BSSID: ");
     for(int i=0; i<6; i++){
       Serial.printf("%02X", info.connected.bssid[i]);
  
@@ -322,8 +323,9 @@ void eventHandler_WiFiStationConnected(WiFiEvent_t event, WiFiEventInfo_t info)
         Serial.print(":");
       }
     }
+    Serial.println();
      
-    Serial.print("\nChannel: ");
+    Serial.print("Channel: ");
     Serial.println(info.connected.channel);
  
     Serial.print("Auth mode: ");
@@ -332,7 +334,8 @@ void eventHandler_WiFiStationConnected(WiFiEvent_t event, WiFiEventInfo_t info)
 }
 
 void eventHandler_WiFiStationGotIp(WiFiEvent_t event, WiFiEventInfo_t info) {
-  Serial.printf("WiFi Client has received a new IP: %s\n", WiFi.localIP().toString().c_str());
+  Serial.printf("WiFi Client has received a new IP: %s", WiFi.localIP().toString().c_str());
+  Serial.println();
   reconnectServices();
 }
 
@@ -350,12 +353,13 @@ void eventHandler_WiFiStationConnected(const WiFiEventSoftAPModeStationConnected
   Serial.print("SSID: ");
   Serial.println(WiFi.SSID());
      
-  Serial.print("\nChannel: ");
+  Serial.print("Channel: ");
   Serial.println(WiFi.channel());
     
 }
 void eventHandler_WiFiStationGotIp(const WiFiEventStationModeGotIP& evt) {
-  Serial.printf("WiFi Client has received a new IP: %s\n", WiFi.localIP().toString().c_str());
+  Serial.printf("WiFi Client has received a new IP: %s", WiFi.localIP().toString().c_str());
+  Serial.println();
   reconnectServices();
 }
 void eventHandler_WiFiStationDisconnected(const WiFiEventStationModeDisconnected& evt) {
diff --git a/RFLink/11_Config.cpp b/RFLink/11_Config.cpp
index c0e6462..20a0816 100644
--- a/RFLink/11_Config.cpp
+++ b/RFLink/11_Config.cpp
@@ -609,12 +609,13 @@ void executeCliCommand(const char *cmd) {
       String msg;
       pushNewConfiguration(root, msg, false);
       if(msg.length() > 0) {
-          Serial.printf("Some warning/errors occured while trying to SET config from CLI:\n");
+          Serial.println("Some warning/errors occured while trying to SET config from CLI:");
           Serial.println(msg.c_str());
       }
     }
     else {
-      Serial.printf("Error : unknown command '%s'\n", command.c_str());
+      Serial.printf("Error : unknown command '%s'", command.c_str());
+      Serial.println();
     }
 
   }
diff --git a/RFLink/1_Radio.cpp b/RFLink/1_Radio.cpp
index 46c0954..b07e5fc 100644
--- a/RFLink/1_Radio.cpp
+++ b/RFLink/1_Radio.cpp
@@ -110,6 +110,7 @@ void refreshParametersFromConfig() {
     auto new_hardware_id =  hardwareIDFromString(item->getCharValue());
     if( new_hardware_id == HardwareType::HW_EOF_t ) {
       Serial.printf("Unsupported radio hardware name '%s' was provided, falling to default generic receiver!", item->getCharValue());
+      Serial.println();
       changesDetected = true;
       hardware = HardwareType::HW_basic_t;
       item->setCharValue(hardwareNames[hardware]);
@@ -320,6 +321,7 @@ void set_Radio_mode(States new_State)
     set_Radio_mode_RFM69(new_State);
   else
     Serial.printf("Error while trying to switch Radio state: unknown hardware id '%i'", new_State); 
+    Serial.println();
 }
 
 void setup() {
@@ -408,7 +410,8 @@ void set_Radio_mode_RFM69(States new_State)
       radio.reset();
       radio.initialize();
       radio.setFrequency(433920000);
-      Serial.printf("RFM69 initialized with Freq = %.2f\n", (double)radio.getFrequency()/1000000);
+      Serial.printf("RFM69 initialized with Freq = %.2f", (double)radio.getFrequency()/1000000);
+      Serial.println();
       //Serial.print("Temp = "); Serial.println(radio.readTemperature());
       if(hardware == HardwareType::HW_RFM69HCW_t)
         radio.setHighPower(true);
diff --git a/RFLink/2_Signal.cpp b/RFLink/2_Signal.cpp
index 05c2332..ac0f37c 100644
--- a/RFLink/2_Signal.cpp
+++ b/RFLink/2_Signal.cpp
@@ -703,7 +703,7 @@ void RawSendRF(RawSignalStruct *signal) {
         //Serial.println(cmd+commaIndex);
       }
 
-      //Serial.printf("Now reading Json to find signal properties");
+      //Serial.println("Now reading Json to find signal properties");
 
       auto root = json.as<JsonObject>();
       JsonArrayConst pulsesJson = root.getMember("pulses");
@@ -713,19 +713,22 @@ void RawSendRF(RawSignalStruct *signal) {
       for(JsonVariantConst pulse : pulsesJson) {
           index ++;
           signal.Pulses[index] = pulse.as<signed long int>();
-          //Serial.printf("Pulse=%i\n",signal.Pulses[index]);
+          //Serial.printf("Pulse=%i",signal.Pulses[index]);
+          //Serial.println();
       }
 
       signal.Repeats = root.getMember("repeat").as<signed int>();
       signal.Delay = root.getMember("delay").as<signed int>();
 
       Serial.printf("** sending RF signal with the following properties: pulses=%i, repeat=%i, delay=%i... ", signal.Number, signal.Repeats, signal.Delay);
+      Serial.println();
       RawSendRF(&signal);
       Serial.println("done");
 
     }
     else {
-      Serial.printf("Error : unknown command '%s'\n", command.c_str());
+      Serial.printf("Error : unknown command '%s'", command.c_str());
+      Serial.println();
     }
 
   }

Also available as a diff file here: println.zip

With this, I get a much cleaner output in the serial console

using frequence 868Mhz

Hello,

I used your RFLink32 for running on shutters 433Mhz and it does work very well.

I would like to use it this time for shutters working on 868Mhz. I have a module which work on 868Mhz but I don't manage to receive anything for 868Mhz remotes. is there a configuration or libraries I should change in order to make it work on 868Mhz ?

Thanks a lot for this great project !

Introduce a "debug to serial" method

When writing a plugin, I often have the need to send debug information to the serial port, which I do like this:

 #ifdef PLUGIN_016_DEBUG
 Serial.print("packet = ");
 Serial.println(packet, 16);
 #endif

Now, this #ifdef structure being repeated quite a lot of time, I tried creating a code that would simplify this.
But I also want this code to completely disappear from the firmware if the debug symbol is not defined.
So, at first, I tried this:

#define SerialDebug(symbol, method, argument) #ifdef symbol Serial.method(argument) #endif

But this is not possible, the language does not allow using #ifdef inside #define

As a second try, I created this inside 7_Utils.h:

#ifdef SerialDebugActivated
#define SerialDebug(method, arguments...)  Serial.method(arguments)
#else
#define SerialDebug(method, arguments...)  /**/
#endif
#define SerialDebugPrintln(arguments...)   SerialDebug(println, arguments)
#define SerialDebugPrint(arguments...)     SerialDebug(print, arguments)

It then gets used like this:

SerialDebugPrint("packet =");
SerialDebugPrintln(packet, 16);

which works by adding this code at the top of the plugin file:

#define SerialDebugActivated
#include "../7_Utils.h"

Commenting out the first line gives the expected result, the code is completely absent from the firmware. And I believe this to be more readable and less "copy/paste" than the original code.

I'm creating this issue for discussion before submitting a pull request.

RFM69 Wiring : Confirmed data is from DIO2

Hi There,
I compiled and tried this awesome soft on ESP32 and wired 433MHz RXB6 all is working fine as you can see got data from remote from Sonoff and Generic LED remote

20;48;EV1527;ID=030290;SWITCH=01;CMD=ON;
20;49;EV1527;ID=030290;SWITCH=0d;CMD=ON;
20;4A;EV1527;ID=030290;SWITCH=06;CMD=ON;
20;4B;EV1527;ID=030290;SWITCH=06;CMD=ON;
20;4C;EV1527;ID=030290;SWITCH=07;CMD=ON;
20;4D;EV1527;ID=0d0126;SWITCH=01;CMD=ON;
20;4E;EV1527;ID=0d0126;SWITCH=02;CMD=ON;
20;4F;EV1527;ID=0d0126;SWITCH=08;CMD=ON;
20;50;EV1527;ID=0d0126;SWITCH=04;CMD=ON;

I also have some boards with RFM69 used for other project and looks like I'm unable to get the same signal that I receive with RXB6.
Both board are running on my desk, I receive on one not on the other. RFM69 looks like seen an init

03:14:12.819 -> RFM69 SetOOK()=0
03:14:12.819 -> RFM69 setDataShapingOOK()=0
03:14:12.857 -> RFM69 setEncoding()=0
03:14:12.857 -> RFM69 setOokThresholdType(2)=0
03:14:12.857 -> RFM69 setOokFixedThreshold(0x06)=0
03:14:12.857 -> RFM69 setOokPeakThresholdDecrement() result=0
03:14:12.857 -> RFM69 setLnaTestBoost()=0
03:14:12.857 -> Hardware initialization was successful!
03:14:12.857 -> Applied slicer 'Legacy'

So is there anything to wire for RFM69 more than MISO/MOSI/CLK/CS and power ? BTW do I need to wire any DIO of module or some other pins?

These boards receive signal send by moteino with RFM69 library (Felix's one) so it's not an HW default, I'm pretty sure I'm missing something stupid.
Here below
image

Thanks for any advice.

Default user/pass for captive portal?

Hi,

Figured I'd give this a try and after downloading and flashing a release an RFLink-AP pops up. But when I try to access 192.168.4.1 a default popup appears asking for admin/pass. I can't for the life of me find the default values for these in any documentation.. :)

Giving an IP address for the MQTT broker is not working

I'm trying to configure MQTT and am using the IP address directly. When I validate the settings, I get this error on the serial port:

Trying to connect to MQTT Server '172.31.0.254' ... [E][WiFiGeneric.cpp:654] hostByName(): DNS Failed for ▒▒?

It seems it's trying to resolve a name, when it actually is an IP that I'm using.
I did not have the issue with the original RFLink, it connects with the IP just fine

D1-Mini RFDEBUG craches

After using 10;RFDEBUG=ON; the following code crashed the program (in Plugin_001.c):

  RFLink::sendRawPrint(PSTR(";RSSI="));

fix:
// Replaced PSTR(";RSSI=") with F(";RSSI=")
RFLink::sendRawPrint(F(";RSSI="));

Probably on all places where combination RFLink::sendRawPrint() and PSTR() is used it will crashes the code.

Multiple radio modules at the same time ?

Hi,

I see that the original RFLink allows to use also NRF24L01.

I haven't search more to see if it can be used at the same time than the "standard" frequency (433,868....), but...

Would it be possible to implement more than one radio at the same time ?

It would need :

  • Handling the loop on one or many radio modules
  • Handling initialization of more than one module (SPI modules would each use one CS/SS/NSS pin)
  • Handling multiple Radio pins settings

But it would be a killer feature...
BTW it would allow to also implement MySensors gateway mode...

Can't get data from Alecto ws1200 weather station

Hello,

The rflink is fully working now, i can receive kaku remote control signals. I cannot receive the signal from my Alecto ws1200 weatherstation. Alecto ws1200 is plugin 31, is this plugin disabled bij default?

Removal of the WiFi network makes the Sonoff RF Gateway R2 inaccessible

Hi,
first, thank you very much for the continued development of this awesome firmware.
I noticed the following on the Sonoff RF Gateway R2 (RFLink32 nightly build from a few days ago):

  1. Configuration - both the STA and the AP mode are active on the device. The device is configured to connect as a client to a WiFi router. The Serial2Net interface is enabled. Everything functions as expected. The device receives an IP address from the router by DHCP and a computer can connect to it both via the received IP address and by a direct connection to the device AP with the IP 192.168.4.1.

  2. Issue - if the router is reconfigured or switched off (i.e. the WiFi network, to which the device connects as a client, is not present any more), the computer is able to connect to the device AP but cannot load the WebGUI from it. The Serial2Net interface is also inaccessible.

The computer receives an IP address from the device AP and the browser reaches the prompt for login and password at 192.168.4.1. After that, the GUI does not load. Pings to the device at 192.168.4.1 are intermittent - the ones received have a delay of about 500ms. The Serial2net interface remains closed (no connection to it is possible).

I assume that the device enters some infinite loop trying to connect to the non-existing router and does not have enough resources to process the WebGUI requests any more or reboots.

  1. UX problem - I could not find any factory reset sequence to apply in this case apart from reflashing the whole firmware by serial adapter or bringing back the WiFi network online.

Elro AB440R 433Mhz remote - switch 4 not detected as AB400D

Hello,

I have two remotes Elro AB440R. With both and different settings, switch 4 is not detected as "AB400D". Instead it is detected as Kaku:

13:47:40.494 -> 20;15;AB400D;ID=48;SWITCH=01;CMD=OFF;
13:47:41.382 -> 20;16;AB400D;ID=48;SWITCH=02;CMD=OFF;
13:47:42.125 -> 20;17;AB400D;ID=48;SWITCH=03;CMD=OFF;
13:47:43.100 -> 20;18;Kaku;ID=49;SWITCH=10;CMD=OFF;

13:47:45.916 -> 20;19;AB400D;ID=4e;SWITCH=01;CMD=OFF;
13:47:46.618 -> 20;1A;AB400D;ID=4e;SWITCH=02;CMD=OFF;
13:47:47.421 -> 20;1B;AB400D;ID=4e;SWITCH=03;CMD=OFF;
13:47:49.356 -> 20;1C;Kaku;ID=43;SWITCH=10;CMD=OFF;

It is Plugin-003

I use a wemos d1 mini with WL101-341 receiver

Transmitting EV1527

Hi I am unable to transmit EV1527 signals.
The command: 10;EV1527;000080;0;ON;
returns 20;36;CMD UNKNOWN

for example 10;Kaku;00004d;1;ON works ok

I use a ESP32.
Anyone else has this issue?

SX127X how-to ?

Hi,

Just seen a post on Arduino Forum about this project !
Really nice work !

I'm planning to use this for Somfy RTS blinds, so I need a special frequency...
Instead of finding a weird frequency module, I've read that SX127X is supported ?

Is there any instructions on how to implement it ?

I've seen an ESP32 module with an SX1278 and an OLED display on amazon, just 19€, seems a good option ?

Branch RTL _433 on ESP32 is craching after some time (Master is working fine)

Hi all,
I am testing the RTL_433 branch as the master did not detect inFactory-TH sensor.

But after ~5 Minutes the device suddenly reboot and than completely stops working some time later.
I am using Ser2Net connection with Domoticz and MQTT Server.

The Problem starts with MQTT Error showing on the RFLINK website.
There is no crash message at the serial connection.

But Domoticz is crahsing suddently.

Domoticz shows :

021-11-21 11:16:08.113 Status: RFlink: connected to: 192.168.2.27:1900
2021-11-21 11:16:21.073 Status: RFlink: disconnected
2021-11-21 11:16:21.074 Status: RFlink: Connection reset!
2021-11-21 11:16:51.110 Status: RFlink: connected to: 192.168.2.27:1900
2021-11-21 11:17:37.728 Status: RFlink: trying to connect to 192.168.2.27:1900
2021-11-21 11:17:37.807 Status: RFlink: connected to: 192.168.2.27:1900
2021-11-21 11:17:37.728 Error: RFlink: Nothing received for more than 30 seconds, restarting...
2021-11-21 11:17:37.728 Error: ASyncTCP: connect called while socket is still open. !!!
2021-11-21 11:18:17.732 Error: RFlink: Nothing received for more than 30 seconds, restarting...
2021-11-21 11:18:37.733 Status: RFlink: trying to connect to 192.168.2.27:1900
2021-11-21 11:18:37.741 Status: RFlink: connected to: 192.168.2.27:1900
2021-11-21 11:18:37.734 Error: ASyncTCP: connect called while socket is still open. !!!
2021-11-21 11:19:17.738 Error: RFlink: Nothing received for more than 30 seconds, restarting...
2021-11-21 11:19:37.740 Status: RFlink: trying to connect to 192.168.2.27:1900
2021-11-21 11:19:37.927 Status: RFlink: connected to: 192.168.2.27:1900
2021-11-21 11:19:37.927 Status: RFlink: disconnected
2021-11-21 11:19:37.740 Error: ASyncTCP: connect called while socket is still open. !!!
2021-11-21 11:19:37.927 Error: RFlink: Bad address

When I try to swich back to Master using the web gui I get :

Backtrace: 0x40088980:0x3fff8cb0 0x40088bfd:0x3fff8cd0 0x401a6dab:0x3fff8cf0 0x401a6df2:0x3fff8d10 0x401a671d:0x3fff8d30 0x401a67f4:0x3fff8d50 0x400ee295:0x3fff8d70 0x400ee6f7:0x3fff8d90 0x400eec6d:0x3fff8dc0 0x400ee479:0x3fff8e10 0x400ecdea:0x3fff8e80 0x400ecd4d:0x3fff8ec0 0x400db803:0x3fff8ee0 0x401b0a1b:0x3fff8f50 0x400efa45:0x3fff8f70 0x400ed8e9:0x3fff8fc0 0x400ed9b1:0x3fff9000 0x400edc05:0x3fff9050 0x401a7f65:0x3fff9070 0x401a7fe1:0x3fff90b0 0x401a8686:0x3fff90d0 0x40089c0e:0x3fff9100

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8

Arduino IDE Version : 10805
ESP SDK version: v3.3.5-1-g85c43024c
Sketch File : RFLink/RFLink.cpp
Compiled on : Nov 9 2021 at 08:55:41
20;00;RFLink_ESP;VER=5.1;BUILD=20211109-085345-rtl_433;
Loading persistent filesystem... OK. File system usage: 12/320KB.
Now opening JSON config file '/config.json'
JSON file mem usage: 1791 / 4096

Hope all make sense

Br. Frank

Plugin Newkaku error ID channel

For a reception of:
20:03;Newkaku;ID=00d78800;SWITCH=2;CMD=ON;
the string to turn off should be:
10;Newkaku;00d78800;1;OFF;

the channel number which should be 2 is wrong (it disables channel 3!)
for channel 2 I have to put "1" !!!!

Send TriState with Plugin_003.c not working

My doorbell works with tristate protocol. I get data every time someone rings the bell.

Action: push button
Incoming: 20;0F;TriState;ID=0068a6;SWITCH=03;CMD=ON;
Result: the bell is ringing

I include the Plugin_003.c to send (TX) and tried to call from RFLink (serial/serial2net), the command works but nothing happens.
I corrected the code twice. First to compile, then add a fix like in other plugins.

Send: 10;TriState;0068a6;3;ON;
Answer: 20;01;OK;
Result: silence :(

A small piece of code (for example from the plugin)

`
void TriState_Send(unsigned long bitstream)
{
int fpulse = 360; // Pulse width in microseconds
int fretrans = 8; // Number of code retransmissions
uint32_t fdatabit;
uint32_t fdatamask = 0x00000003;
uint32_t fsendbuff=0; // fix: warning: 'fsendbuff' may be used uninitialized in this function

// fixes like cpainchaud 's in other TX plugins
noInterrupts();
Radio::set_Radio_mode(Radio::States::Radio_TX);

// reverse data bits (2 by 2)
for (unsigned short i = 0; i < 12; i++)
{ // reverse data bits (12 times 2 bits = 24 bits in total)
fsendbuff <<= 2;
fsendbuff |= (bitstream & B11);
bitstream >>= 2;
}
bitstream = fsendbuff; // store result

for (int nRepeat = 0; nRepeat <= fretrans; nRepeat++)
{
fsendbuff = bitstream;
// Send command
for (int i = 0; i < 12; i++)
{ // 12 times 2 bits = 24 bits in total
// read data bit
fdatabit = fsendbuff & fdatamask; // Get most right 2 bits
fsendbuff = (fsendbuff >> 2); // Shift right
// data can be 0, 1 or float.
if (fdatabit == 0)
{ // Write 0
digitalWrite(Radio::pins::TX_DATA, HIGH);
delayMicroseconds(fpulse);
digitalWrite(Radio::pins::TX_DATA, LOW);
delayMicroseconds(fpulse * 3);
digitalWrite(Radio::pins::TX_DATA, HIGH);
delayMicroseconds(fpulse);
digitalWrite(Radio::pins::TX_DATA, LOW);
delayMicroseconds(fpulse * 3);
}
else if (fdatabit == 1)
{ // Write 1
digitalWrite(Radio::pins::TX_DATA, HIGH);
delayMicroseconds(fpulse * 3);
digitalWrite(Radio::pins::TX_DATA, LOW);
delayMicroseconds(fpulse * 1);
digitalWrite(Radio::pins::TX_DATA, HIGH);
delayMicroseconds(fpulse * 3);
digitalWrite(Radio::pins::TX_DATA, LOW);
delayMicroseconds(fpulse * 1);
}
else
{ // Write float
digitalWrite(Radio::pins::TX_DATA, HIGH);
delayMicroseconds(fpulse * 1);
digitalWrite(Radio::pins::TX_DATA, LOW);
delayMicroseconds(fpulse * 3);
digitalWrite(Radio::pins::TX_DATA, HIGH);
delayMicroseconds(fpulse * 3);
digitalWrite(Radio::pins::TX_DATA, LOW);
delayMicroseconds(fpulse * 1);
}
}
// Send sync bit
digitalWrite(Radio::pins::TX_DATA, HIGH);
delayMicroseconds(fpulse * 1);
digitalWrite(Radio::pins::TX_DATA, LOW); // and lower the signal
delayMicroseconds(fpulse * 31);
}
// fixes like cpainchaud 's in other TX plugins
Radio::set_Radio_mode(Radio::States::Radio_RX);
interrupts();
}
#endif //PLUGIN_TX_003
`

Where to dig, what else can I try?

CC1101 Not working

I seem to get an error continuously

Now trying to initialize hardware 'CC1101'
Initialized CC1101(freq=433.92Mhz,br=9.600kbps,rxbw=250.0khz)=-104
CC1101 SetOOK(true)=0
CC1101 setPromiscuousMode(true)=0
CC1101 disableSyncWordFiltering(true)=0
Hardware failed to initialize, we will retry later!

I have tried two CC1101 modules both the same, I can however get the CC1101 module to talk to the ESP32 using this project which is using the same SPI interface pins, and I have configured the pins in the web interface.

https://github.com/NorthernMan54/rtl_433_ESP/tree/master

Has anyone managed to get a CC1101 working?

Plugins 048 & 101 for decoding Oregon Scientific Protocols not implemented??

I have several sensors using the Oregon V1 and V2 protocols that are not being recognized even with moving the senors close to the rf433 card. I noticed in the code that the plugins for the Oregon sensors (048 and 0101) are not used.... filename extensions were changed from 'c' to 'old'. I've looked at the code to see if one of the other plugins perform that function but I couldn't figure it out. Any explanation & help are greatly appreciated.

Support for Heltec Lora 433Mhz

Hello

Just received this little board, and I'm trying to make a RFLink bridge out of it.
It"s ESP32 based so obviously I've been able to flash RFLink32 but no packet is received by the 433 radio.
This little device being very cheap, already embeding the RF transceiver, and sporting a LiPo connector, it appears to be a good choice.

@cpainchaud Since you're french, and parisian, if needed, I'd be happy to provide a board for you to add support. My knowledge of embeded programming is way too light for handling this myself as of now.

thanks for the great job

NB: this is the board I use https://www.aliexpress.com/item/33018609928.html

Cheers

PS: Chip seems to be 1278 but when set,

Now trying to initialize hardware 'SX1278
Hardware failed to initialize, we will retry later!

Plugin_048 Not Updated To "New" Format

Curious as to why plugin_048 (for Oregon Scientific sensors, which are quite popular) was never refactored into what I believe is a new plugin format. Is there a technical reason why that's not possible OR has someone has already done it and I'm just not finding it OR has no-one has taken the time to do it. Sorry for such a basic question but I'm still trying to wrap my head around this fork of RFLink and why/how the plug-in format has modified from the original. Posted a similar question on the couin3/RFLink fork but thought I would ask here since this project seems to still be active.

CC2500 Support howto question

Hi,

Great idea to port RFlink from Mega to ESP and inluce MQTT, very much appreciated!

Does your code support CC2500 (RFlink) module?
And if it does, how to wire it?

I look forward to hearing from you
Thank you
Peter.

SSL Cert for MQTT connection

Hello!

Recently used RFLink32.
I have a Sonoff RF Brdige R2 with a direct hack. Everything works without problems (almost).

I want to know: for MQTT it is possible to use SSL, but it is not possible to specify a CA certificate in the WebUI.
In json config (in code) you have a string, and in vue.js you have a switch (type of CA cert).
I thought to fix it, but maybe you did it on purpose?
Tell me, is this just a bug or a specially disabled feature (for example, due to the size of the certificate)?

Sonoff RF Gateway R2 - How to configure

I have a Sonoff RF Gateway R2, which I modified according to the instruction by @schmurtzm.

With his version of RFLink32 the gateway works without problems and produces exactly the data I'm looking for (a Xiron temp sensor).

How do I configure this newer version of RFLink32 so that it does the same (or more)? I've compiled the sonoff_bridge version with PlatformIO and successfully uploaded it. It works, but shows only some switch (probably from another apartment). And while the normal things work, I cannot change the plugins listed on the plugins page (A and C are enabled, and I have no idea how they map to the plugins in the plugins directory).

And thanks for all your work.

Replay packages

Hello guys, I was wondering if there is a way to retransmit or replay packages, we have several sensors in our farm and sometimes specially during the day the package doesnt get to the receiver, I was testing rflink32 and i can always get my sensors detected, I would like to retransmit this again for the receiver.

if there is an example or someone can point me in the right direction I would appreciate :)

Greetings!

Fix for compile issues with arduino IDE and disabled OTA/portal

Hello,

thank you very much for the development. I only needed serial transmission for replacing an arduino uno with a wemos d1 mini (ESP8266).

I had serveral issues with compilation with arduino IDE 1.8.1x

  1. .ino file was not contained in the git
  2. main.cpp was necessary to be removed (otherwise linkage fails)
  3. 13_OTA.h and RFLink.cpp did not have a selection for RFLINK_PORTAL_DISABLED
  4. ARDUINOJSON_USE_LONG_LONG 1 had to be added to RFLink.h to solve compile issue with ArduinoJSON 6.18.5. Compiliation with 6.21.1 fails
  5. some plugins had include paths

attached is a patch with my modifications

Arduino_IDE.patch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.