Page 1 of 1

my app stopped working after upgrade

Posted: 29 Aug 2015 11:19
by larry
Yesterday I upgraded to the latest upgrade from August, after this does not http: // RPI: 8084 more. so I do not get downgraded

Razberry app that I received made work no more.
Unable to load data error box
App does not exists or has no valid parameters

How can get downgraded or is it something new site version that makes my app does not work more?

Code: Select all

function ElMeterLogging (id, controller) {
    // Call superconstructor first (AutomationModule)
    ElMeterLogging.super_.call(this, id, controller);
};

inherits(ElMeterLogging, AutomationModule);

_module = ElMeterLogging;

ElMeterLogging.prototype.init = function (config) {
    // Call superclass' init (this will process config argument and so on)
    ElMeterLogging.super_.prototype.init.call(this, config);

    // Remember "this" for detached callbacks (such as event listener callbacks)
    var self = this;

    // Here we assume that period is factor of minute and less than hour, or factor of hours and less than day, or factor of days
    var p = Math.round(this.config.period);
    var m = (p < 60) ? [0, 59, p] : 0;
    var h = p >= 24*60 ? 0 : (p/60 >=1 ? [0, 59, Math.round(p/60)] : null);
    var wd = p/24/60 >=1 ? [0, 6, Math.round(p/24/60)] : null;

    if (this.config.deviceid !== 0 )
    {	
       var deviceid = parseInt(this.config.deviceid,10);
    }
    else {
	console.log ("ERROR: ElMeterLogging Device Id not correct");
    }

    if (this.config.devinstance >= 0 )
    {
       var devinstance = parseInt(this.config.devinstance,10);
    }
    else {
        console.log ("ERROR: ElMeterLogging Device Instance not correct");
    }

    if (this.config.devcommandclass !== 0 )
    {
       var devcommandclass = parseInt(this.config.devcommandclass,10);
    }
    else {
        console.log ("ERROR: ElMeterLogging Device Id not correct");
    }

    this.controller.emit("cron.addTask", "ElMeterLogging.poll", {
        minute: m,
        hour: h,
        weekDay: wd,
        day: null,
        month: null
    });


    this.onPoll = function () {
        //CurrentDataGet(1) gets only first parameter. This should be bitmask, see table at end of PDF,
	// but it doesn't works. To get all params, use CurrentDataGet();
	zway.devices[deviceid].instances[devinstance].commandClasses[devcommandclass].CurrentDataGet(); 
    };

    // Setup metric update event listener
   
    this.controller.on('ElMeterLogging.poll', this.onPoll);
    
    this.bindFunc = function(zwayName) {
	if (zwayName != "zway") return; // you want to bind to default zway instance
	var devices = global.ZWave[zwayName].zway.devices;

	devices[deviceid].instances[devinstance].commandClasses[devcommandclass].data[1].val.bind(function() {
//		debugPrint("Power " + this.value + "  " +this.updateTime);
 		  system("php /opt/z-way-server/automation/modules/ElMeterLogging/savedb.php " + this.value + " " + this.updateTime);
		});
	
	//Instantaneous Primary Active Power (kW) ,Current power consumption.
	devices[deviceid].instances[devinstance].commandClasses[devcommandclass].data[5].val.bind(function() {
//		 debugPrint("Instant " + this.value + "  " +this.updateTime);		
                  system("php /opt/z-way-server/automation/modules/ElMeterLogging/savedb.php " + this.value + " " + this.updateTime + " instantkw");
		});

	};
     global.controller.on("ZWave.register", this.bindFunc);

};

ElMeterLogging.prototype.stop = function () {
    SensorValueLogging.super_.prototype.stop.call(this);

    this.controller.off('ElMeterLogging.poll', this.onPoll);
};

Re: my app stopped working after upgrade

Posted: 29 Aug 2015 11:43
by pz1
larry wrote: How can get downgraded or is it something new site version that makes my app does not work more?
In a SSH session to your Pi change the name
/opt/z-way-server
to something like
/opt/z-way-server_corrupt

Under /opt you should have one or more folders named something like z-way-server_2015-08-28-14-32-07

choose the one with the time of your update, and rename that to
/opt/z-way-server

Then reboot. I am not sure if that brings your 8084 back since that interface resides in /var/webif

Re: my app stopped working after upgrade

Posted: 29 Aug 2015 11:46
by PoltoS
Please check
http://razberry.z-wave.me/index.php?id=24

I suggest to try a clean new install to check if it works.