WiFi configuration plugin - first experiences (1 Viewer)

chefkoch

Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    I am currently the WiFi plugin using my custom build https://github.com/chefkoch/MediaPortal-2/commits/CustomBuilds/130712

    And I have to admit that I really like it :) It looks pretty nice having having the connection bar on the right side of the list items :)
    20130712_164401.png


    The design can be improved, but that is not a top priority for a developer ;) Designers should bring up improvements for such things, even if the only draw the svg or xaml for it, and then get support "converting" it to MP2 compatible stuff with support by MP2 devs.
    • could the signal indicator colored red if signal is < 40% and
    • colored green if signal is > 90 or 85% ?
    Now to the dev-related things:
    • When disconnecting from wifi and reconnecting again, it the reconnected state is not detected and applied to the list item. Scanning for wifi networks again, displays the connection state correctly.
    • Would it be possible to scan for networks continuously while being in this screen? This would allow updating the signal and available networks.
    • If scanning for networks is kept as manual trigger by pressing the button it would be nice to have an indicator that something is going on, because from start to finish and updated network list there is a delay of a (only) a few seconds.
      Since this is not the only use case for a progress notifications, it might require additional code changes in core instead specifically to this plugin.
     
    Last edited:

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    And again I have to notice: It is unbelievable what will be possible within MP2 :)
    Check out the definitions of the signal bars (beginning at <Path x:Name="signalBars" and ending at </Path>, of course):
    XML:
      <DataTemplate x:Key="WifiItemDataTemplate" DataType="{x:Type collections:ListItem}">
    	<DockPanel x:Name="ItemControl" LastChildFill="True">
     
    	  <Grid Width="30" DockPanel.Dock="Left">
    		<Path x:Name="selectedCheckMark" Width="26" Height="26" Stretch="None" IsVisible="{Binding Selected}"
    				Stroke="{ThemeResource ControlHandleColor}" StrokeThickness="1" Data="M8,13 L11,18 L18,6"/>
    	  </Grid>
     
    	  <StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
     
    		<Path x:Name="signalBars" Width="25" Height="25" Stretch="None"
    				  Stroke="{ThemeResource ControlHandleColor}" StrokeThickness="1" Data="M0,25 L25,25 L25,0 L20,0 L20,5 L15,5 L15,10 L10,10 L10,15 L5,15 L5,20 L0,20 z">
    		  <Path.Fill>
    			<LinearGradientBrush StartPoint="0,1" EndPoint="1,1">
    			  <GradientStop Offset="0" Color="{ThemeResource PlayControlsFillColor1}"/>
    			  <GradientStop Offset="{Binding AdditionalProperties[SignalStrength]}" Color="{ThemeResource PlayControlsFillColor1}"/>
    			  <GradientStop Color="Transparent">
    				<GradientStop.Offset>
    				  <Binding Path="AdditionalProperties[SignalStrength]" Converter="{StaticResource ExpressionValueConverter}" ConverterParameter="{}{0} + 0.01f"/>
    				</GradientStop.Offset>
    			  </GradientStop>
    			  <GradientStop Offset="1" Color="Transparent"/>
    			</LinearGradientBrush >
    		  </Path.Fill>
    		</Path>
     
    		<Label HorizontalAlignment="Right" HorizontalContentAlignment="Right" VerticalAlignment="Center" FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource TextColor}" Width="70">
    		  <Label.Content>
    			<Binding Path="AdditionalProperties[SignalStrength]" Converter="{StaticResource StringFormatConverter}" ConverterParameter="{}{0:P0}"/>
    		  </Label.Content>
    		</Label>
     
    	  </StackPanel>
     
    	  <Label x:Name="ItemLabel" DockPanel.Dock="Center" Content="{Binding [Name]}"
    					HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{ThemeResource SmallFontSize}"
    					Color="{ThemeResource TextColor}"/>
    	</DockPanel>
      </DataTemplate>
    These are defined once for the default skin, but are immediately available this way in all skins:
    20130712_172611.png 20130712_172638.png

    There are already so much other things available in MP2 like anyimations / storybords, etc... which are not used at all, but offer so much great skinning and design possibilities. :)
     
    Last edited:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    Thanks :)
    Colors->Shouldn't be a problem with a converter.
    The "hardware" WLAN API is completely async, so a scan is triggered and then the other side must wait for the results. Could be that somewhere something is not catching a result.
    Automatic repeated scanning all the time is probably not a good idea. But I am not hardware guru on this :)
    And yes some kind of progress or general notification build into the core is needed a lot!
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    Regarding continuously scan, I forgot to add that it might be enough to auto-trigger a scan every 15 seconds and only if you are within the network listing, which should not have any negative affects to the performance or the hardware.

    When I saw this thread https://forum.team-mediaportal.com/threads/request-wifi-plugin.49003/ (within our similar thread ;) ) I got the idea that skinners might want to put connection information also on the homescreen. So maybe an updated signal value is needed even if you are not within the network listing?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    Not sure if this is really wanted/needed - usual use case would be that neither the box with MP2 installed nor the Wfi Router will move around :) So nothing ever changes about the signal strength - superfluous information :)
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    It's a bit unfair to zoom into a screenshot to illustrate very minor issue, which I was not able to notice normally on my display (which is only 23") ;)
    Again this is something that can be solved in future by designers, if there will be some ;)

    20130712_180944.png
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    No it can't, because it is a skinengine bug :) I have tried to find it but was unsuccessfull :(

    I am using a fill for the path, as you can see in the xaml above, with the % set to the wifi strength. The skinengine fills the wrong pixels.
     
    Last edited:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    But then you can`t easily set a precentage for the fill.
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    yep, not linear, but atleast every 20% or similar.

    If keeping the current single "path" and xaml code for intended style (filling within bounds only) is correct, but displayed wrong, then it's a skin engine bug that should be added to JIRA.
     
    Last edited:

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    R Problem with MP1 and WifiRemote Skins and Plugins Installer (MPEI) 8
    M 1.25.0 Tv Server Configuration Italian Dvb-t2 test channel preview error Television (MyTV frontend and TV-Server) 2
    toricred [solved] Configuring TV Server to use NAS General 4
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    W Info on particular configuration Installation, configuration support 2
    horned_reaper MediaPortal configuration error log message General Support 1
    T TV Series Configuration funktioniert nicht Plugins & Erweiterungen 15
    HTPCSourcer [Evaluate] Remove obsolete menu entries from "MP2 TV Configuration" MediaPortal 2 0
    T I cannot get a basic media import-what is the best configuration? General 10
    P Configuration Moving Pictures Support d'installation et de configuration 0
    cbr954rr How to disable a pre-configured plugin? General 2
    A FB funktioniert plötzlich nicht mehr korrekt Allgemeines Supportforum 0
    M.Hulot [solved] PureVisionHD 1080 taucht nicht im Configurator auf Allgemeines Supportforum 12
    Edwardfc Fanart setup/configuration General 10
    Edwardfc [solved] Mp 2.2.1 Configuration Issues - Goes to Sleep while playing Music General 6
    P Configuration closes on channel scan General 26
    M App Icon starts Configuration Installation, configuration support 3
    O [solved] MP2.2.1 TV-Server Configuration wont start after initial installation General 10
    D [solved] How to configure subtitle color in MP 2.2.1? General 5
    sve1 Invalid DateTime when loading configuration tool Trakt 5
    johns11 [solved] MP2.2 TV configuration issue General 4
    H MP2.2 client TV-Server configuration General 17
    R MP 2.2 TV configuration General 13
    E [solved] No Live TV in MP2.2 Client - Can TEST Successfully in "MediaPortal 2 TV Configuration" utility General 8
    Similar threads

























    Top Bottom