Springen naar inhoud


Foto

FanControl2 web page under OpenWebIf - quick fix

OpenWebIf FanControl2

  • Please log in to reply
Er zijn 10 reacties in dit onderwerp

#1 macnuts

  • Senior Member
  • 420 berichten

+14
Neutral

Geplaatst op 3 augustus 2012 - 10:24

Due to the plugin sanity checks at startup it does not start the web service add-on during startup.
The problem is with hardcoded paths inside the plugin initialization routine. I posted the request and proposed solution on author's forum (IHAD), but I am not sure of the response.

So, in the meantime, for other folks like me that what OpenWebIf and FanControl2 to cooperate (or to force FanControl2 to cooperate, as OpenWebIf has nothing against it) I put the proposed solution here too.
--- old/lib/python/Plugins/Extensions/FanControl2/plugin.py
+++ new/lib/python/Plugins/Extensions/FanControl2/plugin.py
@@ -1046,7 +1046,8 @@
def autostart(reason, **kwargs):
		global session
		if reason == 0 and kwargs.has_key("session"):
-			   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/webif.py"):
+			   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/__init__.py"):
						from Plugins.Extensions.WebInterface.WebChilds.Toplevel import addExternalChild
						from FC2webSite import FC2web, FC2webLog, FC2webChart
						from twisted.web import static
@@ -1055,7 +1055,7 @@
						root.putChild("", FC2web())
						root.putChild("log", FC2webLog())
						root.putChild("chart", FC2webChart())
-					   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml"):
+					   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml") or os.path.exists("/usr/lib/enigma2/pyton/Plugins/Extensions/OpenWebif/__init__.py"):
								addExternalChild( ("fancontrol", root, "Fan Control 2", Version) )
						else:
								addExternalChild( ("fancontrol", root) )
Regards.

Re: FanControl2 web page under OpenWebIf - quick fix #2 Rob van der Does

  • Senior Member
  • 7766 berichten

+184
Excellent

Geplaatst op 3 augustus 2012 - 12:35

Sorry, I can't get this to work with only Open WEB-IF installed.

Re: FanControl2 web page under OpenWebIf - quick fix #3 macnuts

  • Senior Member
  • 420 berichten

+14
Neutral

Geplaatst op 3 augustus 2012 - 14:47

Sorry, I can't get this to work with only Open WEB-IF installed.


It is working on my DM8000 and Open WebIf installed only.
root@dm8000:/usr/lib/enigma2/python# opkg list_installed *web*
enigma2-plugin-extensions-openwebif - 0.1+git345+a4e13dd-r1.72
python-twisted-web - 12.0.0-r2
root@dm8000:/usr/lib/enigma2/python#

From OpenWebIf code it looks like the there are some more steps required after OpenWebIf installation:
1. Install enigma2-plugin-extensions-openwebif
2. Open in web browser: http://your_box_ip
3. Restart enigma2
4. http://your_box_ip/fancontrol should work now

Regards.

Re: FanControl2 web page under OpenWebIf - quick fix #4 gjstroom

  • Senior Member
  • 516 berichten

+16
Neutral

Geplaatst op 3 augustus 2012 - 14:48

I also tried it, I don't get http://ip/fancontrol either. OpenPLi 3 dm800se.

root@dm800sr4:/usr/lib/enigma2/python/Plugins/Extensions/FanControl2# opkg list_installed |grep web
enigma2-plugin-extensions-openwebif - 0.1+git345+a4e13dd-r1.72
python-twisted-web - 12.0.0-r2

Veranderd door gjstroom, 3 augustus 2012 - 14:52

Amiko8240, DM500HD, DM800, DM800SE, DM800SESR4, DM800SEV2, VU+ SoloSEV2, VU+ UnoSE


Re: FanControl2 web page under OpenWebIf - quick fix #5 macnuts

  • Senior Member
  • 420 berichten

+14
Neutral

Geplaatst op 3 augustus 2012 - 14:53

I also tried it, I don't get http://ip/fancontrol either. OpenPLi 3 dm800se.

????

Have you applied both changes? Are your boxes are up-to-date (openwebif plugin)?

See my dumps enclosed.

Regards.

Bijlage  dump1.png   304,21K   49 Aantal bijlagenBijlage  dump2.png   331,49K   54 Aantal bijlagen

Veranderd door macnuts, 3 augustus 2012 - 14:53


Re: FanControl2 web page under OpenWebIf - quick fix #6 macnuts

  • Senior Member
  • 420 berichten

+14
Neutral

Geplaatst op 3 augustus 2012 - 14:56

My bad. Typo in diff file. Try it again.

Second corrected line should be
[color="#666600"]+[/color] [color="#000088"]if[/color][color="#000000"] os[/color][color="#666600"].[/color][color="#000000"]path[/color][color="#666600"].[/color][color="#000000"]exists[/color][color="#666600"]([/color][color="#008800"]"/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml"[/color][color="#666600"])[/color] [color="#000088"]or[/color][color="#000000"] os[/color][color="#666600"].[/color][color="#000000"]path[/color][color="#666600"].[/color][color="#000000"]exists[/color][color="#666600"]([/color][color="#008800"]"/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/__init__.py"[/color][color="#666600"]):[/color]

Have some problems with my laptop mouse pad.
Regards.

Veranderd door macnuts, 3 augustus 2012 - 14:59


Re: FanControl2 web page under OpenWebIf - quick fix #7 gjstroom

  • Senior Member
  • 516 berichten

+16
Neutral

Geplaatst op 3 augustus 2012 - 15:01

Sorry but I only see a diff-file for /usr/lib/enigma2/python/Plugins/Extensions/FanControl2/plugin.py.
Where's this second line for ? I think something went wrong with pasting again (html code...)

Veranderd door gjstroom, 3 augustus 2012 - 15:03

Amiko8240, DM500HD, DM800, DM800SE, DM800SESR4, DM800SEV2, VU+ SoloSEV2, VU+ UnoSE


Re: FanControl2 web page under OpenWebIf - quick fix #8 macnuts

  • Senior Member
  • 420 berichten

+14
Neutral

Geplaatst op 3 augustus 2012 - 15:03

Once again, full diff:
--- old/plugin.py
+++ new/plugin.py
@@ -1046,7 +1046,8 @@
def autostart(reason, **kwargs):
	    global session
	    if reason == 0 and kwargs.has_key("session"):
-			   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/webif.py"):
+			   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/__init__.py"):
					    from Plugins.Extensions.WebInterface.WebChilds.Toplevel import addExternalChild
					    from FC2webSite import FC2web, FC2webLog, FC2webChart
					    from twisted.web import static
@@ -1055,7 +1055,7 @@
					    root.putChild("", FC2web())
					    root.putChild("log", FC2webLog())
					    root.putChild("chart", FC2webChart())
-					   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml"):
+					   if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/WebInterface/web/external.xml") or os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/OpenWebif/__init__.py"):
							    addExternalChild( ("fancontrol", root, "Fan Control 2", Version) )
					    else:
							    addExternalChild( ("fancontrol", root) )

Regards.

Re: FanControl2 web page under OpenWebIf - quick fix #9 macnuts

  • Senior Member
  • 420 berichten

+14
Neutral

Geplaatst op 3 augustus 2012 - 15:07

Two changes in

Sorry but I only see a diff-file for /usr/lib/enigma2/python/Plugins/Extensions/FanControl2/plugin.py.
Where's this second line for ? I think something went wrong with pasting again (html code...)

Two changes in one file, one diff file. There was an error in the diff from first post. One of python's became pyton. Sorry for that, but my by laptop palmrest generates random cursor movements during typing, somtimes I do not notice that.

Regards.

Re: FanControl2 web page under OpenWebIf - quick fix #10 gjstroom

  • Senior Member
  • 516 berichten

+16
Neutral

Geplaatst op 3 augustus 2012 - 15:08

Thanks, working now !
an h was missing in python.

Veranderd door gjstroom, 3 augustus 2012 - 15:08

Amiko8240, DM500HD, DM800, DM800SE, DM800SESR4, DM800SEV2, VU+ SoloSEV2, VU+ UnoSE


Re: FanControl2 web page under OpenWebIf - quick fix #11 macnuts

  • Senior Member
  • 420 berichten

+14
Neutral

Geplaatst op 4 augustus 2012 - 07:50

The plugin author (joergm6) has already updated the FanControl2 plugin (and LCD4Linux too probably).
It is available for download from IHAD plugin homepage.
It will be updated in the OpenPli feeds soon, hopefully.

Regards.

Veranderd door macnuts, 4 augustus 2012 - 07:50




Also tagged with one or more of these keywords: OpenWebIf, FanControl2

1 gebruiker(s) lezen dit onderwerp

0 leden, 1 bezoekers, 0 anonieme gebruikers