The files contained in this repository can be downloaded to your computer using a svn client.
On Linux you simply type the command displayed below.

This URL has Read-Only access.

Statistics
| Revision:

root / trunk / tools / dumpdevices.sh @ 741

History | View | Annotate | Download (891 Bytes)

1 293 rdnzl
#!/bin/sh
2 293 rdnzl
# Script to dump the most important DomotiGa device info (not all)
3 293 rdnzl
# to cli in csv format.
4 293 rdnzl
5 293 rdnzl
# DomotiGa - an open source home automation program.
6 293 rdnzl
# Copyright(C) 2008-2010 Ron Klinkien.
7 293 rdnzl
8 293 rdnzl
mysql -udomouser -pkung-fu domotiga -B -e "SELECT devices.id,devices.name,address,module,devicetypes.name AS devicetypename,interface, interfaces.name AS interfacename,location,locations.name AS locationname,value,label,value2,label2,value3,label3,value4,label4,calibration,divider,calibration2,divider2,calibration3,divider3,calibration4,divider4,onicon,dimicon,officon,firstseen,lastseen,lastchanged,enabled,hide,log,groups,batterystatus,comments FROM devices LEFT JOIN interfaces ON interfaces.id = devices.interface LEFT JOIN devicetypes ON devicetypes.id = devices.module LEFT JOIN locations ON devices.location = locations.id ORDER BY devices.id;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g'