LinuxMCE Forums
June 20, 2013, 07:38:08 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Bulk import  (Read 334 times)
brononius
Guru
****
Posts: 361


Trying to keep it simple and centralized...


View Profile WWW
« on: August 14, 2012, 07:03:44 am »

I'm having a lot of switches in my home (light bulb, power outlets, switches...). And of course, i can add them one by one. But this would take hours. So I'm wondering if there isn't a way to import them in bulk into linuxmce.

Can i insert them 'simply' in the database from fe a csv? Or are their different places that are impacted?  Huh

An example of a csv could be:
descriptiontemplatecontrolledlocationchannel
Light kitchen37EIBDKitchen1/1/1|1/2/1
Light bedroom37EIBDBedroom1/1/3|1/2/2
Light office37EIBDOffice1/1/3|1/2/3
Lightswitch kitchen 1x1624EIBDKitchen2/1/1
Lightswitch kitchen 2x1624EIBDKitchen2/1/2
Lightswitch kitchen 3x1624EIBDKitchen2/1/3
Lightswitch kitchen 4x1624EIBDKitchen2/1/4
Lightswitch bedroom 1x1624EIBDBedroom2/1/5


Logged

Version: linuxMCE 1004 (v 2012-07-01)
Extra's: Cacti, webmin, phpmyadmin, joomla

Server: MSI MS-7519 / E7400 2,8GB / 4GB / SSD 60GB / Radeon HD4350 / RTL8111 - 3C905C-TX
Orbiters: HTC Desire Z, HP PocketPC, Samsung Galaxy S, iPAD, ASUS eeePAD
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7940, Cisco 7960
Camera's: IPCAM02
tschak909
LinuxMCE God
****
Posts: 5117

DOES work for LinuxMCE.


View Profile
« Reply #1 on: August 14, 2012, 08:22:29 am »

Devices are created across multiple tables, so a simple injection of a CSV into a single table is not possible.

An import utility would need to be written in the Web Admin to do this (and I thought we had one at one point?)

-Thom
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2637


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #2 on: August 14, 2012, 01:30:02 pm »

Add the KNX devices one by one. OR, create an import utility after you looked at how the devices are currently added. iirc, I've added over 100 GAs already to my system.
Logged

hari
Administrator
LinuxMCE God
*****
Posts: 2414



View Profile WWW
« Reply #3 on: August 14, 2012, 09:30:30 pm »

the backup/restore child devices function in the web admin can be abused to achieve that
Logged

rock your home - http://www.agocontrol.com home automation
tschak909
LinuxMCE God
****
Posts: 5117

DOES work for LinuxMCE.


View Profile
« Reply #4 on: August 14, 2012, 09:38:12 pm »

oh yeah, forgot about that!

the file that comes back can be modified, and subsequently restored to produce more devices.

-Thom
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!