Python Plugin: Broadlink RM2

Python and python framework

Moderator: leecollings

User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Python Plugin: Broadlink RM2

Post by StanHD »

Hi @zak45,

I have just updated to Domoticz V3.7614 running as a service under Windows 7.

The Broadlink hardware is gone and the log shows no mention of python or Broadlink.

Could you advise if there is something I need to do?
(for the moment I have reverted to V3.7377 and all is working again)

Thanks for any help.

Stan
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2

Post by zak45 »

Hi,
nothing on your side.
there has been a major update on Python framework since rel; 7602.
this need to completely rewrite connection part of the plugins.
Should be on v3... when found some time.
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Python Plugin: Broadlink RM2

Post by StanHD »

zak45 wrote:Hi,
nothing on your side.
there has been a major update on Python framework since rel; 7602.
this need to completely rewrite connection part of the plugins.
Should be on v3... when found some time.
Thanks for your fast reply, no worries, I can happily stay with the current version until you are ready ;)

Stan
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Broadlink RM2

Post by kniazio »

My Broadlink also stopped working.
User avatar
Phantom
Posts: 87
Joined: Saturday 31 December 2016 14:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11652
Location: The Netherlands
Contact:

Re: Python Plugin: Broadlink RM2

Post by Phantom »

a post i found from one of the devs in an other topic about the python issue's:
https://www.domoticz.com/forum/viewtopi ... 40#p137203
Once the Python Framework makes it into the stable release then we will take much more care on not breaking things, at the moment it is still in beta which is why we are still making changes (that is what the beta channel is for).

The current issues were triggered by extending Python usage to allow event scripts to also be written in Python (enhancing the existing Blockly & Lua scripting). This a great thing for Domoticz and we wanted to get it in before the next stable version was released.

As soon as we work out why Python is no longer being built into betas the plugins will work again.
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Broadlink RM2

Post by kniazio »

After updating to 3.7686 everything went back to normal.
Thanks a lot
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Broadlink RM2

Post by kniazio »

But something is not right.
Domoticz stopped working.
I renamed the python.py file to python.py_old. Domoticz works then correctly
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Broadlink RM2

Post by kniazio »

I changed the file name back to plugin.py. I restarted Domoticz. Domoticz and the broadlink plugin works. I do not know how long?
P.S. Several of my switches do not work.

Is there a chance that this will be corrected?
Last edited by kniazio on Thursday 08 June 2017 14:42, edited 1 time in total.
TigroEHOT
Posts: 14
Joined: Wednesday 03 August 2016 12:14
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Python Plugin: Broadlink RM2

Post by TigroEHOT »

Hello everybody!
It is a really great job!
But I need help :)

I have installed python 3.5.2
I have installed the plugin
I've got

Code: Select all

2017-06-08 22:16:38.682 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/usr/lib/python35.zip:/usr/lib/python3.5/:/usr/lib/python3.5/plat-linux:/usr/lib/python3.5/lib-dynload'.
2017-06-08 22:16:38.682 Error: (Broadlink RM2) Module Import failed, exception: 'ImportError'
It says that plugin system succesfully started. Python 3.5.2.

When I try to run python3 ./plugin.py it says

Code: Select all

Traceback (most recent call last):
  File "./plugin.py", line 44, in <module>
    import Domoticz
ImportError: No module named 'Domoticz'
Where should I look?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2

Post by zak45 »

TigroEHOT wrote:Hello everybody!

Code: Select all

2017-06-08 22:16:38.682 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/usr/lib/python35.zip:/usr/lib/python3.5/:/usr/lib/python3.5/plat-linux:/usr/lib/python3.5/lib-dynload'.
2017-06-08 22:16:38.682 Error: (Broadlink RM2) Module Import failed, exception: 'ImportError'

Code: Select all

Traceback (most recent call last):
  File "./plugin.py", line 44, in <module>
    import Domoticz
ImportError: No module named 'Domoticz'
Hi,
- your default python should be 2.7. You need to copy some files manually, this is explained on the forum / wiki.

- no way to execute the plugin.py file. Need to be executed from Domoticz.
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Broadlink RM2

Post by kniazio »

Is there a chance to fix the plugin?
vonzeng
Posts: 2
Joined: Sunday 14 May 2017 16:21
Target OS: OS X
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2

Post by vonzeng »

2017-06-11 21:16:04.165 User: Admin initiated a switch command (109/Broadlink RM Pro - Import/Set Level)
2017-06-11 21:16:04.170 (Broadlink RM Pro) Calling message handler 'onCommand'.
2017-06-11 21:16:04.170 (Broadlink RM Pro) onCommand called for Unit 255: Parameter 'Set Level', Level: 20 , Connected : True
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) 'onCommand' failed 'UnboundLocalError':'local variable 'numName' referenced before assignment'.
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) ----> Line 179 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) ----> Line 609 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function createIniImport

help me
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2

Post by zak45 »

vonzeng wrote:2017-06-11 21:16:04.165 User: Admin initiated a switch command (109/Broadlink RM Pro - Import/Set Level)
2017-06-11 21:16:04.170 (Broadlink RM Pro) Calling message handler 'onCommand'.
2017-06-11 21:16:04.170 (Broadlink RM Pro) onCommand called for Unit 255: Parameter 'Set Level', Level: 20 , Connected : True
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) 'onCommand' failed 'UnboundLocalError':'local variable 'numName' referenced before assignment'.
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) ----> Line 179 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) ----> Line 609 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function createIniImport

help me
Provide your three Json files.. will check.
oslalo
Posts: 3
Joined: Tuesday 13 June 2017 19:21
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Python Plugin: Broadlink RM2

Post by oslalo »

Hello,
I’m Oslalo, thank you in advanced for your help.

I try to configurate the Broadlink plugin but I don’t find the solution.
I installed Python 2.7, 3.4 and 3.5 and I have in three Python path the Crypto und Broadlink

/usr/local/lib/python2.7/dist-packages/Crypto/
/usr/lib/python2.7/Crypto/

/usr/local/lib/python3.4/dist-packages/Crypto/
/usr/lib/python3.4/Crypto/

/usr/local/lib/python3.5/dist-packages/Crypto/
/usr/lib/python3.5/Crypto/

When I uddate to the Beta versión this not go, the messages is “Domoticz Offline”, but when I ./updaterelease the domoticz go.

Someone could help me to advanced ¿?

By the way, In my Domoticz/plugins/BroadlinkRM2/ I don’t have any file .ini (ex. BroadlinkRM2-24-4.ini),
Do I need to create this file ¿?

Thank you
kingoifsnake74
Posts: 14
Joined: Saturday 06 May 2017 11:41
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2

Post by kingoifsnake74 »

Oslalo, the latest beta versions have a compatibility issue with the broadlink program. seems to be fixed in the latest beta , still buggy though, but i updated few days ago and domo went offline again having broadlink plugins in the directory. Think we will have to wait for the rm2 v3 version. Unless someone else has a solution? Read about sqlite3 database update but don't think it will fix this issue. Rollback to previous beta is an option, but i can t find them to download. Gl
Andree
Posts: 74
Joined: Wednesday 07 June 2017 11:19
Target OS: Windows
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2

Post by Andree »

There is a way to install on Windows?
.exe in Dropbox doesn't work.Im on Beta 3.7991.
THX
dutchdevil83
Posts: 130
Joined: Monday 31 October 2016 19:34
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Netherlands
Contact:

Re: Python Plugin: Broadlink RM2

Post by dutchdevil83 »

Hi maybe this is already answered but couldn`t find it in the forum. Will the updated 2017 version (RM3) also work with this plugin? Does anybody have a link to this device where to buy best? I guess best way to buy is at Aliexpress?
Hardware
1x Raspberry Pi
1x Razberry Z-Wave
1x RFXtrx433E
1x Toon
1x GoodWe Solarpanels
2x FGSD-002 Smoke Detector
1x FGBS-001 Binaire Sensor (RFID lezer)
7x FGMS-001 Motion Sensor
3x ZW089 Verzonken Deursensor
7x NC Wallplug
&lots of KaKu stuff
ToneStrife
Posts: 20
Joined: Sunday 16 April 2017 17:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2

Post by ToneStrife »

Hi everyone,

I have installed domoticz from the beginning but the problem is that the RM2 Command element that appears in the wiki is lost.

Any help?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin: Broadlink RM2

Post by zak45 »

oslalo
Posts: 3
Joined: Tuesday 13 June 2017 19:21
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Python Plugin: Broadlink RM2

Post by oslalo »

Thank you kingoifsnake74 for you answerd.

It mean that nobody can use the Broadlink with Domoticz in this moment ???
Post Reply

Who is online

Users browsing this forum: rini52 and 1 guest