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 - mkbrown69

Pages: 1 ... 6 7 [8] 9 10 ... 14

Actually, if you're able to make the C++ 1-wire device template more flexible, to accommodate more of the OWFS supported devices, that may solve the problem.  Right now it's hard-coded to expect a serial type device, which rules out all the network, i2c, and other types of OWFS bus masters <>

In my case, I'd like to be able to use my Raspberry Pi as a networked OWFS control node.  I have some quick and dirty bash scripts running that do owreads into a variable, and then do a messagesend to a manually created device on the core.  Works well enough for proof-of-concept, and I can see the little Thermometer icon on the floor plans.

Just a thought...



Developers / Re: Questions about device table...
« on: January 06, 2013, 03:30:37 pm »

Thanks for the detailed explanations and good advice.  I'll keep it all in mind as I continue to learn about LMCE, and work towards implementing some of the things I'm working on.

Thanks for your time, and all the best for the New Year!


Developers / Questions about device table...
« on: January 03, 2013, 03:23:17 pm »
Happy New Year folks!

As I'm poking around under the hood trying to understand how some things bolt together so I can look at implementing some things I've been thinking about, I've got a few questions about how things work in the device table.

1. What is the purpose of the 'state' field?

2. Is the intention of the 'status' field to show a near-real-time status of the device in question?  Typically, what is responsible for updating that field?  Based on what's shown in the wiki, it's almost as if each device class or plugin is responsible for updating status.

3. As there is a MAC address and an IP address as part of the device's data, would it also not be prudent to have a hostname field as part of the device data?  It would make some aspects of managing the LMCE internal network a lot easier if that data were present in the device table, rather than derived and hard coded in external scripts or elsewhere in the database.  I'm looking at playing around with the 'workstation' aspect, and it would sure make my life easier if the hostname were there. (Note: there is a "#188 computer name" data point, but that seems like a WINS name field to me, but I could be mistaken).

If the core devs don't see an issue with that, I'll put a feature request ticket in for that schema change.  The core devs would be the ones with a full understanding of the possible effects that change would have, so I would think they'd want to handle any change to a core db table like device.

Also, one final question:  I manually changed a MD from a MD template to a workstation template in the Device table, and that seems to work.  Is that data recorded anywhere else besides the device table?

Thanks for your time, and happy home automation for 2013!


Users / Re: mythtv issue
« on: November 27, 2012, 10:02:20 pm »

On your core, run

sudo dpkg -s mythtv-frontend | grep Version

If Version is greater than 0.23, then you've installed a newer mythtv version than is presently supported on LinuxMCE.  Some surgery may be required to restore it to a working version...

Hope that helps!


Installation issues / Re: Strange NFS issue (or not)...
« on: November 17, 2012, 03:53:43 am »

The IBM card is coming up in raid mode (meaning it wasn't flashed into IT mode, which is a passthrough mode).  So, you'll want to set the I/O scheduler to 'noop' rather than deadline, and let the raid card handle the re-ordering of I/O operations.  

Code: [Select]
echo noop > /sys/block/sda/queue/scheduler
The default CFQ scheduler just adds unnecessary latency and I/O operations when feeding HBA's and RAID controller cards.  It's more useful on desktops/laptops with SATA disks.

Presuming those are consumer SATA drives, not SAS or enterprise SATA, you'll be limited by the spindle speeds.  Hopefully those aren't green drives; 7200 RPM and higher would be necessary as the root file system.

That raid card supports four ports, so depending on how it was cabled at the factory, you might have the other two ports available to you, in which case you could tuck an SSD inside the server case and Velcro it in.  It might be using SFF-8087 or 8088 cables, in which case you'll be out of luck for adding internal disks.  Take a look at which is for the IBM server you identified, and see how it compares to what you have.

Use the GigE switch for production usage.  It'll help, but your core issue is disk related.  You may also need to tune MySQL, as 5.1, InnoDB tables, and ext4 don't necessarily play well together, resulting in I/O waits which you'll definitely notice as everything is hitting the same set of spindles.



Installation issues / Re: Strange NFS issue (or not)...
« on: November 14, 2012, 06:50:06 pm »
(with a small SSD disk inside things could be very fast)
To make my life easier, when I first started designing the project specs, I was planning to install Linuxmce 810 final, but (on installation time) it would not see the IBM controller (serveraid M1015)..

As Thom said, you're I/O bound.  Your issues are the result of 10 NFS clients using the NFS shares as their root file system, so you have all sorts of random I/O's happening, including lots of writes due to logging.  I'm also presuming that the MySQL database which powers the application logic on the core is residing on the same spindle, so you're probably maxing out the IOPS of a single drive, and hitting wait states and timeouts as a result.  'top' and 'iotop' run on both the core and MD's will tell you for sure.

Things you can do to improve the situation:

  • Install your core's filesystem to an SSD.  You'll be going from 100 IOPS to 4K+ IOPS in one easy step.  If you can't re-install or move it, then add an SSD to the system using LVM, and create logical volumes which get mounted at /var/lib/mysql and /usr/pluto/diskless to host the IO intensive workloads.  Obviously, you'll need to move the contents of those directories while in single-user mode, then reboot.
  • If you can't do SSD, then use the RAID card in RAID 10 mode for the core's file system.  SSD would be better though for random I/O.  Either way, set the I/O scheduler for that /dev/sdX to 'deadline'.
  • If you have lots of memory on your MD's, consider making /tmp a tmpfs ramdisk
  • Consider setting vm.swappiness=1 i sysctl.conf on your MD's, to reduce swapping, or install a local disk for swap if you don't have enough memory on the MD's.
  • Tune the TCP stack for throughput on the core, and increase your memory buffers.
  • Use a really good network card for the internal network.  Intel GigE cards are typically the best on Linux; Realtek and NVIDIA on-boards are crap under heavy loads.  If you have a capable managed switch and a multi-port NIC (or multiple NIC's), you can look at port aggregation for increased bandwidth.  Or go 10G between the core and the switch if you have money to spare.  No matter what, you need a switch with a non-blocking fabric, capable of full wire-speeds for the number of ports available.

Hope that helps!


Users / Re: LinuxMCE community, lets talk.
« on: November 14, 2012, 04:02:07 am »
sad face. all i can say. bums me out to hear that we are basically suffering because of software we dont maintain. awesome :|

The problem with MythTV in LMCE is that it's 0.23, and that version had known stability issues.  When I had upgraded my (non-LMCE) MythTV, it was considerably more stable on 0.24 and 0.25 than it ever was on 0.23.  If we could upgrade the LMCE MythTV parts to support 0.25-fixes, that would likely address some people's stability issues.  0.26 introduces UTC time in the database, so the Level of effort there might be a bit higher at this point in time.  Besides, it's never a good idea to upgrade to a point zero release on any software... Let it get to 0.26.2 before considering it for inclusion when stability is key.

My $0.02 worth before HST.



Users / Firewall issues
« on: November 12, 2012, 04:27:36 am »
Good day folks!

I'm having some issues with the stock firewall settings (I added the "domain" TCP/UDP 53 ones via the LMCE firewall page to play with it).  Lots of packet denied messages, including localhost.

Code: [Select]
[1062546.521689] IPv4 packet denied: IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC= DST= LEN=57 TOS=0x00 PREC=0x00 TTL=64 ID=39621 DF PROTO=TCP SPT=47142 DPT=3450 WINDOW=770 RES=0x00 ACK PSH URGP=0

[1062570.285733] IPv4 packet denied: IN=eth1 OUT= MAC=ff:ff:ff:ff:ff:ff:52:54:00:a8:7f:eb:08:00 SRC= DST= LEN=68 TOS=0x00 PREC=0x00 TTL=128 ID=14050 PROTO=UDP SPT=52330 DPT=52330 LEN=48

[1062522.277283] IPv4 packet denied: IN=eth1 OUT= MAC=54:52:00:6a:5b:4b:00:0c:29:b5:fd:73:08:00 SRC= DST= LEN=136 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=703 DPT=2049 LEN=116

Interfaces are correct, eth0 is outside, eth1 is inside (LMCE network).

Code: [Select]
# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
LOG        all  --  anywhere             anywhere            limit: avg 5/min burst
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISH
ACCEPT     all  --  anywhere             anywhere            mark match 0x1
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
ACCEPT     all  --      anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Any ideas why localhost and the internal network are denying so many packets?

Code: [Select]
dcerouter_1021496:/var/log# cat syslog | grep "IPv4 packet denied" |wc -l
dcerouter_1021496:/var/log# cat syslog | grep "IPv4 packet denied" |grep |wc -l
dcerouter_1021496:/var/log# cat syslog | grep "IPv4 packet denied" |grep 192.168.80 |wc -l

Thanks for your time!


P.S.  disabling the firewall via the web admin doesn't actually disable or clear the firewall.   I had to clear with iptables -F and iptables -Z.

Users / Question about sambahelper user.
« on: November 05, 2012, 03:37:33 am »
Good day folks!

I've got a question about the sambahelper user.  Obviously, it's used on the core and on the MD's.  It's being assigned UID's in the "normal" unix user range, which can conflict with existing core and NIS users.  As you see below, it's inconsistent between what was created on moon72 and what was created on the core.

Code: [Select]
root@moon72:~# cat /etc/passwd | grep samba
sambahelper:x:1000:1000:Pluto Samba Share Helper:/tmp:/bin/false

root@moon72:~# ypcat passwd
mkbrown:x:1000:1000:Michael Brown,,,:/home/mkbrown:/bin/bash
sambahelper:x:1001:1001:Pluto Samba Share Helper:/tmp:/bin/false

The sambahelper user is created in PlutoStorageDevices/ It is created using the following code starting on lines 31

Code: [Select]
## Samba Share Helper
if [[ "$(id -u sambahelper)" == "" ]] ;then
        useradd -c "Pluto Samba Share Helper" -d /tmp -s /bin/false sambahelper

Wouldn't it be better to have it created as a "system" user using -r, or to statically assign something like -u 999 -g 999 ?

I'm throwing this out there for someone much more knowledgeable about this subsystem to educate me, or suggest I file a Trac ticket.

Thanks for your time!


Feature requests & roadmap / Re: Status / overview page?
« on: November 01, 2012, 02:59:03 pm »
some progress...
some graphs showing up now ... with zoom function...
i'll need to find a smart way to filter data and add a timeframe selector.

Looks good!  Spelling mistake for "usage" though...


Users / Re: Disk size incorrect / disk full?
« on: October 29, 2012, 06:04:20 pm »
I've done this for all folder (except /mnt/), and the total shouldn't be over the 25GB.
Or am i doing something wrong?
sudo du -h /foldername


One option is
Code: [Select]
sudo du -hxs /
And wait patiently... That will summarize everything under / that is on the same file-system as a total size (i.e. not mounted from a different disk, or the tmpfs filesystems).  x keeps it on the / file-system, and s gives you the summary, rather than each file or directory listed.

/home/camera (or cameras; going from memory here) will have videos and such of motion events, those can consume a lot of space.

If you want to find your largest files, try the following:

Code: [Select]
sudo du -ahx / | sort -h -r -o /tmp/largefiles.txt  && head -10 /tmp/largefiles.txt  

will net you your top 10 space hogs...



Feature requests & roadmap / Re: News flash
« on: September 05, 2012, 06:38:53 pm »
Just a thought...  It could be implemented as a re-usable component, like a Twitter/XMPP/RSS feed reader...


Developers / OT: climate plugin for local weather
« on: August 30, 2012, 03:07:25 pm »
I have played with the climate plugin to pull local airport weather (based on a wiki article, thank you to that author)

I'm interested in doing something like that too... Misterhouse has a "weather hash", and various scripts & plugins that will populate the weather hash (temperature, humidity, rain fall, wind speed, etc) to allow for automation to take action based on weather conditions.  Could you put up the link to the wiki article, and maybe describe how you're using it?



Installation issues / Re: [SOLVED] IP Camera in 1004
« on: August 21, 2012, 07:28:43 pm »
I need to thank you.
For the support, and the extra lessons...

I learned:
  • How to raise the loglevel (/etc/pluto.conf > 4,6,8,10)
  • Each device has his own log file (/var/log/pluto), based on the id
  • With the id. you can find a lot more in the global logfile (/var/log/pluto/DCErouter.log).
  • And that it isn't so difficult to create a template as it seems. ;)

I'd like to echo brononius, and say thanks as well.  I've been following this thread as I'm about to get my cameras configured (playing with the 2121 template, but will look at doing a DCS-930L soon - unless Armor Gnome beats me to it) after I finish something else I've been working on.  I'm guessing it's probably a bad thing to try to do a sql-cvs diff when working on multiple un-finished templates.

It's been very informative watching this thread progress.  Thanks for educating a few of us in the process.



Users / Re: Requesting Help (small wiring project)
« on: August 21, 2012, 07:19:59 pm »
There is a small cap between +'ve and gnd.  A few more caps around the usb connectors.
The caps will be important, as those are for DC power conditioning and noise suppression, so Armor Gnome will need to match those values in his build.  You could always post a pic of the parts if they're surface mount, and we could figure out the values for him.

Armor Gnome,

Make sure your ground pins are longer than your power pins.  For 'hot insertion' you always want ground to make first, and break last to prevent damage to your electronics.


(former telecom R & D lab technician)

Pages: 1 ... 6 7 [8] 9 10 ... 14