You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Daniel Felsing <da...@maven.at> on 2008/07/23 23:16:10 UTC

AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint can help you to pin down the problem?

Hi again,

one more thing.

If i have Felix UPnP Tester running parallel to my device tester and i
subscribe the device that is actually missing i also get no "initial status"
in the log window...
For the other devices it is working properly.  Then i restart my "tester"
bundle..and dont restart felix upnp tester and then subscribe to the shutter
again
I get the initial status in the upnp tester from felix.

So...when "registering" / "removing" a new listener there must happen
anything which influences the "initial" or "overall??" eventing behaviour of
the upnp devices.


Kind regards, Daniel Felsing

-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Mittwoch, 23. Juli 2008 21:18
An: users@felix.apache.org
Betreff: Re: AW: bug in felix upnp basedriver 0.8

Hi Daniel,

it seems that two are the devices that whose events are not captured by 
your tester code:
uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status

please, check the code generating the events for such devices, may be 
you send the event only if their status assume a specific value.

I think you should run the tester at least 5 times more.
If you experience the same problem always with different devices then we 
will try to repeat a similar test.

regards,
francesco


Daniel Felsing wrote:
> Ah - one more update...
> 
> I think event change propagation of single devices is ok :)
> Hm....
> 
> 
> Well - hoping for a solution!
> 
> Kind regards,
> Daniel
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Mittwoch, 23. Juli 2008 19:43
> An: users@felix.apache.org
> Betreff: bug in felix upnp basedriver 0.8
> 
> Hello.
> 
>  
> 
> It seems there is a bug in event notification in the actual release of the
> upnp basedriver 0.8.
> 
>  
> 
> I have exported exactly 17 devices to the upnp network.
> 
> After "UPnP Event" subscription i should get informed about all device
> stati.
> 
> So the number of actual devices by which i should get informed should be
17.
> 
>  
> 
> This is not always true..and the behavior by which device status i dont
get
> informed is random.
> 
>  
> 
> Here an example:
> 
>  
> 
> First run:
> 
>  
> 
> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
> 
> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
> 
> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
> 
> info     20080723 19:38:21 bid#39       -
> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:1
> 
> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
> 
> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
> 
> info     20080723 19:38:22 bid#39       -
> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:2
> 
> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
> 
> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
> 
> info     20080723 19:38:22 bid#39       -
> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:3
> 
> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
> 
> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
> 
> info     20080723 19:38:23 bid#39       -
> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
> 
> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
> 
> info     20080723 19:38:23 bid#39       -
> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:5
> 
> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
> 
> info     20080723 19:38:24 bid#39       -
> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:6
> 
> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
> 
> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
> 
> info     20080723 19:38:24 bid#39       -
> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:7
> 
> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
> 
> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
> 
> info     20080723 19:38:25 bid#39       -
> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
> 
> info     20080723 19:38:25 bid#39       -
> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
on
> 
> #diff Devices:9
> 
> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
> 
> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
> 
> info     20080723 19:38:26 bid#39       -
> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:10
> 
> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
> 
> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
> 
> info     20080723 19:38:26 bid#39       -
> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:11
> 
> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
> 
> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
> 
> info     20080723 19:38:27 bid#39       -
> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:12
> 
> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
> 
> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
> 
> info     20080723 19:38:27 bid#39       -
> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:13
> 
> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
> 
> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
> 
> info     20080723 19:38:28 bid#39       -
> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:14
> 
> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
> 
> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
> 
> info     20080723 19:38:29 bid#39       -
> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
> 
> #diff Devices:15
> 
> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
> 
> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
> 
> info     20080723 19:38:29 bid#39       -
> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:16
> 
> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
> 
> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
> 
> info     20080723 19:38:30 bid#39       -
> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:16
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:17
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Device count is 17
> 
>  
> 
>  
> 
> Then i restarted the "tester bundle"
> 
>  
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:1
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:5
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:14
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:15
> 
>  
> 
>  
> 
> I get informed by only 15 devices?...
> 
>  
> 
>  
> 
> Third run:
> 
>  
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:1
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:5
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
> 
> #diff Devices:14
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:16
> 
>  
> 
> Informed by 16 devices.
> 
>  
> 
>  
> 
>  
> 
> The code for testing was:
> 
>  
> 
> public class EventListener implements UPnPEventListener {
> 
>  
> 
>       private ArrayList<String> knownDevs = new ArrayList<String>();
> 
>       
> 
>       @Override
> 
>       public synchronized void notifyUPnPEvent(String deviceId, String
> serviceId, Dictionary events) {
> 
>             String output = "";
> 
>             output += deviceId + " " + serviceId;
> 
>             
> 
>             Enumeration eventit = events.keys();
> 
>             
> 
>             while (eventit.hasMoreElements()) {
> 
>                   String key = (String) eventit.nextElement();
> 
>                   output += key + " " + events.get(key) + "\n";
> 
>             }
> 
>                         
> 
>             if (!knownDevs.contains(deviceId)) {
> 
>                   knownDevs.add(deviceId);
> 
>             }
> 
>             System.err.println(output + "#diff Devices:" +
> knownDevs.size());
> 
>             System.err.flush();
> 
>             
> 
>       }
> 
>  
> 
> }
> 
>  
> 
>  
> 
>  
> 
> I think it should be free from errors :-)
> 
> Please help me! Since i really need the upnp driver for my master thesis.
> 
>  
> 
>  
> 
>  
> 
> Kind regards,
> 
> Daniel
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: bug in felix upnp basedriver 0.8 - maybe problem of myCtrlPoint.java?

Posted by Daniel Felsing <da...@maven.at>.
Hmm...

Maybe it is an issue with this method?

public void serviceChanged(ServiceEvent event)

it is not synchronized....
what is happening if "too" many listeners are registering in parallel?


Kind regards,
Daniel Felsing

-----Ursprüngliche Nachricht-----
Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
Gesendet: Donnerstag, 24. Juli 2008 10:07
An: users@felix.apache.org
Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition....

Hello..

One more thing i experienced is that when i change e.g. a device from on to
off...or set another level for a dimming device
the change is sent out correctly and device is responding.

Regards,
Daniel


-----Ursprüngliche Nachricht-----
Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
Gesendet: Mittwoch, 23. Juli 2008 23:16
An: users@felix.apache.org
Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint can
help you to pin down the problem?


Hi again,

one more thing.

If i have Felix UPnP Tester running parallel to my device tester and i
subscribe the device that is actually missing i also get no "initial status"
in the log window...
For the other devices it is working properly.  Then i restart my "tester"
bundle..and dont restart felix upnp tester and then subscribe to the shutter
again
I get the initial status in the upnp tester from felix.

So...when "registering" / "removing" a new listener there must happen
anything which influences the "initial" or "overall??" eventing behaviour of
the upnp devices.


Kind regards, Daniel Felsing

-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Mittwoch, 23. Juli 2008 21:18
An: users@felix.apache.org
Betreff: Re: AW: bug in felix upnp basedriver 0.8

Hi Daniel,

it seems that two are the devices that whose events are not captured by 
your tester code:
uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status

please, check the code generating the events for such devices, may be 
you send the event only if their status assume a specific value.

I think you should run the tester at least 5 times more.
If you experience the same problem always with different devices then we 
will try to repeat a similar test.

regards,
francesco


Daniel Felsing wrote:
> Ah - one more update...
> 
> I think event change propagation of single devices is ok :)
> Hm....
> 
> 
> Well - hoping for a solution!
> 
> Kind regards,
> Daniel
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Mittwoch, 23. Juli 2008 19:43
> An: users@felix.apache.org
> Betreff: bug in felix upnp basedriver 0.8
> 
> Hello.
> 
>  
> 
> It seems there is a bug in event notification in the actual release of the
> upnp basedriver 0.8.
> 
>  
> 
> I have exported exactly 17 devices to the upnp network.
> 
> After "UPnP Event" subscription i should get informed about all device
> stati.
> 
> So the number of actual devices by which i should get informed should be
17.
> 
>  
> 
> This is not always true..and the behavior by which device status i dont
get
> informed is random.
> 
>  
> 
> Here an example:
> 
>  
> 
> First run:
> 
>  
> 
> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
> 
> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
> 
> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
> 
> info     20080723 19:38:21 bid#39       -
> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:1
> 
> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
> 
> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
> 
> info     20080723 19:38:22 bid#39       -
> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:2
> 
> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
> 
> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
> 
> info     20080723 19:38:22 bid#39       -
> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:3
> 
> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
> 
> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
> 
> info     20080723 19:38:23 bid#39       -
> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
> 
> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
> 
> info     20080723 19:38:23 bid#39       -
> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:5
> 
> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
> 
> info     20080723 19:38:24 bid#39       -
> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:6
> 
> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
> 
> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
> 
> info     20080723 19:38:24 bid#39       -
> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:7
> 
> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
> 
> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
> 
> info     20080723 19:38:25 bid#39       -
> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
> 
> info     20080723 19:38:25 bid#39       -
> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
on
> 
> #diff Devices:9
> 
> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
> 
> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
> 
> info     20080723 19:38:26 bid#39       -
> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:10
> 
> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
> 
> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
> 
> info     20080723 19:38:26 bid#39       -
> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:11
> 
> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
> 
> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
> 
> info     20080723 19:38:27 bid#39       -
> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:12
> 
> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
> 
> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
> 
> info     20080723 19:38:27 bid#39       -
> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:13
> 
> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
> 
> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
> 
> info     20080723 19:38:28 bid#39       -
> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:14
> 
> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
> 
> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
> 
> info     20080723 19:38:29 bid#39       -
> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
> 
> #diff Devices:15
> 
> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
> 
> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
> 
> info     20080723 19:38:29 bid#39       -
> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:16
> 
> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
> 
> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
> 
> info     20080723 19:38:30 bid#39       -
> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:16
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:17
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Device count is 17
> 
>  
> 
>  
> 
> Then i restarted the "tester bundle"
> 
>  
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:1
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:5
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:14
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:15
> 
>  
> 
>  
> 
> I get informed by only 15 devices?...
> 
>  
> 
>  
> 
> Third run:
> 
>  
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:1
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:5
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
> 
> #diff Devices:14
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:16
> 
>  
> 
> Informed by 16 devices.
> 
>  
> 
>  
> 
>  
> 
> The code for testing was:
> 
>  
> 
> public class EventListener implements UPnPEventListener {
> 
>  
> 
>       private ArrayList<String> knownDevs = new ArrayList<String>();
> 
>       
> 
>       @Override
> 
>       public synchronized void notifyUPnPEvent(String deviceId, String
> serviceId, Dictionary events) {
> 
>             String output = "";
> 
>             output += deviceId + " " + serviceId;
> 
>             
> 
>             Enumeration eventit = events.keys();
> 
>             
> 
>             while (eventit.hasMoreElements()) {
> 
>                   String key = (String) eventit.nextElement();
> 
>                   output += key + " " + events.get(key) + "\n";
> 
>             }
> 
>                         
> 
>             if (!knownDevs.contains(deviceId)) {
> 
>                   knownDevs.add(deviceId);
> 
>             }
> 
>             System.err.println(output + "#diff Devices:" +
> knownDevs.size());
> 
>             System.err.flush();
> 
>             
> 
>       }
> 
>  
> 
> }
> 
>  
> 
>  
> 
>  
> 
> I think it should be free from errors :-)
> 
> Please help me! Since i really need the upnp driver for my master thesis.
> 
>  
> 
>  
> 
>  
> 
> Kind regards,
> 
> Daniel
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - some debug infos

Posted by Daniel Felsing <da...@maven.at>.
Hello...

When i manually subscribe to a device which initial event delivery is not
working i get the following debug code (using felix upnp tester):

info     20080724 14:28:09 bid#61       -
[805;org.osgi.service.upnp.UPnPEventListener] ServiceEvent REGISTERED
debug    20080724 14:28:09 bid#70       - [Importer] serviceChanged
debug    20080724 14:28:09 bid#70       -
Event::org.osgi.framework.ServiceEvent[source={org.osgi.service.upnp.UPnPEve
ntListener}={upnp.filter=(&(UPnP.device.UDN=uuid:AT-SM-FHZ1-funksteckdose1)(
UPnP.service.id=urn:upnp-org:serviceId:SwitchDevice:1)), service.id=805}]

info     20080724 14:28:55 bid#61       -
[805;org.osgi.service.upnp.UPnPEventListener] ServiceEvent UNREGISTERING
debug    20080724 14:28:55 bid#70       - [Importer] serviceChanged
debug    20080724 14:28:55 bid#70       -
Event::org.osgi.framework.ServiceEvent[source={org.osgi.service.upnp.UPnPEve
ntListener}={upnp.filter=(&(UPnP.device.UDN=uuid:AT-SM-FHZ1-funksteckdose1)(
UPnP.service.id=urn:upnp-org:serviceId:SwitchDevice:1)), service.id=805}]

on a working device it seems to be the same:

info     20080724 14:29:53 bid#61       -
[806;org.osgi.service.upnp.UPnPEventListener] ServiceEvent REGISTERED
debug    20080724 14:29:53 bid#70       - [Importer] serviceChanged
debug    20080724 14:29:53 bid#70       -
Event::org.osgi.framework.ServiceEvent[source={org.osgi.service.upnp.UPnPEve
ntListener}={upnp.filter=(&(UPnP.device.UDN=uuid:AT-SM-FHZ1-simplelight1)(UP
nP.service.id=urn:upnp-org:serviceId:SwitchDevice:1)), service.id=806}]

info     20080724 14:31:01 bid#61       -
[806;org.osgi.service.upnp.UPnPEventListener] ServiceEvent UNREGISTERING
debug    20080724 14:31:01 bid#70       - [Importer] serviceChanged
debug    20080724 14:31:01 bid#70       -
Event::org.osgi.framework.ServiceEvent[source={org.osgi.service.upnp.UPnPEve
ntListener}={upnp.filter=(&(UPnP.device.UDN=uuid:AT-SM-FHZ1-simplelight1)(UP
nP.service.id=urn:upnp-org:serviceId:SwitchDevice:1)), service.id=806}]


one thing i do not understand...
on my host with debug code on i get messages from the [Exporter] and
[Importer] which sends ssdp alive for a specific device (Exporting e.g.
device FHZSwitch)
[Importer] says on that message "devicenotifyReceived"


after that another message appears and the [Importer] says
"deviceNotifyReceived" ssdp:byebye 


is this code to avoid the import of "same" devices?
Well so far all is working properly, just was wondering :) the renew every
1800 works also fine...as it seems


Kind regards,
Daniel Felsing




-----Ursprüngliche Nachricht-----
Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
Gesendet: Donnerstag, 24. Juli 2008 12:51
An: users@felix.apache.org
Betreff: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition.... forgot one thing!

Hello,

one more thing.
The felix UPNP tester shows up ALL the devices, services and state
variables.
when i switch the state of a missed device (which has not delivered the
event on subscription of a new listener) the event is propagated on change
to the 
interested listener

It seems that only the INITIAL delivery when registering a new upnp listener
is fuxxed up somehow...

Kind regards,
Daniel Felsing

-----Ursprüngliche Nachricht-----
Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
Gesendet: Donnerstag, 24. Juli 2008 12:43
An: users@felix.apache.org
Betreff: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition....

Hello Francesco,

- yes, the devices are using the same host pc.
I have written a "basedriver" for my device technology...and then a
UPnPBridgeDriver exporting them to my network.
I'm directly connected to the host by a switch (so cable - no wireless
there)

- as development environment i'm using eclipse equinox, all upnp stuff is
from felix.
As runtime environment i'm using felix - however same behavior on both osgi
implementations

- the felix runtimes are the same, the equinox runtimes also...


Kind regards,
Daniel Felsing


-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Donnerstag, 24. Juli 2008 12:35
An: users@felix.apache.org
Betreff: Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition....

Hi Daniel,

well few question so far before starting to work on it.
you should describe you execution environment.
- do the devices run on the same host PC?
- are they implemented by you and executed on different (#17) Felix 
instances?
- are you testing all the devices on the same Felix runtime?

br,
francesco




Daniel Felsing wrote:
> Hello..
> 
> One more thing i experienced is that when i change e.g. a device from on
to
> off...or set another level for a dimming device
> the change is sent out correctly and device is responding.
> 
> Regards,
> Daniel
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Mittwoch, 23. Juli 2008 23:16
> An: users@felix.apache.org
> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint
can
> help you to pin down the problem?
> 
> 
> Hi again,
> 
> one more thing.
> 
> If i have Felix UPnP Tester running parallel to my device tester and i
> subscribe the device that is actually missing i also get no "initial
status"
> in the log window...
> For the other devices it is working properly.  Then i restart my "tester"
> bundle..and dont restart felix upnp tester and then subscribe to the
shutter
> again
> I get the initial status in the upnp tester from felix.
> 
> So...when "registering" / "removing" a new listener there must happen
> anything which influences the "initial" or "overall??" eventing behaviour
of
> the upnp devices.
> 
> 
> Kind regards, Daniel Felsing
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Mittwoch, 23. Juli 2008 21:18
> An: users@felix.apache.org
> Betreff: Re: AW: bug in felix upnp basedriver 0.8
> 
> Hi Daniel,
> 
> it seems that two are the devices that whose events are not captured by 
> your tester code:
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
> 
> please, check the code generating the events for such devices, may be 
> you send the event only if their status assume a specific value.
> 
> I think you should run the tester at least 5 times more.
> If you experience the same problem always with different devices then we 
> will try to repeat a similar test.
> 
> regards,
> francesco
> 
> 
> Daniel Felsing wrote:
>> Ah - one more update...
>>
>> I think event change propagation of single devices is ok :)
>> Hm....
>>
>>
>> Well - hoping for a solution!
>>
>> Kind regards,
>> Daniel
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>> An: users@felix.apache.org
>> Betreff: bug in felix upnp basedriver 0.8
>>
>> Hello.
>>
>>  
>>
>> It seems there is a bug in event notification in the actual release of
the
>> upnp basedriver 0.8.
>>
>>  
>>
>> I have exported exactly 17 devices to the upnp network.
>>
>> After "UPnP Event" subscription i should get informed about all device
>> stati.
>>
>> So the number of actual devices by which i should get informed should be
> 17.
>>  
>>
>> This is not always true..and the behavior by which device status i dont
> get
>> informed is random.
>>
>>  
>>
>> Here an example:
>>
>>  
>>
>> First run:
>>
>>  
>>
>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>
>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>
>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>
>> info     20080723 19:38:21 bid#39       -
>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:2
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:5
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:6
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:9
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:12
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:13
>>
>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>
>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>
>> info     20080723 19:38:28 bid#39       -
>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:14
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:15
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:16
>>
>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>
>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>
>> info     20080723 19:38:30 bid#39       -
>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:16
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:17
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>> Device count is 17
>>
>>  
>>
>>  
>>
>> Then i restarted the "tester bundle"
>>
>>  
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>>  
>>
>>  
>>
>> I get informed by only 15 devices?...
>>
>>  
>>
>>  
>>
>> Third run:
>>
>>  
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:16
>>
>>  
>>
>> Informed by 16 devices.
>>
>>  
>>
>>  
>>
>>  
>>
>> The code for testing was:
>>
>>  
>>
>> public class EventListener implements UPnPEventListener {
>>
>>  
>>
>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>
>>       
>>
>>       @Override
>>
>>       public synchronized void notifyUPnPEvent(String deviceId, String
>> serviceId, Dictionary events) {
>>
>>             String output = "";
>>
>>             output += deviceId + " " + serviceId;
>>
>>             
>>
>>             Enumeration eventit = events.keys();
>>
>>             
>>
>>             while (eventit.hasMoreElements()) {
>>
>>                   String key = (String) eventit.nextElement();
>>
>>                   output += key + " " + events.get(key) + "\n";
>>
>>             }
>>
>>                         
>>
>>             if (!knownDevs.contains(deviceId)) {
>>
>>                   knownDevs.add(deviceId);
>>
>>             }
>>
>>             System.err.println(output + "#diff Devices:" +
>> knownDevs.size());
>>
>>             System.err.flush();
>>
>>             
>>
>>       }
>>
>>  
>>
>> }
>>
>>  
>>
>>  
>>
>>  
>>
>> I think it should be free from errors :-)
>>
>> Please help me! Since i really need the upnp driver for my master thesis.
>>
>>  
>>
>>  
>>
>>  
>>
>> Kind regards,
>>
>> Daniel
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition.... forgot one thing!

Posted by Daniel Felsing <da...@maven.at>.
I have two platforms - the host for exporting...and the server


The routine for counting the "different" devices was the following on the
server side:


public class EventListener implements UPnPEventListener {

	private ArrayList<String> knownDevs = new ArrayList<String>();
	
	@Override
	public synchronized void notifyUPnPEvent(String deviceId, String
serviceId, Dictionary events) {
		String output = "";
		output += deviceId + " " + serviceId;
		
		Enumeration eventit = events.keys();
		
		while (eventit.hasMoreElements()) {
			String key = (String) eventit.nextElement();
			output += key + " " + events.get(key) + "\n";
		}
				
		if (!knownDevs.contains(deviceId)) {
			knownDevs.add(deviceId);
		}
		System.err.println(output + "#diff Devices:" +
knownDevs.size());
		System.err.flush();
		
	}

}

Registered in the following activator:

public class Activator implements BundleActivator {

	private ServiceRegistration servReg;
	
	/*
	 * (non-Javadoc)
	 * @see
org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		EventListener test = new EventListener();
		servReg =
context.registerService(UPnPEventListener.class.getName(), test, null);
	}

	/*
	 * (non-Javadoc)
	 * @see
org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
		servReg.unregister();
	}

}




-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Donnerstag, 24. Juli 2008 15:49
An: users@felix.apache.org
Betreff: Re: AW: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and
one more addition.... forgot one thing!

No I mean the routine you use for counting the devices sending a notify.
That's, the code implementing the subscription.
basically you are running all the UPnP related code on the same felix 
runtime.

francesco


Daniel Felsing wrote:
> With listener routine you mean the UPnPEventNotifier?
> Yes...my devices are "EventSources" using the propertyChange thing
> 
> switchDev is an EventSource
> 
> I register them with the notifier in that line:
>> 		notify_switch = new UPnPEventNotifier(context, this,
> switchdevswitchservice, switchDev);
> 
> 
> 
> BUT: when i startup my whole host and switch no devices the
> propertychangelistener isnt used, only when the basedriver devices state
> changes....
> but "getCurrentValue" is responsible for Retrieving the "initial" values,
or
> am i wrong? For further detail on that see my last post on the mailing
list
> i did some testing and presented you some results there.
> 
> I paste you the content of it here:
> 
> Hello,
> 
> ok what i did now was the following.
> In the upnplocalstatevariable implementations i put into getCurrentValue
> some debug code so i can see when it is called.
> 
> On the host i now exported my 17 devices to see which oft he
getCurrentValue
> methods get called.
> Only 16 devices got called! This time S20_Switch7 was missing...
> 
> Now i looked at upnp felix tester - cause that must be the device which
> should send me no events on subscription But u know what? I can subscribe
to
> the event and get the values delivered...
> 
> I thought that upon subscription of the device i should see something on
my
> hosts log window...but nothing
> 
> I rechecked upnp felix tester cause i wanted to find the actual device
which
> i am not able to subscribe..cause it must be another one then.
> 
> And now it gets funny....service/variable i cant subscribe is EXACTLY the
> device which is found before Switch7...and the the last service of it
> 
> 
> Maybe this can lead u to something?
> 
> Kind regards,
> Daniel Felsing
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: AW: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition.... forgot one thing!

Posted by Francesco Furfari <fr...@isti.cnr.it>.
No I mean the routine you use for counting the devices sending a notify.
That's, the code implementing the subscription.
basically you are running all the UPnP related code on the same felix 
runtime.

francesco


Daniel Felsing wrote:
> With listener routine you mean the UPnPEventNotifier?
> Yes...my devices are "EventSources" using the propertyChange thing
> 
> switchDev is an EventSource
> 
> I register them with the notifier in that line:
>> 		notify_switch = new UPnPEventNotifier(context, this,
> switchdevswitchservice, switchDev);
> 
> 
> 
> BUT: when i startup my whole host and switch no devices the
> propertychangelistener isnt used, only when the basedriver devices state
> changes....
> but "getCurrentValue" is responsible for Retrieving the "initial" values, or
> am i wrong? For further detail on that see my last post on the mailing list
> i did some testing and presented you some results there.
> 
> I paste you the content of it here:
> 
> Hello,
> 
> ok what i did now was the following.
> In the upnplocalstatevariable implementations i put into getCurrentValue
> some debug code so i can see when it is called.
> 
> On the host i now exported my 17 devices to see which oft he getCurrentValue
> methods get called.
> Only 16 devices got called! This time S20_Switch7 was missing...
> 
> Now i looked at upnp felix tester - cause that must be the device which
> should send me no events on subscription But u know what? I can subscribe to
> the event and get the values delivered...
> 
> I thought that upon subscription of the device i should see something on my
> hosts log window...but nothing
> 
> I rechecked upnp felix tester cause i wanted to find the actual device which
> i am not able to subscribe..cause it must be another one then.
> 
> And now it gets funny....service/variable i cant subscribe is EXACTLY the
> device which is found before Switch7...and the the last service of it
> 
> 
> Maybe this can lead u to something?
> 
> Kind regards,
> Daniel Felsing
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition.... forgot one thing!

Posted by Daniel Felsing <da...@maven.at>.
With listener routine you mean the UPnPEventNotifier?
Yes...my devices are "EventSources" using the propertyChange thing

switchDev is an EventSource

I register them with the notifier in that line:
> 		notify_switch = new UPnPEventNotifier(context, this,
switchdevswitchservice, switchDev);



BUT: when i startup my whole host and switch no devices the
propertychangelistener isnt used, only when the basedriver devices state
changes....
but "getCurrentValue" is responsible for Retrieving the "initial" values, or
am i wrong? For further detail on that see my last post on the mailing list
i did some testing and presented you some results there.

I paste you the content of it here:

Hello,

ok what i did now was the following.
In the upnplocalstatevariable implementations i put into getCurrentValue
some debug code so i can see when it is called.

On the host i now exported my 17 devices to see which oft he getCurrentValue
methods get called.
Only 16 devices got called! This time S20_Switch7 was missing...

Now i looked at upnp felix tester - cause that must be the device which
should send me no events on subscription But u know what? I can subscribe to
the event and get the values delivered...

I thought that upon subscription of the device i should see something on my
hosts log window...but nothing

I rechecked upnp felix tester cause i wanted to find the actual device which
i am not able to subscribe..cause it must be another one then.

And now it gets funny....service/variable i cant subscribe is EXACTLY the
device which is found before Switch7...and the the last service of it


Maybe this can lead u to something?

Kind regards,
Daniel Felsing



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition.... forgot one thing!

Posted by Francesco Furfari <fr...@isti.cnr.it>.
ok I will take a look later.
another question, the devices are all exported devices running on the 
same felix platform with the listener routine too, aren't?
In this case the BaseDriver is not involved in the delivery of the 
UPnPNotifyEvents.
So the bug should be either in the UPnPEventNotifier or in your code.

francesco


Daniel Felsing wrote:
> Yes i'm using them in every exported device type...
> Wait - i paste you some code of a whole device type implementation :-)
> 
> Note that there is also a upnpdimmabledevice which is reusing the status
> things of switchabledevice
> It just provides an additional level....my class hierarchy of my own
> basedriver is also built like that - so i could reduce "copy paste" code
> 
> 
> 
> 
> Ok every upnp device is extending my upnp general device:
> 
> public abstract class UPnPGeneralDevice {
> 
> 	// device identifiers
> 	final protected String DEVICE_ID_PREFIX = "uuid:AT-SM-";
> 	protected String DEVICE_ID;
> 	
> 	// model and context
> 	protected BundleContext context;
> 	
> 	// device category and description
> 	protected String deviceCat;
> 	protected String description;
> 	protected String hubId;
> 	protected String identity;
> 	
> 	// localhost information
> 	protected String ipAddress;
> 	protected String portNumber;
> 	
> 	// path to presentation servlet
> 	protected String presServlet;
> 	
> 	// device properties
> 	protected Dictionary devprops;
> 	
> 	
> 	public void generateHostInfo() {
> 		
>         try {
>             Enumeration interfaces =
> NetworkInterface.getNetworkInterfaces();
>             while (interfaces.hasMoreElements()) {
>                 NetworkInterface networkInterface =
> (NetworkInterface)interfaces.nextElement();
>                 
>                 Enumeration addresses = networkInterface.getInetAddresses();
>                 while (addresses.hasMoreElements()) {
>                     InetAddress inetAddress =
> (InetAddress)addresses.nextElement();
>                     // ignore loopback ip
>                     if (!inetAddress.isLoopbackAddress() &&
> !inetAddress.isLinkLocalAddress()) {
>                        this.ipAddress = inetAddress.getHostAddress();
>                     }
>                 }
>             }
>         } catch (SocketException e) {
>             e.printStackTrace();
>         }		
> 		
> 		this.portNumber = "80";
> 		if(context.getProperty("org.osgi.service.http.port") !=
> null) {
> 			this.portNumber =
> context.getProperty("org.osgi.service.http.port");
> 		}
> 	}
> 	
> 	public void setupProperties() {
> 		devprops = new Properties();
> 		// indicate for UPnP Export and set proper device category
> 		devprops.put(UPnPDevice.UPNP_EXPORT,"");
> 	
> devprops.put(org.osgi.service.device.Constants.DEVICE_CATEGORY, new
> String[]{UPnPDevice.DEVICE_CATEGORY});
> 	
> 		// device specific properties
> 		devprops.put(UPnPDevice.FRIENDLY_NAME, deviceCat);
> 		devprops.put(UPnPDevice.MANUFACTURER, "Daniel Felsing");
> 		devprops.put(UPnPDevice.MANUFACTURER_URL,
> "http://www.maven.at");
> 		devprops.put(UPnPDevice.MODEL_DESCRIPTION, description);
> 		devprops.put(UPnPDevice.MODEL_NAME, deviceCat);
> 		devprops.put(UPnPDevice.MODEL_NUMBER,"2.0");
> 		if (this.ipAddress != null && this.portNumber != null &&
> this.presServlet != null) {
> 			devprops.put(UPnPDevice.PRESENTATION_URL,"http://" +
> this.ipAddress + ":" + this.portNumber + presServlet + "?identity=" +
> identity);
> 		}
> 		//dictionary.put(UPnPDevice.SERIAL_NUMBER,"123456789");
> 		devprops.put(UPnPDevice.TYPE,"urn:schemas-upnp-org:device:"
> + deviceCat + ":1");
> 		devprops.put(UPnPDevice.ID, DEVICE_ID);
> 		devprops.put(UPnPDevice.UPC,"SMARTHOME_" +
> hubId.toUpperCase() + "_" + deviceCat.toUpperCase());		
> 	}	
> 	
> 	public Dictionary getDevprops() {
> 		return devprops;
> 	}
> 
> 
> 	public void setDevprops(Dictionary devprops) {
> 		this.devprops = devprops;
> 	}		
> 	
> }
> 
> 
> My switchabledevice (e.g. a plug or a light)
> 
> public class UPnPSwitchableDevice extends UPnPGeneralDevice implements
> UPnPDevice, Destroyable {	
> 	
> 	// upnp services
> 	private SwitchableDevSwitchService switchdevswitchservice;
> 	private GeneralDevNameService switchdevnameservice;
> 	private UPnPService[] upnpservices;
> 	
> 	// event notifier
> 	private UPnPEventNotifier notify_switch;
> 	
> 	// device
> 	private SwitchableDevice switchDev;
> 	
> 	public UPnPSwitchableDevice(SwitchableDevice switchDev,
> BundleContext context, String hubId, String deviceCat, String description,
> String presServlet) {
> 		super();
> 		this.switchDev = switchDev;
> 		this.context = context;
> 		this.presServlet = presServlet;
> 		this.deviceCat = deviceCat;
> 		this.description = description;
> 		this.hubId = hubId;
> 		this.identity = switchDev.getIdentity();		
> 		
> 		if(hubId != null) {
> 			this.DEVICE_ID = DEVICE_ID_PREFIX + hubId + "-" +
> switchDev.getIdentity();
> 		} else {
> 			this.DEVICE_ID = DEVICE_ID_PREFIX +
> switchDev.getIdentity();	
> 		}
> 		
> 		// create services of the device
> 		this.switchdevswitchservice = new
> SwitchableDevSwitchService(switchDev);
> 		this.switchdevnameservice = new
> GeneralDevNameService(switchDev, hubId);
> 		this.upnpservices = new UPnPService[]{switchdevnameservice,
> switchdevswitchservice};
> 		this.generateHostInfo();
> 		this.setupProperties();
> 		
> 		// setup event notifier
> 		notify_switch = new UPnPEventNotifier(context, this,
> switchdevswitchservice, switchDev);
> 	}
> 	
> 	public Dictionary getDescriptions(String locale) {
> 		return devprops;
> 	}
> 
> 	public UPnPIcon[] getIcons(String locale) {
> 		UPnPIcon icon = new DeviceIcon(switchDev);
> 		return new UPnPIcon[]{icon} ;
> 	}
> 
> 	public UPnPService getService(String serviceId) {
> 		if  (serviceId.equals(switchdevswitchservice.getId())) 
> 			return switchdevswitchservice;
> 		else if (serviceId.equals(switchdevnameservice.getId())) 
> 			return switchdevnameservice;
> 		else
> 			return null;
> 	}
> 
> 	public UPnPService[] getServices() {
> 		return upnpservices;
> 	}
> 	
> 	public void destroy() {
> 		// destroy listeners...
> 		notify_switch.destroy();
> 	}	
> 
> }
> 
> 
> My Switch Service:
> 
> public class SwitchableDevSwitchService implements UPnPService {
> 	final private String SERVICE_ID =
> "urn:upnp-org:serviceId:SwitchDevice:1";
> 	final private String SERVICE_TYPE =
> "urn:schemas-upnp-org:service:SwitchDevice:1";
> 	final private String VERSION ="2.0";
> 	
> 	private HashMap actions = new HashMap();
> 	
> 	private UPnPStateVariable statusstate;
> 	private UPnPStateVariable[] states;
> 
> 	public SwitchableDevSwitchService(SwitchableDevice switchDev) {
> 		super();
> 		this.statusstate = new
> SwitchableDevStatusStateVariable(switchDev);
> 		this.states = new UPnPStateVariable[]{statusstate};
> 		
> 		UPnPAction setUPnPStatus = new
> SwitchableDevSetStatusAction(statusstate, switchDev);
> 		UPnPAction getUPnPStatus = new
> SwitchableDevGetStatusAction(statusstate, switchDev);
> 		actions.put(getUPnPStatus.getName(), getUPnPStatus);
> 		actions.put(setUPnPStatus.getName(), setUPnPStatus);
> 	}
> 
> 	public UPnPAction getAction(String name) {
> 		return (UPnPAction)actions.get(name);
> 	}
> 
> 	public UPnPAction[] getActions() {
> 		return (UPnPAction[])(actions.values()).toArray(new
> UPnPAction[]{});
> 	}
> 
> 	public String getId() {
> 		return SERVICE_ID;
> 	}
> 
> 	public UPnPStateVariable getStateVariable(String id) {
> 		if (id.equals("Status"))
> 			return statusstate;
> 		else return null;
> 	}
> 
> 	public UPnPStateVariable[] getStateVariables() {
> 		return states;
> 	}
> 
> 	public String getType() {
> 		return SERVICE_TYPE;
> 	}
> 
> 	public String getVersion() {
> 		return VERSION;
> 	}	
> }
> 
> 
> The switchdev state variable:
> 
> public class SwitchableDevStatusStateVariable implements
> UPnPLocalStateVariable {
> 
> 	final private String NAME = "Status";
> 	final private String DEFAULT_VALUE = "off";
> 	
> 	private SwitchableDevice switchDev;
> 	
> 	public SwitchableDevStatusStateVariable(SwitchableDevice switchDev){
> 		this.switchDev = switchDev;
> 	}	
> 	
> 	public String[] getAllowedValues() {
> 		return null;
> 	}
> 
> 	public Object getDefaultValue() {
> 		return DEFAULT_VALUE;
> 	}
> 
> 	public Class getJavaDataType() {
> 		return String.class;
> 	}
> 
> 	public Number getMaximum() {
> 		return null;
> 	}
> 
> 	public Number getMinimum() {
> 		return null;
> 	}
> 
> 	public String getName() {
> 		return NAME;
> 	}
> 
> 	public Number getStep() {
> 		return null;
> 	}
> 
> 	public String getUPnPDataType() {
> 		return org.osgi.service.upnp.UPnPStateVariable.TYPE_STRING;
> 	}
> 
> 	public boolean sendsEvents() {
> 		return true;
> 	}
> 
> 	public Object getCurrentValue() {
> 		return switchDev.getStatus();
> 	}
> 
> }
> 
> 
> 
> SetStatusAction:
> 
> public class SwitchableDevSetStatusAction implements UPnPAction {
> 
> 	final private String NAME = "SetStatus";
> 	final private String NEW_STATUS_VALUE = "NewStatusValue";
> 	final private String[] IN_ARG_NAMES = new
> String[]{NEW_STATUS_VALUE};
> 	private UPnPStateVariable state;
> 	private SwitchableDevice switchDev;	
> 	
> 	public SwitchableDevSetStatusAction(UPnPStateVariable state,
> SwitchableDevice switchDev) {
> 		super();
> 		this.state = state;
> 		this.switchDev = switchDev;
> 	}
> 
> 	public String[] getInputArgumentNames() {
> 		return IN_ARG_NAMES;
> 	}
> 
> 	public String getName() {
> 		return NAME;
> 	}
> 
> 	public String[] getOutputArgumentNames() {
> 		return null;
> 	}
> 
> 	public String getReturnArgumentName() {
> 		return null;
> 	}
> 
> 	public UPnPStateVariable getStateVariable(String argumentName) {
> 		return state;
> 	}
> 
> 	public Dictionary invoke(Dictionary args) throws Exception {
> 		String value = (String) args.get(NEW_STATUS_VALUE);
> 		this.switchDev.setStatus(value);
> 		return null;
> 	}
> 
> }
> 
> 
> 
> And finally getstatusaction:
> 
> public class SwitchableDevGetStatusAction implements UPnPAction {
> 
> 	final private String NAME = "GetStatus";
> 	final private String RESULT_STATUS = "ResultStatus";
> 	final private String[] OUT_ARG_NAMES = new String[]{RESULT_STATUS};
> 	private UPnPStateVariable state;
> 	private SwitchableDevice switchDev;	
> 	
> 	public SwitchableDevGetStatusAction(UPnPStateVariable state,
> SwitchableDevice switchDev) {
> 		super();
> 		this.state = state;
> 		this.switchDev = switchDev;
> 	}
> 
> 	public String[] getInputArgumentNames() {
> 		return null;
> 	}
> 
> 	public String getName() {
> 		return NAME;
> 	}
> 
> 	public String[] getOutputArgumentNames() {
> 		return OUT_ARG_NAMES;
> 	}
> 
> 	public String getReturnArgumentName() {
> 		return null;
> 	}
> 
> 	public UPnPStateVariable getStateVariable(String argumentName) {
> 		return state;
> 	}
> 
> 	public Dictionary invoke(Dictionary args) throws Exception {
> 		String status = switchDev.getStatus();
> 		Hashtable result = new Hashtable();
> 		result.put(RESULT_STATUS, status);
> 		return result;
> 	}
> 
> }
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition.... forgot one thing!

Posted by Daniel Felsing <da...@maven.at>.
Yes i'm using them in every exported device type...
Wait - i paste you some code of a whole device type implementation :-)

Note that there is also a upnpdimmabledevice which is reusing the status
things of switchabledevice
It just provides an additional level....my class hierarchy of my own
basedriver is also built like that - so i could reduce "copy paste" code




Ok every upnp device is extending my upnp general device:

public abstract class UPnPGeneralDevice {

	// device identifiers
	final protected String DEVICE_ID_PREFIX = "uuid:AT-SM-";
	protected String DEVICE_ID;
	
	// model and context
	protected BundleContext context;
	
	// device category and description
	protected String deviceCat;
	protected String description;
	protected String hubId;
	protected String identity;
	
	// localhost information
	protected String ipAddress;
	protected String portNumber;
	
	// path to presentation servlet
	protected String presServlet;
	
	// device properties
	protected Dictionary devprops;
	
	
	public void generateHostInfo() {
		
        try {
            Enumeration interfaces =
NetworkInterface.getNetworkInterfaces();
            while (interfaces.hasMoreElements()) {
                NetworkInterface networkInterface =
(NetworkInterface)interfaces.nextElement();
                
                Enumeration addresses = networkInterface.getInetAddresses();
                while (addresses.hasMoreElements()) {
                    InetAddress inetAddress =
(InetAddress)addresses.nextElement();
                    // ignore loopback ip
                    if (!inetAddress.isLoopbackAddress() &&
!inetAddress.isLinkLocalAddress()) {
                       this.ipAddress = inetAddress.getHostAddress();
                    }
                }
            }
        } catch (SocketException e) {
            e.printStackTrace();
        }		
		
		this.portNumber = "80";
		if(context.getProperty("org.osgi.service.http.port") !=
null) {
			this.portNumber =
context.getProperty("org.osgi.service.http.port");
		}
	}
	
	public void setupProperties() {
		devprops = new Properties();
		// indicate for UPnP Export and set proper device category
		devprops.put(UPnPDevice.UPNP_EXPORT,"");
	
devprops.put(org.osgi.service.device.Constants.DEVICE_CATEGORY, new
String[]{UPnPDevice.DEVICE_CATEGORY});
	
		// device specific properties
		devprops.put(UPnPDevice.FRIENDLY_NAME, deviceCat);
		devprops.put(UPnPDevice.MANUFACTURER, "Daniel Felsing");
		devprops.put(UPnPDevice.MANUFACTURER_URL,
"http://www.maven.at");
		devprops.put(UPnPDevice.MODEL_DESCRIPTION, description);
		devprops.put(UPnPDevice.MODEL_NAME, deviceCat);
		devprops.put(UPnPDevice.MODEL_NUMBER,"2.0");
		if (this.ipAddress != null && this.portNumber != null &&
this.presServlet != null) {
			devprops.put(UPnPDevice.PRESENTATION_URL,"http://" +
this.ipAddress + ":" + this.portNumber + presServlet + "?identity=" +
identity);
		}
		//dictionary.put(UPnPDevice.SERIAL_NUMBER,"123456789");
		devprops.put(UPnPDevice.TYPE,"urn:schemas-upnp-org:device:"
+ deviceCat + ":1");
		devprops.put(UPnPDevice.ID, DEVICE_ID);
		devprops.put(UPnPDevice.UPC,"SMARTHOME_" +
hubId.toUpperCase() + "_" + deviceCat.toUpperCase());		
	}	
	
	public Dictionary getDevprops() {
		return devprops;
	}


	public void setDevprops(Dictionary devprops) {
		this.devprops = devprops;
	}		
	
}


My switchabledevice (e.g. a plug or a light)

public class UPnPSwitchableDevice extends UPnPGeneralDevice implements
UPnPDevice, Destroyable {	
	
	// upnp services
	private SwitchableDevSwitchService switchdevswitchservice;
	private GeneralDevNameService switchdevnameservice;
	private UPnPService[] upnpservices;
	
	// event notifier
	private UPnPEventNotifier notify_switch;
	
	// device
	private SwitchableDevice switchDev;
	
	public UPnPSwitchableDevice(SwitchableDevice switchDev,
BundleContext context, String hubId, String deviceCat, String description,
String presServlet) {
		super();
		this.switchDev = switchDev;
		this.context = context;
		this.presServlet = presServlet;
		this.deviceCat = deviceCat;
		this.description = description;
		this.hubId = hubId;
		this.identity = switchDev.getIdentity();		
		
		if(hubId != null) {
			this.DEVICE_ID = DEVICE_ID_PREFIX + hubId + "-" +
switchDev.getIdentity();
		} else {
			this.DEVICE_ID = DEVICE_ID_PREFIX +
switchDev.getIdentity();	
		}
		
		// create services of the device
		this.switchdevswitchservice = new
SwitchableDevSwitchService(switchDev);
		this.switchdevnameservice = new
GeneralDevNameService(switchDev, hubId);
		this.upnpservices = new UPnPService[]{switchdevnameservice,
switchdevswitchservice};
		this.generateHostInfo();
		this.setupProperties();
		
		// setup event notifier
		notify_switch = new UPnPEventNotifier(context, this,
switchdevswitchservice, switchDev);
	}
	
	public Dictionary getDescriptions(String locale) {
		return devprops;
	}

	public UPnPIcon[] getIcons(String locale) {
		UPnPIcon icon = new DeviceIcon(switchDev);
		return new UPnPIcon[]{icon} ;
	}

	public UPnPService getService(String serviceId) {
		if  (serviceId.equals(switchdevswitchservice.getId())) 
			return switchdevswitchservice;
		else if (serviceId.equals(switchdevnameservice.getId())) 
			return switchdevnameservice;
		else
			return null;
	}

	public UPnPService[] getServices() {
		return upnpservices;
	}
	
	public void destroy() {
		// destroy listeners...
		notify_switch.destroy();
	}	

}


My Switch Service:

public class SwitchableDevSwitchService implements UPnPService {
	final private String SERVICE_ID =
"urn:upnp-org:serviceId:SwitchDevice:1";
	final private String SERVICE_TYPE =
"urn:schemas-upnp-org:service:SwitchDevice:1";
	final private String VERSION ="2.0";
	
	private HashMap actions = new HashMap();
	
	private UPnPStateVariable statusstate;
	private UPnPStateVariable[] states;

	public SwitchableDevSwitchService(SwitchableDevice switchDev) {
		super();
		this.statusstate = new
SwitchableDevStatusStateVariable(switchDev);
		this.states = new UPnPStateVariable[]{statusstate};
		
		UPnPAction setUPnPStatus = new
SwitchableDevSetStatusAction(statusstate, switchDev);
		UPnPAction getUPnPStatus = new
SwitchableDevGetStatusAction(statusstate, switchDev);
		actions.put(getUPnPStatus.getName(), getUPnPStatus);
		actions.put(setUPnPStatus.getName(), setUPnPStatus);
	}

	public UPnPAction getAction(String name) {
		return (UPnPAction)actions.get(name);
	}

	public UPnPAction[] getActions() {
		return (UPnPAction[])(actions.values()).toArray(new
UPnPAction[]{});
	}

	public String getId() {
		return SERVICE_ID;
	}

	public UPnPStateVariable getStateVariable(String id) {
		if (id.equals("Status"))
			return statusstate;
		else return null;
	}

	public UPnPStateVariable[] getStateVariables() {
		return states;
	}

	public String getType() {
		return SERVICE_TYPE;
	}

	public String getVersion() {
		return VERSION;
	}	
}


The switchdev state variable:

public class SwitchableDevStatusStateVariable implements
UPnPLocalStateVariable {

	final private String NAME = "Status";
	final private String DEFAULT_VALUE = "off";
	
	private SwitchableDevice switchDev;
	
	public SwitchableDevStatusStateVariable(SwitchableDevice switchDev){
		this.switchDev = switchDev;
	}	
	
	public String[] getAllowedValues() {
		return null;
	}

	public Object getDefaultValue() {
		return DEFAULT_VALUE;
	}

	public Class getJavaDataType() {
		return String.class;
	}

	public Number getMaximum() {
		return null;
	}

	public Number getMinimum() {
		return null;
	}

	public String getName() {
		return NAME;
	}

	public Number getStep() {
		return null;
	}

	public String getUPnPDataType() {
		return org.osgi.service.upnp.UPnPStateVariable.TYPE_STRING;
	}

	public boolean sendsEvents() {
		return true;
	}

	public Object getCurrentValue() {
		return switchDev.getStatus();
	}

}



SetStatusAction:

public class SwitchableDevSetStatusAction implements UPnPAction {

	final private String NAME = "SetStatus";
	final private String NEW_STATUS_VALUE = "NewStatusValue";
	final private String[] IN_ARG_NAMES = new
String[]{NEW_STATUS_VALUE};
	private UPnPStateVariable state;
	private SwitchableDevice switchDev;	
	
	public SwitchableDevSetStatusAction(UPnPStateVariable state,
SwitchableDevice switchDev) {
		super();
		this.state = state;
		this.switchDev = switchDev;
	}

	public String[] getInputArgumentNames() {
		return IN_ARG_NAMES;
	}

	public String getName() {
		return NAME;
	}

	public String[] getOutputArgumentNames() {
		return null;
	}

	public String getReturnArgumentName() {
		return null;
	}

	public UPnPStateVariable getStateVariable(String argumentName) {
		return state;
	}

	public Dictionary invoke(Dictionary args) throws Exception {
		String value = (String) args.get(NEW_STATUS_VALUE);
		this.switchDev.setStatus(value);
		return null;
	}

}



And finally getstatusaction:

public class SwitchableDevGetStatusAction implements UPnPAction {

	final private String NAME = "GetStatus";
	final private String RESULT_STATUS = "ResultStatus";
	final private String[] OUT_ARG_NAMES = new String[]{RESULT_STATUS};
	private UPnPStateVariable state;
	private SwitchableDevice switchDev;	
	
	public SwitchableDevGetStatusAction(UPnPStateVariable state,
SwitchableDevice switchDev) {
		super();
		this.state = state;
		this.switchDev = switchDev;
	}

	public String[] getInputArgumentNames() {
		return null;
	}

	public String getName() {
		return NAME;
	}

	public String[] getOutputArgumentNames() {
		return OUT_ARG_NAMES;
	}

	public String getReturnArgumentName() {
		return null;
	}

	public UPnPStateVariable getStateVariable(String argumentName) {
		return state;
	}

	public Dictionary invoke(Dictionary args) throws Exception {
		String status = switchDev.getStatus();
		Hashtable result = new Hashtable();
		result.put(RESULT_STATUS, status);
		return result;
	}

}


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - did a small test with the state variables.....

Posted by Daniel Felsing <da...@maven.at>.
Yes, but the second one is not evented!


this.switchdevnameservice = new GeneralDevNameService(switchDev, hubId);
it's just a service for retrieving the actual name of the device...
it was my first one and i will remove it in the near future



the filter i'm using at the server side in every device the refining driver
is creating looks like following:
		subscriber = new UPnPSubscriber(bundleContext, this);
		subscriber.subscribeAllServicesOf(super.getUPnPDeviceUDN());

so i'm registering the refined device as a listener...that wants to be
notified for every service of the underlying upnp device


dont forget that my tester code subscribes to EVERY upnp device using the
tester code i already supplied:

	@Override
	public synchronized void notifyUPnPEvent(String deviceId, String
serviceId, Dictionary events) {
		String output = "";
		output += deviceId + " " + serviceId;
		
		Enumeration eventit = events.keys();
		
		while (eventit.hasMoreElements()) {
			String key = (String) eventit.nextElement();
			output += key + " " + events.get(key) + "\n";
		}
				
		if (!knownDevs.contains(deviceId)) {
			knownDevs.add(deviceId);
		}
		System.err.println(output + "#diff Devices:" +
knownDevs.size());
		System.err.flush();
		
	}

It misses the initial events too...!
And upnp felix tester also....



-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Donnerstag, 24. Juli 2008 15:43
An: users@felix.apache.org
Betreff: Re: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - did a
small test with the state variables.....

mmm

in your code you have two services but you use only one 
UPnPEventNofier() for the service "switchdevswitchservice". Is it 
normal? I suppose at this point that for the subscription you use a 
filter for monitoring all the devices. is it right?

francesco


Daniel Felsing wrote:
> Hello,
> 
> ok what i did now was the following.
> In the upnplocalstatevariable implementations i put into getCurrentValue
> some debug code so i can see when it is called.
> 
> On the host i now exported my 17 devices to see which oft he
getCurrentValue
> methods get called.
> Only 16 devices got called! This time S20_Switch7 was missing...
> 
> Now i looked at upnp felix tester - cause that must be the device which
> should send me no events on subscription
> But u know what? I can subscribe to the event and get the values
> delivered...
> 
> I thought that upon subscription of the device i should see something on
my
> hosts log window...but nothing
> 
> I rechecked upnp felix tester cause i wanted to find the actual device
which
> i am not able to subscribe..cause it must be another one then.
> 
> And now it gets funny....service/variable i cant subscribe is EXACTLY the
> device which is found before Switch7...and the the last service of it
> 
> 
> Maybe this can lead u to something?
> 
> Kind regards,
> Daniel Felsing
> 
> 
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Donnerstag, 24. Juli 2008 14:49
> An: users@felix.apache.org
> Betreff: Re: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one
more
> addition.... forgot one thing!
> 
> I would like to know if the UPnP Devices you are testing are implemented 
> by you using for all of them the UPnPLocalStateVariable interface.
> please take a look at 
> http://felix.apache.org/site/upnp-writing-cd-and-cp.html
> 
> francesco
> 
> Daniel Felsing wrote:
>> Hello,
>>
>> one more thing.
>> The felix UPNP tester shows up ALL the devices, services and state
>> variables.
>> when i switch the state of a missed device (which has not delivered the
>> event on subscription of a new listener) the event is propagated on
change
>> to the 
>> interested listener
>>
>> It seems that only the INITIAL delivery when registering a new upnp
> listener
>> is fuxxed up somehow...
>>
>> Kind regards,
>> Daniel Felsing
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Donnerstag, 24. Juli 2008 12:43
>> An: users@felix.apache.org
>> Betreff: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
>> addition....
>>
>> Hello Francesco,
>>
>> - yes, the devices are using the same host pc.
>> I have written a "basedriver" for my device technology...and then a
>> UPnPBridgeDriver exporting them to my network.
>> I'm directly connected to the host by a switch (so cable - no wireless
>> there)
>>
>> - as development environment i'm using eclipse equinox, all upnp stuff is
>> from felix.
>> As runtime environment i'm using felix - however same behavior on both
> osgi
>> implementations
>>
>> - the felix runtimes are the same, the equinox runtimes also...
>>
>>
>> Kind regards,
>> Daniel Felsing
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
>> Gesendet: Donnerstag, 24. Juli 2008 12:35
>> An: users@felix.apache.org
>> Betreff: Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
>> addition....
>>
>> Hi Daniel,
>>
>> well few question so far before starting to work on it.
>> you should describe you execution environment.
>> - do the devices run on the same host PC?
>> - are they implemented by you and executed on different (#17) Felix 
>> instances?
>> - are you testing all the devices on the same Felix runtime?
>>
>> br,
>> francesco
>>
>>
>>
>>
>> Daniel Felsing wrote:
>>> Hello..
>>>
>>> One more thing i experienced is that when i change e.g. a device from on
>> to
>>> off...or set another level for a dimming device
>>> the change is sent out correctly and device is responding.
>>>
>>> Regards,
>>> Daniel
>>>
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>>> Gesendet: Mittwoch, 23. Juli 2008 23:16
>>> An: users@felix.apache.org
>>> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint
>> can
>>> help you to pin down the problem?
>>>
>>>
>>> Hi again,
>>>
>>> one more thing.
>>>
>>> If i have Felix UPnP Tester running parallel to my device tester and i
>>> subscribe the device that is actually missing i also get no "initial
>> status"
>>> in the log window...
>>> For the other devices it is working properly.  Then i restart my
"tester"
>>> bundle..and dont restart felix upnp tester and then subscribe to the
>> shutter
>>> again
>>> I get the initial status in the upnp tester from felix.
>>>
>>> So...when "registering" / "removing" a new listener there must happen
>>> anything which influences the "initial" or "overall??" eventing
behaviour
>> of
>>> the upnp devices.
>>>
>>>
>>> Kind regards, Daniel Felsing
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
>>> Gesendet: Mittwoch, 23. Juli 2008 21:18
>>> An: users@felix.apache.org
>>> Betreff: Re: AW: bug in felix upnp basedriver 0.8
>>>
>>> Hi Daniel,
>>>
>>> it seems that two are the devices that whose events are not captured by 
>>> your tester code:
>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
>>>
>>> please, check the code generating the events for such devices, may be 
>>> you send the event only if their status assume a specific value.
>>>
>>> I think you should run the tester at least 5 times more.
>>> If you experience the same problem always with different devices then we

>>> will try to repeat a similar test.
>>>
>>> regards,
>>> francesco
>>>
>>>
>>> Daniel Felsing wrote:
>>>> Ah - one more update...
>>>>
>>>> I think event change propagation of single devices is ok :)
>>>> Hm....
>>>>
>>>>
>>>> Well - hoping for a solution!
>>>>
>>>> Kind regards,
>>>> Daniel
>>>>
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>>>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>>>> An: users@felix.apache.org
>>>> Betreff: bug in felix upnp basedriver 0.8
>>>>
>>>> Hello.
>>>>
>>>>  
>>>>
>>>> It seems there is a bug in event notification in the actual release of
>> the
>>>> upnp basedriver 0.8.
>>>>
>>>>  
>>>>
>>>> I have exported exactly 17 devices to the upnp network.
>>>>
>>>> After "UPnP Event" subscription i should get informed about all device
>>>> stati.
>>>>
>>>> So the number of actual devices by which i should get informed should
be
>>> 17.
> 
>>>>  
>>>>
>>>> This is not always true..and the behavior by which device status i dont
>>> get
>>>> informed is random.
>>>>
>>>>  
>>>>
>>>> Here an example:
>>>>
>>>>  
>>>>
>>>> First run:
>>>>
>>>>  
>>>>
>>>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>>>
>>>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>>>
>>>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>>>
>>>> info     20080723 19:38:21 bid#39       -
>>>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status
off
>>>>
>>>> #diff Devices:1
>>>>
>>>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>>>
>>>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>>>
>>>> info     20080723 19:38:22 bid#39       -
>>>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:2
>>>>
>>>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>>>
>>>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>>>
>>>> info     20080723 19:38:22 bid#39       -
>>>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:3
>>>>
>>>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>>>
>>>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>>>
>>>> info     20080723 19:38:23 bid#39       -
>>>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:4
>>>>
>>>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>>>
>>>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>>>
>>>> info     20080723 19:38:23 bid#39       -
>>>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:5
>>>>
>>>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>>>
>>>> info     20080723 19:38:24 bid#39       -
>>>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>>>
>>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:6
>>>>
>>>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>>>
>>>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>>>
>>>> info     20080723 19:38:24 bid#39       -
>>>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>>
>>>> #diff Devices:7
>>>>
>>>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>>>
>>>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>>>
>>>> info     20080723 19:38:25 bid#39       -
>>>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>>>
>>>> info     20080723 19:38:25 bid#39       -
>>>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>>>
>>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1
>>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-simplelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>>> on
>>>> #diff Devices:9
>>>>
>>>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>>>
>>>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>>>
>>>> info     20080723 19:38:26 bid#39       -
>>>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:10
>>>>
>>>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>>>
>>>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>>>
>>>> info     20080723 19:38:26 bid#39       -
>>>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:11
>>>>
>>>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>>>
>>>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>>>
>>>> info     20080723 19:38:27 bid#39       -
>>>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:11
>>>>
>>>> uuid:AT-SM-FHZ1-funksteckdose1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:12
>>>>
>>>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>>>
>>>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>>>
>>>> info     20080723 19:38:27 bid#39       -
>>>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:13
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:13
>>>>
>>>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>>>
>>>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>>>
>>>> info     20080723 19:38:28 bid#39       -
>>>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>>
>>>> #diff Devices:14
>>>>
>>>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>>>
>>>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>>>
>>>> info     20080723 19:38:29 bid#39       -
>>>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>>
>>>> #diff Devices:15
>>>>
>>>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>>>
>>>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>>>
>>>> info     20080723 19:38:29 bid#39       -
>>>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:16
>>>>
>>>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>>>
>>>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>>>
>>>> info     20080723 19:38:30 bid#39       -
>>>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>>
>>>> #diff Devices:16
>>>>
>>>> uuid:AT-SM-FHZ1-dimmablelight1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:17
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Device count is 17
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Then i restarted the "tester bundle"
>>>>
>>>>  
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:1
>>>>
>>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status
off
>>>>
>>>> #diff Devices:2
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:2
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:5
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1
>>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>>
>>>> #diff Devices:6
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>>
>>>> #diff Devices:6
>>>>
>>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>>
>>>> #diff Devices:7
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-funksteckdose1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:10
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:11
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>>
>>>> #diff Devices:12
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:13
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:14
>>>>
>>>> uuid:AT-SM-FHZ1-dimmablelight1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>>
>>>> #diff Devices:15
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> I get informed by only 15 devices?...
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Third run:
>>>>
>>>>  
>>>>
>>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status
off
>>>>
>>>> #diff Devices:1
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:2
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:5
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1
>>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>>
>>>> #diff Devices:6
>>>>
>>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>>
>>>> #diff Devices:7
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>>
>>>> #diff Devices:7
>>>>
>>>> uuid:AT-SM-FHZ1-simplelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>>> on
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:10
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:10
>>>>
>>>> uuid:AT-SM-FHZ1-funksteckdose1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:11
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:12
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:12
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>>
>>>> #diff Devices:13
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>>
>>>> #diff Devices:14
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-dimmablelight1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:16
>>>>
>>>>  
>>>>
>>>> Informed by 16 devices.
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> The code for testing was:
>>>>
>>>>  
>>>>
>>>> public class EventListener implements UPnPEventListener {
>>>>
>>>>  
>>>>
>>>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>>>
>>>>       
>>>>
>>>>       @Override
>>>>
>>>>       public synchronized void notifyUPnPEvent(String deviceId, String
>>>> serviceId, Dictionary events) {
>>>>
>>>>             String output = "";
>>>>
>>>>             output += deviceId + " " + serviceId;
>>>>
>>>>             
>>>>
>>>>             Enumeration eventit = events.keys();
>>>>
>>>>             
>>>>
>>>>             while (eventit.hasMoreElements()) {
>>>>
>>>>                   String key = (String) eventit.nextElement();
>>>>
>>>>                   output += key + " " + events.get(key) + "\n";
>>>>
>>>>             }
>>>>
>>>>                         
>>>>
>>>>             if (!knownDevs.contains(deviceId)) {
>>>>
>>>>                   knownDevs.add(deviceId);
>>>>
>>>>             }
>>>>
>>>>             System.err.println(output + "#diff Devices:" +
>>>> knownDevs.size());
>>>>
>>>>             System.err.flush();
>>>>
>>>>             
>>>>
>>>>       }
>>>>
>>>>  
>>>>
>>>> }
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> I think it should be free from errors :-)
>>>>
>>>> Please help me! Since i really need the upnp driver for my master
> thesis.
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Kind regards,
>>>>
>>>> Daniel
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - did a small test with the state variables.....

Posted by Francesco Furfari <fr...@isti.cnr.it>.
mmm

in your code you have two services but you use only one 
UPnPEventNofier() for the service "switchdevswitchservice". Is it 
normal? I suppose at this point that for the subscription you use a 
filter for monitoring all the devices. is it right?

francesco


Daniel Felsing wrote:
> Hello,
> 
> ok what i did now was the following.
> In the upnplocalstatevariable implementations i put into getCurrentValue
> some debug code so i can see when it is called.
> 
> On the host i now exported my 17 devices to see which oft he getCurrentValue
> methods get called.
> Only 16 devices got called! This time S20_Switch7 was missing...
> 
> Now i looked at upnp felix tester - cause that must be the device which
> should send me no events on subscription
> But u know what? I can subscribe to the event and get the values
> delivered...
> 
> I thought that upon subscription of the device i should see something on my
> hosts log window...but nothing
> 
> I rechecked upnp felix tester cause i wanted to find the actual device which
> i am not able to subscribe..cause it must be another one then.
> 
> And now it gets funny....service/variable i cant subscribe is EXACTLY the
> device which is found before Switch7...and the the last service of it
> 
> 
> Maybe this can lead u to something?
> 
> Kind regards,
> Daniel Felsing
> 
> 
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Donnerstag, 24. Juli 2008 14:49
> An: users@felix.apache.org
> Betreff: Re: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
> addition.... forgot one thing!
> 
> I would like to know if the UPnP Devices you are testing are implemented 
> by you using for all of them the UPnPLocalStateVariable interface.
> please take a look at 
> http://felix.apache.org/site/upnp-writing-cd-and-cp.html
> 
> francesco
> 
> Daniel Felsing wrote:
>> Hello,
>>
>> one more thing.
>> The felix UPNP tester shows up ALL the devices, services and state
>> variables.
>> when i switch the state of a missed device (which has not delivered the
>> event on subscription of a new listener) the event is propagated on change
>> to the 
>> interested listener
>>
>> It seems that only the INITIAL delivery when registering a new upnp
> listener
>> is fuxxed up somehow...
>>
>> Kind regards,
>> Daniel Felsing
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Donnerstag, 24. Juli 2008 12:43
>> An: users@felix.apache.org
>> Betreff: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
>> addition....
>>
>> Hello Francesco,
>>
>> - yes, the devices are using the same host pc.
>> I have written a "basedriver" for my device technology...and then a
>> UPnPBridgeDriver exporting them to my network.
>> I'm directly connected to the host by a switch (so cable - no wireless
>> there)
>>
>> - as development environment i'm using eclipse equinox, all upnp stuff is
>> from felix.
>> As runtime environment i'm using felix - however same behavior on both
> osgi
>> implementations
>>
>> - the felix runtimes are the same, the equinox runtimes also...
>>
>>
>> Kind regards,
>> Daniel Felsing
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
>> Gesendet: Donnerstag, 24. Juli 2008 12:35
>> An: users@felix.apache.org
>> Betreff: Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
>> addition....
>>
>> Hi Daniel,
>>
>> well few question so far before starting to work on it.
>> you should describe you execution environment.
>> - do the devices run on the same host PC?
>> - are they implemented by you and executed on different (#17) Felix 
>> instances?
>> - are you testing all the devices on the same Felix runtime?
>>
>> br,
>> francesco
>>
>>
>>
>>
>> Daniel Felsing wrote:
>>> Hello..
>>>
>>> One more thing i experienced is that when i change e.g. a device from on
>> to
>>> off...or set another level for a dimming device
>>> the change is sent out correctly and device is responding.
>>>
>>> Regards,
>>> Daniel
>>>
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>>> Gesendet: Mittwoch, 23. Juli 2008 23:16
>>> An: users@felix.apache.org
>>> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint
>> can
>>> help you to pin down the problem?
>>>
>>>
>>> Hi again,
>>>
>>> one more thing.
>>>
>>> If i have Felix UPnP Tester running parallel to my device tester and i
>>> subscribe the device that is actually missing i also get no "initial
>> status"
>>> in the log window...
>>> For the other devices it is working properly.  Then i restart my "tester"
>>> bundle..and dont restart felix upnp tester and then subscribe to the
>> shutter
>>> again
>>> I get the initial status in the upnp tester from felix.
>>>
>>> So...when "registering" / "removing" a new listener there must happen
>>> anything which influences the "initial" or "overall??" eventing behaviour
>> of
>>> the upnp devices.
>>>
>>>
>>> Kind regards, Daniel Felsing
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
>>> Gesendet: Mittwoch, 23. Juli 2008 21:18
>>> An: users@felix.apache.org
>>> Betreff: Re: AW: bug in felix upnp basedriver 0.8
>>>
>>> Hi Daniel,
>>>
>>> it seems that two are the devices that whose events are not captured by 
>>> your tester code:
>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
>>>
>>> please, check the code generating the events for such devices, may be 
>>> you send the event only if their status assume a specific value.
>>>
>>> I think you should run the tester at least 5 times more.
>>> If you experience the same problem always with different devices then we 
>>> will try to repeat a similar test.
>>>
>>> regards,
>>> francesco
>>>
>>>
>>> Daniel Felsing wrote:
>>>> Ah - one more update...
>>>>
>>>> I think event change propagation of single devices is ok :)
>>>> Hm....
>>>>
>>>>
>>>> Well - hoping for a solution!
>>>>
>>>> Kind regards,
>>>> Daniel
>>>>
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>>>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>>>> An: users@felix.apache.org
>>>> Betreff: bug in felix upnp basedriver 0.8
>>>>
>>>> Hello.
>>>>
>>>>  
>>>>
>>>> It seems there is a bug in event notification in the actual release of
>> the
>>>> upnp basedriver 0.8.
>>>>
>>>>  
>>>>
>>>> I have exported exactly 17 devices to the upnp network.
>>>>
>>>> After "UPnP Event" subscription i should get informed about all device
>>>> stati.
>>>>
>>>> So the number of actual devices by which i should get informed should be
>>> 17.
> 
>>>>  
>>>>
>>>> This is not always true..and the behavior by which device status i dont
>>> get
>>>> informed is random.
>>>>
>>>>  
>>>>
>>>> Here an example:
>>>>
>>>>  
>>>>
>>>> First run:
>>>>
>>>>  
>>>>
>>>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>>>
>>>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>>>
>>>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>>>
>>>> info     20080723 19:38:21 bid#39       -
>>>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:1
>>>>
>>>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>>>
>>>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>>>
>>>> info     20080723 19:38:22 bid#39       -
>>>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:2
>>>>
>>>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>>>
>>>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>>>
>>>> info     20080723 19:38:22 bid#39       -
>>>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:3
>>>>
>>>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>>>
>>>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>>>
>>>> info     20080723 19:38:23 bid#39       -
>>>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:4
>>>>
>>>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>>>
>>>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>>>
>>>> info     20080723 19:38:23 bid#39       -
>>>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:5
>>>>
>>>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>>>
>>>> info     20080723 19:38:24 bid#39       -
>>>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>>>
>>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:6
>>>>
>>>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>>>
>>>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>>>
>>>> info     20080723 19:38:24 bid#39       -
>>>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>>
>>>> #diff Devices:7
>>>>
>>>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>>>
>>>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>>>
>>>> info     20080723 19:38:25 bid#39       -
>>>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>>>
>>>> info     20080723 19:38:25 bid#39       -
>>>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>>>
>>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1
>>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>>> on
>>>> #diff Devices:9
>>>>
>>>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>>>
>>>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>>>
>>>> info     20080723 19:38:26 bid#39       -
>>>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:10
>>>>
>>>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>>>
>>>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>>>
>>>> info     20080723 19:38:26 bid#39       -
>>>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:11
>>>>
>>>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>>>
>>>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>>>
>>>> info     20080723 19:38:27 bid#39       -
>>>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:11
>>>>
>>>> uuid:AT-SM-FHZ1-funksteckdose1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:12
>>>>
>>>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>>>
>>>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>>>
>>>> info     20080723 19:38:27 bid#39       -
>>>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:13
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:13
>>>>
>>>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>>>
>>>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>>>
>>>> info     20080723 19:38:28 bid#39       -
>>>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>>
>>>> #diff Devices:14
>>>>
>>>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>>>
>>>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>>>
>>>> info     20080723 19:38:29 bid#39       -
>>>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>>
>>>> #diff Devices:15
>>>>
>>>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>>>
>>>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>>>
>>>> info     20080723 19:38:29 bid#39       -
>>>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:16
>>>>
>>>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>>>
>>>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>>>
>>>> info     20080723 19:38:30 bid#39       -
>>>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>>
>>>> #diff Devices:16
>>>>
>>>> uuid:AT-SM-FHZ1-dimmablelight1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:17
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Device count is 17
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Then i restarted the "tester bundle"
>>>>
>>>>  
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:1
>>>>
>>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:2
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:2
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:5
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1
>>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>>
>>>> #diff Devices:6
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>>
>>>> #diff Devices:6
>>>>
>>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>>
>>>> #diff Devices:7
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-funksteckdose1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:10
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:11
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>>
>>>> #diff Devices:12
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:13
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:14
>>>>
>>>> uuid:AT-SM-FHZ1-dimmablelight1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>>
>>>> #diff Devices:15
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> I get informed by only 15 devices?...
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Third run:
>>>>
>>>>  
>>>>
>>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>>
>>>> #diff Devices:1
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:2
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:3
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:4
>>>>
>>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:5
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1
>>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>>
>>>> #diff Devices:6
>>>>
>>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>>
>>>> #diff Devices:7
>>>>
>>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>>
>>>> #diff Devices:7
>>>>
>>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>>> on
>>>> #diff Devices:8
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:9
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:10
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>>
>>>> #diff Devices:10
>>>>
>>>> uuid:AT-SM-FHZ1-funksteckdose1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:11
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:12
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>>
>>>> #diff Devices:12
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>>
>>>> #diff Devices:13
>>>>
>>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>>
>>>> #diff Devices:14
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>>
>>>> #diff Devices:15
>>>>
>>>> uuid:AT-SM-FHZ1-dimmablelight1
>> urn:upnp-org:serviceId:SwitchDevice:1Status
>>>> off
>>>>
>>>> #diff Devices:16
>>>>
>>>>  
>>>>
>>>> Informed by 16 devices.
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> The code for testing was:
>>>>
>>>>  
>>>>
>>>> public class EventListener implements UPnPEventListener {
>>>>
>>>>  
>>>>
>>>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>>>
>>>>       
>>>>
>>>>       @Override
>>>>
>>>>       public synchronized void notifyUPnPEvent(String deviceId, String
>>>> serviceId, Dictionary events) {
>>>>
>>>>             String output = "";
>>>>
>>>>             output += deviceId + " " + serviceId;
>>>>
>>>>             
>>>>
>>>>             Enumeration eventit = events.keys();
>>>>
>>>>             
>>>>
>>>>             while (eventit.hasMoreElements()) {
>>>>
>>>>                   String key = (String) eventit.nextElement();
>>>>
>>>>                   output += key + " " + events.get(key) + "\n";
>>>>
>>>>             }
>>>>
>>>>                         
>>>>
>>>>             if (!knownDevs.contains(deviceId)) {
>>>>
>>>>                   knownDevs.add(deviceId);
>>>>
>>>>             }
>>>>
>>>>             System.err.println(output + "#diff Devices:" +
>>>> knownDevs.size());
>>>>
>>>>             System.err.flush();
>>>>
>>>>             
>>>>
>>>>       }
>>>>
>>>>  
>>>>
>>>> }
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> I think it should be free from errors :-)
>>>>
>>>> Please help me! Since i really need the upnp driver for my master
> thesis.
>>>>  
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Kind regards,
>>>>
>>>> Daniel
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - did a small test with the state variables.....

Posted by Daniel Felsing <da...@maven.at>.
Hello,

ok what i did now was the following.
In the upnplocalstatevariable implementations i put into getCurrentValue
some debug code so i can see when it is called.

On the host i now exported my 17 devices to see which oft he getCurrentValue
methods get called.
Only 16 devices got called! This time S20_Switch7 was missing...

Now i looked at upnp felix tester - cause that must be the device which
should send me no events on subscription
But u know what? I can subscribe to the event and get the values
delivered...

I thought that upon subscription of the device i should see something on my
hosts log window...but nothing

I rechecked upnp felix tester cause i wanted to find the actual device which
i am not able to subscribe..cause it must be another one then.

And now it gets funny....service/variable i cant subscribe is EXACTLY the
device which is found before Switch7...and the the last service of it


Maybe this can lead u to something?

Kind regards,
Daniel Felsing





-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Donnerstag, 24. Juli 2008 14:49
An: users@felix.apache.org
Betreff: Re: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition.... forgot one thing!

I would like to know if the UPnP Devices you are testing are implemented 
by you using for all of them the UPnPLocalStateVariable interface.
please take a look at 
http://felix.apache.org/site/upnp-writing-cd-and-cp.html

francesco

Daniel Felsing wrote:
> Hello,
> 
> one more thing.
> The felix UPNP tester shows up ALL the devices, services and state
> variables.
> when i switch the state of a missed device (which has not delivered the
> event on subscription of a new listener) the event is propagated on change
> to the 
> interested listener
> 
> It seems that only the INITIAL delivery when registering a new upnp
listener
> is fuxxed up somehow...
> 
> Kind regards,
> Daniel Felsing
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Donnerstag, 24. Juli 2008 12:43
> An: users@felix.apache.org
> Betreff: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
> addition....
> 
> Hello Francesco,
> 
> - yes, the devices are using the same host pc.
> I have written a "basedriver" for my device technology...and then a
> UPnPBridgeDriver exporting them to my network.
> I'm directly connected to the host by a switch (so cable - no wireless
> there)
> 
> - as development environment i'm using eclipse equinox, all upnp stuff is
> from felix.
> As runtime environment i'm using felix - however same behavior on both
osgi
> implementations
> 
> - the felix runtimes are the same, the equinox runtimes also...
> 
> 
> Kind regards,
> Daniel Felsing
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Donnerstag, 24. Juli 2008 12:35
> An: users@felix.apache.org
> Betreff: Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
> addition....
> 
> Hi Daniel,
> 
> well few question so far before starting to work on it.
> you should describe you execution environment.
> - do the devices run on the same host PC?
> - are they implemented by you and executed on different (#17) Felix 
> instances?
> - are you testing all the devices on the same Felix runtime?
> 
> br,
> francesco
> 
> 
> 
> 
> Daniel Felsing wrote:
>> Hello..
>>
>> One more thing i experienced is that when i change e.g. a device from on
> to
>> off...or set another level for a dimming device
>> the change is sent out correctly and device is responding.
>>
>> Regards,
>> Daniel
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Mittwoch, 23. Juli 2008 23:16
>> An: users@felix.apache.org
>> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint
> can
>> help you to pin down the problem?
>>
>>
>> Hi again,
>>
>> one more thing.
>>
>> If i have Felix UPnP Tester running parallel to my device tester and i
>> subscribe the device that is actually missing i also get no "initial
> status"
>> in the log window...
>> For the other devices it is working properly.  Then i restart my "tester"
>> bundle..and dont restart felix upnp tester and then subscribe to the
> shutter
>> again
>> I get the initial status in the upnp tester from felix.
>>
>> So...when "registering" / "removing" a new listener there must happen
>> anything which influences the "initial" or "overall??" eventing behaviour
> of
>> the upnp devices.
>>
>>
>> Kind regards, Daniel Felsing
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
>> Gesendet: Mittwoch, 23. Juli 2008 21:18
>> An: users@felix.apache.org
>> Betreff: Re: AW: bug in felix upnp basedriver 0.8
>>
>> Hi Daniel,
>>
>> it seems that two are the devices that whose events are not captured by 
>> your tester code:
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
>>
>> please, check the code generating the events for such devices, may be 
>> you send the event only if their status assume a specific value.
>>
>> I think you should run the tester at least 5 times more.
>> If you experience the same problem always with different devices then we 
>> will try to repeat a similar test.
>>
>> regards,
>> francesco
>>
>>
>> Daniel Felsing wrote:
>>> Ah - one more update...
>>>
>>> I think event change propagation of single devices is ok :)
>>> Hm....
>>>
>>>
>>> Well - hoping for a solution!
>>>
>>> Kind regards,
>>> Daniel
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>>> An: users@felix.apache.org
>>> Betreff: bug in felix upnp basedriver 0.8
>>>
>>> Hello.
>>>
>>>  
>>>
>>> It seems there is a bug in event notification in the actual release of
> the
>>> upnp basedriver 0.8.
>>>
>>>  
>>>
>>> I have exported exactly 17 devices to the upnp network.
>>>
>>> After "UPnP Event" subscription i should get informed about all device
>>> stati.
>>>
>>> So the number of actual devices by which i should get informed should be
>> 17.
>>>  
>>>
>>> This is not always true..and the behavior by which device status i dont
>> get
>>> informed is random.
>>>
>>>  
>>>
>>> Here an example:
>>>
>>>  
>>>
>>> First run:
>>>
>>>  
>>>
>>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>>
>>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>>
>>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>>
>>> info     20080723 19:38:21 bid#39       -
>>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:1
>>>
>>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>>
>>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>>
>>> info     20080723 19:38:22 bid#39       -
>>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:2
>>>
>>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>>
>>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>>
>>> info     20080723 19:38:22 bid#39       -
>>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:3
>>>
>>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>>
>>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>>
>>> info     20080723 19:38:23 bid#39       -
>>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:4
>>>
>>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>>
>>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>>
>>> info     20080723 19:38:23 bid#39       -
>>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:5
>>>
>>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>>
>>> info     20080723 19:38:24 bid#39       -
>>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>>
>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:6
>>>
>>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>>
>>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>>
>>> info     20080723 19:38:24 bid#39       -
>>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>
>>> #diff Devices:7
>>>
>>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>>
>>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>>
>>> info     20080723 19:38:25 bid#39       -
>>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>>
>>> info     20080723 19:38:25 bid#39       -
>>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>>
>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1
>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> on
>>> #diff Devices:9
>>>
>>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>>
>>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>>
>>> info     20080723 19:38:26 bid#39       -
>>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:10
>>>
>>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>>
>>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>>
>>> info     20080723 19:38:26 bid#39       -
>>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:11
>>>
>>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>>
>>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>>
>>> info     20080723 19:38:27 bid#39       -
>>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:11
>>>
>>> uuid:AT-SM-FHZ1-funksteckdose1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:12
>>>
>>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>>
>>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>>
>>> info     20080723 19:38:27 bid#39       -
>>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:13
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:13
>>>
>>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>>
>>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>>
>>> info     20080723 19:38:28 bid#39       -
>>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>
>>> #diff Devices:14
>>>
>>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>>
>>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>>
>>> info     20080723 19:38:29 bid#39       -
>>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>
>>> #diff Devices:15
>>>
>>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>>
>>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>>
>>> info     20080723 19:38:29 bid#39       -
>>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:16
>>>
>>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>>
>>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>>
>>> info     20080723 19:38:30 bid#39       -
>>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>
>>> #diff Devices:16
>>>
>>> uuid:AT-SM-FHZ1-dimmablelight1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:17
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> Device count is 17
>>>
>>>  
>>>
>>>  
>>>
>>> Then i restarted the "tester bundle"
>>>
>>>  
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:1
>>>
>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:2
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:2
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:5
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1
>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>
>>> #diff Devices:6
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>
>>> #diff Devices:6
>>>
>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>
>>> #diff Devices:7
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-funksteckdose1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:10
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:11
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>
>>> #diff Devices:12
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:13
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:14
>>>
>>> uuid:AT-SM-FHZ1-dimmablelight1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>
>>> #diff Devices:15
>>>
>>>  
>>>
>>>  
>>>
>>> I get informed by only 15 devices?...
>>>
>>>  
>>>
>>>  
>>>
>>> Third run:
>>>
>>>  
>>>
>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:1
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:2
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:5
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1
>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>
>>> #diff Devices:6
>>>
>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>
>>> #diff Devices:7
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>
>>> #diff Devices:7
>>>
>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> on
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:10
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:10
>>>
>>> uuid:AT-SM-FHZ1-funksteckdose1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:11
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:12
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:12
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>
>>> #diff Devices:13
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>
>>> #diff Devices:14
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-dimmablelight1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:16
>>>
>>>  
>>>
>>> Informed by 16 devices.
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> The code for testing was:
>>>
>>>  
>>>
>>> public class EventListener implements UPnPEventListener {
>>>
>>>  
>>>
>>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>>
>>>       
>>>
>>>       @Override
>>>
>>>       public synchronized void notifyUPnPEvent(String deviceId, String
>>> serviceId, Dictionary events) {
>>>
>>>             String output = "";
>>>
>>>             output += deviceId + " " + serviceId;
>>>
>>>             
>>>
>>>             Enumeration eventit = events.keys();
>>>
>>>             
>>>
>>>             while (eventit.hasMoreElements()) {
>>>
>>>                   String key = (String) eventit.nextElement();
>>>
>>>                   output += key + " " + events.get(key) + "\n";
>>>
>>>             }
>>>
>>>                         
>>>
>>>             if (!knownDevs.contains(deviceId)) {
>>>
>>>                   knownDevs.add(deviceId);
>>>
>>>             }
>>>
>>>             System.err.println(output + "#diff Devices:" +
>>> knownDevs.size());
>>>
>>>             System.err.flush();
>>>
>>>             
>>>
>>>       }
>>>
>>>  
>>>
>>> }
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> I think it should be free from errors :-)
>>>
>>> Please help me! Since i really need the upnp driver for my master
thesis.
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> Kind regards,
>>>
>>> Daniel
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition.... forgot one thing!

Posted by Francesco Furfari <fr...@isti.cnr.it>.
I would like to know if the UPnP Devices you are testing are implemented 
by you using for all of them the UPnPLocalStateVariable interface.
please take a look at 
http://felix.apache.org/site/upnp-writing-cd-and-cp.html

francesco

Daniel Felsing wrote:
> Hello,
> 
> one more thing.
> The felix UPNP tester shows up ALL the devices, services and state
> variables.
> when i switch the state of a missed device (which has not delivered the
> event on subscription of a new listener) the event is propagated on change
> to the 
> interested listener
> 
> It seems that only the INITIAL delivery when registering a new upnp listener
> is fuxxed up somehow...
> 
> Kind regards,
> Daniel Felsing
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Donnerstag, 24. Juli 2008 12:43
> An: users@felix.apache.org
> Betreff: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
> addition....
> 
> Hello Francesco,
> 
> - yes, the devices are using the same host pc.
> I have written a "basedriver" for my device technology...and then a
> UPnPBridgeDriver exporting them to my network.
> I'm directly connected to the host by a switch (so cable - no wireless
> there)
> 
> - as development environment i'm using eclipse equinox, all upnp stuff is
> from felix.
> As runtime environment i'm using felix - however same behavior on both osgi
> implementations
> 
> - the felix runtimes are the same, the equinox runtimes also...
> 
> 
> Kind regards,
> Daniel Felsing
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Donnerstag, 24. Juli 2008 12:35
> An: users@felix.apache.org
> Betreff: Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
> addition....
> 
> Hi Daniel,
> 
> well few question so far before starting to work on it.
> you should describe you execution environment.
> - do the devices run on the same host PC?
> - are they implemented by you and executed on different (#17) Felix 
> instances?
> - are you testing all the devices on the same Felix runtime?
> 
> br,
> francesco
> 
> 
> 
> 
> Daniel Felsing wrote:
>> Hello..
>>
>> One more thing i experienced is that when i change e.g. a device from on
> to
>> off...or set another level for a dimming device
>> the change is sent out correctly and device is responding.
>>
>> Regards,
>> Daniel
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Mittwoch, 23. Juli 2008 23:16
>> An: users@felix.apache.org
>> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint
> can
>> help you to pin down the problem?
>>
>>
>> Hi again,
>>
>> one more thing.
>>
>> If i have Felix UPnP Tester running parallel to my device tester and i
>> subscribe the device that is actually missing i also get no "initial
> status"
>> in the log window...
>> For the other devices it is working properly.  Then i restart my "tester"
>> bundle..and dont restart felix upnp tester and then subscribe to the
> shutter
>> again
>> I get the initial status in the upnp tester from felix.
>>
>> So...when "registering" / "removing" a new listener there must happen
>> anything which influences the "initial" or "overall??" eventing behaviour
> of
>> the upnp devices.
>>
>>
>> Kind regards, Daniel Felsing
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
>> Gesendet: Mittwoch, 23. Juli 2008 21:18
>> An: users@felix.apache.org
>> Betreff: Re: AW: bug in felix upnp basedriver 0.8
>>
>> Hi Daniel,
>>
>> it seems that two are the devices that whose events are not captured by 
>> your tester code:
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
>>
>> please, check the code generating the events for such devices, may be 
>> you send the event only if their status assume a specific value.
>>
>> I think you should run the tester at least 5 times more.
>> If you experience the same problem always with different devices then we 
>> will try to repeat a similar test.
>>
>> regards,
>> francesco
>>
>>
>> Daniel Felsing wrote:
>>> Ah - one more update...
>>>
>>> I think event change propagation of single devices is ok :)
>>> Hm....
>>>
>>>
>>> Well - hoping for a solution!
>>>
>>> Kind regards,
>>> Daniel
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>>> An: users@felix.apache.org
>>> Betreff: bug in felix upnp basedriver 0.8
>>>
>>> Hello.
>>>
>>>  
>>>
>>> It seems there is a bug in event notification in the actual release of
> the
>>> upnp basedriver 0.8.
>>>
>>>  
>>>
>>> I have exported exactly 17 devices to the upnp network.
>>>
>>> After "UPnP Event" subscription i should get informed about all device
>>> stati.
>>>
>>> So the number of actual devices by which i should get informed should be
>> 17.
>>>  
>>>
>>> This is not always true..and the behavior by which device status i dont
>> get
>>> informed is random.
>>>
>>>  
>>>
>>> Here an example:
>>>
>>>  
>>>
>>> First run:
>>>
>>>  
>>>
>>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>>
>>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>>
>>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>>
>>> info     20080723 19:38:21 bid#39       -
>>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:1
>>>
>>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>>
>>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>>
>>> info     20080723 19:38:22 bid#39       -
>>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:2
>>>
>>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>>
>>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>>
>>> info     20080723 19:38:22 bid#39       -
>>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:3
>>>
>>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>>
>>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>>
>>> info     20080723 19:38:23 bid#39       -
>>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:4
>>>
>>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>>
>>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>>
>>> info     20080723 19:38:23 bid#39       -
>>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:5
>>>
>>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>>
>>> info     20080723 19:38:24 bid#39       -
>>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>>
>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:6
>>>
>>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>>
>>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>>
>>> info     20080723 19:38:24 bid#39       -
>>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>
>>> #diff Devices:7
>>>
>>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>>
>>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>>
>>> info     20080723 19:38:25 bid#39       -
>>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>>
>>> info     20080723 19:38:25 bid#39       -
>>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>>
>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1
>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> on
>>> #diff Devices:9
>>>
>>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>>
>>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>>
>>> info     20080723 19:38:26 bid#39       -
>>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:10
>>>
>>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>>
>>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>>
>>> info     20080723 19:38:26 bid#39       -
>>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:11
>>>
>>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>>
>>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>>
>>> info     20080723 19:38:27 bid#39       -
>>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:11
>>>
>>> uuid:AT-SM-FHZ1-funksteckdose1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:12
>>>
>>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>>
>>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>>
>>> info     20080723 19:38:27 bid#39       -
>>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:13
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:13
>>>
>>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>>
>>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>>
>>> info     20080723 19:38:28 bid#39       -
>>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>
>>> #diff Devices:14
>>>
>>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>>
>>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>>
>>> info     20080723 19:38:29 bid#39       -
>>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>
>>> #diff Devices:15
>>>
>>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>>
>>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>>
>>> info     20080723 19:38:29 bid#39       -
>>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:16
>>>
>>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>>
>>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>>
>>> info     20080723 19:38:30 bid#39       -
>>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>
>>> #diff Devices:16
>>>
>>> uuid:AT-SM-FHZ1-dimmablelight1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:17
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> Device count is 17
>>>
>>>  
>>>
>>>  
>>>
>>> Then i restarted the "tester bundle"
>>>
>>>  
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:1
>>>
>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:2
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:2
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:5
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1
>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>
>>> #diff Devices:6
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>
>>> #diff Devices:6
>>>
>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>
>>> #diff Devices:7
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-funksteckdose1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:10
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:11
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>
>>> #diff Devices:12
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:13
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:14
>>>
>>> uuid:AT-SM-FHZ1-dimmablelight1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>
>>> #diff Devices:15
>>>
>>>  
>>>
>>>  
>>>
>>> I get informed by only 15 devices?...
>>>
>>>  
>>>
>>>  
>>>
>>> Third run:
>>>
>>>  
>>>
>>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>>
>>> #diff Devices:1
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:2
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:3
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:4
>>>
>>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:5
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1
>>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>>
>>> #diff Devices:6
>>>
>>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>>
>>> #diff Devices:7
>>>
>>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>>
>>> #diff Devices:7
>>>
>>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> on
>>> #diff Devices:8
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:9
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:10
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>>
>>> #diff Devices:10
>>>
>>> uuid:AT-SM-FHZ1-funksteckdose1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:11
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:12
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>>
>>> #diff Devices:12
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>>
>>> #diff Devices:13
>>>
>>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>>
>>> #diff Devices:14
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>>
>>> #diff Devices:15
>>>
>>> uuid:AT-SM-FHZ1-dimmablelight1
> urn:upnp-org:serviceId:SwitchDevice:1Status
>>> off
>>>
>>> #diff Devices:16
>>>
>>>  
>>>
>>> Informed by 16 devices.
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> The code for testing was:
>>>
>>>  
>>>
>>> public class EventListener implements UPnPEventListener {
>>>
>>>  
>>>
>>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>>
>>>       
>>>
>>>       @Override
>>>
>>>       public synchronized void notifyUPnPEvent(String deviceId, String
>>> serviceId, Dictionary events) {
>>>
>>>             String output = "";
>>>
>>>             output += deviceId + " " + serviceId;
>>>
>>>             
>>>
>>>             Enumeration eventit = events.keys();
>>>
>>>             
>>>
>>>             while (eventit.hasMoreElements()) {
>>>
>>>                   String key = (String) eventit.nextElement();
>>>
>>>                   output += key + " " + events.get(key) + "\n";
>>>
>>>             }
>>>
>>>                         
>>>
>>>             if (!knownDevs.contains(deviceId)) {
>>>
>>>                   knownDevs.add(deviceId);
>>>
>>>             }
>>>
>>>             System.err.println(output + "#diff Devices:" +
>>> knownDevs.size());
>>>
>>>             System.err.flush();
>>>
>>>             
>>>
>>>       }
>>>
>>>  
>>>
>>> }
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> I think it should be free from errors :-)
>>>
>>> Please help me! Since i really need the upnp driver for my master thesis.
>>>
>>>  
>>>
>>>  
>>>
>>>  
>>>
>>> Kind regards,
>>>
>>> Daniel
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition.... forgot one thing!

Posted by Daniel Felsing <da...@maven.at>.
Hello,

one more thing.
The felix UPNP tester shows up ALL the devices, services and state
variables.
when i switch the state of a missed device (which has not delivered the
event on subscription of a new listener) the event is propagated on change
to the 
interested listener

It seems that only the INITIAL delivery when registering a new upnp listener
is fuxxed up somehow...

Kind regards,
Daniel Felsing

-----Ursprüngliche Nachricht-----
Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
Gesendet: Donnerstag, 24. Juli 2008 12:43
An: users@felix.apache.org
Betreff: AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition....

Hello Francesco,

- yes, the devices are using the same host pc.
I have written a "basedriver" for my device technology...and then a
UPnPBridgeDriver exporting them to my network.
I'm directly connected to the host by a switch (so cable - no wireless
there)

- as development environment i'm using eclipse equinox, all upnp stuff is
from felix.
As runtime environment i'm using felix - however same behavior on both osgi
implementations

- the felix runtimes are the same, the equinox runtimes also...


Kind regards,
Daniel Felsing


-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Donnerstag, 24. Juli 2008 12:35
An: users@felix.apache.org
Betreff: Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition....

Hi Daniel,

well few question so far before starting to work on it.
you should describe you execution environment.
- do the devices run on the same host PC?
- are they implemented by you and executed on different (#17) Felix 
instances?
- are you testing all the devices on the same Felix runtime?

br,
francesco




Daniel Felsing wrote:
> Hello..
> 
> One more thing i experienced is that when i change e.g. a device from on
to
> off...or set another level for a dimming device
> the change is sent out correctly and device is responding.
> 
> Regards,
> Daniel
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Mittwoch, 23. Juli 2008 23:16
> An: users@felix.apache.org
> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint
can
> help you to pin down the problem?
> 
> 
> Hi again,
> 
> one more thing.
> 
> If i have Felix UPnP Tester running parallel to my device tester and i
> subscribe the device that is actually missing i also get no "initial
status"
> in the log window...
> For the other devices it is working properly.  Then i restart my "tester"
> bundle..and dont restart felix upnp tester and then subscribe to the
shutter
> again
> I get the initial status in the upnp tester from felix.
> 
> So...when "registering" / "removing" a new listener there must happen
> anything which influences the "initial" or "overall??" eventing behaviour
of
> the upnp devices.
> 
> 
> Kind regards, Daniel Felsing
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Mittwoch, 23. Juli 2008 21:18
> An: users@felix.apache.org
> Betreff: Re: AW: bug in felix upnp basedriver 0.8
> 
> Hi Daniel,
> 
> it seems that two are the devices that whose events are not captured by 
> your tester code:
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
> 
> please, check the code generating the events for such devices, may be 
> you send the event only if their status assume a specific value.
> 
> I think you should run the tester at least 5 times more.
> If you experience the same problem always with different devices then we 
> will try to repeat a similar test.
> 
> regards,
> francesco
> 
> 
> Daniel Felsing wrote:
>> Ah - one more update...
>>
>> I think event change propagation of single devices is ok :)
>> Hm....
>>
>>
>> Well - hoping for a solution!
>>
>> Kind regards,
>> Daniel
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>> An: users@felix.apache.org
>> Betreff: bug in felix upnp basedriver 0.8
>>
>> Hello.
>>
>>  
>>
>> It seems there is a bug in event notification in the actual release of
the
>> upnp basedriver 0.8.
>>
>>  
>>
>> I have exported exactly 17 devices to the upnp network.
>>
>> After "UPnP Event" subscription i should get informed about all device
>> stati.
>>
>> So the number of actual devices by which i should get informed should be
> 17.
>>  
>>
>> This is not always true..and the behavior by which device status i dont
> get
>> informed is random.
>>
>>  
>>
>> Here an example:
>>
>>  
>>
>> First run:
>>
>>  
>>
>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>
>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>
>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>
>> info     20080723 19:38:21 bid#39       -
>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:2
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:5
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:6
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:9
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:12
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:13
>>
>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>
>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>
>> info     20080723 19:38:28 bid#39       -
>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:14
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:15
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:16
>>
>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>
>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>
>> info     20080723 19:38:30 bid#39       -
>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:16
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:17
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>> Device count is 17
>>
>>  
>>
>>  
>>
>> Then i restarted the "tester bundle"
>>
>>  
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>>  
>>
>>  
>>
>> I get informed by only 15 devices?...
>>
>>  
>>
>>  
>>
>> Third run:
>>
>>  
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:16
>>
>>  
>>
>> Informed by 16 devices.
>>
>>  
>>
>>  
>>
>>  
>>
>> The code for testing was:
>>
>>  
>>
>> public class EventListener implements UPnPEventListener {
>>
>>  
>>
>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>
>>       
>>
>>       @Override
>>
>>       public synchronized void notifyUPnPEvent(String deviceId, String
>> serviceId, Dictionary events) {
>>
>>             String output = "";
>>
>>             output += deviceId + " " + serviceId;
>>
>>             
>>
>>             Enumeration eventit = events.keys();
>>
>>             
>>
>>             while (eventit.hasMoreElements()) {
>>
>>                   String key = (String) eventit.nextElement();
>>
>>                   output += key + " " + events.get(key) + "\n";
>>
>>             }
>>
>>                         
>>
>>             if (!knownDevs.contains(deviceId)) {
>>
>>                   knownDevs.add(deviceId);
>>
>>             }
>>
>>             System.err.println(output + "#diff Devices:" +
>> knownDevs.size());
>>
>>             System.err.flush();
>>
>>             
>>
>>       }
>>
>>  
>>
>> }
>>
>>  
>>
>>  
>>
>>  
>>
>> I think it should be free from errors :-)
>>
>> Please help me! Since i really need the upnp driver for my master thesis.
>>
>>  
>>
>>  
>>
>>  
>>
>> Kind regards,
>>
>> Daniel
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition....

Posted by Daniel Felsing <da...@maven.at>.
Hello Francesco,

- yes, the devices are using the same host pc.
I have written a "basedriver" for my device technology...and then a
UPnPBridgeDriver exporting them to my network.
I'm directly connected to the host by a switch (so cable - no wireless
there)

- as development environment i'm using eclipse equinox, all upnp stuff is
from felix.
As runtime environment i'm using felix - however same behavior on both osgi
implementations

- the felix runtimes are the same, the equinox runtimes also...


Kind regards,
Daniel Felsing


-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Donnerstag, 24. Juli 2008 12:35
An: users@felix.apache.org
Betreff: Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more
addition....

Hi Daniel,

well few question so far before starting to work on it.
you should describe you execution environment.
- do the devices run on the same host PC?
- are they implemented by you and executed on different (#17) Felix 
instances?
- are you testing all the devices on the same Felix runtime?

br,
francesco




Daniel Felsing wrote:
> Hello..
> 
> One more thing i experienced is that when i change e.g. a device from on
to
> off...or set another level for a dimming device
> the change is sent out correctly and device is responding.
> 
> Regards,
> Daniel
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Mittwoch, 23. Juli 2008 23:16
> An: users@felix.apache.org
> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint
can
> help you to pin down the problem?
> 
> 
> Hi again,
> 
> one more thing.
> 
> If i have Felix UPnP Tester running parallel to my device tester and i
> subscribe the device that is actually missing i also get no "initial
status"
> in the log window...
> For the other devices it is working properly.  Then i restart my "tester"
> bundle..and dont restart felix upnp tester and then subscribe to the
shutter
> again
> I get the initial status in the upnp tester from felix.
> 
> So...when "registering" / "removing" a new listener there must happen
> anything which influences the "initial" or "overall??" eventing behaviour
of
> the upnp devices.
> 
> 
> Kind regards, Daniel Felsing
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Mittwoch, 23. Juli 2008 21:18
> An: users@felix.apache.org
> Betreff: Re: AW: bug in felix upnp basedriver 0.8
> 
> Hi Daniel,
> 
> it seems that two are the devices that whose events are not captured by 
> your tester code:
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
> 
> please, check the code generating the events for such devices, may be 
> you send the event only if their status assume a specific value.
> 
> I think you should run the tester at least 5 times more.
> If you experience the same problem always with different devices then we 
> will try to repeat a similar test.
> 
> regards,
> francesco
> 
> 
> Daniel Felsing wrote:
>> Ah - one more update...
>>
>> I think event change propagation of single devices is ok :)
>> Hm....
>>
>>
>> Well - hoping for a solution!
>>
>> Kind regards,
>> Daniel
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>> An: users@felix.apache.org
>> Betreff: bug in felix upnp basedriver 0.8
>>
>> Hello.
>>
>>  
>>
>> It seems there is a bug in event notification in the actual release of
the
>> upnp basedriver 0.8.
>>
>>  
>>
>> I have exported exactly 17 devices to the upnp network.
>>
>> After "UPnP Event" subscription i should get informed about all device
>> stati.
>>
>> So the number of actual devices by which i should get informed should be
> 17.
>>  
>>
>> This is not always true..and the behavior by which device status i dont
> get
>> informed is random.
>>
>>  
>>
>> Here an example:
>>
>>  
>>
>> First run:
>>
>>  
>>
>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>
>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>
>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>
>> info     20080723 19:38:21 bid#39       -
>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:2
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:5
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:6
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:9
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:12
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:13
>>
>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>
>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>
>> info     20080723 19:38:28 bid#39       -
>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:14
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:15
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:16
>>
>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>
>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>
>> info     20080723 19:38:30 bid#39       -
>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:16
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:17
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>> Device count is 17
>>
>>  
>>
>>  
>>
>> Then i restarted the "tester bundle"
>>
>>  
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>>  
>>
>>  
>>
>> I get informed by only 15 devices?...
>>
>>  
>>
>>  
>>
>> Third run:
>>
>>  
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-funksteckdose1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimmablelight1
urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:16
>>
>>  
>>
>> Informed by 16 devices.
>>
>>  
>>
>>  
>>
>>  
>>
>> The code for testing was:
>>
>>  
>>
>> public class EventListener implements UPnPEventListener {
>>
>>  
>>
>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>
>>       
>>
>>       @Override
>>
>>       public synchronized void notifyUPnPEvent(String deviceId, String
>> serviceId, Dictionary events) {
>>
>>             String output = "";
>>
>>             output += deviceId + " " + serviceId;
>>
>>             
>>
>>             Enumeration eventit = events.keys();
>>
>>             
>>
>>             while (eventit.hasMoreElements()) {
>>
>>                   String key = (String) eventit.nextElement();
>>
>>                   output += key + " " + events.get(key) + "\n";
>>
>>             }
>>
>>                         
>>
>>             if (!knownDevs.contains(deviceId)) {
>>
>>                   knownDevs.add(deviceId);
>>
>>             }
>>
>>             System.err.println(output + "#diff Devices:" +
>> knownDevs.size());
>>
>>             System.err.flush();
>>
>>             
>>
>>       }
>>
>>  
>>
>> }
>>
>>  
>>
>>  
>>
>>  
>>
>> I think it should be free from errors :-)
>>
>> Please help me! Since i really need the upnp driver for my master thesis.
>>
>>  
>>
>>  
>>
>>  
>>
>> Kind regards,
>>
>> Daniel
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition....

Posted by Francesco Furfari <fr...@isti.cnr.it>.
Hi Daniel,

well few question so far before starting to work on it.
you should describe you execution environment.
- do the devices run on the same host PC?
- are they implemented by you and executed on different (#17) Felix 
instances?
- are you testing all the devices on the same Felix runtime?

br,
francesco




Daniel Felsing wrote:
> Hello..
> 
> One more thing i experienced is that when i change e.g. a device from on to
> off...or set another level for a dimming device
> the change is sent out correctly and device is responding.
> 
> Regards,
> Daniel
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Mittwoch, 23. Juli 2008 23:16
> An: users@felix.apache.org
> Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint can
> help you to pin down the problem?
> 
> 
> Hi again,
> 
> one more thing.
> 
> If i have Felix UPnP Tester running parallel to my device tester and i
> subscribe the device that is actually missing i also get no "initial status"
> in the log window...
> For the other devices it is working properly.  Then i restart my "tester"
> bundle..and dont restart felix upnp tester and then subscribe to the shutter
> again
> I get the initial status in the upnp tester from felix.
> 
> So...when "registering" / "removing" a new listener there must happen
> anything which influences the "initial" or "overall??" eventing behaviour of
> the upnp devices.
> 
> 
> Kind regards, Daniel Felsing
> 
> -----Ursprüngliche Nachricht-----
> Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
> Gesendet: Mittwoch, 23. Juli 2008 21:18
> An: users@felix.apache.org
> Betreff: Re: AW: bug in felix upnp basedriver 0.8
> 
> Hi Daniel,
> 
> it seems that two are the devices that whose events are not captured by 
> your tester code:
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status
> 
> please, check the code generating the events for such devices, may be 
> you send the event only if their status assume a specific value.
> 
> I think you should run the tester at least 5 times more.
> If you experience the same problem always with different devices then we 
> will try to repeat a similar test.
> 
> regards,
> francesco
> 
> 
> Daniel Felsing wrote:
>> Ah - one more update...
>>
>> I think event change propagation of single devices is ok :)
>> Hm....
>>
>>
>> Well - hoping for a solution!
>>
>> Kind regards,
>> Daniel
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
>> Gesendet: Mittwoch, 23. Juli 2008 19:43
>> An: users@felix.apache.org
>> Betreff: bug in felix upnp basedriver 0.8
>>
>> Hello.
>>
>>  
>>
>> It seems there is a bug in event notification in the actual release of the
>> upnp basedriver 0.8.
>>
>>  
>>
>> I have exported exactly 17 devices to the upnp network.
>>
>> After "UPnP Event" subscription i should get informed about all device
>> stati.
>>
>> So the number of actual devices by which i should get informed should be
> 17.
>>  
>>
>> This is not always true..and the behavior by which device status i dont
> get
>> informed is random.
>>
>>  
>>
>> Here an example:
>>
>>  
>>
>> First run:
>>
>>  
>>
>> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
>>
>> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
>>
>> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
>>
>> info     20080723 19:38:21 bid#39       -
>> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:2
>>
>> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
>>
>> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
>>
>> info     20080723 19:38:22 bid#39       -
>> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
>>
>> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
>>
>> info     20080723 19:38:23 bid#39       -
>> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:5
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:6
>>
>> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
>>
>> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
>>
>> info     20080723 19:38:24 bid#39       -
>> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
>>
>> info     20080723 19:38:25 bid#39       -
>> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:9
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
>>
>> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
>>
>> info     20080723 19:38:26 bid#39       -
>> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:12
>>
>> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
>>
>> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
>>
>> info     20080723 19:38:27 bid#39       -
>> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:13
>>
>> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
>>
>> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
>>
>> info     20080723 19:38:28 bid#39       -
>> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:14
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:15
>>
>> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
>>
>> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
>>
>> info     20080723 19:38:29 bid#39       -
>> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:16
>>
>> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
>>
>> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
>>
>> info     20080723 19:38:30 bid#39       -
>> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:16
>>
>> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:17
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>> Device count is 17
>>
>>  
>>
>>  
>>
>> Then i restarted the "tester bundle"
>>
>>  
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>>  
>>
>>  
>>
>> I get informed by only 15 devices?...
>>
>>  
>>
>>  
>>
>> Third run:
>>
>>  
>>
>> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
>>
>> #diff Devices:1
>>
>> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:2
>>
>> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:3
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:4
>>
>> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:5
>>
>> uuid:AT-SM-FHZ1-motionsensor1
>> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
>>
>> #diff Devices:6
>>
>> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
>>
>> #diff Devices:7
>>
>> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> on
>> #diff Devices:8
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:9
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
>>
>> #diff Devices:10
>>
>> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:11
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
>>
>> #diff Devices:12
>>
>> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
>>
>> #diff Devices:13
>>
>> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
>>
>> #diff Devices:14
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
>>
>> #diff Devices:15
>>
>> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
>> off
>>
>> #diff Devices:16
>>
>>  
>>
>> Informed by 16 devices.
>>
>>  
>>
>>  
>>
>>  
>>
>> The code for testing was:
>>
>>  
>>
>> public class EventListener implements UPnPEventListener {
>>
>>  
>>
>>       private ArrayList<String> knownDevs = new ArrayList<String>();
>>
>>       
>>
>>       @Override
>>
>>       public synchronized void notifyUPnPEvent(String deviceId, String
>> serviceId, Dictionary events) {
>>
>>             String output = "";
>>
>>             output += deviceId + " " + serviceId;
>>
>>             
>>
>>             Enumeration eventit = events.keys();
>>
>>             
>>
>>             while (eventit.hasMoreElements()) {
>>
>>                   String key = (String) eventit.nextElement();
>>
>>                   output += key + " " + events.get(key) + "\n";
>>
>>             }
>>
>>                         
>>
>>             if (!knownDevs.contains(deviceId)) {
>>
>>                   knownDevs.add(deviceId);
>>
>>             }
>>
>>             System.err.println(output + "#diff Devices:" +
>> knownDevs.size());
>>
>>             System.err.flush();
>>
>>             
>>
>>       }
>>
>>  
>>
>> }
>>
>>  
>>
>>  
>>
>>  
>>
>> I think it should be free from errors :-)
>>
>> Please help me! Since i really need the upnp driver for my master thesis.
>>
>>  
>>
>>  
>>
>>  
>>
>> Kind regards,
>>
>> Daniel
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


AW: AW: AW: bug in felix upnp basedriver 0.8 - and one more addition....

Posted by Daniel Felsing <da...@maven.at>.
Hello..

One more thing i experienced is that when i change e.g. a device from on to
off...or set another level for a dimming device
the change is sent out correctly and device is responding.

Regards,
Daniel


-----Ursprüngliche Nachricht-----
Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
Gesendet: Mittwoch, 23. Juli 2008 23:16
An: users@felix.apache.org
Betreff: AW: AW: AW: bug in felix upnp basedriver 0.8 - Maybe that hint can
help you to pin down the problem?


Hi again,

one more thing.

If i have Felix UPnP Tester running parallel to my device tester and i
subscribe the device that is actually missing i also get no "initial status"
in the log window...
For the other devices it is working properly.  Then i restart my "tester"
bundle..and dont restart felix upnp tester and then subscribe to the shutter
again
I get the initial status in the upnp tester from felix.

So...when "registering" / "removing" a new listener there must happen
anything which influences the "initial" or "overall??" eventing behaviour of
the upnp devices.


Kind regards, Daniel Felsing

-----Ursprüngliche Nachricht-----
Von: Francesco Furfari [mailto:francesco.furfari@isti.cnr.it] 
Gesendet: Mittwoch, 23. Juli 2008 21:18
An: users@felix.apache.org
Betreff: Re: AW: bug in felix upnp basedriver 0.8

Hi Daniel,

it seems that two are the devices that whose events are not captured by 
your tester code:
uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status

please, check the code generating the events for such devices, may be 
you send the event only if their status assume a specific value.

I think you should run the tester at least 5 times more.
If you experience the same problem always with different devices then we 
will try to repeat a similar test.

regards,
francesco


Daniel Felsing wrote:
> Ah - one more update...
> 
> I think event change propagation of single devices is ok :)
> Hm....
> 
> 
> Well - hoping for a solution!
> 
> Kind regards,
> Daniel
> 
> -----Ursprüngliche Nachricht-----
> Von: Daniel Felsing [mailto:daniel.felsing@maven.at] 
> Gesendet: Mittwoch, 23. Juli 2008 19:43
> An: users@felix.apache.org
> Betreff: bug in felix upnp basedriver 0.8
> 
> Hello.
> 
>  
> 
> It seems there is a bug in event notification in the actual release of the
> upnp basedriver 0.8.
> 
>  
> 
> I have exported exactly 17 devices to the upnp network.
> 
> After "UPnP Event" subscription i should get informed about all device
> stati.
> 
> So the number of actual devices by which i should get informed should be
17.
> 
>  
> 
> This is not always true..and the behavior by which device status i dont
get
> informed is random.
> 
>  
> 
> Here an example:
> 
>  
> 
> First run:
> 
>  
> 
> osgi> info     20080723 19:38:20 bid#39       - BundleEvent STARTED
> 
> info     20080723 19:38:21 bid#44       - device found, UPnP71/39
> 
> info     20080723 19:38:21 bid#44       - no driver for UPnP71/39
> 
> info     20080723 19:38:21 bid#39       -
> [71;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:1
> 
> info     20080723 19:38:22 bid#44       - device found, UPnP72/39
> 
> info     20080723 19:38:22 bid#44       - no driver for UPnP72/39
> 
> info     20080723 19:38:22 bid#39       -
> [72;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:2
> 
> info     20080723 19:38:22 bid#44       - device found, UPnP73/39
> 
> info     20080723 19:38:22 bid#44       - no driver for UPnP73/39
> 
> info     20080723 19:38:22 bid#39       -
> [73;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:3
> 
> info     20080723 19:38:23 bid#44       - device found, UPnP74/39
> 
> info     20080723 19:38:23 bid#44       - no driver for UPnP74/39
> 
> info     20080723 19:38:23 bid#39       -
> [74;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> info     20080723 19:38:23 bid#44       - device found, UPnP75/39
> 
> info     20080723 19:38:23 bid#44       - no driver for UPnP75/39
> 
> info     20080723 19:38:23 bid#39       -
> [75;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-switch3 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:5
> 
> info     20080723 19:38:24 bid#44       - device found, UPnP76/39
> 
> info     20080723 19:38:24 bid#39       -
> [76;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:24 bid#44       - no driver for UPnP76/39
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:6
> 
> info     20080723 19:38:24 bid#44       - device found, UPnP77/39
> 
> info     20080723 19:38:24 bid#44       - no driver for UPnP77/39
> 
> info     20080723 19:38:24 bid#39       -
> [77;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:7
> 
> info     20080723 19:38:25 bid#44       - device found, UPnP78/39
> 
> info     20080723 19:38:25 bid#44       - no driver for UPnP78/39
> 
> info     20080723 19:38:25 bid#39       -
> [78;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:25 bid#44       - device found, UPnP79/39
> 
> info     20080723 19:38:25 bid#39       -
> [79;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> info     20080723 19:38:25 bid#44       - no driver for UPnP79/39
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
on
> 
> #diff Devices:9
> 
> info     20080723 19:38:26 bid#44       - device found, UPnP80/39
> 
> info     20080723 19:38:26 bid#44       - no driver for UPnP80/39
> 
> info     20080723 19:38:26 bid#39       -
> [80;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:10
> 
> info     20080723 19:38:26 bid#44       - device found, UPnP81/39
> 
> info     20080723 19:38:26 bid#44       - no driver for UPnP81/39
> 
> info     20080723 19:38:26 bid#39       -
> [81;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:11
> 
> info     20080723 19:38:27 bid#44       - device found, UPnP82/39
> 
> info     20080723 19:38:27 bid#44       - no driver for UPnP82/39
> 
> info     20080723 19:38:27 bid#39       -
> [82;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:12
> 
> info     20080723 19:38:27 bid#44       - device found, UPnP83/39
> 
> info     20080723 19:38:27 bid#44       - no driver for UPnP83/39
> 
> info     20080723 19:38:27 bid#39       -
> [83;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:13
> 
> info     20080723 19:38:28 bid#44       - device found, UPnP84/39
> 
> info     20080723 19:38:28 bid#44       - no driver for UPnP84/39
> 
> info     20080723 19:38:28 bid#39       -
> [84;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:14
> 
> info     20080723 19:38:29 bid#44       - device found, UPnP85/39
> 
> info     20080723 19:38:29 bid#44       - no driver for UPnP85/39
> 
> info     20080723 19:38:29 bid#39       -
> [85;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
> 
> #diff Devices:15
> 
> info     20080723 19:38:29 bid#44       - device found, UPnP86/39
> 
> info     20080723 19:38:29 bid#44       - no driver for UPnP86/39
> 
> info     20080723 19:38:29 bid#39       -
> [86;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:16
> 
> info     20080723 19:38:30 bid#44       - device found, UPnP87/39
> 
> info     20080723 19:38:30 bid#44       - no driver for UPnP87/39
> 
> info     20080723 19:38:30 bid#39       -
> [87;org.osgi.service.upnp.UPnPDevice] ServiceEvent REGISTERED
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:16
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:17
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Device count is 17
> 
>  
> 
>  
> 
> Then i restarted the "tester bundle"
> 
>  
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:1
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:5
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:14
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:15
> 
>  
> 
>  
> 
> I get informed by only 15 devices?...
> 
>  
> 
>  
> 
> Third run:
> 
>  
> 
> uuid:AT-SM-FHZ1-dawnsensor2 urn:upnp-org:serviceId:GetStatus:1Status off
> 
> #diff Devices:1
> 
> uuid:AT-SM-FHZ1-S20_Switch6 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:2
> 
> uuid:AT-SM-FHZ1-S20_Switch5 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:3
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-S20_Switch8 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:4
> 
> uuid:AT-SM-FHZ1-rainsensor1 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:5
> 
> uuid:AT-SM-FHZ1-motionsensor1
> urn:upnp-org:serviceId:GetEstimate:1EstimatedValue 0
> 
> #diff Devices:6
> 
> uuid:AT-SM-FHZ1-shutter1 urn:upnp-org:serviceId:SwitchDevice:1Status on
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-motionsensor1 urn:upnp-org:serviceId:GetEvent:1Event 
> 
> #diff Devices:7
> 
> uuid:AT-SM-FHZ1-simplelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
on
> 
> #diff Devices:8
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch2 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:9
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-S20_Switch3 urn:upnp-org:serviceId:GetLevel:1Level 70
> 
> #diff Devices:10
> 
> uuid:AT-SM-FHZ1-funksteckdose1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:11
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-S20_Switch7 urn:upnp-org:serviceId:GetLevel:1Level 82
> 
> #diff Devices:12
> 
> uuid:AT-SM-FHZ1-S20_Switch1 urn:upnp-org:serviceId:GetLevel:1Level 36
> 
> #diff Devices:13
> 
> uuid:AT-SM-FHZ1-dimswitch4 urn:upnp-org:serviceId:GetLevel:1Level 0
> 
> #diff Devices:14
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetStatus:1Status on
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-S20_Switch4 urn:upnp-org:serviceId:GetLevel:1Level 100
> 
> #diff Devices:15
> 
> uuid:AT-SM-FHZ1-dimmablelight1 urn:upnp-org:serviceId:SwitchDevice:1Status
> off
> 
> #diff Devices:16
> 
>  
> 
> Informed by 16 devices.
> 
>  
> 
>  
> 
>  
> 
> The code for testing was:
> 
>  
> 
> public class EventListener implements UPnPEventListener {
> 
>  
> 
>       private ArrayList<String> knownDevs = new ArrayList<String>();
> 
>       
> 
>       @Override
> 
>       public synchronized void notifyUPnPEvent(String deviceId, String
> serviceId, Dictionary events) {
> 
>             String output = "";
> 
>             output += deviceId + " " + serviceId;
> 
>             
> 
>             Enumeration eventit = events.keys();
> 
>             
> 
>             while (eventit.hasMoreElements()) {
> 
>                   String key = (String) eventit.nextElement();
> 
>                   output += key + " " + events.get(key) + "\n";
> 
>             }
> 
>                         
> 
>             if (!knownDevs.contains(deviceId)) {
> 
>                   knownDevs.add(deviceId);
> 
>             }
> 
>             System.err.println(output + "#diff Devices:" +
> knownDevs.size());
> 
>             System.err.flush();
> 
>             
> 
>       }
> 
>  
> 
> }
> 
>  
> 
>  
> 
>  
> 
> I think it should be free from errors :-)
> 
> Please help me! Since i really need the upnp driver for my master thesis.
> 
>  
> 
>  
> 
>  
> 
> Kind regards,
> 
> Daniel
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org