Search found 27 matches

by Samael
Monday 30 December 2019 22:00
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

There is no any passwords and can not be. Source code is open. I assume this is related to the work environment. Currently I use Python 3.6.8. C:\Python>pip3 list miio Package Version --------------------- ---------- android-backup 0.2.0 appdirs 1.4.3 asn1crypto 0.24.0 attrs 18.2.0 certifi 2018.11 ...
by Samael
Sunday 22 December 2019 22:07
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

At the moment I am using a development version of the plugin with a beta version of domoticz, since it does not use the launch of an additional script to execute commands. I hope the release of stable version of domoticz will be soon..
by Samael
Saturday 07 December 2019 13:43
Forum: Switches and Scenes
Topic: Yeelight - control from LUA
Replies: 6
Views: 1687

Re: Yeelight - control from LUA

I faced with the same problem. This happened after some IP reconfiguration, so Yeelight devices in Domoticz got a new ID numbers. I deleted script and created a new one - only after that Domoticz began use a new ID of the lamp (changing the script did nothing).
by Samael
Monday 11 March 2019 17:29
Forum: Python
Topic: Need to hash password
Replies: 6
Views: 1153

Re: Need to hash password

AFAIK, plugin settings fields are read only. So, you have two variants of solution: 1. Ask users to enter password hash directly in plug-in settings. You can provide a helpful link to http://www.fileformat.info/tool/hash.htm 2. In your plugin calculate hash in onStart handler and use this value ...
by Samael
Sunday 10 March 2019 17:20
Forum: Python
Topic: Default python script does not work
Replies: 2
Views: 2622

Re: Default python script does not work

I modified default script as import DomoticzEvents as DE import domoticz import random print ("This will only show up in the shell where you start domoticz"); domoticz.log("Hi Domoticz!") domoticz.log("The device that got changed is: ", DE.changed_device_name) # changed_device.name is the same ...
by Samael
Sunday 10 March 2019 14:51
Forum: Python
Topic: Logging to domoticz log from Python script.
Replies: 2
Views: 1414

Re: Logging to domoticz log from Python script.

You can not run script that use Domoticz outside of Domoticz.
Press Settings -> Advanced -> Events. Choose Python, name it, edit it and test.

https://www.domoticz.com/wiki/Scripts#Python_scripts
by Samael
Sunday 10 March 2019 12:23
Forum: Blockly
Topic: Blockly examples
Replies: 709
Views: 424303

Re: Blockly examples

Is it possible to insert in notification message some kind of line break?

My message for telegram:

Code: Select all

Temperature:{{temperaturedevice[51]}} °C      Humidity:  {{humiditydevice[51]}} %      Pressure: {{barometerdevice[51]}} hPA      Balcony: {{temperaturedevice[41]}} °C
by Samael
Tuesday 05 March 2019 23:56
Forum: Temperature and Weather
Topic: Weather underground closing API
Replies: 8
Views: 3381

Re: Weather underground closing API

It is over. https://apicommunity.wunderground.com/weatherapi/topics/end-of-feb-wu-api-update My API key was disabled manually by WU team. :( 2019-03-05 22:08:31.706 Error: WUnderground: Error: this key is not valid due to exceeding rate plan 2019-03-05 22:18:35.259 Error: WUnderground: Error: this ...
by Samael
Sunday 03 March 2019 22:05
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

mgabor wrote: Sunday 03 March 2019 14:44 Yes, I have installed. I have used the Bulb, but the token has changed, since I have to add again the hardver
Hmm. You can change the token on Hardware tab and simply press update. No need to remove and add.
by Samael
Sunday 03 March 2019 22:03
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

If someone switched to the development branch of Domoticz, then I recommend to pick up the plugin from the dev branch:
https://github.com/deennoo/domoticz-Xia ... p/tree/dev

This version is faster.
by Samael
Sunday 03 March 2019 21:57
Forum: Python
Topic: Debugging a Python plugin
Replies: 7
Views: 2498

Re: Debugging a Python plugin

Wow!

I tested on dev branch and now miio package fully works without problems. I placed import inside onStart and plugin works flawless. No hangs, no any threads in onStop.

Thanks!
by Samael
Sunday 03 March 2019 13:08
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

the answer: Traceback (most recent call last): File "MyBulb.py", line 11, in <module> import miio.philips_bulb ImportError: No module named miio.philips_bulb Did you install python-miio library? Please read this guide https://python-miio.readthedocs.io/en/latest/discovery.html
by Samael
Saturday 02 March 2019 14:54
Forum: Python
Topic: Debugging a Python plugin
Replies: 7
Views: 2498

Re: Debugging a Python plugin

@Dnpwwo, During dubugging a phyton plugin I found that it was very hard to diagnose 'import' related problems in embedded phyton.. You can add to any plugin.py (BaseTemplate.py, for ex.) import sys import site path='' path=site.getsitepackages() for i in path: sys.path.append(i) import miio.philips ...
by Samael
Saturday 02 March 2019 10:50
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

mgabor wrote: Saturday 02 March 2019 8:03 Dear,
I have found that the token has changed, so the bulb did not work.
First of all, you have to test a new token with MyBulb.py. Run command with lamp IP and it's token

Code: Select all

MyBulb.py 192.168.10.102 89bedfa9123841a44030fd4ae2a0db09 status
What does it say?
by Samael
Friday 01 March 2019 17:23
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

salvacalatayud wrote: Friday 01 March 2019 16:52 Please commit your changes or stash them before you merge.
This means that you have made some changes to the file. Do the next commands inside 'domoticz-Xiaomi-Led-Lamp':

Code: Select all

git reset

Code: Select all

git checkout .
ps: https://stackoverflow.com/questions/140 ... ed-changes
by Samael
Wednesday 06 February 2019 13:12
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

Yes, I think it should work.
To organize the group of lights you better read the manual (http://www.domoticz.com/DomoticzManual.pdf) and https://www.domoticz.com/forum/viewtopic.php?t=14903.
by Samael
Monday 04 February 2019 15:14
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

mgabor wrote: Sunday 03 February 2019 15:51 Hi,
I have tried. Same problem, "MyBulb.py: error: the following arguments are required: IPaddress, token"
Please update plugin from git. It should work now.
by Samael
Monday 04 February 2019 0:12
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

You can update plugin now.
And don't forget to change the file permissions.
sudo chmod +x MyBulb.py
sudo chmod +x plugin.py
by Samael
Sunday 03 February 2019 22:41
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

People, I see that there are some problems with running under Linux. I will conduct some experiments and make the necessary edits. Please be patient. :(
by Samael
Sunday 03 February 2019 22:18
Forum: Python
Topic: Python Plugin : Xiaomi Philips LED Ball Lamp
Replies: 54
Views: 15931

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

You have to install a python-miio lib.
sudo pip3 install python-miio

It is installed as site package into the Python.