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

FanControl2 #453

Closed
RobvanderDoes opened this issue Nov 24, 2016 · 18 comments
Closed

FanControl2 #453

RobvanderDoes opened this issue Nov 24, 2016 · 18 comments

Comments

@RobvanderDoes
Copy link
Contributor

RobvanderDoes commented Nov 24, 2016

Would it be possible to add an extra entry for FanControl2 when it's installed (IP-box/fancontrol), just as is the case for Oscam, L4L and several other plugins?

@jbleyel
Copy link
Contributor

jbleyel commented Nov 24, 2016

It will be the right time to discuss about openwebif plugins.
A base feature for plugins are already included but not finished yet.
There is was also a missing example plugin.

I have planed a first plugin and move the package manager feature out of the openwebif into this first plugin.

!!!! PLANED !!!!!

@RobvanderDoes
Copy link
Contributor Author

Thanks.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 25, 2016

Hi @RobvanderDoes, please try the new 1.1 branch version.
It's not the right way but should work as new browser window.

The webif of the fancontrol needs a complete rebuild to use it as inline feature like autotimer.
The current webif of fancontrol is crappy and from the last century. ;-)

@RobvanderDoes
Copy link
Contributor Author

Hmmm, sorry to say, but I copied all the files from the plugin-folder of the 1.1 branch to my box and no Fancontrol2 shows up under 'Extra's'.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 25, 2016

please call ../api/external and provide the result here

@jbleyel
Copy link
Contributor

jbleyel commented Nov 25, 2016

The current solution will only work if you have only the openwebif installed and NOT the Webinterface plugin.

@RobvanderDoes
Copy link
Contributor Author

please call ../api/external and provide the result here

web.Server Traceback (most recent call last):
exceptions.TypeError: FilePath('/usr/lib/enigma2/python/Plugins/Extensions/FanControl2/data') is not JSON serializable
/usr/lib/python2.7/site-packages/twisted/web/server.py:190 in process
189
190
191
/usr/lib/python2.7/site-packages/twisted/web/server.py:241 in render
240
241
242
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/controllers/base.py:152 in render
151 request.setHeader("content-type", "text/plain")
152 request.write(json.dumps(data))
153 request.finish()
/usr/lib/python2.7/json/init.py:244 in dumps
243
244
245
/usr/lib/python2.7/json/encoder.py:207 in encode
206
207
208
/usr/lib/python2.7/json/encoder.py:270 in iterencode
269
270
271
/usr/lib/python2.7/json/encoder.py:184 in default
183
184
185
exceptions.TypeError: FilePath('/usr/lib/enigma2/python/Plugins/Extensions/FanControl2/data') is not JSON serializable

@jbleyel
Copy link
Contributor

jbleyel commented Nov 25, 2016

Okay .. the loaded_plugins var is not empty.
For testing i have called
loaded_plugins.append( ("fancontrol", None, "Fan Control 2", '11') )
in base.py of openwebif and i get the menu entry.

Strange ????

@jbleyel
Copy link
Contributor

jbleyel commented Nov 25, 2016

I think there is a little bug near by
https://github.com/OpenPLi/enigma2-plugins/blob/master/fancontrol2/src/plugin.py#L1253

If you only call this ..
addExternalChild( ("fancontrol", root) )

@RobvanderDoes
Copy link
Contributor Author

@jbleyel
Copy link
Contributor

jbleyel commented Nov 25, 2016

It's the same code.

Do you have this file on your box?
/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml

Do you have this file?
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/pluginshook.src

And is this
/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/WebChilds/Toplevel.py
File exactly the same like this
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/pluginshook.src

@jbleyel
Copy link
Contributor

jbleyel commented Nov 25, 2016

The fancontrol writes logs -> FClog
Please check the log for:
use new WebIF
use old WebIF
use new OpenWebIF

@RobvanderDoes
Copy link
Contributor Author

Log has "use new OpenWebIF" entries.

Do you have this file on your box?
/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml

No: where should I get it from?

Do you have this file?
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/pluginshook.src

Yes

And is this
/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/WebChilds/Toplevel.py
File exactly the same like this
/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/pluginshook.src

The first one is a symbolic link to the latter.

@RobvanderDoes
Copy link
Contributor Author

Do you have this file on your box?
/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml

No: where should I get it from?

Found it, but adding that makes no difference.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 26, 2016

The log should say "use new OpenWebIF" if you have no external.xml .. this is correct.
The external.xml file existence means you have the DMM webinterface.

I will do some prints inside the openwebif for debugging.
Please remove the external.xml if you have copied this file manually.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 26, 2016

please get the latest versio of 1.1 and check the debug output of base.py

@RobvanderDoes
Copy link
Contributor Author

Now Fancontrol2 shows neatly under 'Extra's'.
Thanks!

@jbleyel
Copy link
Contributor

jbleyel commented Nov 26, 2016

Okay.. i close this issue here and remove the debug print.

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

No branches or pull requests

2 participants