Plugin: AutoVirtualThermostat (AVT)

[quote=“rigpapa, post:69, topic:198289”]If you look through your log file specifically for the word “ineligible”, you will find messages that will tell us more about what it thinks. I’m guessing I know, but I want to be sure.

Fast way to get your log is this URL: http://your-vera-ip/cgi-bin/cmh/log.sh?Device=LuaUPnP[/quote]

50 03/29/18 10:42:55.105 luup_log:352: AutoVirtualThermostat: Sensor “354” ({ mac=“”, category_num=5, description=“Office Thermostat”, user=“”, id=“88”, pass=“”, ip=“”, room_num=22, udn=“uuid:4d494342-5342-5645-0162-000002fb2aa7”, subcategory_num=1, invisible=false, hidden=false, embedded=false, device_num_parent=1, device_type=“urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1” }) ineligible, comm failure status 1 <0x6d447520>
50 03/29/18 10:42:55.116 luup_log:352: AutoVirtualThermostat: No valid sensors. <0x6d447520>

The thermostat is definitely back online - but takes a while AVT to come back online

So I have been using AVT now instead of SVT in one of my rooms in my summerhouse, but in that room I have 2 heaters. The second heater is set on the Fan as suggested.

When I am not in the summerhouse I set the thermostat to Eco and on 11 degrees celsius. When I am preparing to go to the summerhouse I change it to Comfort, which is set to 15 degrees celsius and then, theoretically, it should turn on the heaters to reach that temperature. But now I arrived in the summerhouse and the second heater was on full blast and the AVT was set to Cooling. My theory here is that when I changed the AVT to Comfort, the heat was already over 15 degrees and therefore it started the “Fan” to cool the room and then instead it started heating. The temperature was up to 24 degrees when I arrived.

Unfortunately I did not have this logged in Datamine due to some other changes so I can?t really back up my claims, but if beneficial I could potentially test this out as I will be staying here for another 3 days.

Could we have a better way of adding a second heater instead of to the Fan ?

Also I am interested in if you are planning any development with regards to getting the temperature display in Imperihome outside of the internal network ?

I do realize that you are most likely busy with a lot of other development and the rewards for your work on AVT may not be that great. I would be willing to donate towards further development, but I need to be able to trust it to work as expected and be visible in Imperihome. I also realize that only one donor will probably not make a lot of difference either…

Are you still looking at developing this further ?

Short reply while traveling. You must not use Auto or Cool modes in your configuration. You should be set to heat only.

Edit: spelling

Of course ! That makes perfect sense… I think I am comparing it to much to SVT as the Auto mode there is different. Thanks for the travelling reply :slight_smile:

Nice-to-have Feature request:
Could one have multiple stage heating? I have two ovens in one room, and it might be neccesary to use both if the outside temperature is low(winter), and only one if its warmer (summer nights)…

Just a cool add-on, the AVT works fine as it is, so thanks for that! :slight_smile:

I’ve considered this and I think it’s a great idea. This is the type of change that would actually make PID useful, and smarts for tuning, but there are many options for control, and supporting a couple of the most popular seems a good direction. Do you have any ideas or wishes for control heuristics in a multi-stage configuration?

I’m not that versed in the options really, its been a long time since i played with PID’s. :slight_smile:

The simple way is probably to have an outside temp setpoint (value in variables), where the AVT applies both ovens in the heat cycle if the outside temp is below this point. This option may be used in a mode where you don’t use a “learning” thermostat, which (in my experience with SVT) can get confused by some external factors changing (open doors, etc).

The coolest way may be a proper regulator watching the flanks on the temperature decrease/increase, and apply ovens accordingly? This one could probably be both fun and frustrating to implement. :wink:

Is there any plans for releasing this for AltUI? I have an openluup system running without Vera, and would like one of these. :slight_smile:
I see that the thermostat shows up fine in AltUI on my Vera, so it should be just to release it in AltAppStore? Looks like it from here, i’m sure its more complicated…:smiley:

In the past, openLuup has not set luup.device in the watch and delay callbacks, which AVT likes to have. I’ll check the latest version. There are workarounds, as well. So, maybe.

[quote=“rigpapa”][quote=“Forzaalfa, post:88, topic:198289”]Is there any plans for releasing this for AltUI? I have an openluup system running without Vera, and would like one of these. :slight_smile:
I see that the thermostat shows up fine in AltUI on my Vera, so it should be just to release it in AltAppStore? Looks like it from here, i’m sure its more complicated…:D[/quote]

In the past, openLuup has not set luup.device in the watch and delay callbacks, which AVT likes to have. I’ll check the latest version. There are workarounds, as well. So, maybe.[/quote]

OK. So the short answer is now yes, it’s in the AltAppStore with a single “beta” version (from the Github stable branch). It has not been fully tested, but I expect it to work, and will be pleased to address any problems if not. If you’re interested in an openLuup version of AVT, please help me out by installing it from the AltAppStore and bashing on it.

Background, in case this helps anyone in future (and yes, I’m simplifying a few points here): there’s a key difference between Vera Luup and openLuup that was standing in the way as implemented. Vera Luup loads each module loaded by a plugin’s implementation in per-device context, so if you have three or four AVTs on your Vera, you have four separate copies in memory of its implementation and each of the modules required by the implementation. In contrast, openLuup behaves in a more “Lua-natural” way (IMO) and loads a module only once, so all uses of that module by the three or four AVT devices would share the single copy of the module. The effect of this difference is that certain elements of context on openLuup, such as [tt]luup.device[/tt], are available in the implementation per device, but not the loaded modules (they can’t be, it’s shared context between multiple devices). For AVT in particular, this meant that the watch callbacks being used to monitor temperature sensors and other devices could not discern which of the three or four AVT instances the callback was intended for (Vera neglected to define their callback functions to receive the handling plugin device; [tt]luup.device[/tt] is the remedy for this, but it’s not great style and should have been passed). The workaround was relatively simple once I reassured myself I could get enough context somewhere: rather than having the watch call the module function directly, I have it call a pass-through function in the [tt][/tt] section of the implementation file, which simply calls the module’s function (hence, pass-through), but also passes [tt]luup.device[/tt] as an additional argument to the module’s handler (which is in context and available in the implementation file functions on both Vera and openLuup).

By the way, this difference in module loading probably explains in large part why plugins are so memory-hungry on Vera. It could have all been avoided had they simply added one received argument for each of the callbacks.

Awesome! Currently i have no remote login to that system, but i will definately add it when i get back there. I’ll let you know how it works. :slight_smile:

Thanks!

[quote=“Forzaalfa, post:91, topic:198289”]Awesome! Currently i have no remote login to that system, but i will definately add it when i get back there. I’ll let you know how it works. :slight_smile:

Thanks![/quote]

…Forgot the laptop i set up in the same network with remote login… ::slight_smile:

I Installed it now, and according to LuaUPnP.log there is no error messages.
I did however not get the control panel and settings tab up when i enter the thermostat device, and the icon is also missing.
I entered the sensor and oven, and i set ModeTarget to HeatOn, still no errors as i can see, but ModeStatus stays “Off”.
I also tried to change EnergyModeTarget to “EnergySavingsMode”, but status is unchanged.

Any logs or stuff you need, let me know.

Did you do a full cache flush on the browser?

I did now.

Now the temperature and “Idle” is shown on the device in the list, but the control panel tabs and icon is still gone.
ModeStatus is “InDeadBand” which is correct, so its running, but EnergyModeStatus is “Normal” while EnergyModeTarget is “EnergySavingsMode”…

[quote=“Forzaalfa, post:94, topic:198289”]I did now.

Now the temperature and “Idle” is shown on the device in the list, but the control panel tabs and icon is still gone.
ModeStatus is “InDeadBand” which is correct, so its running, but EnergyModeStatus is “Normal” while EnergyModeTarget is “EnergySavingsMode”…[/quote]

All working good for me, of course. :slight_smile: Actually, it was working fine on ALTUI 2.26 and the current development branch of openLuup. But to be sure I updated to the more current 2.29.2418 ALTUI and I saw brokenness like you’re describing. Weird. It looks like it’s not loading/using the ALTUI-specific JavaScript for the dashboard card. That JS hasn’t changed in a while (and worked in prior versions of ALTUI), but I ran it through jshint anyway just to be sure, and it came up clean (enough). The only thing I noticed that looked different is that strict mode wasn’t being used–it’s commented out. I generally turn that on for ALTUI (but off for UI7, which chokes on it). So I uncommented the strict mode literal, refreshed, and behold! the dashboard card came up normal again.

So just try that on your side. In the file [tt]J_AutoVirtualThermostat1_ALTUI.js[/tt], the second line of the file should currently read:

// "use strict";

Just remove the slashes and any leading whitespace to uncomment that line, then reload.

Ok, so i did that, reloaded luup in Altui, cleared all browser stuff, and reentered the AltUI website. Still no control panel.

Heres how the J_…_AltUI.js looks.

OpenLuup version: 2018.03.23
AltUI Version: 2.29.2418
Running on Beaglebone xM using Debian 9.3

It’s working fine on my openLuup/ALTUI installation at this point (my openLuup is newer). Post screen shots of what it does show in the dashboard and settings, so we can all be sure we’re on the same page with the problem we’re trying to fix. You might also open the Developer console on your browser (e.g. F12 in Chrome and Firefox) and see if the console is logging anything that may be useful. If that doesn’t give us an “ah hah” moment, we’ll probably need to page @amg0 for an assist in debugging this on your installation.

Will this screenshot suffice?

I did an apt-get upgrade, and tried to update openluup as well, but it seems like 18.3.23 is the latest it will update to?

Well, that helps! Looks like you misspelled the device file name when creating the device. I think you can just go into the Attributes tab and correct it (capitalize the V and double-check the rest of it and the implementation file name). Then reload openLuup.

That Worked. Thanks. :slight_smile:

I don’t mind taking the blame here, but i’m pretty sure this is device was auto generated when I installed the plugin?