Virtual Thermostat for radiator using Multi Sensor & Fibaro relay (help a newbie!)

Hi Andy,

Bad news. With the new version of the app with the adjustable temp, it appears that the master switch does not work. Ie - I set it up, pick a temperature. Set the master switch to off (as I don’t want heating at the minute) - and the radiator gets turned on anyway. Does that make sense?

So even when I ask for the thermostat app & therefore the radiator to be off at night, it keeps coming on by itself!

Any idea why that’s happening? Previous iteration of the app was fine…

Tim

Hi Tim
I’m back in the UK on thursday and will have a look as soon as I can

Tim
I’ve just tried this and it worked perfectly for me!

One thing I noticed… you need to toggle the master switch a couple of times to get it to register.

Can you please check the ‘live logging’ when you toggle the switch and screenshot it?
Then post the screenshot here?

I got it working! I was using the wrong type of virtual switch. Works great now. thanks so much!

I wish I could contribute and get the temperature to be adjustable in ActionTiles but I just don’t know how!

Thanks again for all your work
T

Hi Andy,

Many thanks for a great app and DTH. I am a total beginner with Smartthings and coding, so I am sure I have done something wrong as it is not quite working as intended yet…

I have a cabin in the garden, using a heater plugged in to an Aeotec smart plug and I am using the temperature from the Smartthings motion sensor. I created a virtual temperature controller using your DTH, but whenever I adjust up or down the heater always comes on, even if the room is warmer than the target temperature.

I am sure I am being a bit dim, but any pointers would be gratefully received!

Regards,

Matt

Hi Matt
if you turn on the logging in the app and check ‘live logging’ on the IDE website what does it tell you when you alter the required temperature?

Andy

Hi Andy,

The temperature set point on the virtual controller was below the room temperature, so heater off. If I increase or decrease the temperature selection, keeping it below the room temperature I get…

9734e6b6-ca26-447e-98c5-0333927b849b 14:50:44: debug 'zw device: 03, command: 3202, payload: 21 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ’ parsed to [name:power, value:0, unit:W, isStateChange:false, displayed:false, linkText:Cabin Heater, descriptionText:Cabin Heater power is 0 W]
485b1ff4-3d38-4a74-ad65-4170e17367f1 14:50:41: info postEventToEndpoint: event successfully posted.
485b1ff4-3d38-4a74-ad65-4170e17367f1 14:50:41: debug Property Change Event switch: off (source: DEVICE)
9734e6b6-ca26-447e-98c5-0333927b849b 14:50:40: debug 'zw device: 03, command: 2003, payload: 00 ’ parsed to [[name:switch, value:off, descriptionText:Cabin Heater was turned off, isStateChange:true, displayed:true, linkText:Cabin Heater], physicalgraph.device.HubMultiAction@56d24aa5]
9734e6b6-ca26-447e-98c5-0333927b849b 14:50:32: debug 'zw device: 03, command: 3202, payload: 21 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ’ parsed to [name:power, value:0, unit:W, isStateChange:false, displayed:false, linkText:Cabin Heater, descriptionText:Cabin Heater power is 0 W]
485b1ff4-3d38-4a74-ad65-4170e17367f1 14:50:29: info postEventToEndpoint: event successfully posted.
485b1ff4-3d38-4a74-ad65-4170e17367f1 14:50:29: debug Property Change Event switch: on (source: DEVICE)
9734e6b6-ca26-447e-98c5-0333927b849b 14:50:29: debug 'zw device: 03, command: 2603, payload: 63 ’ parsed to [[name:switch, value:on, descriptionText:Cabin Heater was turned on, isStateChange:true, displayed:true, linkText:Cabin Heater], [name:level, value:99, unit:%, isStateChange:false, displayed:false, linkText:Cabin Heater, descriptionText:Cabin Heater level is 99%], physicalgraph.device.HubMultiAction@66d9c415]

So it looks like it switches on the heater briefly, realises it is not needed and switches it off again? This is not a huge issue and it different to earlier when the heater came on and stayed on, but might still be nice to iron out. Either way it seems to be working really well.

The other odd quirk is that I have made the temperature controlled a favourite on the Dashboard of the Android app. It displays the temperature setting but when I touch it, rather than opening the app it says “You are not authorized to perform the requested operation”.

I need to get my head into the coding side of things so I can start do really customise things, and this is a really useful insight.

Many thanks,

Matt

Matt
this look like the output from the actual outlet not the smartapp
Also, is the outlet dimmable? or just on/off?

Andy

Hi Andy,

Apologies for that. It is what came up in the live logging on IDE. I did not see anywhere in the app to enable logging and this is the only thing i could see. The socket has power monitoring and is dimmable, but at the moment I am using it as a simple on / off with the heater.

Matt

The switch to enable debug logging in the app is on the same page as the place where you ‘name’ the app

I have only ever tested with a simple on/off outlet as we don’t have the dimming ones here in the UK

Thanks Andy. I am in the UK too and I bought the outlets from Amazon. Anyway, thanks for the pointer re debug logging. The live log when I change temp is…

: 03, command: 3202, payload: 21 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ’ parsed to [name:power, value:0, unit:W, isStateChange:false, displayed:false, linkText:Cabin Heater, descriptionText:Cabin Heater power is 0 W]
485b1ff4-3d38-4a74-ad65-4170e17367f1 16:20:21: info postEventToEndpoint: event successfully posted.
485b1ff4-3d38-4a74-ad65-4170e17367f1 16:20:21: debug Property Change Event switch: off (source: DEVICE)
9734e6b6-ca26-447e-98c5-0333927b849b 16:20:21: debug 'zw device: 03, command: 2003, payload: 00 ’ parsed to [[name:switch, value:off, descriptionText:Cabin Heater was turned off, isStateChange:true, displayed:true, linkText:Cabin Heater], physicalgraph.device.HubMultiAction@6c009f1f]
9734e6b6-ca26-447e-98c5-0333927b849b 16:20:15: debug 'zw device: 03, command: 3202, payload: 21 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ’ parsed to [name:power, value:0, unit:W, isStateChange:false, displayed:false, linkText:Cabin Heater, descriptionText:Cabin Heater power is 0 W]
485b1ff4-3d38-4a74-ad65-4170e17367f1 16:20:12: info postEventToEndpoint: event successfully posted.
485b1ff4-3d38-4a74-ad65-4170e17367f1 16:20:12: debug Property Change Event switch: on (source: DEVICE)
9734e6b6-ca26-447e-98c5-0333927b849b 16:20:12: debug 'zw device: 03, command: 2603, payload: 63 ’ parsed to [[name:switch, value:on, descriptionText:Cabin Heater was turned on, isStateChange:true, displayed:true, linkText:Cabin Heater], [name:level, value:99, unit:%, isStateChange:false, displayed:false, linkText:Cabin Heater, descriptionText:Cabin Heater level is 99%], physicalgraph.device.HubMultiAction@592c3873]
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) Reported temperature is equal to, or above, 7.0 so deactivating [Cabin Heater]
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) Configured to use variable temp controller - state.confTemp = 7.0
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) Configured for heating mode
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) All ok so can continue…
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) presenceOk = true
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) contactOk = true
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) enableOk = true
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) timeOk = true
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) daysOk = true
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) modeOk = true
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) Reported temperature is now: 13.0 degrees.
80764574-5c91-4b59-a896-30d7933292a0 16:20:06: debug TEMPERATURE.CONTROLLED.SWITCH (AppVersion: 2.4.0) Required Temp set to: 7.0 degrees by virtual controller: Cabin Thermostat

Reading the above, with my most basic grasp of things it does seem to switch on the heating, notes that the room temperature (13 degrees in this case) is higher than the set temperature (7 degrees) so switches it back off again. As I said before, this is just a little quirk rather than anything troublesome.

Any advice on not being able to open the smart app via the tile on the Dashboard would be appreciated. My final task is to find a way to extract the temperature from the motion sensor and display it on a Dashboard tile next to the temperature controller tile, and that will be amazing.

Kind regards,

Matt

Not sure why it’s doing this… it may be a quirk of the fact that it’s a dimming outlet.

OK… the DTH for the temp controller was configured like that as I didn’t want to be able to control it from the dashboard… just use it to show what was configured.

OK… to make it configurable…

In the DTH code look at line: 74

‘attributeState(“temperature”, label:’${currentValue}°’, unit:“C”, action:“wait”, // change ‘unit’ setting to F for fahrenheit ’

if you remove this bit: action:“wait”,
(then save & publish)
then you will find that when you click on the icon in the dashboard it will allow you to change the temperature

Let me know how you get on.

Andy

To be able to display the temp on your motion sensor instead of the motion you will need to edit the DTH for the motion sensor.
Note: If you edit a standard smartthings DTH it will no longer run locally (but custom apps etc don’t run locally anyway)

Look in the DTH for a setting called ‘main’ you will find this under the ‘tiles’ section near the top of the DTH.

Change the setting of main: “motion” to

main:“temperature”

This will just change the main display… it should not affect the workings of the motion sensor… just what is displayed in the main box.

I did exactly this as I use a smartthings door sensor to measure temperature in my conservatory.
I just ignore open/closed and show the temp on the main tile.

You can find a copy of the original smartthings DTH (if you need it) here:

Hi Andy,

That tweak to line 74 worked wonders and now I can use the tile on the Dashboard as a shortcut to adjust the set temp. Thank you!

I created a DTH using the code for the Smartsense Motion Sensor and changed “motion” to “temperature”, but when I applied that to the device and checked the Android app the tile on the Dashboard just said “Tiles Missing” so I must have cocked it up. I will revert back to the standard DTH for the moment until I work out what went wrong.

Thanks again for your help with this. I have learned a lot in the past 24 hours, but I suspect this will start to become addictive…

Matt

Sorted it now. I had picked the wrong version of the motion sensor DTH that had no temperature capability. All working 100%.

Regards,

Matt

I’m glad you finally got it sorted, well done!

You have two ways you can go to control smartthings…
webcore or write your own apps
I decided to learn to write my own apps and did find it addictive :slight_smile: