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.


Topics - mkbrown69

Pages: [1] 2
1
Users / GSD issues - all devices died.
« on: August 04, 2015, 04:06:35 am »
Hi folks!

I have an issue with all my GSD devices are dying and re-spawning until they hit the 50 retries. Both (the Radio Thermostat and the ISY994i driver) die with the same result code.

Code: [Select]
1843:#### START SETTERS #############################################################
#######
1844:def initialize()
1845:super
1846:@returnParamArray=Array.new
1847:end
1848:####  END  SETTERS #############################################################
#######
1849:end
1851:Return code: 134
3       08/03/15 09:59:41       189 (spawning-device)   Device died... count=34
/50 dev=189

I'm running 12.04 with the latest updates.  I notice from the 12.04 Wiki page that the requirement for Ruby 1.9 was added recently. Both Ruby 1.8 and 1.9 are presently on the system.

I'm wondering if anyone else has experienced similar issues. My likely next steps are to look at either reverting the 1.9 installation back to 1.8, or removing all the 1.8 Ruby packages. 

Anyone know what result code 134 means?

Thanks!

/Mike

Update:  I reverted back to pluto-generic-serial-device_2.0.0.46.14081629241_i386.deb (as it was the only previous version I could find in my package caches), and removed Ruby 1.9, restarted DCERouter, and my GSD devices are back in business!

/Mike

2
Users / Proxy Orbiter crashing (Re: web orbiter refresh)
« on: March 06, 2014, 07:36:10 pm »
Hi Folks!

Not to hijack the thread; is the web orbiter code also used for the Proxy Orbiters (like for Roaming Orb)?  I have problems with those just dying, and having to reboot the core to get them to work.  Happens in both 10.04 and 12.04.

Now back to your regularly scheduled discussion thread...  ;)

/Mike

3
Developers / DNS inconsistencies, input sought.
« on: January 09, 2014, 04:10:59 am »
Hi Folks!

Being a sysadmin type, I'm now trying to work my way through various sysadmin type Trac issues.  I just patched a NIS issue (Thanks Phenigma for committing it!), and now I'm currently working on a DNS related one.  I'm doing the relevant patches against 10.04, and will diff against 12.04 as well (I'm currently running 10.04, and plan to do an in-place upgrade).

http://svn.linuxmce.org/trac/ticket/1769

Some of this is easy to fix, but some needs some input.  Three scripts actually backup and manage aspects of resolv.conf on the core (trunk/src):
BootScripts/Network_DNS.sh
BootScripts/Network_Parameters.sh
BootScripts/Network_Setup.sh

Would it not be better/easier to maintain if only one script managed that resolv.conf file?  I may be missing out on why it is the way it is, so I thought I'd put it out there for those more knowledgable about LMCE internals to comment...

Thanks for your time!

/Mike

4
Developers / New Template ISY994i uploaded
« on: December 07, 2013, 04:32:01 am »
ISY994i Template Release notes

Initial checkin, Trac ticket #1999 committed Dec. 6, 2013 at 22:20 EST.  Would someone be able to review and approve it, please?  Edit: Forgot to mention, it's a SQLCVS anonymous commit...

Wiki Page for driver: http://wiki.linuxmce.org/index.php/ISY994i

Working Features:

Insteon/X10 Devices and Insteon Scenes
Automatic device creation in LMCE
Automatic creation of Insteon Scenes as dimmable child devices
Generates status update events to LMCE
Control of devices and scenes using orbiters

Future work/To-Do list:
- finish up device status, config routines and logic
- integrate orbiter alerts
- add more events support
- add more device support and verbosity
- Insteon Keypad support (basically implemented using related devices)
- relate ISY folders to LMCE rooms (and logic applied
- Integrate ISY WeatherBug module with 1204's WeatherPlugin

Thanks!

/Mike

5
Developers / Need some design advice
« on: October 09, 2013, 06:55:36 pm »
Good Day folks!

I'm hoping Thom, posde, phenigma, or anyone else who's familiar with the guts of LMCE can sanity check and provide some advice on what I'm thinking below...

I'm working on my ISY driver, and getting to the parts where it will create devices in LMCE based on what exists in the ISY.  The idea is that the ISY "owns" the devices that are linked to it (Insteon for now, possibly UPB and Zwave in future versions of the driver and hardware), and it will inform LMCE about the devices and their configuration.  Generally, that is easy and works presently in my driver.  The way the ISY works is that there is a Java-based management console that is used to configure and administrate the system, and add and mange connected devices.  The API and subscription channel are used to interact with and monitor/react to events from the ISY, for integration into Home Automation systems.  Most things are fairly straight forward to implement from the LMCE point of view. There are a few devices/features I'm not quite certain as to the best way to implement them, which is why I'm asking for advice.

The first is Insteon keypads (Dimmer or relay switched).  There are 6 and 8 button models; the 6 button has an 'on' and an 'off' button (which appears as one load control switch remotely), and 4 other buttons.  The 8 button model has one load control button, and 7 other buttons.  The other buttons can be triggers for Insteon scenes (which I'll get to next), or can be cross-linked to other switches.  For example, I have a 6 button KeypadLinc in my breakfast nook, that is linked to the switches in the kitchen and family room.  Now, I could create a device template for it, but I think I could simply use the generic Light Switch on/off and Light Switch dimmable templates, and use the configuration field to store the required information.  Here's the part I'm not sure about.  The "other" buttons are a part of the switch, but are not controlling the parent switches load (unless they are part of a scene involving the parent switch).  Is is possible to create child devices of a generic light switch, and would it be a good ideal?  Or should they be treated as peers and grouped or related somehow?

Insteon Scenes are my next challenge;  basically, they are a pre-programmed into the various devices which comprise the scene (using a scene identifier, level, and ramp rate), and then are triggered by the scene broadcast message.  The nice thing about scenes is that they happen simultaneously (all member devices respond to the broadcast message directly), and being programmed into the target devices, they work even if the automation controller goes down.  Scenes triggered via the protocol have an on/off capability, and a relative dim/bright capability (in which all scene members will brighten or dim as the scene button is held, relative to their scene levels).  The thing is, a scene can't be queried directly; it's just a broadcast message on the Insteon network.  Scene members have to be queried directly for their status (and that's covered already in the subscription channel in the driver).  So, I'm wondering if I should create a device template for an "Insteon Scene", which has a data field consisting of the members of that scene?  Or would an LMCE group work?  If an LMCE group would work, can I generate and modify them using LMCE events?  Or should just use a generic light switch for a scene, and handle it all in my driver using the configuration field information?

The last thing I'm wondering about is the ISY concept of "folders".  The ISY has a feature (not Insteon specific) that allows you to group related items (by room, by function, whatever).  A device/scene/program can be assigned to only one folder.  Would that capability translate directly to an LMCE group?  If I were to use groups for ISY folders, are there any problems or gotchas with doing that?  Can I create/modify groups using LMCE events?

The ISY also has "programs" and "variables" which are used on the controller for conditional if/then/else type events and automation.  Those are all visibly exposed via API's and the subscription channel for event status updates.  I'm not even looking at dealing with them right now, is this version of the driver.  I'll look at those later when the driver is mature and stable for production usage, but if anyone has thoughts on those, I'd be happy to hear them!

Thanks for your time!

/Mike

6
Developers / New Radio Thermostat CT-80/CT-30 template uploaded
« on: October 07, 2013, 04:44:21 am »
Hi Folks!

I've done an anonymous check-in of changes for the Radio Thermostat Template.  Trac #1931, committed at 22:32 on 2013-10-06.

Could someone please review the SQLCVS commit, and let me know if I did it right?  It's my first time committing using SQLCVS.

Thanks for your time!

/Mike

7
Users / Radio Thermostat owners: can you help me out on new driver?
« on: August 30, 2013, 04:31:18 am »
Hi Folks!

I'm currently working on a driver for the Radio Thermostat CT-80, which uses the API.  Because it uses the API, it's a possible universal driver for all Radio Thermostat models.  I've based mine on Sean's (aka WhateverFits) excellent 3M50 driver (thanks for the great work Sean!), and updated it for the additional capabilities of the CT-80 plus other API features which should work with other models. There's been a bit of discussion in this thread:  http://forum.linuxmce.org/index.php/topic,13336.0.html

In order to try and make this a universal driver, I'm hoping some other Radio Thermostat owners could do me a favor, and post the results of a few URL's off of your thermostat.  That way, I can make sure I don't break anybody's usage of their thermostats if they try my driver.  ;). So, if you have a 3M50, a CT-30, or a CT-80, if you could post the results of some URL's, it would let me make sure that I'm not making assumptions on the capabilities of the various models, as the API docs don't go into enough specifics as to what devices have which capabilities.

You should be able to use a web browser, and just paste the URL's into the browser address bar.  I'll also post a curl version people can run from the core via command line.  Just substitute the xxx with the proper address of your thermostat (or the full IP if you're not using the normal subnet range for the LMCE network)

Code: [Select]
http://192.168.80.xxx/tstat/model

http://192.168.80.xxx/sys

http://192.168.80.xxx/tstat/help

http://192.168.80.xxx/tstat/eventlog

Code: [Select]
curl http://192.168.80.xxx/tstat/model

curl http://192.168.80.xxx/sys

curl http://192.168.80.xxx/tstat/help

curl http://192.168.80.xxx/tstat/eventlog

Thanks for your assistance with this!

/Mike

8
Developers / GSD command question
« on: July 21, 2013, 02:58:38 pm »
Morning folks!

I have a question about a particular command:  #246 Set Device Data.  I'm trying to use it in a couple of drivers to obtain information and update LMCE.  In this case, I'm grabbing the model information from a thermostat to update Device Data 233 (Model), so that could be used in conditional logic in the driver to use or disable enhanced features, depending on model.

The model info retrieved looks like this "CT80 Rev B2 V1.03" (including the quotes).  The commented out line in the code below strips the quotes, the line below it leaves them intact. 

Code: [Select]
def get_model()
  log("get_model called")
  @data = ""
  @data = get_data("/tstat/model").to_s
  @data = @data.split(":")
  #@model = (@data[1]).to_s.gsub("}","").gsub! /"/, ''
  @model = (@data[1]).to_s.gsub("}","")
  log(@model)
  cmd = Command.new(device_.devid_, -1001, 1, 2, 246)
      cmd.params_[2] = (device_.devid_).to_s
      cmd.params_[52] = '233'
      cmd.params_[5] = @model.to_s
      SendCommand(cmd)
  rescue => e
    log("Error in get_model: " + e.message)
    log(e.backtrace)
    @model
end

The problem is, it's not working for me.  I've worked out any errors, so the routine runs error free.  But it doesn't do anything... Can anyone help me figure out what I'm doing wrong?

Should the cmd.params_[52] = '233' use a constant with a to_s instead? 
Should  cmd.params_[5] = @model.to_s have quoted or non-quoted information in the variable?

Thanks!
/Mike

9
Developers / Question about GSD...
« on: March 19, 2013, 03:25:45 am »
Good day folks!

I'm working on a device template using GSD for an IP enabled device, and I was wondering if it's possible to obtain the IP address of the device from device data?  I'm building various URL's for device control, and it would be cleaner to be able to retrieve the IP address from the device's data...

Thanks for your time!

/Mike

10
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. http://wiki.linuxmce.org/index.php/Device_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!

/Mike

11
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=127.0.0.1 DST=127.0.0.1 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=192.168.80.245 DST=255.255.255.255 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=192.168.80.4 DST=192.168.80.1 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  --  192.168.80.0/24      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
6283
dcerouter_1021496:/var/log# cat syslog | grep "IPv4 packet denied" |grep 127.0.0.1 |wc -l
2776
dcerouter_1021496:/var/log# cat syslog | grep "IPv4 packet denied" |grep 192.168.80 |wc -l
3243

Thanks for your time!

/Mike

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.

12
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/mkr_postinst.sh. 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
fi

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!

/Mike

13
Users / Is it supposed to behave like this?
« on: May 04, 2012, 03:14:49 pm »
Morning folks!

I've been playing around with LMCE 10.04 in a test environment for a while now.  I'm mostly using iDevices and RoamingOrb to access it, and I've noticed that if the core has detected a NAS or something like that which causes a message to appear on the Orbiters asking the user to do something about it, the Proxy/Web Orbiters that RoamingOrb depend on are blocked and become un-responsive.  The web orbiter is also similarly blank.  Is it supposed to behave that way?  Could something be done to prevent the RoamingOrb orbiters from being blocked?  I'm thinking of the use case where someone might only have iDevices and uPnP boxes, and a blocking event might cause the (non-technical) user to think the system was broken or locked up.

Thanks for your time!

/Mike

14
Users / MD idle shutdown?
« on: April 21, 2012, 01:28:00 am »
Good day folks!

I've noticed that when the core restarts, it wakes up the MD's.  Given that they stay running, I'm presuming that there isn't an idle shutdown/sleep function, correct?  I'm just trying to confirm that it doesn't have an idle shutdown;  if it does exist, then I'll have to figure out why it's not working...

I'm running 10.04.

Thanks for your time!

/Mike

15
Users / Cameras, Motion, and notifications
« on: April 03, 2012, 05:19:30 am »
Good day folks!

Could someone familiar with the camera, motion wrapper, and e-mail (or other) notifications possibly point me in the right direction?

I have two DCS-930L IP cameras configured with motion wrapper, which are visible on RoamingOrb and the Admin site (I'm not running MD's yet other than for preliminary testing).  The cameras have on-board motion detection and e-mail alerting, which I'm presently using to e-mail me about motion events.  The onboard software is pretty limited, so I get spammed when light levels change, and when I'm home, and so on.  I'd like to move the alerting and e-mail notification to LMCE, so I can add some smarts to it using event logic, and I'm wondering if:

A) it's functionality that presently exists, or if it'll take something like kmotion,
B) if so, what kind of event is emitted by motion wrapper (tripped, motion, true/false, number of pixels...), and
C) if anyone else is doing the same thing, and how is it working out for them

I'm just hoping to avoid running down a few rabbit holes... I've tried putting together some events, but not sure if I'm on the right track.  If someone could point me in the right direction, I'll go looking for the light  ;)

Thanks!

/Mike

Pages: [1] 2