Page 1 of 1

Send Temperaturedevice Value with notification or Blockly

Posted: Wednesday 21 December 2016 15:06
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

Re: Send Temperaturedevice Value with notification or Blockly

Posted: Wednesday 21 December 2016 16:22
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 :)

Re: Send Temperaturedevice Value with notification or Blockly

Posted: Wednesday 21 December 2016 19:18
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 ?

Re: Send Temperaturedevice Value with notification or Blockly

Posted: Wednesday 21 December 2016 19:21
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.

Re: Send Temperaturedevice Value with notification or Blockly

Posted: Wednesday 21 December 2016 20:55
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

Re: Send Temperaturedevice Value with notification or Blockly

Posted: Wednesday 21 December 2016 21:13
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!!