sValues vs Current state - Satel Integra

Moderator: leecollings

Post Reply
petecz
Posts: 5
Joined: Sunday 13 August 2017 17:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

sValues vs Current state - Satel Integra

Post by petecz »

I am trying to configure notifications via Pushover for alarm events.
I can only configure notifications for 'Current state' values, not for 'sValues'. What's the difference?
Why there is no 'current state' for few outputs?
How to handle it?
Attachments
domoticz.jpg
domoticz.jpg (26.08 KiB) Viewed 1973 times
domoticz.jpg
domoticz.jpg (208.48 KiB) Viewed 1977 times
petecz
Posts: 5
Joined: Sunday 13 August 2017 17:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: sValues vs Current state - Satel Integra

Post by petecz »

Or I need other ideas for configuring notifications.... Only 'Arm partition' works at the moment.
Why 'text device' hasn't any current state, how to rewrite it from sValue?
mivo
Posts: 80
Joined: Friday 21 April 2017 8:58
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Czechia
Contact:

Re: sValues vs Current state - Satel Integra

Post by mivo »

Hi,

not everything works in Blockly. This should work in dzVents scripting:

Code: Select all

return {
    active = true,
    logging = {
        level = domoticz.LOG_INFO,
    },
    on = {
        -- trigger on device with name
        devices = {'Text device'}
    },

    execute = function(domoticz, device)
        -- check text value of device
        if device.text == 'ON' then
                -- log for debugging purpose
                domoticz.log('Text is ON')
                -- send notification, more parameters available - see Wiki
                domoticz.notify('Text is ON')
        end
   end
}
Complete syntax of domoticz.notify() function is on Wiki: https://www.domoticz.com/wiki/DzVents:_ ... object_API:
My toys:
Raspberry Pi 3 + UPS PIco HV3.0 A Stack
Minibian (Raspbian Jessie) + Domoticz beta
RFLink 433 Gateway, 1wire DS18B20 temp sensors (GPIO)
RaZberry module + 2x Comet Z-Wave + Z-wave socket
---
Plugins: WeMo Switch, UPS PIco HV3.0A on GitHub
petecz
Posts: 5
Joined: Sunday 13 August 2017 17:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: sValues vs Current state - Satel Integra

Post by petecz »

hey it works thanks!
Two questions:
1) how to make else construction in dzVents
/something like

Code: Select all

return {
    active = true,
    logging = {
        level = domoticz.LOG_INFO,
    },
    on = {
        -- trigger on device with name
        devices = {'Brak zasilania'}
    },

    execute = function(domoticz, device)
        -- check text value of device
        if device.text == 'On' then
                -- log for debugging purpose
                domoticz.log('Brak zasilania')
                -- send notification, more parameters available - see Wiki
                domoticz.notify('Brak zasilania')
        else device.text == 'Off' then
                -- log for debugging purpose
                domoticz.log('Powrot zasilania')
                -- send notification, more parameters available - see Wiki
                domoticz.notify('Powrot zasilania')
        end
   end
}
but it doesn't work

2) Why Pushover is not working, despite the sending is done is logs? /email sending works ok/
mivo
Posts: 80
Joined: Friday 21 April 2017 8:58
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Czechia
Contact:

Re: sValues vs Current state - Satel Integra

Post by mivo »

Change else to this - normal LUA syntax, nothing specific to dzVents:

Code: Select all

elseif device.text == 'Off' then
I have no experience with Pushover - do you set it in Setup / Settings / Notifications ? Does it send message when click on Test ?
My toys:
Raspberry Pi 3 + UPS PIco HV3.0 A Stack
Minibian (Raspbian Jessie) + Domoticz beta
RFLink 433 Gateway, 1wire DS18B20 temp sensors (GPIO)
RaZberry module + 2x Comet Z-Wave + Z-wave socket
---
Plugins: WeMo Switch, UPS PIco HV3.0A on GitHub
petecz
Posts: 5
Joined: Sunday 13 August 2017 17:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: sValues vs Current state - Satel Integra

Post by petecz »

mivo wrote: Thursday 17 August 2017 8:39 Change else to this - normal LUA syntax, nothing specific to dzVents:

Code: Select all

elseif device.text == 'Off' then
I have no experience with Pushover - do you set it in Setup / Settings / Notifications ? Does it send message when click on Test ?
Ok, priority must be set as default level is no notification on smartphone ;)

Code: Select all

domoticz.notify('Brak zasilania','Informacja z systemu alarmowego',domoticz.PRIORITY_NORMAL)
should be elseif additionally ended as I've got parse errors?
mivo
Posts: 80
Joined: Friday 21 April 2017 8:58
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Czechia
Contact:

Re: sValues vs Current state - Satel Integra

Post by mivo »

IF..ELSEIF should be enclosed by "end" - complete condition part of your original script should be:

Code: Select all

...
        -- check text value of device
        if device.text == 'On' then
                -- log for debugging purpose
                domoticz.log('Brak zasilania')
                -- send notification, more parameters available - see Wiki
                domoticz.notify('Brak zasilania')
        elseif device.text == 'Off' then
                -- log for debugging purpose
                domoticz.log('Powrot zasilania')
                -- send notification, more parameters available - see Wiki
                domoticz.notify('Powrot zasilania')
        end
My toys:
Raspberry Pi 3 + UPS PIco HV3.0 A Stack
Minibian (Raspbian Jessie) + Domoticz beta
RFLink 433 Gateway, 1wire DS18B20 temp sensors (GPIO)
RaZberry module + 2x Comet Z-Wave + Z-wave socket
---
Plugins: WeMo Switch, UPS PIco HV3.0A on GitHub
fantom
Posts: 269
Joined: Thursday 26 March 2015 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Poland
Contact:

Re: sValues vs Current state - Satel Integra

Post by fantom »

Hi.
Please write post about Satel Integra in this task: viewtopic.php?f=17&t=4260
I'm author of this module, and sometimes I may help

Fantom
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest