Radio Thermostat 3M-50 Wifi support

Having the plugin detect changes to the RemoteTempSensor changes would be pretty nice. I’ve been meaning to play with this, but have yet to settle on which temperature sensors to get. However, from what I’ve read previously some other people had created a virtual temperature device that did all the averaging, scheduling, etc between different sensors (this all requires custom code). The virtual temperature device would then expose a single temperature, and you wouldn’t need to change the RemoteTempSensor in the thermostat itself. If you guys are interested I could try to find the posts that explained this solution.

If I recall, your use case was to switch between two different temperature sensors depending on time of day… it would be pretty straightforward to multiplex several different temperature inputs into one virtual one.

function handleTemperatureChange(lul_device, lul_service, lul_variable, lul_value_old, lul_value_new)
  local now = os.time()
  local curDate = os.date("*t", now)
  if (lul_device == TEMPERATURE_DEVICE_1) then
    if (curDate["hour"] < 12) then
      luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", VIRTUAL_TEMPERATURE_DEVICE, lul_value_new)
    end
  else
    ..
  end
end

luup.variable_watch("handleTemperatureChange", "urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", TEMPERATURE_DEVICE_1)
luup.variable_watch("handleTemperatureChange", "urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", TEMPERATURE_DEVICE_2)

all of the above code snippet is completely contrived and off the top of my head… just trying to demonstrate how you could use the variable_watch function to monitor changes to multiple thermometers and switch which temperature device’s value was recorded in a virtual one based on time of day.

of course this approach would also need to be augmented with logic that actually set the virtual device at certain times of day (because variable_watch only triggers when the watched value changes, regardless of how long that takes to happen). for example if you switched which thermometer you were interested in at 7 AM, but the new one didn’t log a new temperature until 7:14, the value of your virtual device wouldn’t reflect the new temperature sensor for those 14 minutes using just the code above unless you simply set the value at 7 AM.

The only problem is that if you intend to use the built in sensor on the thermostat you need to remove the variable on the fly. Other than that this method is fine.

Thanks everyone for the responses. Hopefully I will have a full solution posted up here soon.

I was doing some research on calibrating my ST814 Temp/Humd device (since it is off by almost 5 degrees) and I had an idea. I am not sure if it will work due to my inexperience with Vera and luup…

Could I make a Dummy Temperature Device (empty shell) to take in the temp reading from the ST814 and add some code to calibrate/adjust the ST814 temp reading AND switch between the thermostat sensor and the ST814 sensor depending on the time of day?

Basically, it would just set the temperature of the Dummy Temperature Device to either the calibrated ST814 temp or the thermostat temp depending on the time of day.

I THINK that would also solve the problem of changing the “RemoteTempDevice” ID, because that would not change… it would always be the ID of the Dummy Device…

Am I thinking correctly here?

[quote=“TaterTot, post:204, topic:170555”]Thanks everyone for the responses. Hopefully I will have a full solution posted up here soon.

I was doing some research on calibrating my ST814 Temp/Humd device (since it is off by almost 5 degrees) and I had an idea. I am not sure if it will work due to my inexperience with Vera and luup…

Could I make a Dummy Temperature Device (empty shell) to take in the temp reading from the ST814 and add some code to calibrate/adjust the ST814 temp reading AND switch between the thermostat sensor and the ST814 sensor depending on the time of day?

Basically, it would just set the temperature of the Dummy Temperature Device to either the calibrated ST814 temp or the thermostat temp depending on the time of day.

I THINK that would also solve the problem of changing the “RemoteTempDevice” ID, because that would not change… it would always be the ID of the Dummy Device…

Am I thinking correctly here?[/quote]

You can switch between remote devices just fine with this method but the internal temp sensor does not function when it is in remote mode. So you’d have to change the RemoteTempDevice ID to a null value to use the internal sensor.

[quote=“joey52685, post:205, topic:170555”][quote=“TaterTot, post:204, topic:170555”]Thanks everyone for the responses. Hopefully I will have a full solution posted up here soon.

I was doing some research on calibrating my ST814 Temp/Humd device (since it is off by almost 5 degrees) and I had an idea. I am not sure if it will work due to my inexperience with Vera and luup…

Could I make a Dummy Temperature Device (empty shell) to take in the temp reading from the ST814 and add some code to calibrate/adjust the ST814 temp reading AND switch between the thermostat sensor and the ST814 sensor depending on the time of day?

Basically, it would just set the temperature of the Dummy Temperature Device to either the calibrated ST814 temp or the thermostat temp depending on the time of day.

I THINK that would also solve the problem of changing the “RemoteTempDevice” ID, because that would not change… it would always be the ID of the Dummy Device…

Am I thinking correctly here?[/quote]

You can switch between remote devices just fine with this method but the internal temp sensor does not function when it is in remote mode. So you’d have to change the RemoteTempDevice ID to a null value to use the internal sensor.[/quote]

OK, I am glad we have that resolved. Thanks againfor everyone’s help!

But I was wondering if my method would work since I have a calibration issue with my remote temp sensor. If not then I will have to send the ST814 back and figure out another more accurate device.

Installed in Vera plugin for 3m50 thermostat. After installation I only see one interface for thermostat. How do I enable additional instances/ of the plugin for my remaining four thermostats. ???

I can’t advise you if this workflow is different on UI7 as I haven’t upgraded, but for UI5 go to apps->my apps->radio thermostat wifi plugin. mash the create another button. wait while vera restarts…

…there are no buttons, or options within plugin after the installation to create another instance. Where can I d/l an older version UI ?
I would love utilize all four thermostats in Vera. Thank you.

This what I see on my end…attaching a file.

If you go to develop apps can you create a new device manually?

Yes I can but I am not sure what to enter in all these fields (image attached) so it correctly detects second then(third, fourth…etc.,) 3m50 thermostat. Thank you.

Just copy everything from the existing device, except the IP address which should be unique. It’s ok if some fields are blank.

I tried that before and this is what I entered but it was not working. Additionally after device gets created it has fewer settings inside vs 3m50 plugin thermostat.

device type: urn:schemas-hugheaves-com:device:HVAC_ZoneThermostat:1

description: thermostat #2

Ip Address: thermostat #2 IP

MAC: thermostat #2 MAC

[quote=“famx, post:214, topic:170555”]I tried that before and this is what I entered but it was not working. Additionally after device gets created it has fewer settings inside vs 3m50 plugin thermostat.

device type: urn:schemas-hugheaves-com:device:HVAC_ZoneThermostat:1

description: thermostat #2

Ip Address: thermostat #2 IP

MAC: thermostat #2 MAC[/quote]

What about device and implementation file name?

D_RTCOA_Wifi_ZoneThermostat1.xml
I_RTCOA_Wifi_ZoneThermostat1.xml

The Vera may need a reload after creating the device.

After device has been created I entered these two lines inside new device settings and reloaded…still no go :frowning: ???

device_file: D_RTCOA_Wifi_ZoneThermostat1.xml
impl_file: I_RTCOA_Wifi_ZoneThermostat1.xml

Running Lua Startup…only on device/application that was installed with 3m50 plugin -thermostat #1

Thermostat #2 is not detected for some reason and is not even loading, menu all grey out.

[url=http://tinyurl.com/nhjp7ay]http://tinyurl.com/nhjp7ay[/url]

Also when I was installing original thermostat 3m50 plugin in Vera I got following error yet the plugin installed. But still now I having trouble adding additional thermostats. :frowning:

Config: start configuration. This shouldn’t take more than 2 minutes.
Config: found device: 17 for app: 1618
Config: waiting app data for app: 1618
Config: found app data.
Config: failed to find config data. Waiting for it.
Config: it’s now safe to exit this screen.

[quote=“joey52685, post:215, topic:170555”][quote=“famx, post:214, topic:170555”]I tried that before and this is what I entered but it was not working. Additionally after device gets created it has fewer settings inside vs 3m50 plugin thermostat.

device type: urn:schemas-hugheaves-com:device:HVAC_ZoneThermostat:1

description: thermostat #2

Ip Address: thermostat #2 IP

MAC: thermostat #2 MAC[/quote]

What about device and implementation file name?

D_RTCOA_Wifi_ZoneThermostat1.xml
I_RTCOA_Wifi_ZoneThermostat1.xml

The Vera may need a reload after creating the device.[/quote]

Hard reset or fresh install has solved the issue. But as you recommended additionally both device and implementation files needed to be entered manually after device has been created.
Now I noticed there is half point difference in temperature reading between PMATempDevice and RemoteTempDevice even though temperature reading is being send from another thermostat and device number entered is the same in both fields.

Thermostat 2
device #4

Thermostat 1

“Values are…”

PMATempDevice: 4
RemoteTempDevice: 4

…yet temperatures readings on thermostat #1 screen show left top corner 71.5 and 72 in the middle of the screen. It seems like there is some sort of delay or they do not sync at the same time…?

[quote=“famx, post:219, topic:170555”][quote=“joey52685, post:215, topic:170555”][quote=“famx, post:214, topic:170555”]I tried that before and this is what I entered but it was not working. Additionally after device gets created it has fewer settings inside vs 3m50 plugin thermostat.

device type: urn:schemas-hugheaves-com:device:HVAC_ZoneThermostat:1

description: thermostat #2

Ip Address: thermostat #2 IP

MAC: thermostat #2 MAC[/quote]

What about device and implementation file name?

D_RTCOA_Wifi_ZoneThermostat1.xml
I_RTCOA_Wifi_ZoneThermostat1.xml

The Vera may need a reload after creating the device.[/quote]

Hard reset or fresh install has solved the issue. But as you recommended additionally both device and implementation files needed to be entered manually after device has been created.
Now I noticed there is half point difference in temperature reading between PMATempDevice and RemoteTempDevice even though temperature reading is being send from another thermostat and device number entered is the same in both fields.

Thermostat 2
device #4

Thermostat 1

“Values are…”

PMATempDevice: 4
RemoteTempDevice: 4

…yet temperatures readings on thermostat #1 screen show left top corner 71.5 and 72 in the middle of the screen. It seems like there is some sort of delay or they do not sync at the same time…?[/quote]

Does the remote temp device always show a whole number? Maybe it rounds up. I’m not totally sure how that works.