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

Support new Tasmota MQTT format to detect RfRaw message #187

Closed
wants to merge 1 commit into from

Conversation

jcisio
Copy link

@jcisio jcisio commented Jan 12, 2021

It seems that in recent version of Tasmota, the MQTT message format has been changed to add time data.

Old example:

18:30:23 MQT: /sonoff/bridge/RESULT = {"RfRaw":{"Data":"AA B1 04 0224 03FB 0BF4 1CAC 01101001100101011010100110010101101010010110011023 55"}}

Mine, currently (Tasmota 9.2.0):

21:20:06 MQT: tele/rfbridge/RESULT = {"Time":"2021-01-12T21:20:06","RfRaw":{"Data":"AA B1 04 0140 00E6 051E 0514 381828 55"}}

I don't know since when this change happened, or could it be configured. But we can see it everywhere, e.g. in March 2020 #155

It seems that in recent version of Tasmota, the MQTT message format has been changed to add time data.
@jcisio jcisio changed the title Support new Tasmota rfraw format Support new Tasmota MQTT format to detect RfRaw message Jan 12, 2021
@pfeerick
Copy link

Looks like it's been a while since #142 also seeks to fix this...

@easyservices
Copy link

easyservices commented Feb 3, 2021

Hi there,
here we go...the decoder tool that will make our life easier with the latest Tamosta version (at least it works the 9.x version) in order to automate B0 signal testings :-)
bitbucket-converter-20210203-py3.txt

Have fun. Do not forget to rename it with .py instead of .txt and it works with python3.7+
btw this "hack" works only for tamosta devices as I made a quick and dirty fix that drops the previous ESPHome support...

@jcisio
Copy link
Author

jcisio commented Feb 5, 2021

@easyservices what did you change? Normally with this PR (one line change) it should work already.

@easyservices
Copy link

@easyservices what did you change? Normally with this PR (one line change) it should work already.

1st fix - search pattern was incorrect for tamosta 9.x and >

original line 287 --> if '{"RfRaw":{"Data":"AA B1' in line:
replaced with --> if '"RfRaw":{"Data":"AA B1' in line:

2nd fix - uri was incorrect for tamosta 9.x and >

original line from 72 (I suppose it works for ESPHome firmware but not for tamosta) -->
url = str("http://{}/ax?c2=191&c1=RfRaw%20".format(mydevice))
url += szOutFinal.replace(" ","%20")

replaced with -->
url = str("http://{}/cm?cmnd=Backlog%20RfRaw%20".format(mydevice))
url += szOutFinal.replace(" ","%20")
url += "; RfRaw 0"

Ideal fixes would be to include a new args param to select ESPHome or Tamosta firmware :-)
Cheers

@jcisio
Copy link
Author

jcisio commented Feb 6, 2021

Ok thank you, I didn't use the sendCommand so I didn't notice it. Both these two fixes are included in #142 so I think I'll close this PR.

@jcisio jcisio closed this Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants