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

Main Menu

Bulk import

Started by brononius, August 14, 2012, 08:03:44 AM

Previous topic - Next topic

brononius

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

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


Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

tschak909

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

Marie.O

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.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

hari

the backup/restore child devices function in the web admin can be abused to achieve that
rock your home - [url="http://www.agocontrol.com"]http://www.agocontrol.com[/url] home automation

tschak909

oh yeah, forgot about that!

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

-Thom