Skip to content
Permalink
Browse files

Merge pull request #8 from directman66/alpha

minor fixes
  • Loading branch information...
directman66 committed Jul 3, 2019
2 parents 1e528be + 07b3edc commit 4895b19c54dc6f42d9ecc3dd745c3e9ec0bee78f
@@ -18,7 +18,8 @@
if (!$maparray[$i]['PARRENTIEEEADDR']) {$parrentieee=$defaultiee;} else {$parrentieee=$maparray[$i]['PARRENTIEEEADDR'];}
// $nodes.= "{id: ".$idd.", font:{size:10}, size:40, label: '".$maparray[$i]['description']."', group: 0, shape: 'circularImage', image: '/templates/zigbee2mqtt/img/".$maparray[$i]['model'].".jpg', },";
$nodes.= "{id: ".$idd.", size:40, color:'white', font:{color:'black', size:10}, label: '".$maparray[$i]['TITLE']."', group: 0, shape: 'image', image: '/templates/zigbee2mqtt/img/".$maparray[$i]['SELECTTYPE'].".jpg', },";
if ($maparray[$i]['STATUS']) {$status=" (".$maparray[$i]['STATUS'].")";} else {$status="";}
$nodes.= "{id: ".$idd.", size:40, color:'white', font:{color:'black', size:10}, label: '".$maparray[$i]['TITLE'].$status. "', group: 0, shape: 'image', image: '/templates/zigbee2mqtt/img/".$maparray[$i]['SELECTTYPE'].".jpg', },";
@@ -3065,7 +3065,7 @@ function updateparrent()
SQLUpdate( 'zigbee2mqtt_devices',$rec4[$ij]);
}
$allieee="";
$maparray=SQLSelectOne ('select * from zigbee2mqtt where TITLE="zigbee2mqtt/bridge/networkmap/raw"');
$map=$maparray['VALUE'];
if (ZMQTT_DEBUG=="1" ) debmes($map, 'zigbee2mqtt');
@@ -3099,11 +3099,14 @@ function updateparrent()
$rec3['LQI']=$lqi;
$rec3['STATUS']=$status;
$rec3['NWKADDR']=$nwkAddr;
SQLUpdate( 'zigbee2mqtt_devices',$rec3);
if (strpos($allieee,$ieeeAddr)==0) SQLUpdate( 'zigbee2mqtt_devices',$rec3);
}
$allieee.=$ieeeAddr.";";
//var_dump( $str);
// $json3= json_decode ($str,true);
@@ -3636,7 +3639,7 @@ function createdb()
zigbee2mqtt_log: ID int(10) unsigned NOT NULL auto_increment
zigbee2mqtt_log: TITLE varchar(255) NOT NULL DEFAULT ''
zigbee2mqtt_log: MESSAGE varchar(255) NOT NULL DEFAULT ''
zigbee2mqtt_log: MESSAGE longtext NOT NULL DEFAULT ''
zigbee2mqtt_log: TYPE varchar(255) NOT NULL DEFAULT ''
zigbee2mqtt_log: FIND datetime
@@ -1,144 +1,101 @@

<br>

<form action="?" method="post" enctype="multipart/form-data" name="frmEdit" class="form-horizontal">
<fieldset>

<div class="form-group">
<label class="control-label"[#if ERR_MQTT_CLIENT#] style="color:red;font-weight:bold"[#endif#]>
MajorDoMo Client:
</label>
<div class="controls"><input type="text" name="mqtt_client" value="<#MQTT_CLIENT#>" class="input"></div>
</div>


<div class="form-group">
<label class="control-label"[#if ERR_zigbee2mqttpath#] style="color:red;font-weight:bold"[#endif#]>
Zigbee2mqtt path:
(*)
</label>
<div class="controls"><input type="text" name="zigbee2mqttpath" value="<#ZIGBEE2MQTTPATH#>" class="input"></div>
</div>


<div class="form-group">
<label class="control-label"[#if ERR_MQTT_HOST#] style="color:red;font-weight:bold"[#endif#]>
Hostname:
(*)
</label>
<div class="controls"><input type="text" name="mqtt_host" value="<#MQTT_HOST#>" class="input"></div>
</div>

<div class="form-group">
<label class="control-label"[#if ERR_MQTT_PORT#] style="color:red;font-weight:bold"[#endif#]>
Port:
(*)
</label>
<div class="controls"><input type="text" name="mqtt_port" value="<#MQTT_PORT#>" class="input"></div>
</div>

<div class="form-group">
<label class="control-label"[#if ERR_MQTT_QUERY#] style="color:red;font-weight:bold"[#endif#]>
Subscription path:
(*)
</label>
<div class="controls"><input type="text" name="mqtt_query" value="<#MQTT_QUERY#>" class="input"></div>
</div>




<div class="form-group">

<label class="control-label"[#if ERR_VIEW#] style="color:red;font-weight:bold"[#endif#]>
zigbee2mqtt view mode:
</label>



<div class="col-md-1 input-group">


<select name="z2m_view" id="z2m_view" class="form-control">
<option value="container-fluid"[#if Z2M_VIEW="container-fluid"#] selected[#endif#]>container-fluid</option>
<option value="table"[#if Z2M_VIEW="table"#] selected[#endif#]>table(old)</option>
</select>






</div>
</div>




<div class="form-group">

<label class="control-label"[#if ERR_Z2M_LOGMODE#] style="color:red;font-weight:bold"[#endif#]>
zigbee2mqtt log level
[#Z2M_LOGMODE#]
:
(*)
</label>



<div class="col-md-1 input-group">


<div class="form-group">
<h3 class="controls" style="padding-top:0.5em">MQTT settings</h3>
</div>

<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_MQTT_CLIENT#] style="color:red;font-weight:bold"[#endif#]>Client name:</label>
<div class="col-sm-9">
<input class="form-control" type="text" name="mqtt_client" value="<#MQTT_CLIENT#>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_MQTT_HOST#] style="color:red;font-weight:bold"[#endif#]>Hostname: (*)</label>
<div class="col-sm-9">
<input class="form-control" type="text" name="mqtt_host" value="<#MQTT_HOST#>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_MQTT_PORT#] style="color:red;font-weight:bold"[#endif#]>Port: (*)</label>
<div class="col-sm-9">
<input class="form-control" type="text" name="mqtt_port" value="<#MQTT_PORT#>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_MQTT_QUERY#] style="color:red;font-weight:bold"[#endif#]>Subscription path: (*)</label>
<div class="col-sm-9">
<input class="form-control" type="text" name="mqtt_query" value="<#MQTT_QUERY#>">
</div>
</div>

<div class="form-group">
<div class="controls">
<label><input type="checkbox" name="mqtt_auth" value="1"[#if MQTT_AUTH="1"#] checked[#endif#]> authorization required</label>
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_MQTT_QUERY#] style="color:red;font-weight:bold"[#endif#]>Authorization:</label>
<div class="col-sm-9">
<div class="form-inline form-group">
<div class="input-group col-sm-6">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<input type="text" name="mqtt_username" value="<#MQTT_USERNAME#>" class="form-control" placeholder="Login">
</div>
<div class="input-group col-sm-6">
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
<input type="password" name="mqtt_password" value="<#MQTT_PASSWORD#>" class="form-control" placeholder="Password">
</div>
</div>
</div>
</div>

<div class="form-group">
<h3 class="controls">Zigbee2MQTT settings</h3>
</div>



<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_MQTT_QUERY#] style="color:red;font-weight:bold"[#endif#]>Folder path:</label>
<div class="col-sm-9">
<input class="form-control" type="text" name="zigbee2mqttpath" value="<#ZIGBEE2MQTTPATH#>">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_VIEW#] style="color:red;font-weight:bold"[#endif#]>View mode:</label>
<div class="col-sm-9">
<select name="z2m_view" id="z2m_view" class="form-control">
<option value="container-fluid"[#if Z2M_VIEW="container-fluid"#] selected[#endif#]>tiles</option>
<option value="table"[#if Z2M_VIEW="table"#] selected[#endif#]>table (old)</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" [#if ERR_Z2M_LOGMODE#] style="color:red;font-weight:bold"[#endif#]>Log level [#Z2M_LOGMODE#]:</label>
<div class="col-sm-9">
<select name="z2m_logmode2" id="z2m_logmode2" class="form-control">
<option value="debug"[#if Z2M_LOGMODE="debug"#] selected[#endif#]>debug</option>
<option value="info"[#if Z2M_LOGMODE="info"#] selected[#endif#]>info</option>
<option value="warn"[#if Z2M_LOGMODE="warn"#] selected[#endif#]>warn</option>
<option value="error"[#if Z2M_LOGMODE="error"#] selected[#endif#]>error</option>
</select>






</div>
</div>


<div class="form-group">
<div class="controls">
<label><input type="checkbox" name="mqtt_debug" value="1"[#if MQTT_DEBUG="1"#] checked[#endif#]> enable debmes message [#ZMQTT_DEBUG#]</label>
</div>
</div>


<div class="form-group">
<div class="controls">
<label><input type="checkbox" name="mqtt_auth" value="1"[#if MQTT_AUTH="1"#] checked[#endif#]> authorization required</label>
</div>
</div>


<div class="form-group">
<label class="control-label"[#if ERR_MQTT_USERNAME#] style="color:red;font-weight:bold"[#endif#]>
Username:
</label>
<div class="controls"><input type="text" name="mqtt_username" value="<#MQTT_USERNAME#>" class="input"></div>
</div>

<div class="form-group">
<label class="control-label"[#if ERR_MQTT_PASSWORD#] style="color:red;font-weight:bold"[#endif#]>
Password:
</label>
<div class="controls"><input type="password" name="mqtt_password" value="<#MQTT_PASSWORD#>" class="input"></div>
</div>


</div>
</div>

<div class="form-group">
<div class="controls">
<label><input type="checkbox" name="mqtt_debug" value="1"[#if MQTT_DEBUG="1"#] checked[#endif#]> enable debmes message [#ZMQTT_DEBUG#]</label>
</div>
</div>

<div class="form-actions">
<button type="submit" name="subm" value="Submit" class="btn btn-primary"><#LANG_UPDATE#></button>
<input type="hidden" name="view_mode" value="update_settings">
<input type="hidden" name="mode" value="update">
<input type="hidden" name="tab" value="settings">
</div>
</div>
</fieldset>
</form>

@@ -22,12 +22,13 @@

<style type="text/css">
#mynetwork {
width: 1000px;
height: 800px;
width: 100%;
height: 1200px;
border: 1px solid lightgray;
}
</style>


<script type="text/javascript" src="/templates/zigbee2mqtt/vis-4.21.0/dist/vis.js"></script>
<link href="/templates/zigbee2mqtt/vis-4.21.0/dist/vis-network.min.css" rel="stylesheet" type="text/css" />

0 comments on commit 4895b19

Please sign in to comment.
You can’t perform that action at this time.