Skip to content

Commit

Permalink
Bugfix #1
Browse files Browse the repository at this point in the history
Fix for Issue #1  (Thank you @KrunkZhou)

Beta Release 1.1.2.6
  • Loading branch information
The009 committed Jan 18, 2020
1 parent 51d1868 commit 606715c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ extension_dir = "."
If you want the php_sockets.dll to be in a folder change ```extension_dir = "." ```to ```extension_dir = "folderName/"```

Then you are done. Open your fav CMD line app and use the usage examples above.

## Important Mentions:

@KrunkZhou for finding and fixing a bug with more then one dimmer. https://github.com/The009/SmartSwitchPHPController/issues/1
21 changes: 10 additions & 11 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@
<!-- JavaScript for sending of data -->
<script type="text/javascript">
$( document ).ready(function() {
$("#dimmverValue").change(function() {
$("#dimmverValue{$i}").change(function() {
$.ajax({
url: 'send.php',
type: 'get',
data: $("form").serialize(),
data: $("#form{$i}").serialize(),
success: function(response){
console.log("Enable debug in send.php for response");
console.log( response );
}
});
});
});
});

function SingleSend( givenIp, givenPort, reqAction, devTyp){
Expand Down Expand Up @@ -163,14 +163,13 @@ function displayDeviceList($csv){
echo <<<EOD
<p> </p>
<div id="slider_container">
<form>
<input id="deviceIP" name="ip" type="hidden" value="{$item["deviceIP"]}" />
<input id="devicePort" name="port" type="hidden" value="{$item["devicePort"]}" />
<input id="action" name="action" type="hidden" value="dimmerAdjust" />
<input id="deviceType" name="deviceType" type="hidden" value="{$item["deviceType"]}" />
<input id="dimmverValue" name="dimmerValue" type="range" min="1" max="100" step="1" value="50" />
</form>
<form id="form{$i}">
<input id="deviceIP" name="ip" type="hidden" value="{$item["deviceIP"]}" />
<input id="devicePort" name="port" type="hidden" value="{$item["devicePort"]}" />
<input id="action" name="action" type="hidden" value="dimmerAdjust" />
<input id="deviceType" name="deviceType" type="hidden" value="{$item["deviceType"]}" />
<input id="dimmverValue{$i}" name="dimmerValue" type="range" min="1" max="100" step="1" value="50" />
</form>
</div>
EOD;
}
Expand Down
2 changes: 1 addition & 1 deletion send.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
define('debug', false);

//Define The Version Number For the project due to everything requireing send.php
define('versionNumber', "1.1.1.6");
define('versionNumber', "1.1.2.6");

//No Further Options
$csv = array();
Expand Down

0 comments on commit 606715c

Please sign in to comment.