TheThingSystem / steward

The Thing System is a set of software components and network protocols that aims to fix the Internet of Things. Our steward software is written in node.js making it both portable and easily extensible. It can run on your laptop, or fit onto a small single board computer like the Raspberry Pi.
http://thethingsystem.com
Other
346 stars 81 forks source link

ZWave not working #273

Open ErikDeBruijn opened 9 years ago

ErikDeBruijn commented 9 years ago

Hi! I was asked to create an issue, so here I'm happy to provide more details.

I'm trying to get Z-Wave working with the Aeon Labs stick. I've copied the configuration.json (based on the docs it wasn't immediately apparent that this needed to be done). For the RXCOM rxtx433 I'll create a separate issue.

db/configuration.json
{ "logconfigs"  :
  { "climate"   : { "console"           : { "level": "info"  } }
  , "media"     : { "console"           : { "level": "info"  } }
  , "motive"    : { "console"           : { "level": "info"  } }
  , "wearable"  : { "console"           : { "level": "info"  } }
  }

, "deviceTypes" :
  { "include"   : {
                  }
  , "exclude"   : { "gateway"           : [ "example-cloud"
                                          ]
                  }
  }

, "serialPorts" :
  {
    "openzwave-usb"
                : { "/dev/ttyUSB1"      : { "vendor"       : "AEOTEC"
                                          , "modelName"    : "Z-Stick S2"
                                          , "description"  : "Aeon Labs Z-Wave Z-Stick Series 2 USB Dongle"
                                          , "manufacturer" : "Silicon Labs"
                                          }
                  }
  }
}

In /var/log/steward.log I'm getting this:

info: [discovery] /dev/ttyUSB1 manufacturer=Silicon Labs, vendorID=undefined, productID=undefined, serialNo=undefined
info: [discovery] openzwave:184dda3:1 manufacturer=Aeon Labs, product=Z-Stick S2, type=Static PC Controller
info: [devices] found Z-Stick S2 deviceID=12, deviceType=/device/gateway/aeotec/usb

That's quite promising!

It would be great if the USB devices which cannot be discovered automagically would be configurable through the interface in the same way as the d3 client can add cloud services. Using a drop down so much more accessible, only second best to automatic config.

Let me know what other information I should provide.

zimler commented 9 years ago

Hi Erik - I'm also trying to get the Z-Stick working, could you go into a bit more detail regarding what you did, please? I'm referring to your comment I've copied the configuration.json (based on the docs it wasn't immediately apparent that this needed to be done).

ErikDeBruijn commented 9 years ago

I'm not sure whether the configuration.json does anything. I didn't find anything in the documentation about it yet. However I saw the configuration.json-example file and usually that means that you can copy that to configuration.json and use that. It's more a convention than something I read in any TTS related documentation.

zimler commented 9 years ago

Thanks for the reply. I'm trying to locate the steward config file where I would identify which port the Z-Stick is plugged into. I think that is where I am missing something, but same here. I haven't found anything in the documentation...

On Thu, Nov 13, 2014 at 2:31 PM, Erik de Bruijn notifications@github.com wrote:

I'm not sure whether the configuration.json does anything. I didn't find anything in the documentation about it yet. However I saw the configuration.json-example file and usually that means that you can copy that to configuration.json and use that. It's more a convention than something I read in any TTS related documentation.

— Reply to this email directly or view it on GitHub https://github.com/TheThingSystem/steward/issues/273#issuecomment-62960885 .

mrose17 commented 9 years ago

hi. here's how to see what is on your USB ports:

    cd steward/scripts
    node list-usb.js

that should print out what is attached to what...

zimler commented 9 years ago

Thanks mrose17.

In case anyone else is struggling here, I had to take a copy of the configuration.json.example file in the db directory, call it configuration.json (leaving it in the same db directory) and then properly identify in the file which TTY USB port my z-stick was. Then it all started to work. Some of my lights still aren't showing up, but at least one sensor is so I know it's working.

ErikDeBruijn commented 9 years ago

Still not working. So far I've done the following.

@mrose17 I'm getting this:

cd steward/scripts/
node list-usb.js

Output:

device #0
{"comName":"/dev/ttyUSB0","pnpId":"usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0"}

I have no experience with the Z-Wave devices yet. I have sensors, radiator knobs, alarm sirens, PIR, motion and temperature sensing devices.

After matching the curly bracket I finally made progress! image After pairing and putting the Z-Stick back into the steward (and restarting the service) I still needed to press a button on the Z-Wave devices to get anything to register on the console.html page.

Which devices can I expect it to support? I see the Multi-Sensor now shows up. The Danfoss Z-Thermostat isn't showing up in D3.

manufacturer=Danfoss, manufacturerid=0002, product=Z Thermostat, producttype=0005, productid=0003, type=Setpoint Thermostat, homeid=184dda3, nodeid=7, event=discovery, diagnostic=no deviceType