Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working for me #29

Closed
exxeraga opened this issue Mar 2, 2017 · 25 comments
Closed

Not working for me #29

exxeraga opened this issue Mar 2, 2017 · 25 comments

Comments

@exxeraga
Copy link

exxeraga commented Mar 2, 2017

Lights do not react at all if I set host and port manually, scan gives me an error. Here's what I found in log file. Any ideas? Thank for your work!

16:30:06 T:3529503648 WARNING: CPythonInvoker(31): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:30:17 T:3529503648 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'socket.timeout'>
Error Contents: timed out
Traceback (most recent call last):
File "/storage/.kodi/addons/script.service.mookfist-milights/cmd.py", line 92, in
main(sys.argv[1:])
File "/storage/.kodi/addons/script.service.mookfist-milights/cmd.py", line 83, in main
scan_bridges()
File "/storage/.kodi/addons/script.service.mookfist-milights/cmd.py", line 61, in scan_bridges
bridge = scanner.get_bridges()
File "/storage/.kodi/addons/script.service.mookfist-milights/lib/scanner.py", line 12, in get_bridges
data = s.recv(1024)
timeout: timed out
-->End of Python script error report<--
16:30:26 T:3529503648 WARNING: CPythonInvoker(32): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:30:27 T:4118508096 NOTICE: Samba is idle. Closing the remaining connections
16:30:36 T:3529503648 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'socket.timeout'>
Error Contents: timed out
Traceback (most recent call last):
File "/storage/.kodi/addons/script.service.mookfist-milights/cmd.py", line 92, in
main(sys.argv[1:])
File "/storage/.kodi/addons/script.service.mookfist-milights/cmd.py", line 83, in main
scan_bridges()
File "/storage/.kodi/addons/script.service.mookfist-milights/cmd.py", line 61, in scan_bridges
bridge = scanner.get_bridges()
File "/storage/.kodi/addons/script.service.mookfist-milights/lib/scanner.py", line 12, in get_bridges
data = s.recv(1024)
timeout: timed out
-->End of Python script error report<--
16:30:55 T:3713004448 NOTICE: ES: Client from 192.168.1.102 timed out
16:31:20 T:3458200480 WARNING: CPythonInvoker(33): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:31:22 T:3529503648 WARNING: CPythonInvoker(34): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:45 T:3630220192 WARNING: CPythonInvoker(35): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:49 T:3630220192 WARNING: CPythonInvoker(36): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:49 T:3458200480 WARNING: CPythonInvoker(37): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:49 T:3466589088 WARNING: CPythonInvoker(38): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:50 T:3847222176 WARNING: CPythonInvoker(40): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:50 T:3913282464 WARNING: CPythonInvoker(39): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:51 T:3630220192 WARNING: CPythonInvoker(41): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:52 T:3466589088 WARNING: CPythonInvoker(42): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:52 T:3673158560 WARNING: CPythonInvoker(44): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:37:52 T:3458200480 WARNING: CPythonInvoker(43): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:38:32 T:3458200480 WARNING: CPythonInvoker(45): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
16:38:32 T:3997168544 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.TypeError'>
Error Contents: range() integer start argument expected, got NoneType.
Traceback (most recent call last):
File "/storage/.kodi/addons/script.service.mookfist-milights/service.py", line 195, in onNotification
self.onFadeOut(data)
File "/storage/.kodi/addons/script.service.mookfist-milights/service.py", line 170, in onFadeOut
self.lights.fade(group, brightness, getMainStepSpeed(group))
File "/storage/.kodi/addons/script.service.mookfist-milights/light.py", line 217, in fade
self._currentWorkingThread.fade(target, step, group)
File "/storage/.kodi/addons/script.service.mookfist-milights/light.py", line 59, in fade
for i in range(startingBrightness, brightness + step, step):
TypeError: range() integer start argument expected, got NoneType.
-->End of Python script error report<--

@mookfist
Copy link
Owner

mookfist commented Mar 2, 2017

Thank you for the bug report.

I feel like there are two problems here:

  1. For the scanning bit, if you have an Android phone, can you try installing this app: https://play.google.com/store/apps/details?id=com.lierda.wifi&hl=en and see if it can detect your bridge automatically? I'm not sure what an iOS equivalent app is but i'm sure one exists. It seems that it can't detect your bridge, but then the plugin doesn't handle this situation gracefully. But I do want to make sure you can verify that something else which is known to work can find your wifi bridge.

  2. The second error at the bottom of this log seems to suggest that the plugin is not fully configured. Again, this should be a situation that the plugin handles gracefully. I should probably make sure there are sensible default values for all the settings in the plugin to be safe.

@exxeraga
Copy link
Author

exxeraga commented Mar 2, 2017

That version of app doesnt work for me, maybe a problem with android 7 or with the bridge, cant be sure. I installed mi-light 3 from play store and its working, bridge gets discovered.
About plugin configuration, I tryed auto discovery and when that failed I gave it IP address and port manually (8899).
I have this bridge : http://www.milight.com/milight-wifi-receiver-bridge-3-0-controller-box/

@mookfist
Copy link
Owner

mookfist commented Mar 3, 2017

Can you visit the wifi bridge's webpage and let me know what the software version is? This screenshot is from my bridge:

wifi-bridge-settings

@exxeraga
Copy link
Author

exxeraga commented Mar 3, 2017

Sure, here it is.

ver

@trarizakaria
Copy link

I'm in the same situation. Same bridge. But android app works with me

@trarizakaria
Copy link

screenshot_2017-03-04-07-00-03
I tested the addon on kodi 17 and 15.2 same problem. I think there is something with the bridge v6

@exxeraga
Copy link
Author

exxeraga commented Mar 6, 2017

Any ideas?

@mookfist
Copy link
Owner

so you guys appear to be running a different version of the wifi bridge than I am. I have the v4 firmware.

AT this time I don't plan to support newer versions. This is mainly because I am relying on a third party library that has implemented the LimitlessLED protocol and I don't want to implement the whole limitlessled protocol myself.

I'll purchase a modern bridge soon, and keep my eyes peeled for updates to the library or a new python library that implements the newer standards.

@trarizakaria
Copy link

Thank you

@mookfist
Copy link
Owner

mookfist commented Apr 2, 2017

I have ordered the v6 wifi bridge. It should take two weeks to arrive so it'll be some time before I get v6 working

@trarizakaria
Copy link

Good news :) i have kodi running on raspberry (raspbian), there is a way to have an ambilight on raspberry (may be with an arduino) ??

@mookfist
Copy link
Owner

mookfist commented Apr 3, 2017 via email

@mookfist
Copy link
Owner

mookfist commented Apr 3, 2017

the bridge has been shipped!

I've decided to implement the protocol myself in the end. A python library is now available at https://github.com/mookfist/mookfist-lled-controller - I will use this with the kodi plugin and since I'll have a v4 and a v6 bridge I should be able to test against both and support both.

@mookfist mookfist added enhancement and removed bug labels Apr 3, 2017
@mookfist
Copy link
Owner

mookfist commented Apr 7, 2017

For those interested, I will be getting the new wifi bridge the day after this comment was written. I am going to implement the protocol myself in the end.

However, I've started a new 0.2.0 branch of this plugin, which is where I will implement these changes. I've started this branch because it's more or less a rewrite of how the plugin talks to the wifi bridge. I'm doing this out of necessity as currently this plugin can struggle sometimes when trying to fade slowly and based on my testing, the approach I took is problematic.

So it may still be a while yet before I can support the v6 bridge, but it is being worked on!

@trarizakaria
Copy link

We will wait. Take your time. Good luck

@exxeraga
Copy link
Author

exxeraga commented Apr 7, 2017

Thank you for your work. Looking forward to it!

@mookfist
Copy link
Owner

mookfist commented Apr 9, 2017

well on the library i'm developing for this, I got my v6 bridge working. If anyone is up for it try it out: https://github.com/mookfist/mookfist-lled-controller. I now need to integrate this into the kodi plugin

@mookfist
Copy link
Owner

most things appear to be working now. I will do some more testing but I think I'm pretty close to pushing the new version of this plugin to the master branch

@mookfist mookfist added this to the v0.2.0 milestone Apr 18, 2017
@mookfist
Copy link
Owner

Hello everyone, the plugin seems to be working for me now. I wlil continue to use it and fix anything that comes up. If anyone wants to, please feel free to try out the beta yourself by installing the development repository at https://github.com/mookfist/repo/raw/0.2.0devel/zips/repository.mookfist/repository.mookfist-2.2.zip

the plugin has a very different way of being configured now with more tweaking options and per-group settings. You can review the setup instructions here: https://github.com/mookfist/repo/tree/0.2.0devel/script.service.mookfist-milights

Please let me know if you have any issues. I'd say a few more weeks and i'll push this into master.

@exxeraga
Copy link
Author

Ok, I've installed new version. This time bridge is detected but still cant get it to work on test or anywhere else after detection (I've saved configuration after it was detected as you suggested).
I've tried running it on amlogic media player running libreelec and tried it on windows pc, same problem and same errors in log.

`20:30:08.252 T:3966759840 ERROR: [mookfist-milights::Controller] Bridge not configured properly

20:30:12.395 T:3966759840 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: invalid literal for int() with base 16: ''
Traceback (most recent call last):
File "/storage/.kodi/addons/1script.service.mookfist-milights/service.py", line 375, in
monitor.onSettingsChanged()
File "/storage/.kodi/addons/1script.service.mookfist-milights/service.py", line 151, in onSettingsChanged
red = int(color[2:4], 16)
ValueError: invalid literal for int() with base 16: ''
-->End of Python script error report<--
`

@mookfist
Copy link
Owner

hrm...

can you confirm you have beta2 version installed?

The issue seems to be when it tries to parse the color. I will try setting the default color to white so that there is always a color value present.

I will make this change tonight (EST) and then the version will be beta3

@mookfist
Copy link
Owner

actually scratch that, the better solution should just make sure a color is set before trying to parse anything.

@mookfist
Copy link
Owner

version 0.2.0~beta4 is up. New icon too and should resolve your issue @exxeraga

Since this ticket seemed to be originally for ver6 support, I will now now close it.

Please feel free to open new issues for any additional issues you may encounter. Thank you all for your patience!

@exxeraga
Copy link
Author

Great, I'll test it tonight. Thank you very much!!!

@exxeraga
Copy link
Author

exxeraga commented May 7, 2017

No luck for me, still getting ERROR: [mookfist-milights::Controller] Bridge not configured properly... It works great with android app and limitless led windows app. Not sure why it wont work with this plugin :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants