Python Plugin : Broadlink RM2 V4

Python and python framework
zak45
Posts: 481
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Monday 14 May 2018 19:16

henk99 wrote:
Monday 14 May 2018 16:31
I hope this is not a silly question, but I'm uncertain about the Python role in all of this. I have ordered two SP3S units and would like to use them in Domoticz, so I ended up here. I have Domoticz running on a RP. However, the domoticz dashboard is only accessed through windows machines or my phone.

Do I need to install Python on my windows pc to be able to get this to work on my domoticz, or do I need to do something on the RP? I have already checked my domoticz dashboard, but I can't find any Broadlink in 'hardware' yet.

Is it possible that someone explains it to me in 'dummy' terms? It's fine by me if that goes through Private messages ;)
There is no silly question.. only response :-)
This need to be installed in the same place as your Domoticz Server application is, so in your case the RP.
You need to configure all to have python 3.x running first, and all step can be found in wiki and sme tips/help in the forum.

Domoticz use a Web server as main interface, this is why you can access it from Win / Mac / Linux / Android etc ... this is only the client part.

henk99
Posts: 4
Joined: Thursday 02 March 2017 12:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by henk99 » Monday 14 May 2018 22:40

Thank you for the response. Does this mean I have to type in all these commands listed in the wiki?

For others
sudo pip3 install broadlink --> mandatory
sudo pip3 install pyaes --> pycrypto no more mandatory, pyaes will be used instead
download plugin.py [2]
download plugin_send.py [3]
download plugin_http.py [4]
download plugin_http.sh [5]
these files need to be on the plugins/BroadlinkRM2 folder (chmod +x should be necessary ??)
See technical area on what is necessary.
Once all is ok, restart Domoticz

I have not dared to type these commands, because I'm afraid I will ' break' my working RP domoticz setup. I assume if I type 'download plugin.py' that RP knows where it is?

Like I said, isn't there a place that explains it more for people that have little or no knowledge of this? I says these files need to be in a certain folder, but I honestly don't know how to get them there.

zak45
Posts: 481
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Monday 14 May 2018 23:15

henk99 wrote:
Monday 14 May 2018 22:40
Thank you for the response. Does this mean I have to type in all these commands listed in the wiki?
I have not dared to type these commands, because I'm afraid I will ' break' my working RP domoticz setup. I assume if I type 'download plugin.py' that RP knows where it is?

Like I said, isn't there a place that explains it more for people that have little or no knowledge of this? I says these files need to be in a certain folder, but I honestly don't know how to get them there.
And this is only the part that need to be done once you have installed python on your system.... so more work to do before.
This is also on the wiki.. but on what you say.. little bit afraid for you...
If you don't want to break your Pi and you don't know what you do... not do it !!!

henk99
Posts: 4
Joined: Thursday 02 March 2017 12:36
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by henk99 » Tuesday 15 May 2018 9:38

Oh boy :shock:

zak45
Posts: 481
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Wednesday 16 May 2018 18:16

henk99 wrote:
Tuesday 15 May 2018 9:38
Oh boy :shock:
If you find someone To help you for your python i will help you after for the plugin

Salammbo
Posts: 3
Joined: Saturday 19 May 2018 10:22
Target OS: Raspberry Pi
Domoticz version:
Contact:

PI3 image with a pre-installed Domiticz including the Broadlink plugin

Post by Salammbo » Saturday 19 May 2018 10:33

Hi all,
Can someone please help me get back to a normal life by sharing a PI3 image with a pre-installed Domiticz including the Broadlink plugin?

I have tried everything in this forum a beyond during 4 days but I did not manage to make it work :( .

Your help will be much appreciated, very very much.

Thank you

User avatar
Phantom
Posts: 82
Joined: Saturday 31 December 2016 15:47
Target OS: Raspberry Pi
Domoticz version: 3.8922
Location: The Netherlands
Contact:

Re: PI3 image with a pre-installed Domiticz including the Broadlink plugin

Post by Phantom » Saturday 19 May 2018 11:50

Salammbo wrote:
Saturday 19 May 2018 10:33
Hi all,
Can someone please help me get back to a normal life by sharing a PI3 image with a pre-installed Domiticz including the Broadlink plugin?

I have tried everything in this forum a beyond during 4 days but I did not manage to make it work :( .

Your help will be much appreciated, very very much.

Thank you
Hey Salammbo, i had a lot of trouble also with getting the pluing to work with debian stretch, domoticz cept crashing as soon as i enabled the pluing.
Now i am using ubuntu and running domoticz compiled from source and it working perfectly again:
https://wiki.ubuntu.com/ARM/RaspberryPi
then under: Unofficial images
Raspberry Pi 3: ubuntu-18.04-preinstalled-server-armhf+raspi3.img.xz (4G image, 296M compressed) Updated 2018-04-28 (18.04 LTS)

Salammbo
Posts: 3
Joined: Saturday 19 May 2018 10:22
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Salammbo » Saturday 19 May 2018 13:44

Thank you Phantom. I will give it a trial.

Lasermi
Posts: 9
Joined: Thursday 02 June 2016 22:08
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Lasermi » Friday 25 May 2018 9:17

Hello all,

I'm quite stuck with the plugin. Let me see if I can summarize all the testing I have already done...

1.- I currently use Domoticz 3.9483 on Raspbian Stretch (upgraded from Jessie). I have Python 3.5.3 installed.
2.- I installed the plugin following the wiki. I noticed I got the Broadlink 0.9 library.
3.- Manually triggering a Discovery in Python works, although I needed to increase the timeout. With a 5, it wouldn't find the device.
3.- I can add the Discovery device in Domoticz HW but then it immediately crashes. Trying to restart manually domoticz shows a segmentation fault just after starting the Discovery process and initiating Openzwave.
4.- Listing Python modules provides:

Code: Select all

pi@raspberrypi:~ $ sudo pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
broadlink (0.9)
cryptography (1.7.1)
gpiozero (1.4.1)
idna (2.2)
keyring (10.1)
keyrings.alt (1.3)
mcpi (0.1.1)
numpy (1.12.1)
pgzero (1.2)
picamera (1.13)
pifacecommon (4.2.1)
pifacedigitalio (3.1.0)
Pillow (4.0.0)
pip (9.0.1)
pyaes (1.6.1)
pyasn1 (0.1.9)
PyBluez (0.22)
PyCRC (1.21)
pycrypto (2.6.1)
pygame (1.9.3)
pygobject (3.22.0)
pyserial (3.2.1)
pyxdg (0.25)
RPi.GPIO (0.6.3)
RTIMULib (7.2.1)
SecretStorage (2.3.1)
sense-hat (2.2.0)
setuptools (33.1.1)
six (1.10.0)
spidev (3.3)
wheel (0.29.0)
5.- I noticed I have Pycrypto installed. When I try to uninstall it, I get

Code: Select all

sudo pip3 uninstall pycrypto
Not uninstalling pycrypto at /usr/lib/python3/dist-packages, outside environment /usr
I could not find how to uninstall it with apt-get. I guess the trick is here but googling around didn't give me many clues. I did successfully uninstall pycryptodome but that dind't provide any improvement.
6.- Removing the plugin files or renaming them will allow Domoticz to run perfectly, but of course without broadlink plugin.

Can anybody provide any idea?
Thanks in advance!!
Lasermi

zak45
Posts: 481
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 » Friday 25 May 2018 18:07

Lasermi wrote:
Friday 25 May 2018 9:17
Hello all,

I'm quite stuck with the plugin. Let me see if I can summarize all the testing I have already done...

1.- I currently use Domoticz 3.9483 on Raspbian Stretch (upgraded from Jessie). I have Python 3.5.3 installed.
I could not find how to uninstall it with apt-get. I guess the trick is here but googling around didn't give me many clues. I did successfully uninstall pycryptodome but that dind't provide any improvement.
6.- Removing the plugin files or renaming them will allow Domoticz to run perfectly, but of course without broadlink plugin.

Can anybody provide any idea?
Thanks in advance!!
Lasermi
maybe something like that :
sudo apt-get remove python-crypto

Lasermi
Posts: 9
Joined: Thursday 02 June 2016 22:08
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Lasermi » Friday 25 May 2018 19:12

Hi Zak45, and thank you.

Finally, I executed:

Code: Select all

 sudo apt-get remove python3-crypto 
I also ran

Code: Select all

sudo apt-get remove python3-cryptography 
Just in case, but no joy. I still get the same fault:

Code: Select all

pi@raspberrypi:~/domoticz $ sudo ./domoticz
2018-05-25 19:10:51.595  Domoticz V3.9483 (c)2012-2018 GizMoCuz
2018-05-25 19:10:51.595  Build Hash: a74f7c4a, Date: 2018-05-24 11:42:36
2018-05-25 19:10:51.595  Startup Path: /home/pi/domoticz/
2018-05-25 19:10:51.622  Sunrise: 06:40:00 SunSet: 21:17:00
2018-05-25 19:10:51.622  Day length: 14:37:00 Sun at south: 13:05:00
2018-05-25 19:10:51.622  Civil twilight start: 06:08:00 Civil twilight end: 21:48:00
2018-05-25 19:10:51.622  Nautical twilight start: 05:30:00 Nautical twilight end: 22:27:00
2018-05-25 19:10:51.622  Astronomical twilight start: 04:46:00 Astronomical twilight end: 23:11:00
2018-05-25 19:10:51.622  EventSystem: reset all events...
2018-05-25 19:10:51.710  PluginSystem: Started, Python version '3.5.3'.
2018-05-25 19:10:51.719  Active notification Subsystems: http, kodi (2/14)
2018-05-25 19:10:51.721  WebServer(HTTP) started on address: :: with port 8080
2018-05-25 19:10:51.726  WebServer(SSL) started on address: :: with port 443
2018-05-25 19:10:51.728  Proxymanager started.
2018-05-25 19:10:51.729  Camera: settings (re)loaded
2018-05-25 19:10:51.729  Accepting shared server connections via MyDomotiz (see settings menu).
2018-05-25 19:10:51.808  Starting shared server on: :::6144
2018-05-25 19:10:51.808  TCPServer: shared server started...
2018-05-25 19:10:51.809  RxQueue: queue worker started...
2018-05-25 19:10:53.309  PROXY: Authenticate result: success.
2018-05-25 19:10:53.809  Hardware Monitor: Started
2018-05-25 19:10:53.827  Wunderground: Worker started...
2018-05-25 19:10:53.828  (Broadlink_Discover) Started.
2018-05-25 19:10:53.829  EventSystem: reset all events...
2018-05-25 19:10:53.830  EventSystem: reset all device statuses...
2018-05-25 19:10:53.840  Nest: Worker started...
2018-05-25 19:10:54.124  PluginSystem: Entering work loop.
2018-05-25 19:10:54.327  OpenZWave: using config in: /home/pi/domoticz/Config/
2018-05-25 19:10:54.329 Always, OpenZwave Version 1.4.2888 Starting Up
2018-05-25 19:10:54.330  OpenZWave: Starting...
2018-05-25 19:10:54.330  OpenZWave: Version: 1.4-2888-g54682370-dirty
Violación de segmento
That is... segment violation. Any ideas?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests