Ev1527 Chinese devices

Moderator: leecollings

Post Reply
xavierlp
Posts: 70
Joined: Tuesday 01 November 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: France
Contact:

Ev1527 Chinese devices

Post by xavierlp »

Hello all

I’m looking for information about integration of EV1527 switches.

I found theses switches and I’d like if one of you could integrate it.

https://a.aliexpress.com/_BUrO9m


I could read some information and it could be possible but in some cases not !!!!

Any feedbacks or advices ?

Thank you very much


Envoyé de mon iPhone en utilisant Tapatalk
Dave21w
Posts: 381
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Ev1527 Chinese devices

Post by Dave21w »

EV1527 based devices are already supported, just use the add switch command and press the button and it will save the device code, you will probably find though that these "switches" only send an "On" command with each press, this is because the device they normally connect to toggles it's state each time it receives the "On" signal. It's easy enough in blockly to create a toggle option to alter the state of another switch with each press of the wireless one, once completed you can then add a $ sign to the name of the wireless switch to hide it so you only see the device you want to control.
xavierlp
Posts: 70
Joined: Tuesday 01 November 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: France
Contact:

Re: Ev1527 Chinese devices

Post by xavierlp »

Thanks a lot Dave.

I will order it based on your feedback

;)
Dave21w
Posts: 381
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Ev1527 Chinese devices

Post by Dave21w »

I take it you already have either an RFXCom or RFLink for your 433Mhz devices ?
xavierlp
Posts: 70
Joined: Tuesday 01 November 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: France
Contact:

Re: Ev1527 Chinese devices

Post by xavierlp »

Yes I do

A rfxcom RFXtrx433E.

thanks
xavierlp
Posts: 70
Joined: Tuesday 01 November 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: France
Contact:

Re: Ev1527 Chinese devices

Post by xavierlp »

So I just received theses devices.

To integrate it, I used the switches panel, then the button learn Light/switch

I press the button of the device but Domoticz do not "find" it !

Any clues ?
Capture d’écran (57).png
Capture d’écran (57).png (42.78 KiB) Viewed 7193 times
b_weijenberg
Posts: 518
Joined: Friday 12 July 2013 18:13
Target OS: -
Domoticz version:
Location: Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by b_weijenberg »

Use the latest Pro1 firmware in the RFXtrx433E.
Check with RFXmngr if the button is received.

Enable "add new devices" in Domoticz for 5 minutes.
RFX-433, RFX-433EMC, RFX-868
xavierlp
Posts: 70
Joined: Tuesday 01 November 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: France
Contact:

Re: Ev1527 Chinese devices

Post by xavierlp »

Thanks a lot

It works now :D
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by Jasper79 »

Dave21w wrote: Tuesday 23 June 2020 8:35 EV1527 based devices are already supported, just use the add switch command and press the button and it will save the device code, you will probably find though that these "switches" only send an "On" command with each press, this is because the device they normally connect to toggles it's state each time it receives the "On" signal. It's easy enough in blockly to create a toggle option to alter the state of another switch with each press of the wireless one, once completed you can then add a $ sign to the name of the wireless switch to hide it so you only see the device you want to control.
Hi,

I found this thread and your comment because I also have these sensors and just started with Domoticz.
My RFLink found the front door and it does say ON all the time, If set manually to OFF it set ON when opening the door.

Could you give more details on how to make a script that records if the door has been opened?
xavierlp
Posts: 70
Joined: Tuesday 01 November 2016 16:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: France
Contact:

Re: Ev1527 Chinese devices

Post by xavierlp »

I bought a switch not a door contact. So it is different


Envoyé de mon iPhone en utilisant Tapatalk
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by waaren »

Jasper79 wrote: Saturday 08 August 2020 11:24 Could you give more details on how to make a script that records if the door has been opened?
How do you see the device details on the device tab? Do you see Open / Closed or On / Off in the data column?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by Jasper79 »

On/Off, once its on it does not go off by itself.

I've been trying and it does seem to work like this.
Screenshot_20200808-123628_Chrome.png
Screenshot_20200808-123628_Chrome.png (215.03 KiB) Viewed 7069 times
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by waaren »

Jasper79 wrote: Saturday 08 August 2020 12:38 On/Off, once its on it does not go off by itself.
I've been trying and it does seem to work like this.
That will work but does update your dummy device when there is any device activity on your system. Can you try changing the devicetype to doorcontact (on the switch tab) and use below dzVents script to toggle the contact n seconds after opening?

Code: Select all

return  
{
    on = 
    { 
        devices = 
        {
            'Door', -- set to name of your door contact
        }, 
    }, 

    logging = 
    {   
        level = domoticz.LOG_DEBUG,
        marker = 'Door', 
    },

    execute = function(dz, item)

        local toggleDelay = 10

        local function toggleContact(dv, delay)
            local delay = delay or 0
            local iToggle = 1 
            if dv.state == 'Open' then iToggle = 0 end
            local url = dz.settings['Domoticz url'] .. '/json.htm?type=command&param=udevice&idx=' .. dv.idx .. '&nvalue=' .. iToggle
            dz.openURL(url).afterSec(delay)
        end

        if item.state == 'Open' then
            dz.notify('Door alert','Door is opened. Closing the contact in ' .. toggleDelay .. ' seconds')
            dz.log('Door is opened. Closing the contact in ' .. toggleDelay .. ' seconds',dz.LOG_DEBUG)
            toggleContact(item, toggleDelay)
        end
    end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by Jasper79 »

Setting it to door contact shows a closed/locked door icon and state closed.
Then opening the door shows a open door and state open.

Then nothing else happens after closing the door, It does not seem to reset.

On device I changed the name Door To Voordeur as in my devices list.

Everything else is untouched.

Code: Select all

return  
{
    on = 
    { 
        devices = 
        {
            'Voordeur', -- set to name of your door contact
        }, 
    }, 

    logging = 
    {   
        level = domoticz.LOG_DEBUG,
        marker = 'Door', 
    },

    execute = function(dz, item)

        local toggleDelay = 10

        local function toggleContact(dv, delay)
            local delay = delay or 0
            local iToggle = 1 
            if dv.state == 'Open' then iToggle = 0 end
            local url = dz.settings['Domoticz url'] .. '/json.htm?type=command&param=udevice&idx=' .. dv.idx .. '&nvalue=' .. iToggle
            dz.openURL(url).afterSec(delay)
        end

        if item.state == 'Open' then
            dz.notify('Door alert','Door is opened. Closing the contact in ' .. toggleDelay .. ' seconds')
            dz.log('Door is opened. Closing the contact in ' .. toggleDelay .. ' seconds',dz.LOG_DEBUG)
            toggleContact(item, toggleDelay)
        end
    end
}

Code: Select all

2020-08-08 14:58:55.039 (RFLink) Light/Switch (Voordeur)
2020-08-08 14:58:55.281 Notification sent (browser) => Success
2020-08-08 14:58:55.248 Status: dzVents: Info: Handling events for: "Voordeur", value: "Open"
2020-08-08 14:58:55.249 Status: dzVents: Info: Voordeur: ------ Start internal script: Voordeur Test 2: Device: "Voordeur (RFLink)", Index: 138
2020-08-08 14:58:55.249 Status: dzVents: Debug: Voordeur: Door is opened. Closing the contact in 10 seconds
2020-08-08 14:58:55.249 Status: dzVents: Debug: Voordeur: OpenURL: url = http://127.0.0.1:8181/json.htm?type=command&param=udevice&idx=138&nvalue=0
2020-08-08 14:58:55.249 Status: dzVents: Debug: Voordeur: OpenURL: method = GET
2020-08-08 14:58:55.249 Status: dzVents: Debug: Voordeur: OpenURL: post data = nil
2020-08-08 14:58:55.249 Status: dzVents: Debug: Voordeur: OpenURL: headers = nil
2020-08-08 14:58:55.249 Status: dzVents: Debug: Voordeur: OpenURL: callback = nil
2020-08-08 14:58:55.250 Status: dzVents: Info: Voordeur: ------ Finished Voordeur Test 2
2020-08-08 14:58:55.279 Status: Notification: Door alert
2020-08-08 14:58:55.251 Error: dzVents: local netWork not open for dzVents openURL call !
2020-08-08 14:58:55.251 Error: dzVents: check dzVents wiki (look for 'Using dzVents with Domoticz'
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by Jasper79 »

Fixed that,
make sure that in the Security section in the settings (Setup > Settings > System > Local Networks (no username/password) you allow 127.0.0.1 (and / or ::1 when using IPv6 ) to not need a password.

Code: Select all

2020-08-08 15:05:08.019 Status: Incoming connection from: 127.0.0.1
2020-08-08 15:05:08.226 Status: dzVents: Info: Handling events for: "Voordeur", value: "Closed"
2020-08-08 15:05:08.226 Status: dzVents: Info: Voordeur: ------ Start internal script: Voordeur Test 2: Device: "Voordeur (RFLink)", Index: 138
2020-08-08 15:05:08.226 Status: dzVents: Info: Voordeur: ------ Finished Voordeur Test 2
Now it works.
I'll try for a couple a days before I move on to a siren :mrgreen:
Maybe email notifications should go first.
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by Jasper79 »

Next question,
Door number 2, new script or can it be added in the previous script?

Code: Select all

return  
{
    on = 
    { 
        devices = 
        {
            'Deursensor Voordeur', -- set to name of your door contact 
            'Deursensor Jenniffer',
            --'Deursensor',
        }, 
    }, 

    logging = 
    {   
        level = domoticz.LOG_DEBUG,
        marker = 'Door', 
    },

    execute = function(dz, item)

        local toggleDelay = 10

        local function toggleContact(dv, delay)
            local delay = delay or 0
            local iToggle = 1 
            if dv.state == 'Open' then iToggle = 0 end
            local url = dz.settings['Domoticz url'] .. '/json.htm?type=command&param=udevice&idx=' .. dv.idx .. '&nvalue=' .. iToggle
            dz.openURL(url).afterSec(delay)
        end

        if item.state == 'Open' then
            dz.notify('Door alert','Door is opened. Closing the contact in ' .. toggleDelay .. ' seconds')
            dz.log('Door is opened. Closing the contact in ' .. toggleDelay .. ' seconds',dz.LOG_DEBUG)
            toggleContact(item, toggleDelay)
        end
    end
}

Code: Select all

2020-08-08 18:18:26.790 Status: Notification: Door alert
2020-08-08 18:18:36.862 Status: Incoming connection from: 127.0.0.1
2020-08-08 18:18:37.068 Status: dzVents: Info: Handling events for: "Deursensor Jenniffer", value: "Closed"
2020-08-08 18:18:37.068 Status: dzVents: Info: Door: ------ Start internal script: Voordeur Test 2: Device: "Deursensor Jenniffer (RFLink)", Index: 150
2020-08-08 18:18:37.068 Status: dzVents: Info: Door: ------ Finished Voordeur Test 2
2020-08-08 18:18:50.824 Status: dzVents: Info: Handling events for: "Deursensor Jenniffer", value: "Open"
2020-08-08 18:18:50.825 Status: dzVents: Info: Door: ------ Start internal script: Voordeur Test 2: Device: "Deursensor Jenniffer (RFLink)", Index: 150
2020-08-08 18:18:50.825 Status: dzVents: Debug: Door: Door is opened. Closing the contact in 10 seconds
2020-08-08 18:18:50.825 Status: dzVents: Debug: Door: OpenURL: url = http://127.0.0.1:8181/json.htm?type=command&param=udevice&idx=150&nvalue=0
2020-08-08 18:18:50.825 Status: dzVents: Debug: Door: OpenURL: method = GET
2020-08-08 18:18:50.825 Status: dzVents: Debug: Door: OpenURL: post data = nil
2020-08-08 18:18:50.825 Status: dzVents: Debug: Door: OpenURL: headers = nil
2020-08-08 18:18:50.825 Status: dzVents: Debug: Door: OpenURL: callback = nil
2020-08-08 18:18:50.825 Status: dzVents: Info: Door: ------ Finished Voordeur Test 2
Just to be sure, It does work .
Dave21w
Posts: 381
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Ev1527 Chinese devices

Post by Dave21w »

A quick question before I post my version as I don't want to make an idiot of myself.
Reading this script am I correct that after the door opens there is a delay and the script sets the door to closed again even if it's still open ?
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by Jasper79 »

Indeed, why,. Well because the cheap sensor does not send a message when it's closed, it only sends a message when it opens so for the system it stays open forever.

I will need to buy new sensors some time.
Dave21w
Posts: 381
Joined: Sunday 29 November 2015 21:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: UK
Contact:

Re: Ev1527 Chinese devices

Post by Dave21w »

OK, thanks for the update, you should still have been able to reset the status in the switch itself instead of bothering with a script, simply set the off delay in the edit tab for the switch to say 20 seconds.

Dave
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Ev1527 Chinese devices

Post by Jasper79 »

Thanks, I didn't find a way to set it in the switch.
These are old chuango 433mhz door sensors that just send a signal to the main unit as far as I know.

Setting it to 20 seconds does not make much of a difference I think because like this morning the front door is open for a few hours to try and cool down the house.

I'm willing to try any changes, I'm pretty new to this so I'm relying on the community.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest