Skip to content

Commit

Permalink
Minor changes to WeSwitch
Browse files Browse the repository at this point in the history
  • Loading branch information
basejumpa committed Sep 5, 2024
1 parent 9236250 commit fec6ad1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 39 deletions.
66 changes: 30 additions & 36 deletions docs/blog/2024-09-WeSwitch/_figures/bd_system_and_neighbors.drawio
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<mxfile host="65bd71144e">
<diagram id="81OLYhewOZMGTi1vEdpT" name="Page-1">
<mxGraphModel dx="549" dy="281" grid="1" gridSize="5" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="583" math="0" shadow="0">
<mxGraphModel dx="715" dy="678" grid="1" gridSize="5" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="583" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="28" value="page_frame (invisible)" style="locked=1;" parent="0"/>
Expand All @@ -12,53 +12,47 @@
<mxGeometry x="130" y="108" width="580" height="380" as="geometry"/>
</mxCell>
<mxCell id="51" value="views" style="locked=1;" parent="0"/>
<mxCell id="52" value="«view»&lt;br&gt;logical" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=default;fontSize=10;fillColor=none;dashed=1;strokeColor=#B3B3B3;align=center;horizontal=0;labelPosition=center;verticalLabelPosition=middle;verticalAlign=bottom;fontColor=#B3B3B3;" parent="51" vertex="1">
<mxGeometry x="145" y="138" width="550" height="65" as="geometry"/>
</mxCell>
<mxCell id="53" value="«view»&lt;br&gt;technical" style="rounded=0;whiteSpace=wrap;html=1;labelBackgroundColor=default;fontSize=10;fillColor=none;dashed=1;strokeColor=#B3B3B3;align=center;horizontal=0;labelPosition=center;verticalLabelPosition=middle;verticalAlign=bottom;fontColor=#B3B3B3;" parent="51" vertex="1">
<mxGeometry x="145" y="208" width="550" height="265" as="geometry"/>
</mxCell>
<mxCell id="3" value="system_under_consideration_inner_elements_boundary" style="locked=1;" parent="0"/>
<mxCell id="4" value="«system» WeSwitch" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeWidth=2;align=left;verticalAlign=top;fontColor=#333333;strokeColor=#666666;fontSize=10;" parent="3" vertex="1">
<mxGeometry x="390" y="253" width="255" height="145" as="geometry"/>
<mxGeometry x="384" y="253" width="255" height="145" as="geometry"/>
</mxCell>
<mxCell id="12" value="&lt;span style=&quot;background-color: rgb(255, 255, 255); font-size: 10px;&quot;&gt;P_out&lt;/span&gt;" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#000000;verticalAlign=bottom;align=left;labelPosition=right;verticalLabelPosition=top;fontSize=10;" parent="3" vertex="1">
<mxGeometry x="580" y="243" width="20" height="20" as="geometry"/>
<mxGeometry x="574" y="243" width="20" height="20" as="geometry"/>
</mxCell>
<mxCell id="13" value="P_in" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#000000;verticalAlign=top;align=left;labelPosition=right;verticalLabelPosition=bottom;fontSize=10;" parent="3" vertex="1">
<mxGeometry x="580" y="388" width="20" height="20" as="geometry"/>
<mxGeometry x="574" y="388" width="20" height="20" as="geometry"/>
</mxCell>
<mxCell id="14" value="U_in&lt;br style=&quot;font-size: 10px;&quot;&gt;" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#000000;labelPosition=right;verticalLabelPosition=bottom;align=left;verticalAlign=top;fontSize=10;" parent="3" vertex="1">
<mxGeometry x="465" y="388" width="20" height="20" as="geometry"/>
<mxGeometry x="440" y="388" width="20" height="20" as="geometry"/>
</mxCell>
<mxCell id="15" value="SSH" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#000000;labelPosition=left;verticalLabelPosition=bottom;align=right;verticalAlign=top;fontSize=10;" parent="3" vertex="1">
<mxGeometry x="374" y="315.5" width="20" height="20" as="geometry"/>
</mxCell>
<mxCell id="15" value="SSH" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#000000;labelPosition=left;verticalLabelPosition=top;align=right;verticalAlign=middle;fontSize=10;" parent="3" vertex="1">
<mxGeometry x="380" y="315.5" width="20" height="20" as="geometry"/>
<mxCell id="55" value="PowerSocket" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;dashed=1;align=right;verticalAlign=bottom;labelPosition=left;verticalLabelPosition=top;spacingBottom=0;spacingRight=0;" parent="3" vertex="1">
<mxGeometry x="544" y="240" width="75" height="170" as="geometry"/>
</mxCell>
<mxCell id="17" value="system_under_consideration_inner_elements" style="locked=1;" parent="0"/>
<mxCell id="22" value="1..26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=box;startFill=0;endArrow=box;endFill=0;elbow=vertical;fontSize=10;labelBackgroundColor=none;" parent="17" edge="1">
<mxGeometry x="0.4545" y="-14" relative="1" as="geometry">
<mxPoint x="505" y="325.5" as="sourcePoint"/>
<mxPoint x="560" y="325.5" as="targetPoint"/>
<Array as="points">
<mxPoint x="545" y="325"/>
<mxPoint x="545" y="325"/>
</Array>
<mxPoint as="offset"/>
<mxCell id="22" value="1..26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=box;startFill=0;endArrow=box;endFill=0;elbow=vertical;fontSize=10;labelBackgroundColor=none;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="17" source="18" edge="1">
<mxGeometry x="0.3514" y="11" relative="1" as="geometry">
<mxPoint x="499" y="326" as="sourcePoint"/>
<mxPoint x="554" y="325.5" as="targetPoint"/>
<Array as="points"/>
<mxPoint y="1" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="54" value="GPIOs" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;" vertex="1" connectable="0" parent="22">
<mxCell id="54" value="GPIO" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;" parent="22" vertex="1" connectable="0">
<mxGeometry x="-0.2" y="1" relative="1" as="geometry">
<mxPoint x="-2" y="-15" as="offset"/>
<mxPoint x="-11" y="11" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="18" value="&lt;span style=&quot;color: rgb(51, 51, 51); text-align: left;&quot;&gt;&amp;nbsp;«host»&amp;nbsp;&lt;/span&gt;&lt;br&gt;RPI" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;fontSize=10;" parent="17" vertex="1">
<mxGeometry x="445" y="303" width="60" height="45" as="geometry"/>
<mxGeometry x="420" y="303" width="60" height="45" as="geometry"/>
</mxCell>
<mxCell id="24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;startArrow=box;startFill=0;endArrow=none;endFill=0;elbow=vertical;fontSize=10;" parent="17" source="19" target="13" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="19" value="Relais" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;fontSize=10;" parent="17" vertex="1">
<mxGeometry x="560" y="303" width="60" height="45" as="geometry"/>
<mxGeometry x="554" y="303" width="60" height="45" as="geometry"/>
</mxCell>
<mxCell id="20" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;endFill=0;startArrow=box;startFill=0;fontSize=10;" parent="17" source="18" target="14" edge="1">
<mxGeometry relative="1" as="geometry"/>
Expand All @@ -71,15 +65,15 @@
</mxCell>
<mxCell id="29" value="neighbor_systems" style="locked=1;" parent="0"/>
<mxCell id="30" value="«neighbor»&lt;br style=&quot;font-size: 10px;&quot;&gt;some_electrical_device" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;verticalAlign=middle;fontSize=10;" parent="29" vertex="1">
<mxGeometry x="535" y="150" width="110" height="45" as="geometry"/>
<mxGeometry x="529" y="150" width="110" height="45" as="geometry"/>
</mxCell>
<mxCell id="32" style="edgeStyle=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endArrow=box;endFill=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;fontSize=10;" parent="29" source="12" target="30" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="590" y="198" as="targetPoint"/>
<mxPoint x="584" y="198" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="33" value="&lt;font style=&quot;font-size: 10px;&quot;&gt;«neighbor»&lt;br style=&quot;font-size: 10px;&quot;&gt;«host»&lt;br&gt;some_host&lt;br&gt;&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;verticalAlign=middle;fontSize=10;" parent="29" vertex="1">
<mxGeometry x="213" y="295.5" width="72" height="60" as="geometry"/>
<mxGeometry x="192" y="295.5" width="72" height="60" as="geometry"/>
</mxCell>
<mxCell id="36" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=box;startFill=0;endArrow=box;endFill=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontSize=10;" parent="29" source="33" target="41" edge="1">
<mxGeometry relative="1" as="geometry">
Expand All @@ -88,33 +82,33 @@
</mxCell>
<mxCell id="45" value="pinctrl&lt;br&gt;over&lt;br&gt;SSH" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;" parent="36" vertex="1" connectable="0">
<mxGeometry x="-0.1442" relative="1" as="geometry">
<mxPoint x="3" y="-29" as="offset"/>
<mxPoint x="3" y="-25" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="38" style="edgeStyle=orthogonalEdgeStyle;html=1;startArrow=box;startFill=0;endArrow=none;endFill=0;rounded=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;fontSize=10;" parent="29" source="33" target="37" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="48" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;fontSize=10;startArrow=none;startFill=0;endArrow=open;endFill=0;dashed=1;elbow=vertical;curved=1;" parent="29" source="37" target="19" edge="1">
<mxCell id="48" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.133;entryY=-0.005;entryDx=0;entryDy=0;fontSize=10;startArrow=none;startFill=0;endArrow=open;endFill=0;dashed=1;elbow=vertical;curved=1;entryPerimeter=0;" parent="29" source="37" target="55" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="50" value="control remotely" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;" parent="48" vertex="1" connectable="0">
<mxCell id="50" value="control remotely" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=10;labelBackgroundColor=none;" parent="48" vertex="1" connectable="0">
<mxGeometry x="-0.1693" y="2" relative="1" as="geometry">
<mxPoint x="-12" y="-1" as="offset"/>
<mxPoint x="8" y="-6" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="37" value="«actor»&lt;br&gt;«user»&lt;br&gt;some_user" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;fillColor=none;fontSize=10;labelBackgroundColor=default;" parent="29" vertex="1">
<mxGeometry x="165" y="145" width="30" height="55" as="geometry"/>
</mxCell>
<mxCell id="39" value="«neighbor»&amp;nbsp;domestic power supply&amp;nbsp;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;verticalAlign=middle;points=[[0,0,0,0,0],[0,0.25,0,0,0],[0,0.5,0,0,0],[0,0.75,0,0,0],[0,1,0,0,0],[0.25,1,0,0,0],[0.31,0,0,0,0],[0.5,0,0,0,0],[0.5,1,0,0,0],[0.75,1,0,0,0],[0.79,0,0,0,0],[1,0,0,0,0],[1,0.25,0,0,0],[1,0.5,0,0,0],[1,0.75,0,0,0],[1,1,0,0,0]];fontSize=10;" parent="29" vertex="1">
<mxGeometry x="390" y="443" width="255" height="20" as="geometry"/>
<mxGeometry x="384" y="443" width="255" height="20" as="geometry"/>
</mxCell>
<mxCell id="42" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=box;startFill=0;endArrow=none;endFill=0;fontSize=10;" parent="29" source="41" target="15" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="41" value="«neighbor» wired LAN" style="rounded=0;whiteSpace=wrap;html=1;fillColor=none;verticalAlign=middle;horizontal=0;fontSize=10;" parent="29" vertex="1">
<mxGeometry x="325" y="253" width="25" height="145" as="geometry"/>
<mxGeometry x="319" y="253" width="25" height="145" as="geometry"/>
</mxCell>
<mxCell id="43" style="edgeStyle=none;html=1;startArrow=box;startFill=0;endArrow=none;endFill=0;exitX=0.333;exitY=-0.008;exitDx=0;exitDy=0;exitPerimeter=0;fontSize=10;" parent="29" source="39" target="14" edge="1">
<mxCell id="43" style="edgeStyle=none;html=1;startArrow=box;startFill=0;endArrow=none;endFill=0;exitX=0.259;exitY=0.03;exitDx=0;exitDy=0;exitPerimeter=0;fontSize=10;" parent="29" source="39" target="14" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="44" style="edgeStyle=none;html=1;startArrow=box;startFill=0;endArrow=none;endFill=0;exitX=0.783;exitY=-0.016;exitDx=0;exitDy=0;exitPerimeter=0;fontSize=10;" parent="29" source="39" target="13" edge="1">
Expand Down
4 changes: 2 additions & 2 deletions docs/blog/2024-09-WeSwitch/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Common commands:
some_user@some_host:~$ ssh weswitch@weswitch "pinctrl 26 dh"
Change initial pin states
=========================
Change initial states
=====================

Currently pins `19` and `26` are set to `ON` after reboot. All other pins are in default behavior which is `OFF`.

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def _calculate_repo_root_dir(source_path):
__repo = Repo(_calculate_repo_root_dir(config.BUILD__DIRS__SOURCE))
_scm_git_branch = __repo.active_branch.name
except:
logger.warning(f"Couldn't get git branch.")
logger.info(f"Couldn't get git branch.")

### SPHINX CONFIGURATION (GENERAL) ############################################
# @see https://www.sphinx-doc.org/en/master/usage/configuration.html
Expand Down

0 comments on commit fec6ad1

Please sign in to comment.