[dss-developer] simulate device

msquare msquare at notrademark.de
Tue Apr 12 10:46:51 CEST 2011


Servus,

is still do not have any idea how to simulate a simple light (yellow) device.
Are there any sample files to download, which should work by default?

I just found complex plugins (vlc & co.) but that seems to be more complex and very different to a simple light device.

Grüße
Philip

Am 24.03.2011 um 20:56 schrieb msquare:

> Hi,
> 
> thank you for this idea. It's now in zone 1 but still disabled (grey).
> json/apartment/getStructure:
>          devices: {
>            0: {
>              id: "3504175fe0000000ffc00023",
>              name: "Projektraumlicht",
>              functionID: 0,
>              productRevision: 0,
>              productID: 0,
>              meterDSID: "000000000000000000000000",
>              busID: 65535,
>              isPresent: false,
>              lastDiscovered: "1970-01-01 02:00:00",
>              firstSeen: "2011-03-24 20:53:53",
>              on: false,
>              locked: false
>            }
>          },
> 
> There is no meterDSID. Maybe this is a problem?
> 
> The apartment.xml contains information about the devices' meter:
> <device dsid="3504175fe0000000ffc00023" lastKnownZoneID="1" lastKnownDSMeter="3504175fe0000000ffc00013">
> 
> Its defined later by
>        <dsMeters>
>                <dsMeter id="3504175fe0000000ffc00013"/>
>        </dsMeters>
> 
> Any idea?
> 
> Thanks,
> Philip
> 
> Am 24.03.2011 um 12:05 schrieb Köhler, Roman:
> 
>> I think, the Problem is, that you put your light into zone 0, which is a broadcast zone and means: "whole apartment". Put it into a zone with id <>0, that should help
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: dss-developer-bounces at forum.digitalstrom.org [mailto:dss-developer-bounces at forum.digitalstrom.org] Im Auftrag von dss-developer-request at forum.digitalstrom.org
>> Gesendet: Donnerstag, 24. März 2011 12:00
>> An: dss-developer at forum.digitalstrom.org
>> Betreff: dss-developer Digest, Vol 14, Issue 8
>> 
>> Send dss-developer mailing list submissions to
>> 	dss-developer at forum.digitalstrom.org
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://forum.digitalstrom.org/cgi-bin/mailman/listinfo/dss-developer
>> or, via email, send a message with subject or body 'help' to
>> 	dss-developer-request at forum.digitalstrom.org
>> 
>> You can reach the person managing the list at
>> 	dss-developer-owner at forum.digitalstrom.org
>> 
>> When replying, please edit your Subject line so it is more specific than "Re: Contents of dss-developer digest..."
>> 
>> 
>> Today's Topics:
>> 
>>  1. simulate device (msquare)
>>  2. Re: simulate device (msquare)
>>  3. Re: Diverse Fragen zum allgemeinen Verst?ndnis
>>     (Hofmann, Christoph)
>> 
>> 
>> ----------------------------------------------------------------------
>> 
>> Message: 1
>> Date: Wed, 23 Mar 2011 15:00:52 +0100
>> From: msquare <msquare at notrademark.de>
>> Subject: [dss-developer] simulate device
>> To: dSS list development <dss-developer at forum.digitalstrom.org>
>> Message-ID: <DE227A6C-1D06-43A0-8239-F195BCAD0A9B at notrademark.de>
>> Content-Type: text/plain; charset=us-ascii
>> 
>> servus,
>> 
>> i try to simulate a simple yellow light device. i just followed one of the developer-day presentations (or even tried this).
>> 
>> when i start the dss software, i get the following message:
>> [2011-03-23 13:54:02][Error][System] DSIDJS: Error calling 'initialize' Caught Exception while executing script: TypeError: undefined is not a function
>> 
>> the device appears in the webgui and is disabled (grey).
>> 
>> do you have any quick idea about what i did wrong?
>> 
>> greets from bremen,
>> philip
>> 
>> dss version:
>> DSS v0.9-dev (git:3d0c6e8fa39934d1c51c1c01db982d0200d87fb7-dirty)
>> 
>> projektraumlicht.js:
>> function Projektraumlicht() {
>> 	this.callScene = function(sceneNumber) {
>> 		print("Projektraumlicht ", sceneNumber);
>> 	}
>> }
>> 
>> new Projektraumlicht();
>> 
>> config.xml:
>> <?xml version="1.0" encoding="utf-8"?>
>> <properties version="1">
>> 	<property name="config">
>> 		<property name="subsystems/DSSim/js-devices">
>> 			<property name="projektraumlicht">
>> 				<property name="script-file[0]" type="string">
>> 					<value>jslib/dsid.js</value>
>> 				</property>
>> 				<property name="script-file[1]" type="string">
>> 					<value>plugins/projektraumlicht.js</value>
>> 				</property>
>> 				<property name="id" type="string">
>> 					<value>plugin.projektraumlicht</value>
>> 				</property>
>> 			</property>
>> 		</property>
>> 		<property name="subsystems/Metering/enabled" type="boolean">
>> 			<value>false</value>
>> 		</property>
>> 	</property>
>> </properties>
>> 
>> sim.xml:
>> <?xml version="1.0"?>
>> <simulation version="1">
>> <modulator busid="71" dsid="13">
>>  <device dsid="23" busid="23" type="plugin.projektraumlicht"/>
>>  <zone id="0">
>>      <group id="1">
>> 		<device busid="23" />
>> 	</group>
>>  </zone>
>> </modulator>
>> </simulation>
>> 
>> apartment.xml:
>> <?xml version='1.0' encoding='utf-8'?>
>> <config version="1">
>> 	<apartment>
>> 		<name>dSS</name>
>> 	</apartment>
>> 	<devices>
>> 		<device dsid="3504175fe0000000ffc00023" lastKnownDSMeter="3504175fe0000000ffc00013">
>> 			<name>Projektraumlicht</name>
>> 		</device>
>> 	</devices>
>> 	<zones>
>> 		<zone id="0">
>> 			<groups>
>> 				<group id="0">
>> 					<name>broadcast</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="1">
>> 					<name>yellow</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="2">
>> 					<name>gray</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="3">
>> 					<name>blue</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="4">
>> 					<name>cyan</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="5">
>> 					<name>magenta</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="6">
>> 					<name>red</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="7">
>> 					<name>green</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="8">
>> 					<name>black</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="9">
>> 					<name>white</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="10">
>> 					<name>display</name>
>> 					<scenes/>
>> 				</group>
>> 				<group id="16">
>> 					<scenes/>
>> 				</group>
>> 			</groups>
>> 		</zone>
>> 	</zones>	
>> 	<dsMeters>
>> 		<dsMeter id="3504175fe0000000ffc00013"/>
>> 	</dsMeters>
>> 
>> 
>> ------------------------------
>> 
>> Message: 2
>> Date: Wed, 23 Mar 2011 16:43:07 +0100
>> From: msquare <msquare at notrademark.de>
>> Subject: Re: [dss-developer] simulate device
>> To: dSS development list <dss-developer at forum.digitalstrom.org>
>> Message-ID: <E1A4BC6D-FBEF-4693-A4EA-50DD5ED3B412 at notrademark.de>
>> Content-Type: text/plain; charset=us-ascii
>> 
>> hi,
>> 
>>> when i start the dss software, i get the following message:
>>> [2011-03-23 13:54:02][Error][System] DSIDJS: Error calling 
>>> 'initialize' Caught Exception while executing script: TypeError: 
>>> undefined is not a function
>> i just removed the "new" before "Projektraumlicht();" to remove the displayed error.
>> 
>>> the device appears in the webgui and is disabled (grey).
>> it's still grey and disabled...why?
>> 
>> greets,
>> philip
>> 
>>> dss version:
>>> DSS v0.9-dev (git:3d0c6e8fa39934d1c51c1c01db982d0200d87fb7-dirty)
>>> 
>>> projektraumlicht.js:
>>> function Projektraumlicht() {
>>> 	this.callScene = function(sceneNumber) {
>>> 		print("Projektraumlicht ", sceneNumber);
>>> 	}
>>> }
>>> 
>>> new Projektraumlicht();
>>> 
>>> config.xml:
>>> <?xml version="1.0" encoding="utf-8"?> <properties version="1">
>>> 	<property name="config">
>>> 		<property name="subsystems/DSSim/js-devices">
>>> 			<property name="projektraumlicht">
>>> 				<property name="script-file[0]" type="string">
>>> 					<value>jslib/dsid.js</value>
>>> 				</property>
>>> 				<property name="script-file[1]" type="string">
>>> 					<value>plugins/projektraumlicht.js</value>
>>> 				</property>
>>> 				<property name="id" type="string">
>>> 					<value>plugin.projektraumlicht</value>
>>> 				</property>
>>> 			</property>
>>> 		</property>
>>> 		<property name="subsystems/Metering/enabled" type="boolean">
>>> 			<value>false</value>
>>> 		</property>
>>> 	</property>
>>> </properties>
>>> 
>>> sim.xml:
>>> <?xml version="1.0"?>
>>> <simulation version="1">
>>> <modulator busid="71" dsid="13">
>>> <device dsid="23" busid="23" type="plugin.projektraumlicht"/>
>>> <zone id="0">
>>>     <group id="1">
>>> 		<device busid="23" />
>>> 	</group>
>>> </zone>
>>> </modulator>
>>> </simulation>
>>> 
>>> apartment.xml:
>>> <?xml version='1.0' encoding='utf-8'?> <config version="1">
>>> 	<apartment>
>>> 		<name>dSS</name>
>>> 	</apartment>
>>> 	<devices>
>>> 		<device dsid="3504175fe0000000ffc00023" lastKnownDSMeter="3504175fe0000000ffc00013">
>>> 			<name>Projektraumlicht</name>
>>> 		</device>
>>> 	</devices>
>>> 	<zones>
>>> 		<zone id="0">
>>> 			<groups>
>>> 				<group id="0">
>>> 					<name>broadcast</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="1">
>>> 					<name>yellow</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="2">
>>> 					<name>gray</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="3">
>>> 					<name>blue</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="4">
>>> 					<name>cyan</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="5">
>>> 					<name>magenta</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="6">
>>> 					<name>red</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="7">
>>> 					<name>green</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="8">
>>> 					<name>black</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="9">
>>> 					<name>white</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="10">
>>> 					<name>display</name>
>>> 					<scenes/>
>>> 				</group>
>>> 				<group id="16">
>>> 					<scenes/>
>>> 				</group>
>>> 			</groups>
>>> 		</zone>
>>> 	</zones>	
>>> 	<dsMeters>
>>> 		<dsMeter id="3504175fe0000000ffc00013"/>
>>> 	</dsMeters>
>>> _______________________________________________
>>> dss-developer mailing list
>>> dss-developer at forum.digitalstrom.org
>>> http://forum.digitalstrom.org/cgi-bin/mailman/listinfo/dss-developer



More information about the dss-developer mailing list