Python and python framework
Moderator: leecollings
plaaggeest
Posts: 6 Joined: Thursday 27 April 2017 20:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by plaaggeest » Thursday 27 April 2017 20:11
deennoo wrote: Just test on debian, Domoticz looks lib at
Code: Select all
/usr/local/lib/python3.4/dist-packages/
this mean you need to install python who is used for domoticz
Code: Select all
sudo apt-get install python3-pip libglib2.0-dev
sudo pip3 install Crypto
sudo pip3 install broadlink
When done, you have to copy lib on the good dir :
Code: Select all
sudo cp -r /usr/local/lib/python3.4/dist-packages/Crypto/ /usr/lib/python3.4/
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
Then restart domoticz en enjoy !
@zak45 maybe you can update your wiki with this thank you for this great plugin !
when did you release the one for Orange Box ? ahrd to transforme to freebox revolution ?
Hi,
Code: Select all
sudo apt-get install python3-pip libglib2.0-dev
sudo pip3 install Crypto
runs without any problems, but when I perform
I receive the following error:
Code: Select all
sudo pip3 install broadlink Downloading/unpacking broadlink
Downloading broadlink-0.4.tar.gz
Running setup.py (path:/tmp/pip-build-8kfdo1wo/broadlink/setup.py) egg_info for package broadlink
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-8kfdo1wo/broadlink/setup.py", line 12
except ImportError, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-8kfdo1wo/broadlink/setup.py", line 12
except ImportError, e:
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-8kfdo1wo/broadlink
Storing debug log for failure in /root/.pip/pip.log
I am a noob and cant tell what the issue is. Some able to help me out?
jlites00
Posts: 22 Joined: Friday 31 March 2017 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by jlites00 » Thursday 27 April 2017 20:30
I receive the following error:
CODE: SELECT ALL
sudo pip3 install broadlink Downloading/unpacking broadlink
Downloading broadlink-0.4.tar.gz
Running setup.py (path:/tmp/pip-build-8kfdo1wo/broadlink/setup.py) egg_info for package broadlink
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-8kfdo1wo/broadlink/setup.py", line 12
except ImportError, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-8kfdo1wo/broadlink/setup.py", line 12
except ImportError, e:
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-8kfdo1wo/broadlink
Storing debug log for failure in /root/.pip/pip.log
I'm having the same problem. I tried installing Python 3.5 . Still the same issue.
deennoo
Posts: 784 Joined: Wednesday 10 December 2014 13:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:
Post
by deennoo » Thursday 27 April 2017 20:36
zak45 wrote: Hi,
there is no way to do that in oneshot for all devices.
On the next release, you should be able to put device off by using Domoticz param:
Capture.JPG
You have to create à pushon button
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
lonwan
Posts: 7 Joined: Thursday 27 April 2017 23:52
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Moscow
Contact:
Post
by lonwan » Thursday 27 April 2017 23:56
plaaggeest wrote:
Hi,
Code: Select all
sudo apt-get install python3-pip libglib2.0-dev
sudo pip3 install Crypto
runs without any problems, but when I perform
I receive the following error:
Code: Select all
sudo pip3 install broadlink Downloading/unpacking broadlink
Downloading broadlink-0.4.tar.gz
Running setup.py (path:/tmp/pip-build-8kfdo1wo/broadlink/setup.py) egg_info for package broadlink
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-8kfdo1wo/broadlink/setup.py", line 12
except ImportError, e:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-8kfdo1wo/broadlink/setup.py", line 12
except ImportError, e:
^
SyntaxError: invalid syntax
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-8kfdo1wo/broadlink
Storing debug log for failure in /root/.pip/pip.log
I am a noob and cant tell what the issue is. Some able to help me out?
I have the same problem!! And I also tried install Python 3.5, the problem did not disappear. I ask for help!
zak45
Posts: 953 Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:
Post
by zak45 » Friday 28 April 2017 0:00
This is not due to python version but to broadlink version. Actual version 0.4 had compatibility problem, hope should be solved soon.
in the meantime, see there:
https://www.domoticz.com/forum/viewtopi ... 4&start=20
lonwan
Posts: 7 Joined: Thursday 27 April 2017 23:52
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Moscow
Contact:
Post
by lonwan » Friday 28 April 2017 7:20
Thanks, i'll try it today
plaaggeest
Posts: 6 Joined: Thursday 27 April 2017 20:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:
Post
by plaaggeest » Friday 28 April 2017 12:57
Alright, got the broadlink installed via above comment. Thank you!
Copied the plugin files to the created folder.
Created the Broadlink Hardware with IP+Mac. But still have python issues:
Code: Select all
2017-04-28 12:52:28.495 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/usr/local/lib/python35.zip:/usr/local/lib/python3.5/:/usr/local/lib/python3.5/plat-linux:/usr/local/lib/python3.5/lib-dynload'.
2017-04-28 12:52:28.495 Error: (Broadlink) Module Import failed, exception: 'ImportError'
2017-04-28 12:52:28.495 Error: (Broadlink) Module Import failed: ' Name: broadlink'
2017-04-28 12:52:40.754 Hardware Monitor: Fetching data (System sensors)
2017-04-28 12:52:46.349 (Nest) Thermostat (Thermostaat)
2017-04-28 12:52:46.350 (Nest) Temp + Humidity (Beneden)
2017-04-28 12:53:10.790 Hardware Monitor: Fetching data (System sensors)
2017-04-28 12:53:16.924 (Nest) Thermostat (Thermostaat)
2017-04-28 12:53:16.926 (Nest) Temp + Humidity (Beneden)
2017-04-28 12:53:21.504 (433 Receiver) Temp + Humidity (Boven)
2017-04-28 12:53:30.239 Error: Broadlink hardware (13) thread seems to have ended unexpectedly
Any ideas what this could be?
zak45
Posts: 953 Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:
Post
by zak45 » Friday 28 April 2017 14:07
plaaggeest wrote:
Alright, got the broadlink installed via above comment. Thank you!
Copied the plugin files to the created folder.
Created the Broadlink Hardware with IP+Mac. But still have python issues:
Code: Select all
2017-04-28 12:52:28.495 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/usr/local/lib/python35.zip:/usr/local/lib/python3.5/:/usr/local/lib/python3.5/plat-linux:/usr/local/lib/python3.5/lib-dynload'.
2017-04-28 12:52:28.495 Error: (Broadlink) Module Import failed, exception: 'ImportError'
2017-04-28 12:52:28.495 Error: (Broadlink) Module Import failed: ' Name: broadlink'
2017-04-28 12:52:40.754 Hardware Monitor: Fetching data (System sensors)
2017-04-28 12:52:46.349 (Nest) Thermostat (Thermostaat)
2017-04-28 12:52:46.350 (Nest) Temp + Humidity (Beneden)
2017-04-28 12:53:10.790 Hardware Monitor: Fetching data (System sensors)
2017-04-28 12:53:16.924 (Nest) Thermostat (Thermostaat)
2017-04-28 12:53:16.926 (Nest) Temp + Humidity (Beneden)
2017-04-28 12:53:21.504 (433 Receiver) Temp + Humidity (Boven)
2017-04-28 12:53:30.239 Error: Broadlink hardware (13) thread seems to have ended unexpectedly
Any ideas what this could be?
maybe this :
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
you need to adapt to your configuration
lonwan
Posts: 7 Joined: Thursday 27 April 2017 23:52
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Moscow
Contact:
Post
by lonwan » Friday 28 April 2017 15:31
zak45 wrote:
maybe this :
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
you need to adapt to your configuration
Made on your last post, installed version 0.3 (Successfully installed broadlink-0.3 pycrypto-2.6.1), but in the directory /usr/local/lib/python3.4/dist-packages/ there is no broadlink folder
As a result, I again have a snag. What am I doing wrong?
zak45
Posts: 953 Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:
Post
by zak45 » Friday 28 April 2017 21:41
lonwan wrote: zak45 wrote:
maybe this :
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
you need to adapt to your configuration
Made on your last post, installed version 0.3 (Successfully installed broadlink-0.3 pycrypto-2.6.1), but in the directory /usr/local/lib/python3.4/dist-packages/ there is no broadlink folder
As a result, I again have a snag. What am I doing wrong?
do you have mixed python version i.e 2.7.x & 3.x ?
lonwan
Posts: 7 Joined: Thursday 27 April 2017 23:52
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Moscow
Contact:
Post
by lonwan » Saturday 29 April 2017 9:16
zak45 wrote:
do you have mixed python version i.e 2.7.x & 3.x ?
yes, 2.7 and 3.4, and I tried to install 3.5.
What can I do to make it work?
zak45
Posts: 953 Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:
Post
by zak45 » Saturday 29 April 2017 10:59
lonwan wrote: zak45 wrote:
do you have mixed python version i.e 2.7.x & 3.x ?
yes, 2.7 and 3.4, and I tried to install 3.5.
What can I do to make it work?
your default python env should be 2.7, this made problem.
you should use pip3 command for each installation.
lonwan
Posts: 7 Joined: Thursday 27 April 2017 23:52
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Moscow
Contact:
Post
by lonwan » Saturday 29 April 2017 12:52
zak45 wrote:
your default python env should be 2.7, this made problem.
you should use pip3 command for each installation.
Spoiler: show I use pip3 command, But the folder "broadlink" appears in the /usr/local/lib/python3.5/site-packages.
I copied the folder "broadlink" in /usr/local/lib/python3.4/dist-packages/broadlink and /usr/lib/python3.4/
And restarted the service:
Code: Select all
sudo systemctl restart domoticz.service
But I still get an error in the log, I'm clearly doing something wrong:
Code: Select all
2017-04-29 13:47:54.340 Error: PluginList: Error 'Error document empty.' at line 0 column 0 in XML ''.
2017-04-29 13:47:56.847 (Broadlink) Stopped.
2017-04-29 13:47:57.047 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-04-29 13:47:57.047 Error: (Broadlink) Module Import failed, exception: 'ImportError'
2017-04-29 13:47:57.047 Error: (Broadlink) Module Import failed: ' Name: Crypto'
and:
Code: Select all
2017-04-29 13:53:00.767 Error: Broadlink hardware (10) thread seems to have ended unexpectedly
P.S.:
I finally realized my mistake. I copied the folder "Crypto" :
Code: Select all
sudo cp -r /usr/local/lib/python3.5/site-packages/Crypto /usr/local/lib/python3.4/dist-packages
sudo cp -r /usr/local/lib/python3.4/dist-packages/Crypto/ /usr/lib/python3.4/
I restarted the service and I had a temperature sensor and a remote in the switches section! Now it works! Thanks a lot for your help,
zak45 .
Just want to say that the team
Gives out:
But the team
Issue a delete request:
Code: Select all
Libpython3.4 libpython3.4-dev python3.4-dev
What does it mean? Do I have python3.4 and python3.5.3 on the same system?
zak45
Posts: 953 Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:
Post
by zak45 » Saturday 29 April 2017 18:11
@lonwan
nice to see it's work
yes, you can have various python version installed on the same system. Could be necessary as some script work only with 2.7.x some other with 3.x etc ...
reza
Posts: 112 Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:
Post
by reza » Saturday 29 April 2017 18:18
hi. i want test it with windows. i run setup.exe but after install dont add broadlink in hardware.
reza
Posts: 112 Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:
Post
by reza » Saturday 29 April 2017 18:21
Untitledjjj.jpg (70.62 KiB) Viewed 3487 times
reza
Posts: 112 Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:
Post
by reza » Saturday 29 April 2017 18:38
also for raspberry i want use stable version. can i use this for stable version ?
zak45
Posts: 953 Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:
Post
by zak45 » Saturday 29 April 2017 18:45
reza wrote: also for raspberry i want use stable version. can i use this for stable version ?
yes , can be used from plugin POV but need beta Domoticz version... worked at home since many weeks without trouble.
And for installation problem please read wiki and forum, lot's of informations has been provided.
reza
Posts: 112 Joined: Tuesday 13 September 2016 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:
Post
by reza » Sunday 30 April 2017 15:51
i want just use stable version 3.5877 (because i did some change in domoticz and i dont want update this). so can you help me for run this on 3.5877 version ?
i need this plugin very
zak45
Posts: 953 Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:
Post
by zak45 » Sunday 30 April 2017 16:19
reza wrote: i want just use stable version 3.5877 (because i did some change in domoticz and i dont want update this). so can you help me for run this on 3.5877 version ?
i need this plugin very
Sorry , this need domoticz v3.7xxx or better.
Users browsing this forum: No registered users and 1 guest