Skip to content
Permalink
Browse files

Updates

* Motion sensors: update time not changing now when VALUE=0
* Plans: support for custom CSS classes for states
* thumbnail module: notices removed
* CONNECT: local ip sending
* CONNECT: minor text description updates
  • Loading branch information...
sergejey committed Mar 7, 2019
1 parent 2fe162a commit 2a19a205ccc0707f9fd99129f0cf32c608bc6dd9
@@ -485,6 +485,8 @@ function sendAllDevices()
}
}
$fields['devices_data'] = json_encode($devices);
$fields['local_url'] = getLocalIp();
//DebMes("Posting all devices to $url",'device_sync');
//DebMes($fields['devices_data'],'device_sync');
$ch = curl_init();
@@ -626,9 +628,11 @@ function getCurlValue($filename, $contentType, $postname)
$fields = array(
'datafile' => $cfile,
'merge' => 1,
'force_data' => $force_data
'force_data' => $force_data,
'local_url' => getLocalIp()
);
//open connection
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
@@ -3,9 +3,11 @@
$ot = $this->object_title;
$linked_room = $this->getProperty('linkedRoom');
$tm = time();
$this->setProperty('updated', $tm);
$this->callMethod('setUpdatedText');
if ($this->class_title != 'SMotions' || $params['NEW_VALUE']) {
$tm = time();
$this->setProperty('updated', $tm);
$this->callMethod('setUpdatedText');
}
$this->setProperty('alive', 1);
@@ -18,6 +20,7 @@
$need_call_logic_action = 1;
if ($this->class_title == 'SMotions' && $params['NEW_VALUE'] && !timeOutExists($ot . '_motion_timer_status')) {
$this->callMethodSafe('motionDetected', array('statusUpdated' => 1));
} elseif ($this->class_title == 'SButtons' && $params['NEW_VALUE'] && !timeOutExists($ot . '_pressed_status')) {
@@ -408,6 +408,9 @@ function getImageItems($plan_id) {
}
function getCSSClasses($plan_id) {
$plan_rec=SQLSelectOne("SELECT * FROM plans WHERE ID=".(int)$plan_id);
$classes=array();
$classes[]=array('CLASS'=>'show_it','TITLE'=>LANG_STYLE_SHOW_IT);
@@ -417,6 +420,14 @@ function getCSSClasses($plan_id) {
$classes[]=array('CLASS'=>'fadeout30','TITLE'=>LANG_STYLE_FADEOUT30);
$classes[]=array('CLASS'=>'fadeout10','TITLE'=>LANG_STYLE_FADEOUT10);
if ($plan_rec['CUSTOM_CSS']!='') {
if (preg_match_all('/\.([^\s{\n\.]+)/is',$plan_rec['CUSTOM_CSS'],$m)) {
foreach($m[1] as $class) {
$classes[]=array('CLASS'=>$class,'TITLE'=>'CSS: '.$class);
}
}
}
return $classes;
}
Oops, something went wrong.

0 comments on commit 2a19a20

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