Send Temperaturedevice Value with notification or Blockly

Moderator: leecollings

Post Reply
Roland1971
Posts: 6
Joined: Sunday 11 December 2016 9:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Send Temperaturedevice Value with notification or Blockly

Post by Roland1971 »

Hi guys,

I am struggling with, in my opinion, a simple thing as mailing the values of my (temp)sensors.

in the Blockly send message tag I added:

Code: Select all

My temperature is {{temperaturedevice[6001]}} degrees and the humidity is {{humiditydevice[6001]}} %
And the resulting textstring in the received Email is:
My temperature is temperaturedevice[6001] degrees and the humidity is humiditydevice[6001] %

it show the IDX and not the Values, Can somebody please help me with the syntax for this kind of status emails ?

Thank you very much in advance
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Send Temperaturedevice Value with notification or Blockly

Post by Egregius »

Why don't you use a script for stuff like that?
I guess you don't want to receive a mail every minute? Cause that would happen if you put it in a blockly...

Also, with a script you can perfectly control wheither or not the message is sent. In the summer I receive message when all rooms are warmer than 20°, one ore more windows are open and the outside temperature is higher than inside. Just to know when I need to close the windows to keep it cool :)
Roland1971
Posts: 6
Joined: Sunday 11 December 2016 9:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Send Temperaturedevice Value with notification or Blockly

Post by Roland1971 »

Thank you for your reply.. I guess i am not in the stadium of scripting Yet I guess ;-) wish I was... Just started with Domoticz last week.

I have a blockly running at fixed times now as a heartbeat to check if my internet connection in my holidayhome is still up. This is not realy a stable connection (behind proxy) from the park so i figured to send the temps as well..

Just as a small experiment.

For sure i like to further automate all readings with scripts and have them acting. That will be my next challenge. First i would like to understand why the values are not being transmitted by email..

Any thoughts ?
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Send Temperaturedevice Value with notification or Blockly

Post by Egregius »

Not for blockly...
from pass2php that would just be:

Code: Select all

telegram('Living temperature is now '.$s['living_temp'].' °C');
 
Of course there should be an extra line to check when last message was sent, or just sent a message when temperature is less or more than x degrees changed, whatever. Whit a script only you imagination is the limit.
Roland1971
Posts: 6
Joined: Sunday 11 December 2016 9:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Send Temperaturedevice Value with notification or Blockly

Post by Roland1971 »

Thank you for this startup, i used to program in php for my website a while ago so i guess i can pick up pretty easy. I will start exploring right away..

Thank you very much for taking the time to answer my question!

Cheers, Roland
Roland1971
Posts: 6
Joined: Sunday 11 December 2016 9:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Send Temperaturedevice Value with notification or Blockly

Post by Roland1971 »

[shame on] It seems I used the wrong IDX in the code... [\shame off]

It works now but indeed with blockly it is far from ideal.. I will start reading all the topics on scripting now.

It helped anyway!!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests