@alex9926 since you messaged me in chat that you didnt understand, here are some screenshots;
IRAll.sh script;
http://imgur.com/a/KDt7e
Pimatic rule;
http://imgur.com/a/muf9x
[PYTHON]How-to integrate (cheap)Broadlink RM3 MINI IR blaster with Pimatic
@alex9926 since you messaged me in chat that you didnt understand, here are some screenshots;
IRAll.sh script;
http://imgur.com/a/KDt7e
Pimatic rule;
http://imgur.com/a/muf9x
First thank you first for your help. I have it actually the same as you but with me it does not work. I have 3 pictures for you, where you can recognize my approach. I would be very grateful if you could take a look at it.
https://drive.google.com/drive/folders/0B_3olXH_m_q_dzZLdkNsRzZySWM?usp=sharing
Thank you
@alex9926 do you have any debug data from pimatic itself? maybe we can see what is going wrong then. could be that you need to route the console output /dev/null 2>&1
here’s the rule WHEN button is pressed THEN execute "sudo python /home/pi/pimatic-app/BlackbeanControl/BlackBeanControl.py -c YOUTBUTTONNAME >/dev/null 2>&1"
another thing i could imagine is to make the folder where the script is located RWX access?
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebook
make it so !
Still not working but i have uploaded a new picture (“debug”) in the drive folder.
i’m a bit irritated from the shell-execute debug line
what if you just redirect to WHEN button is pressed THEN execute "sudo python /home/pi/pimatic-app/BlackbeanControl/BlackBeanControl.py -c YOUTBUTTONNAME >/dev/null
guess this won’t matter at all.
is it neccesary to use the -c argument?
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebook
make it so !
@alex9926 well, ive just seen your screens and your “this works” script path doesnt include /scripts/, however your IRAll.sh does have /home/pi/pimatic-app/scripts/ etc…
Why? Also, there is a capital B in your IRAll.sh script that shouldnt be there.
Please make sure you have the correct paths and letters.
Maybe thats the problem.
If that doesnt fix it, i can take a look through putty if you want. PM me then.
I have good news, it works It was only a very small mistake in my rule.
works: execute “sudo python /home/pi/pimatic-app/BlackbeanControl/BlackBeanControl/BlackBeanControl.py -c Weg”
works not: execute “sudo python /home/pi/pimatic-app/BlackBeanControl/BlackBeanControl/BlackBeanControl.py -c Weg”
Finally, once again, thank you for your support
@alex9926 and the evaluation rule error is gone too?
yes, it is finally gone
Added second rm3 mini tutorial
I thought I was already done but I receive the following error:
sudo python /home/pi/pimatic-app/BlackbeanControl/BlackBeanControl/BlackBeanControl.py -c Weg
Traceback (most recent call last):
File "/home/pi/pimatic-app/BlackbeanControl/BlackBeanControl/BlackBeanControl.py", line 167, in <module>
RM3Device = broadlink.rm((RealIPAddress, RealPort), RealMACAddress)
TypeError: __init__() takes exactly 4 arguments (3 given)*
Sounds like there is an error with the ini.file but I am 100% sure that I edited it correctly. Can anybody help please?
EDIT: @hartmood I have edited your post to mark the command snippet as code. If the normal HTML format is used straight quotes will be replaced with curly quotes and, thus, pasting the snippet to a command shell will cause errors in most cases. Please see the following topic on the matter for future posts. Thanks!
https://forum.pimatic.org/topic/1179/how-to-post-code-snippets-and-alike-on-the-forum
@hartmood please post the config, remove the ip address and mac for safety.
Also, try adding -t 10 to the command.
I am sorry but i cant reproduce this problem so you need to do the testing
Thanks @Gleno0h especially for making it easier to read. I haven’t found an icon to add code snippets. My config is standard:
GNU nano 2.7.4 File: BlackBeanControl.ini
[General]
IPAddress = 192.168.179.xx
Port = 80
MACAddress = 78:0F:77:00:xx:xx
Timeout = 30
[Commands]
I found a thread where someone had the same problem and replaced “Timeout” to “RealTimeout”. That didn’t help me either.
sudo python BlackBeanControl.py -c -t 10 TEST led to the same error message.
@hartmood i have seen your message on github and i also dont understand what he means. Problem is that i cant reproduce it, and debug it. Could you try to reinstall the blackbean app? See if that fixes it. I am still running it and have no problem. Did it work before?
@gleno0h Solved the problem:
sudo nano BlackBeanControl.py
CTRL+_ --> GoToLine 167
Change line 167 to
RM3Device = broadlink.rm((RealIPAddress, RealPort), RealMACAddress, RealTimeout)
Received a command then. Not sure why this is missing in the script and why it works for others.
@hartmood well done, thanks for sharing!
Just adding a note that there are multiple new projects based on this one. One is an API library that has advanced to allow more devices and autodetection. Then there is an http-rest project which allows you to use simple http commands control everything. My fork of this adds a macro programming language. I use ifttt’s webhook module so that I can have Google Assistant phrases execute macros of commands, check variables, etc.