Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not really learning Codes Sonoff rf bridge #287

Closed
xoseperez opened this issue Nov 25, 2017 · 30 comments
Closed

Not really learning Codes Sonoff rf bridge #287

xoseperez opened this issue Nov 25, 2017 · 30 comments

Comments

@xoseperez
Copy link
Owner

Originally reported by: tscheerio (Bitbucket: C1nds, GitHub: Unknown)


So i installed espurna 1.9.9 changed the Password wifi address and mqtt.

Then i tried to learn some RF codes, but this is pretty difficult to figure out.
When i press on the learn button nothing happens, i first have to enter manually some stuff click on "save" then click on "save" on the platform itself then "forget" and "save" (on the platform) and then the bridge is beeping once to learn a code. This works so far for Button1.

On Button2 the Bridge is still beeping once to learn and twice to confirm the learning, but theres no code written in there. The code is not invisible or something its just not learned.
I can check this with my remote and to Buttons on the Status Page.
I restarted and reset the Rf bridge several times, but still no new codes are learned.

Sometimes the Bridge is not beeping in the beginning when i press learn instead it is beeping two times when press the send button on my remote.

I dont know what but i think theres something wrong, or do i the mistake?

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


Well acutally i need to press some buttons and save it to get to the learning mode, but i just could learn on button1 something the rest of the buttons wont learn something.
I tried if my sockets react to the buttons in the interface, but nothing

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


The Bridge is still beeping two times when i press on my remote, its like the bridge is not coming out of learning mode

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


Ok i found the problem elsewhere, the rfbridge has a new layout and causes the problem.
I installed tasmota and it is the exactly same problem described in this post.
arendst/Tasmota#1181

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


Hello,

same issue . RFbridge is new.
Flashed it and could not get it into learn mode.

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


I just played around with tasmota and im also just able to learn one code in tasmota, thats it.
I also tried to enter the code manually because the console in tasmota shows the code in there but no success to go further.
Its looking like that:
backlog rfsync 10090; rflow 350; rfhigh 950; rfcode #551; rfkey1 4

Something happend there so its totally incompatible.
But the one code i could learn works flawlessly ;)

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


with tasmota i can learn 1 code with espurna i could not get into learn mode.

when i click learn nothing happens...

flashed with latest version..

as i said board is new ( gold antenna)

u

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


Also have the one with the gold antenna.

You wont get further with espurna than one code and i think it was just an accident that this was saved ...
Dont really know what to do now tried everything

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


ok then the code needs to be rebuild for this version..

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


Yes i think so.
Can u learn more than one code manually with tasmota?

backlog rfsync 10090; rflow 350; rfhigh 950; rfcode #551; rfkey1 4

Just enter the parameters shown in the console and try it

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


i will reflash with tasmota...

what do you want that i try?

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


You see the codes that you send in the console of tasmota and you can manually configure the buttons.
So can you set the different codes you send to different buttons?

backlog rfsync 10090; rflow 350; rfhigh 950; rfcode #551; rfkey1 4 for example

this is the configuration for button 1, you need to change rfkey2 4 for the next

@xoseperez
Copy link
Owner Author

Original comment by mountaindude (Bitbucket: mountaindude, GitHub: mountaindude):


Just to confirm this is an issue, I am seeing the same issue here, with just received Itead bridge.
Will see if I can take a look at it.

@xoseperez
Copy link
Owner Author

Original comment by mountaindude (Bitbucket: mountaindude, GitHub: mountaindude):


I still cannot get the Espurna firmware to get into learning mode, but I did find a workaround:

  1. Make sure your bridge is connected to your local wifi
  2. Configure MQTT in Espurna. You obviously need a MQTT broker somewhere in your local network too.. can be on your local computer or on a server - doesn't matter.
  3. Set up a MQTT monitor (MQTT.fx works well on Mac, for example). Subscribe to topic /#. For me this is ESPURNA_8E7BC2/#
  4. Turn for example an RF controlled outlet on, using the remote that came with the outlet. Or use a small RF remote (like the ones sold by ITEAD).
  5. Espurna will recognize the incoming RF code and output it to MQTT, and then picked up by the MQTT monitor set up in step 3.

I have confirmed the above with a few different RF outlets and remotes, works flawlessly so far.

I have not been able to capture incoming transmissions from RF temperature sensors though, which was the main reason for getting an ITEAD bridge...
I want to forward those sensor readings to MQTT, for further storing and processing in Influx, Grafana etc.

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


Hello,

i tested this workaround and it works.

Manually added codes -saved and put idx from domoticz...

I will now test more devices- only one added so far.

U

@xoseperez
Copy link
Owner Author

Original comment by mountaindude (Bitbucket: mountaindude, GitHub: mountaindude):


Looks like the workaround works for some RF, but not others.
For example, when I turn a NEXA PBR-2300 on and off repeatedly, it is not picked up by Espurna running on the Itead bridge. Probably using some protocol that the receiver chip in the bridge doesn't understand..

--- Edit ---
A quick, non-exhaustive analysis indicate that RF codes sent to so called "self learning" outlets (the more modern 433 MHz outlets, typically) are not recognised by Espurna/Itead bridge.
Could be that those outlets need to be re-paired with their remotes for Espurna to pick them up.. maybe.

Either way - it is a pretty cumbersome process to manually dig up the codes for all outlets (if you have many outlets, at least), so I would argue that fixing the Espurna code is also a priority.

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


Hello, i also tested more devices.
I managed to read all codes with MQTT.fx but Espurna did not recognize it.

Only 1 switch working so far..

U

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


outlets are working - code picked up with remote.
door sensor code read but not recognized with espurna

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


@mountaindude
I followed your workaroundand installed Mqtt.fx and connected the bridge i subscribed to "name"/# so i see two different things, the "status" and the "data" of the bridge.
But in the "data" option nothing is changing and what exactly is the rf code? I get a message like this

{"app":"ESPURNA","version":"1.10.0","host":"bridge","ip":"192.168.178.51","mac":"60:01:94:8F:34:B6","rssi":"-76","uptime":"300","freeheap":"24136","relay/0":"0","relay/1":"0","relay/2":"0","relay/3":"0","relay/4":"0","relay/5":"0","vcc":"3190","time":"2017-11-28 03:47:00"}

@xoseperez
Copy link
Owner Author

Original comment by mountaindude (Bitbucket: mountaindude, GitHub: mountaindude):


@tscheerio That looks like a reasonable status message.
The status messages are sent automatically with some frequency (every 5 min by default?), and contain general status data (duh..) about the bridge. Things like its IP, what version of the software it is running, status of the switches etc.

When you then press a button on an RF remote control, the bridge's hardware will (hopefully!) pick it up and forward it to the Espurna firmware, which will in turn send it out over MQTT.
The "rf code" is simply the data sent by the RF remote, encoded as hex.

Interestingly enough, multiple presses on the same button result in slightly different rf codes. But that's only expected I guess, those RF remotes are pretty cheap and the timing of the signals they generate will vary a bit over time, resulting in slightly different rf codes.

The problem is that the bridge/Espurna only recognise (as far as I can tell) some 433MHz remotes, namely the ones with fixed, pre-set codes. I have had zero success with so called "self learning" outlets and remotes.
It's a pity, as they are nicely supported by e.g. TellstickNet, which I was hoping to replace with the much cheaper Itead bridges.

Finally, it turned out that several different PIR sensors work just fine with Espurna. Not really surprising, as the common denominator of them is the use of PT2660 (I think that's the name of the encoder chip used in many of the simpler rf remote products).

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


I dont get any rfcode when i press a button on my remote.
The funny thing is, that mqtt.fx is showing me something with Espurna like in my example above (app":"ESPURNA","version":"1.10.0)
but i have flashed tasmota on it, which is fully working.
I think there cant be a solution without without a recode of the software

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


I tested also with tasmota- i managed to learn all devices .. 5...

On web UI i can switch on/off all outlets and i recieve RF code with water and door/window sensors- so i can confirm that learning in tasmota is working..

I dont know how to use it with domoticz- espurna is much more simple with IDX for each RF device...

I would like to test that also.. Any idea ?

U

@xoseperez
Copy link
Owner Author

There was a stupid typo in the key sent from the web UI to the firmware to start learning mode... it's fixed in dev if someone wants to test it.

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


Firmware name
ESPURNA
Firmware version
1.10.1b
Firmware build
2017-12-02 08:15:01

Could not save settings- DOMOTICZ ON- not saved
Could not get it into learn mode-not working

i reflashed again- managed to store 1 RF code- but when toggeling on/off it is not working- red light did not flash that command to rf is executed
U

@xoseperez
Copy link
Owner Author

Original comment by tscheerio (Bitbucket: C1nds, GitHub: Unknown):


Tasmota is NOT decoding the remote control codes but a seperate chip inside the bridge is doing this and if it cannot decode the code it just fails to send the valid learn status to Tasmota.
I think thats the problem

@xoseperez
Copy link
Owner Author

Original comment by Nuno Sousa (Bitbucket: nunofgs, GitHub: nunofgs):


I also have the newer version of the RF bridge and just flashed the dev branch (1.10.1b).

Clicking "learn" does nothing (no buzzer, no response when clicking my 433Mhz remote, nothing).

Any ideas?

@xoseperez
Copy link
Owner Author

Anything in the debug log that would help us find why it is not working? I have an engineering sample of the RFBridge and it works great, it could not have changed much....

@xoseperez
Copy link
Owner Author

Original comment by skorc99 (Bitbucket: skorc99, GitHub: skorc99):


I tested again:

when RFbridge is in AP mode i managed to learn codes, switches are working

When i add network and bridge is connected to local network - it is not working.

Can someone test...

Very strange...

i telnet to device but no output when i press LEARN ,or FORGET...

edit2:
device is working till mqtt is enabled. after i enabled mqtt it has stop sending codes... i could not turn off mqtt -i reflashed and tested again with mqtt disabled- on/off sending codes is working and after i enabled mqtt again same issue...

@xoseperez
Copy link
Owner Author

Moved it to 1.10.2 to release 1.10.1. I'm waiting for a new RFBridge to arrive so I can test it.

@xoseperez
Copy link
Owner Author

Duplicate of #344.

@xoseperez
Copy link
Owner Author

Removing milestone: 1.11.0 (automated comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant