Author Topic: Strange temperature alert  (Read 887 times)

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Strange temperature alert
« on: December 18, 2017, 02:51:23 pm »
If I send the following message to Vera Alerts from PLEG I get a strange answer from Google Home:
God morgon, temperaturen utomhus ?r: {Device([1026].TemperatureSensor.CurrentTemperature)}
Translate from Swedish to english: Good morning, Temperature outside is

Answer from Google Home (translated to english):
Good morning, the temperature outside is time 5 degrees.

Why is it mixed up with time?

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10037
  • Karma: +759/-141
Re: Strange temperature alert
« Reply #1 on: December 18, 2017, 08:09:21 pm »
Look at the vera alerts log and see what it sent.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #2 on: December 19, 2017, 02:27:52 am »
It worked while it used () around the expression: ({Device([1026].TemperatureSensor.CurrentTemperature)})
However, I am now trying to include humiditysensor without success, what am I missing: ({Device([1868].HumiditySensor.CurrentLevel)})

UPDATE: It does not always work (depend of what type of temperature sensor is used)...

Se example below:

({Device([1026].TemperatureSensor.CurrentTemperature)})  = Qubino ZMNHAD1 with external temperature sensor
Answer from Google Home: "Klockan 7:50" - should be "-7.5" (Klockan mean "Time" in english)
Log:
08   12/19/17 11:36:28.487   JobHandler_LuaUPnP::HandleActionRequest device: 1069 service: urn:richardgreen:serviceId:VeraAlert1 action: SendAlert <0x703c7520>
50   12/19/17 11:36:28.491   luup_log:1069: VeraAlert:1069:SendAlert:Msg:({Device([1026].TemperatureSensor.CurrentTemperature)}) <0x772b0320>
50   12/19/17 11:36:28.492   luup_log:1069: VeraAlert:1069:ExpandRecipients:Checking:Kitchen_Home <0x772b0320>
50   12/19/17 11:36:28.492   luup_log:1069: VeraAlert:1069:ExpandRecipients:Adding Requested Profile <0x772b0320>
50   12/19/17 11:36:28.492   luup_log:1069: VeraAlert:1069:SendAlert:Sending to:Kitchen_Home <0x772b0320>
50   12/19/17 11:36:28.842   luup_log:1069: VeraAlert:1069:VCLSend:URL:https://192.168.1.188:8989/Say?Target=Kitchen%20Home&Text=%28%2D7%2E50%29 Result:200 Resp:OK <0x772b0320>
06   12/19/17 11:36:28.844   Device_Variable::m_szValue_set device: 1069 service: urn:richardgreen:serviceId:VeraAlert1 variable: LastMsgSent was: 11:35:32 Tue Dec 19 now: 11:36:28 Tue Dec 19 #hooks: 0 upnp: 0 skip: 0 v:0x12d6030/NONE duplicate:0 <0x772b0320>
50   12/19/17 11:36:28.955   luup_log:1069: VeraAlert:1069:SendAlert:Memory:466147 <0x772b0320>



({Device([1352].TemperatureSensor.CurrentTemperature)}) = Aeotec ZW100 with temperature sensor
Answer from Google Home: "19:80" - correct
Log:
08   12/19/17 11:38:48.355   JobHandler_LuaUPnP::HandleActionRequest device: 1069 service: urn:richardgreen:serviceId:VeraAlert1 action: SendAlert <0x6ff8e520>
50   12/19/17 11:38:48.359   luup_log:1069: VeraAlert:1069:SendAlert:Msg:({Device([1352].TemperatureSensor.CurrentTemperature)})  <0x772b0320>
50   12/19/17 11:38:48.360   luup_log:1069: VeraAlert:1069:ExpandRecipients:Checking:Kitchen_Home <0x772b0320>
50   12/19/17 11:38:48.360   luup_log:1069: VeraAlert:1069:ExpandRecipients:Adding Requested Profile <0x772b0320>
50   12/19/17 11:38:48.360   luup_log:1069: VeraAlert:1069:SendAlert:Sending to:Kitchen_Home <0x772b0320>
50   12/19/17 11:38:48.696   luup_log:1069: VeraAlert:1069:VCLSend:URL:https://192.168.1.188:8989/Say?Target=Kitchen%20Home&Text=%2819%2E90%29%20 Result:200 Resp:OK <0x772b0320>
06   12/19/17 11:38:48.697   Device_Variable::m_szValue_set device: 1069 service: urn:richardgreen:serviceId:VeraAlert1 variable: LastMsgSent was: 11:37:43 Tue Dec 19 now: 11:38:48 Tue Dec 19 #hooks: 0 upnp: 0 skip: 0 v:0x12d6030/NONE duplicate:0 <0x772b0320>
50   12/19/17 11:38:48.755   luup_log:1069: VeraAlert:1069:SendAlert:Memory:466149 <0x772b0320>



({Device([1868].HumiditySensor.CurrentLevel)}) = Aeotec ZW100 with humidity sensor
Answer from Google Home: "Device1868HumiditySensorCurrentLevel"
Log:
08   12/19/17 11:39:09.986   JobHandler_LuaUPnP::HandleActionRequest device: 1069 service: urn:richardgreen:serviceId:VeraAlert1 action: SendAlert <0x709c7520>
50   12/19/17 11:39:09.990   luup_log:1069: VeraAlert:1069:SendAlert:Msg:({Device([1868].HumiditySensor.CurrentLevel)})  <0x772b0320>
50   12/19/17 11:39:09.991   luup_log:1069: VeraAlert:1069:ExpandRecipients:Checking:Kitchen_Home <0x772b0320>
50   12/19/17 11:39:09.991   luup_log:1069: VeraAlert:1069:ExpandRecipients:Adding Requested Profile <0x772b0320>
50   12/19/17 11:39:09.991   luup_log:1069: VeraAlert:1069:SendAlert:Sending to:Kitchen_Home <0x772b0320>
50   12/19/17 11:39:10.473   luup_log:1069: VeraAlert:1069:VCLSend:URL:https://192.168.1.188:8989/Say?Target=Kitchen%20Home&Text=%28%7BDevice%28%5B1868%5D%2EHumiditySensor%2ECurrentLevel%29%7D%29%20 Result:200 Resp:OK <0x772b0320>
06   12/19/17 11:39:10.474   Device_Variable::m_szValue_set device: 1069 service: urn:richardgreen:serviceId:VeraAlert1 variable: LastMsgSent was: 11:38:48 Tue Dec 19 now: 11:39:10 Tue Dec 19 #hooks: 0 upnp: 0 skip: 0 v:0x12d6030/NONE duplicate:0 <0x772b0320>
50   12/19/17 11:39:10.541   luup_log:1069: VeraAlert:1069:SendAlert:Memory:466077 <0x772b0320>
« Last Edit: December 19, 2017, 05:48:16 am by paros »

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #3 on: December 23, 2017, 03:35:42 am »
Bump!

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #4 on: December 25, 2017, 11:35:30 am »
Christmas-Bump

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10037
  • Karma: +759/-141
Re: Strange temperature alert
« Reply #5 on: December 25, 2017, 12:34:26 pm »
You may have to use the long format:

i.e.  for
   Device ID = 5
   Serivice ID = urn:upnp-org:serviceId:SwitchPower1
   Variable Name  = Status

{Device([5].parent.service[urn:upnp-org:serviceId:SwitchPower1].Status)}

Using this synbtax you can access any device variable in Vera.

Use the advanced tab for a device to find the variables a device has.
Hover the mouse over the name to see the serviceID


Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #6 on: December 25, 2017, 01:13:21 pm »
Thanks for a rapid reply.
Probably a stupid question, but what does "parent.service" mean in my example?
I tried with the following but nothing happens: {Device([1061].parent.service[urn:upnp-org:serviceId:TemperatureSensor1].CurrentTemperature)}
Log:
08   12/25/17 19:11:43.530   JobHandler_LuaUPnP::HandleActionRequest device: 1069 service: urn:richardgreen:serviceId:VeraAlert1 action: SendAlert <0x6fb9a520>
50   12/25/17 19:11:43.533   luup_log:1069: VeraAlert:1069:SendAlert:Msg:{Device(1061.parent.service[urn:upnp-org:serviceId:TemperatureSensor1].CurrentTemperature)} <0x770e2320>

edit: if I try: {Device([1026].service[urn:upnp-org:serviceId:TemperatureSensor1].CurrentTemperature)}
The answer is: "Klockan 00:50" (translated from swedish to english: "Time is 00:50")
« Last Edit: December 25, 2017, 02:36:50 pm by paros »

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10037
  • Karma: +759/-141
Re: Strange temperature alert
« Reply #7 on: December 25, 2017, 03:09:36 pm »
That is a device that is referencing it's parents device ID.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #8 on: December 25, 2017, 03:13:28 pm »
How should I write to make it right then? I can make it working on all temperature sensors except the one I would like to use..
Where does the initial "klockan"  (translated to "Time is") come from?

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10037
  • Karma: +759/-141
Re: Strange temperature alert
« Reply #9 on: December 26, 2017, 10:01:22 am »
In the App -> Develop App -> Luup files there is a file:

  veraTemplateTest.lua

See it for examples.

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #10 on: December 26, 2017, 02:41:51 pm »
Already tried that.
For someone that know the answer, I guess this is very easy..
Any suggestions?

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #11 on: January 01, 2018, 09:57:32 am »
Bump?

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #12 on: January 05, 2018, 03:32:03 am »
Still no solution :(
Will it work if the temperature sensor is a child (external temperature sensor) to a Qubino ZMNHAD1

({Device([1026].TemperatureSensor.CurrentTemperature)})  = Qubino ZMNHAD1 with external temperature sensor
Answer from Google Home: "Klockan 7:50" - should be "-7.5" (Klockan mean "Time" in english)

Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10037
  • Karma: +759/-141
Re: Strange temperature alert
« Reply #13 on: January 05, 2018, 10:57:34 am »
It's impossible to answer your question because you need to have the proper info in the query string.
That information is DATA dependent.

To access any variable in Vera you need 3 pieces of information:
    1) Device ID  (I do not know if the device ID you provided is correct)
    2) Service ID (Using my shortcut service IDs are probably correct, but you need to verify
    3) Variable Name

Find the Variable you want in by using the Advanced Tab on a Device.
At the top is Device #XX
XX is the device ID
Goto the variable tab. Find your variable,  hover over the variable name ... it will provide the service ID.


You now have all the informaion you need:
      {Device[XX].ServiceIDName.VariableName}
ServiceIDName can be one of my shortcut names

Offline paros

  • Full Member
  • ***
  • Posts: 205
  • Karma: +6/-1
Re: Strange temperature alert
« Reply #14 on: January 05, 2018, 02:08:33 pm »
I think I got it for the temperature sensors, somehow it works now (I removed "1"): {Device([2186].TemperatureSensor.CurrentTemperature)}

However, for the humidity sensor, I doesn't :(
Under variables, I have: urn:micasaverde-com:serviceId:HumiditySensor1 - CurrentLevel

With your logic, it would be: {Device([2188].HumiditySensor1.CurrentLevel)}
I also tried: {Device([2188].HumiditySensor.CurrentLevel)}
But it doesn't work?