Examples of UDProxyDevice


Examples of com.universaldevices.upnp.UDProxyDevice

     * This method is invoked when a currently known ISY (UDProxyDevice) is back
     * on line
     */
    public void onDeviceOnLine() {
        Freedomotic.logger.info("ISY is online ...");
        final UDProxyDevice device = getDevice();
        if (device == null) {
            return;
        }
        if (device.isSecurityEnabled() || device.securityLevel > UPnPSecurity.NO_SECURITY) {
            if (device.isAuthenticated && device.isOnline) {
                return;
            }
            try {
                Freedomotic.logger.info("AUTHENICATING/SUBSCRIBING");
                Isy99iFrame.writeAreaLog(Isy99iUtilities.getDateTime() + ": Authenticating/Subscribing");
                // passing user/pass
                authenticate("admin", "admin");
                Freedomotic.logger.info("AUTHENICATING/SUBSCRIBING DONE");
                Isy99iFrame.writeAreaLog(Isy99iUtilities.getDateTime() + ": Authenticating/Subscribing done");
            } catch (NoDeviceException e) {
                Freedomotic.logger.severe("Authenticating/Subscribing error");
                Isy99iFrame.writeAreaLog(Isy99iUtilities.getDateTime() + ": Authenticating/Subscribing error");
            }
        } else {
            //just subscribe to events
            Freedomotic.logger.info("Subscribing");
            Isy99iFrame.writeAreaLog(Isy99iUtilities.getDateTime() + ": Subscribing");
            device.subscribeToEvents(true);
            Freedomotic.logger.info("Subscription done");
            Isy99iFrame.writeAreaLog(Isy99iUtilities.getDateTime() + ": Subscription done");

        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.