Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - brononius

Pages: 1 2 3 [4] 5 6 ... 26
46
Users / Re: Can i clean out /home/coredump?
« on: December 13, 2012, 03:48:31 pm »
Me too.   :P

I think it's related to the IP-camera issue.

But since i'm using a small SSD card of 60GB for my os, i'm trying to keep the diskspace as healthy as possible.
So the dumps will be dumped. Thanks!

47
Users / Can i clean out /home/coredump?
« on: December 13, 2012, 11:32:02 am »
Hey,

I've noticed that i've got about 5gig of coredumps in /home/coredump.
Most files are from days ago.

I'm wondering if i can safetly remove these files.
Or will this be done automaticly?


48
Users / Re: Pluto_media over 5,5GB?
« on: December 12, 2012, 08:05:28 am »
When i check this today, i've got following after the 'DELETE FROM File WHERE Missing = 1;'

Database pluto_media:
      table FILE
            Records: ~3,608,448
            Size: 4,1 GB
      table FILE_ATTRIBUTE
            Records: ~2,470,705
            Size: 310,7 MB


I've got some media, but 4gigs of 'inventory' in a database is a bit much, no?
And 3 million records? I don't think i got this amount of files...  :-[

Is there a way i can clean out the whole database/table and start over?
I suppose a purge of the table FILE isn't a good idea?

49
Installation issues / Re: [SOLVED] IP Camera in 1004
« on: December 10, 2012, 09:39:11 am »
I think i'm having a simular issue.
After a complete reinstallation of my machine, my camera snapshots (admin>security>view camera's) sometimes show by refresh, sometimes not.

When i open a log of an IP-camera, i've got:

Quote from: sudo tail -50 340_Advanced_IP_Camera.log
var oray_type=0;
var upnp_status=0;
 <0xb7769b70>
05   12/10/12 9:33:21.978      InputStatusChanged: old status = 0, new status = 0 <0xb7769b70>
Return code: 134
3   12/10/12 09:33:22   340 (spawning-device)   Device died... count=49/50 dev=340
Mon Dec 10 09:33:22 CET 2012 died
========== NEW LOG SECTION ==========
1   12/10/12 09:33:32   340 (spawning-device)   Starting... 50
1   12/10/12 09:33:32   340 (spawning-device)   Found /usr/pluto/bin/Advanced_IP_Camera
05   12/10/12 9:33:32.757      m_vectEventMethod.size() = 5. Configured EventMethods: <0xb76f66f0>
05   12/10/12 9:33:32.757      GetConfig(): EventMethod 1, m_bRunning = 26, m_sMethod = urlPoll, m_sURL = /get_status.cgi, m_iInterval = 10, m_vectInputDevices = [ m_dwPK_Device = 341, m_dwFK_DeviceTemplate = 54, status = (null), m_sTriggerMethod = pattern, m_sPatternOn = var alarm_status=1;, m_sPatternOff = var alarm_status=0;,  ] <0xb76f66f0>
05   12/10/12 9:33:32.757      m_mapPK_Device_OutputDevice.size() = 0. Configured OutputDevices: <0xb76f66f0>
05   12/10/12 9:33:32.758      Creating child 341 <0xb76f66f0>
05   12/10/12 9:33:32.758      Note: Device manager has attached a device of type 54 that this has no custom event handler for.  It will not fire events. <0xb76f66f0>
05   12/10/12 9:33:32.758      Note: Device manager has attached a device of type 54 that this has no custom handler for.  This is normal for IR. <0xb76f66f0>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var alias='Sentio';
var now=236957;
var tz=-7200;
var alarm_status=0;
var ddns_status=0;
var <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var now=236957;
var tz=-7200;
var alarm_status=0;
var ddns_status=0;
var ddns_host='';
var oray_type=0;
var  <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var tz=-7200;
var alarm_status=0;
var ddns_status=0;
var ddns_host='';
var oray_type=0;
var upnp_status=0;
 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var alarm_status=0;
var ddns_status=0;
var ddns_host='';
var oray_type=0;
var upnp_status=0;
 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
Return code: 134
3   12/10/12 09:33:33   340 (spawning-device)   Device died... count=50/50 dev=340
Mon Dec 10 09:33:33 CET 2012 died
3   12/10/12 09:33:43   340 (spawning-device)   Aborting restart of device 340...

50
Users / Re: [SOLVED] Events: Stop ringing extension
« on: December 05, 2012, 11:13:01 am »
I vote, i don't care... :-[

I had a problem, linuxMCE couldn't provide me a solution 'out-of-the-box', and i found a solution.

Is it a good solution? I'm sure there are better ways. But what is good?
This is just one of the biggest advantages of Linux(mce).  That you're free to do whatever you want with it.


And i didn't added a feature request. Since i don't have a clue what/how/why/where this is.

51
Users / Re: [SOLVED] Events: Stop ringing extension
« on: December 05, 2012, 08:39:10 am »
Maybe worth a page in the wiki

For the moment, i'm gathering everything on my own intranet: linuxmce and eibd+events...  :-\ 
For me personally, the linuxmce wiki is to much chaos. I can't find an overview in it. But this is another topic...

I'm thinking to create a kind of 'event' scenario's. Situations from the real life... Where people can see what's possible with linuxmce...

52
Users / Re: Events: Stop ringing extension
« on: December 04, 2012, 03:34:48 pm »
I found a solution that works for me. ;)

First create some scripts files:

more /scripts/sys_call_doorbell_201_org.call
Code: [Select]
Channel: Local/201@from-internal
callerid: "Deurbel" <200>
WaitTime: 3
Context: outgoing
Extension: 200
Priority: 1

more /scripts/sys_call_doorbell_205_org.call
Code: [Select]
Channel: Local/205@from-internal
callerid: "Deurbel" <200>
WaitTime: 3
Context: outgoing
Extension: 200
Priority: 1

...
Create this for all you phone extension. Or at least fo the phones you want to have in this scenario.
 
Then you can create a script to call the phones. You can put nice sequences in it, all depending on your house.

more /scripts/sys_call_launch_doorbell_normal.sh
Code: [Select]
#!/bin/bash
 
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_205_org.call /scripts/sys_call_doorbell_205.call
mv /scripts/sys_call_doorbell_205.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_206_org.call /scripts/sys_call_doorbell_206.call
mv /scripts/sys_call_doorbell_206.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_202_org.call /scripts/sys_call_doorbell_202.call
mv /scripts/sys_call_doorbell_202.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_203_org.call /scripts/sys_call_doorbell_203.call
mv /scripts/sys_call_doorbell_203.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_207_org.call /scripts/sys_call_doorbell_207.call
mv /scripts/sys_call_doorbell_207.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_208_org.call /scripts/sys_call_doorbell_208.call
mv /scripts/sys_call_doorbell_208.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_205_org.call /scripts/sys_call_doorbell_205.call
mv /scripts/sys_call_doorbell_205.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_206_org.call /scripts/sys_call_doorbell_206.call
mv /scripts/sys_call_doorbell_206.call /var/spool/asterisk/outgoing/.
And another scenario for 'night' simulation:

more /scripts/sys_call_launch_doorbell_atelier.sh
Code: [Select]
#!/bin/bash
 
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_203_org.call /scripts/sys_call_doorbell_203.call
mv /scripts/sys_call_doorbell_203.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_208_org.call /scripts/sys_call_doorbell_208.call
mv /scripts/sys_call_doorbell_208.call /var/spool/asterisk/outgoing/.
sleep 1
cp /scripts/sys_call_doorbell_201_org.call /scripts/sys_call_doorbell_201.call
mv /scripts/sys_call_doorbell_201.call /var/spool/asterisk/outgoing/.
cp /scripts/sys_call_doorbell_204_org.call /scripts/sys_call_doorbell_204.call
mv /scripts/sys_call_doorbell_204.call /var/spool/asterisk/outgoing/.

Once this is build, you can start using them when somebody push the doorbel. It just a matter of triggering the right scenario (app server / spawn application)...
See attachments for more information on this...

ps you can even call your cellphone when somebody hits the doorbell... ;)

53
Installation issues / Re: Phone line goes down?
« on: December 04, 2012, 03:11:20 pm »
I've improved this workaround a bit. No longer with 'timed event', but with a real service restart check:

Intro: When LinuxMCE is restarted, the SIP provider isn't regristed anymore. You need to place 1 outgoing call, and then it's solved. Of course, when you reload the router (=restart the linuxmce service), then you need to replace an outside phonecall.

Since it's a bit hard to keep this in mind for the rest of your life, i've added a kind of check script. This script is placed in the crontab, and checks each x-minutes if the service 'asterisk' has been restarted. If it isn't, it does nothing. If it is, i'll place a file into /var/spool/asterisk/outgoing and will call this number.

In this example below, change 0123456789 with your external number. I've put my own phonenumber in here. So it's just initate the call, and drops it after 1 second.



more /scripts/sys_call_outside_org.call
Code: [Select]
Channel: Local/0123456789@trusted
WaitTime: 1
Context: outgoing
Extension: 200
Priority: 1

more /scripts/sys_call_check.sh
Code: [Select]
#!/bin/bash

if tail -20 /var/log/asterisk/full | grep "chan_sip.c: SIP channel loading"
then
  : # colon is a null and is required
  #Run Script to launch an outgoing call
sudo /scripts/sys_call_launch.sh
#Add additional log files"
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The service for Asterisk has been apparantly been restarted." >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............" >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..............." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................" >> /var/log/asterisk/full
else
    echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' has nothing to do..." >> /var/log/asterisk/full
fi


if tail -100 /var/log/pluto/18_Asterisk.log | grep "Got a reload command from 0"
then
  : # colon is a null and is required
  #Run Script to launch an outgoing call
sudo /scripts/sys_call_launch.sh
#Add additional log files"
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Asterisk has been apparantly been restarted by Linxumce." >> /var/log/asterisk/full
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/asterisk/full
echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' launched a outgoing call" >> /var/log/pluto/18_Asterisk
.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..............." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated...................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated....................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated......................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated........................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.........................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated..........................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............................" >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated............................." >> /var/log/pluto/18_Asterisk.log
        echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "Systemcall was initiated.............................." >> /var/log/pluto/18_Asterisk.log

else
    echo "[""$(date +%h)" "$(date +%d)" "$(date +%T)""]" "The script '/script/sys_call_check.sh' has nothing to do..." >> /var/log/pluto/18_Asterisk.log
fi

more /scripts/sys_call_launch.sh
Code: [Select]
#!/bin/bash
sleep 60
cp /scripts/sys_call_outside_org.call /scripts/sys_call_outside.call
mv /scripts/sys_call_outside.call /var/spool/asterisk/outgoing/.

more /etc/crontab
Code: [Select]
<knip>
*/7 * * * *     root    /scripts/sys_call_check.sh &> /dev/null
</knip>


Comments to improve this more are of course welcome...

54
Users / Re: DAY/NIGHT = Time or 'timeframe'?
« on: December 04, 2012, 02:52:43 pm »
OK, i figured it out...

  • Add a "Respond To Events"
  • Insert a description
  • Choose from dropdown 'New Event': Sunrise (or sunset)
  • Add you command

So in fact, when you look now at the event, you'll see that the "criteria" are empty.

55
Feature requests & roadmap / Re: Status / overview page?
« on: December 04, 2012, 02:49:11 pm »
UPDATE: Before i ran a script to read the sunrise/-set from the log files. This wasn't best practice since it was a higher load for the system, just to get this value.
I found out that php has a command date_sunrise and date_sunset that calculs your sunrise timing. This based on your lattitude and longitude. And let these values now be in the database.

So i've update the status page:
  • first grep the latt and long from the db
  • get the offset from the timezone
  • use this with date_sunrise
  • ...

http://oniriabe.dyndns.org:1111/status/

56
Users / Trigger script with respond to events
« on: December 01, 2012, 08:47:40 am »
Perfect!!!!
This opens a whole new box of oppurtunities to play around with...  ::)

Didn't understand the term 'spawn'. But now i do... ;)

57
Users / [SOLVED] Trigger script with respond to events
« on: November 30, 2012, 01:57:03 pm »
What's the best way to start a homemade script with respond to events?
I couldn't figure out what kind of event command i need to use.
Is this #28 PK_CommandGroup (int)

fe when you push a light switch, it should trigger '/scripts/startprinting.sh'

58
Users / Re: DAY/NIGHT = Time or 'timeframe'?
« on: November 27, 2012, 08:44:20 am »
There are events for sunset and sunrise, you can use those instead.
http://wiki.linuxmce.org/index.php/Event_criteria#Time_of_Day.

I fail to understand it. :$

So i choose a 'respond to events' and in events, i add 'Time of Day = DAY'?
Doesn't this say that it will be triggerd the whole day? Or only at sunrise?

I've also tried to add an advanced event, and in 'New event' i've chosen 'general > sunrise'.
But when i check now the events, this is empty? Is this normal?

59
Users / Re: LMCE right for me?
« on: November 26, 2012, 08:02:09 am »
All things are possible. I'm using them in a reallife situation (home automation, IP-phones, IP-camera's, data...)

The only thing i really miss in the whole LinuxMCE story is a nice backup system for you data.
But this can be solved with some tricks. I use fe a NAS with rdiff to backup all my data/config nightly.



60
Users / Re: LMCE & security
« on: November 26, 2012, 07:57:32 am »
Usually there is a router before the core anyways

You can mostly add additional security features on this router (fe buildin firewall).
Or to be 100% safe, add a real firewall device in front of it. Of course, this is an extra device (power consumption, configuration work...)

Pages: 1 2 3 [4] 5 6 ... 26