Comments (18)
No meu Broadlink ocorre o mesmo problema. Mas ele sempre trabalhou bem, de uns tempo para cรก resolveu parar de funcionar.
from broadlink-http-rest.
@adepablom can you please provide the commands you're using, and maybe some debug output?
from broadlink-http-rest.
I'm having the same issue here. How was this solved?
from broadlink-http-rest.
It never was debugged. If you interested, please provide the commands you're using, maybe some debug prints, validate if your broadlink working correctly with its app and etc...
from broadlink-http-rest.
It works correctly with IR commands. The RF commands are working correctly through the app. What I'm trying to achieve is to switch on a TC-2 1 Gang light switch. What I tried is send the learnCommand and then press the ON button on the app. It times out with No Command learned and the RMPro becomes unresponsive for a few seconds. Please let me know what else should I provide you and how to get it.
Thanks!
from broadlink-http-rest.
Hi @radinsky any news on this?
from broadlink-http-rest.
@thunder2k sorry, somehow I missed your last message.
For me it was working the same, rm2 looks not capable to handle 2 tasks (send and learn/rx and tx) simultaneously, sometimes it works, but usually as you described it stucks for some time.
I can recommend 2 options:
- use external rf remote (there's a lot of cheap like 1$) and learn your tc2 to recognize it, and use broadlink-http-rest to learn the code of the rf remote
- use fake rf code (should be valid, you can generate using https://dimagoltsman.github.io/Random-Broadlink-RM-Code-Generator/ ), put the tc2 in learning mode and send the preconfigured command using broadlink-http-rest.
from broadlink-http-rest.
I'm interested in option 2 so I don't need to get new hardware..it's not clear to me how can I put my TC-2 into learning mode. Have you tried that? Do you have any tutorial? Also, you mentioned that sometimes it works, did you manage to do it? Mabe it's something related to timing..
from broadlink-http-rest.
Try looking here: mjg59/python-broadlink#21
from broadlink-http-rest.
I've checked your the link and got the codes to turn on and off the TC-2 switch. They're working flawlessly with the sendCode.py test script from your link.
Then I copied the working values in the settings.ini like below:
[Commands]
livingOn = <CODE_TO_TURN_ON>
livingOff = <CODE_TO_TURN_OFF>
The command is sent correctly as shown in your api output:
Reading device configuration for BroadlinkRM2
BroadlinkRM2: Read RM2 on <BROADLINK_IP> (<MAC_ADDRESS>)
Starting broadlink-rest server on 0.0.0.0: ...
127.0.0.1 - - [28/May/2019 20:52:55] "GET /sendCommand/livingOn HTTP/1.1" 200 -
Probably timed out..
Sent: livingOn
127.0.0.1 - - [28/May/2019 20:53:11] "GET /sendCommand/livingOn HTTP/1.1" 200 -
Sent: livingOn
Any Ideas? Do I need to encode/decode the obtained codes somehow?
EDIT
I manage to hack it changing your code as follows:
if commandName == "livingOn" or commandName == "livingOff":
device.send_data(commandFromSettings.decode('hex'))
else:
device.send_data(finalCommand)
Needless to say, it's ugly and hardcoded on those 2 commands but at least it works :)
Please let me know how to properly code this to avoid that hack
Thanks!
from broadlink-http-rest.
it should be /sendCommand/livingon
all the commands are case sensitive and on/off should be lower case
See examples here:
https://github.com/radinsky/broadlink-http-rest/blob/master/README.md
from broadlink-http-rest.
Changing the command to all lower case letters in settings.ini didn't help:
http://localhost:8082/sendCommand/livingon
and this is what I got:
127.0.0.1 - - [28/May/2019 23:01:21] "GET /sendCommand/livingon HTTP/1.1" 200 -
('n', 'living')
Sent: livingon
but the lights won't switch on
I think the way getBroadlinkSharedData.py retrieves the codes is different from how you do it in your learnCommand
from broadlink-http-rest.
How does it look in your settings.ini?
Have you tried learnCommand with lower case before sending command?
from broadlink-http-rest.
I've tried to learn the same command name again and it says:
Command livingon alreadyExists and changes are protected!
Failed: No command learned
I've tried to learn another command (teston) but it didn't work (It times out with No Command learned and the RMPro becomes unresponsive for a few seconds)
in my settings.ini, the command I've got from getBroadlinkSharedData.py it's a sequence of 1184 numbers and letters (only e,d,f letters appear in the code).
from broadlink-http-rest.
I suggest you sharing your settings.ini, I think you might missing something or messing with the lowercases.
from broadlink-http-rest.
Here it is (changing actual data for privacy):
[BroadlinkRM2]
IPAddress = <RM2_IP_ADDRESS>
MACAddress = <RM2_MAC_ADDRESS>
Device = <RM2_DEVICE_ID>
Timeout = 10
Type = RM2
[Commands]
1 = <192_ALPHANUMERICAL_CODE_IR>
2 = <192_ALPHANUMERICAL_CODE_IR>
3 = <192_ALPHANUMERICAL_CODE_IR>
4 = <192_ALPHANUMERICAL_CODE_IR>
5 = <192_ALPHANUMERICAL_CODE_IR>
6 = <192_ALPHANUMERICAL_CODE_IR>
7 = <192_ALPHANUMERICAL_CODE_IR>
8 = <192_ALPHANUMERICAL_CODE_IR>
9 = <192_ALPHANUMERICAL_CODE_IR>
0 = <192_ALPHANUMERICAL_CODE_IR>
livingon = <1184_ALPHANUMERICAL_CODE_RF>
livingoff = <1184_ALPHANUMERICAL_CODE_RF>
[Status]
living = 1
from broadlink-http-rest.
looks ok for me.
when you run http://localhost:8082/sendCommand/livingon can you tell if you see the yellow led on rm2 pro blinks? is livingoff also not working?
Can you confirm other commands you're sending (1, 2 ...0) are working correctly?
from broadlink-http-rest.
I need to confirm the blinking led as I'm not home at the moment. I see that it times out as you can see from my previous log (I've also removed your hardcoded text "Probably timed out.."and printed the actual error text and it was indeed timedout).
livingoff is not working as well.
The other commands (1,2,..0) are IR commands and are working perfectly but they were learned via learnCommand.
EDIT:
When running http://localhost:8082/sendCommand/livingon the led DOES NOT blink.
from broadlink-http-rest.
Related Issues (20)
- running issues
- Learn command problem HOT 3
- Unable to send commands HOT 4
- Interested in Advanced Features? HOT 2
- Where is the "learned code" saved? HOT 1
- Could you please provide an example of how to make a simple Macro Command? HOT 2
- 'module' object has no attribute 'SIGUSR1' HOT 2
- On/Off commands not sent HOT 5
- consecutive commands issue HOT 14
- Duraflame?
- RM3 Mini support? HOT 4
- Send TV Channel Number HOT 4
- sendCommand not working after migration HOT 7
- AttributeError: rm instance has no attribute 'key' HOT 2
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 after a new learn HOT 5
- Copy an paste commands differnt devices HOT 3
- Sky Q Black HOT 2
- Is this offical? HOT 1
- NameError: name 'GlobalPassword' is not defined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broadlink-http-rest.