OpenWebNet developing..?

Others (MiLight, Hue, Toon etc...)
spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Friday 17 February 2017 16:15

Hello and welcome fmal,

what do you mean with "cache refresh failed" thing makes it unusable Often? I have never seen anything like it.
Are you using the stable version? I advise you to use the latest beta release that contains some updates.
If you have any problems in using the domoticz with MyHome, you please explain it well and I will try to fix it.

fmal
Posts: 21
Joined: Thursday 16 February 2017 15:08
Target OS: Raspberry Pi
Domoticz version:
Location: Italy
Contact:

Re: OpenWebNet developing..?

Post by fmal » Saturday 18 February 2017 22:22

I have read in this forum that my error is known: I use domoticz SSL native support with its default certificate and it looks that caching does not work in ssl.
At every new connection from clients (both from Firefox on PC or on Android) I receive first a blue box telling "Clearing browser cache" and after about 10 seconds the box changes into a red one telling "Browser refresh cache failed". After this, the application runs normally until a new connection.
In chrome I have directly the red box telling also "manifest fetch failed ...../html5.appcache" but it is fast appearing and disappearing.
I have the last beta applied today (Version: 3.6749): after this update I still see the warning boxes but the application looks as normally running, in the past versions I had error messages and it was loosing its configuration quite often.
Do not spend much time in this. I have not tested it very much, and maybe I can have make mistakes because I'm a Unix system programmer and I do not know Raspbian very much. I realize that problems can come from using SLL without a true certificate, but I have it running in my home subdomain, and I have no certificates for that subdomain so I must use the default one supplied with package.

gibbo520
Posts: 6
Joined: Thursday 02 March 2017 0:02
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: OpenWebNet developing..?

Post by gibbo520 » Thursday 02 March 2017 0:11

Hallo, i'm new to this forum.
I have a Bticino Legrand Myhome devices in my house.
I made some changes on the openwebnet tcp module:

Partial implementation of alarm Who 5 (autodiscover device and domoticz get state of alarm engaged disengaged)
partial implementation of CEN plus 25 (autodiscover device with creation of light switch and domoticz get state from CEN PLUS command switch)

you can trigger a scene like this

Code: Select all

commandArray = {}
if (devicechanged['CEN TV SCENE']) then -- the real button myhome in CEN PLUS mode
    if (devicechanged['CEN TV SCENE']=='On') then  
        commandArray['UpdateDevice'] = '31|Off|Off|'   --31 is the idx of the autogen dummy light switch 
        commandArray['Scene:HUELight_shutterOFF'] = "On"  -- the scene or switch 
    end
end

return commandArray

How can i upload to github the mod i made ?

Thank you

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Friday 03 March 2017 21:07

Hi gibbo520,
gibbo520 wrote: How can i upload to github the mod i made ?
what do you mean exactly? I think you need to do just a pull request ..
gibbo520 wrote: Partial implementation of alarm Who 5 (autodiscover device and domoticz get state of alarm engaged disengaged)
I would like to know what kind of device you used to the alarm status?
I was thinking of doing this in the coming days, adding also the state of the individual zones.

gibbo520
Posts: 6
Joined: Thursday 02 March 2017 0:02
Target OS: Raspberry Pi
Domoticz version:
Contact:

Post by gibbo520 » Friday 03 March 2017 21:48

I'll push on git hub

fmal
Posts: 21
Joined: Thursday 16 February 2017 15:08
Target OS: Raspberry Pi
Domoticz version:
Location: Italy
Contact:

Re: OpenWebNet developing..?

Post by fmal » Wednesday 08 March 2017 12:28

One question: after a recent upgrade my app discovered the alarm system installed, but it's reported twice.
One is called "Alarm" and the other is "Burglar Alarm". Both have the id= 50000 but the first one has several others devices (500FD=Battery, 500FE=Network, etc).
How should I manage this?

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Wednesday 08 March 2017 14:45

fmal wrote:One question: after a recent upgrade my app discovered the alarm system installed, but it's reported twice.
One is called "Alarm" and the other is "Burglar Alarm". Both have the id= 50000 but the first one has several others devices (500FD=Battery, 500FE=Network, etc).
How should I manage this?
The first version made by gibbo520 created devices "Burglar Alarm" with ID 0x00050000 and unit = alarm zone

I have introduced other devices that I think are useful as battery status and the network status. By doing this I also changed the IDs to ensure proper management of the interface, which in the code is associated with the unit. The name has been changed to "Alarm" only for a matter of length.
So the correct devices to be used will be:

0x00050001 to 0x0005000n = zone active/disactive/intrusion
0x000500FF = general system status (es. manteinance)
0x000500FE = network status
0x000500FD = battery status
0x000500FC = system engage/disengage

After the pull request with these changes (#1303) there was some problem on github, and some changes have been lost. I advise you to wait to be approved pull request #1310 that solves everything and then download last beta.

dioniso
Posts: 5
Joined: Tuesday 02 August 2016 12:12
Target OS: -
Domoticz version:
Contact:

Re: OpenWebNet developing..?

Post by dioniso » Wednesday 08 March 2017 16:47

spugna85 wrote:
fmal wrote:One question: after a recent upgrade my app discovered the alarm system installed, but it's reported twice.
One is called "Alarm" and the other is "Burglar Alarm". Both have the id= 50000 but the first one has several others devices (500FD=Battery, 500FE=Network, etc).
How should I manage this?
The first version made by gibbo520 created devices "Burglar Alarm" with ID 0x00050000 and unit = alarm zone

I have introduced other devices that I think are useful as battery status and the network status. By doing this I also changed the IDs to ensure proper management of the interface, which in the code is associated with the unit. The name has been changed to "Alarm" only for a matter of length.
So the correct devices to be used will be:

0x00050001 to 0x0005000n = zone active/disactive/intrusion
0x000500FF = general system status (es. manteinance)
0x000500FE = network status
0x000500FD = battery status
0x000500FC = system engage/disengage

After the pull request with these changes (#1303) there was some problem on github, and some changes have been lost. I advise you to wait to be approved pull request #1310 that solves everything and then download last beta.
Sorry Spugna85, but how can i control the alarm?I need to engage/disengage but i don't know how do it...
Can you help me?

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Wednesday 08 March 2017 17:06

dioniso wrote: Sorry Spugna85, but how can i control the alarm?I need to engage/disengage but i don't know how do it...
Can you help me?
With bticino system myhome you can not directly control the alarm system with OpenWebNet protocol, but you can only monitor its status.

The only chance you have is to use the AUXILIARY devices, configuring your alarm control panel to run some commands (eg. Engage alarm)
when it receives a particular OpenWebNet auxiliary command.

I have configured four auxiliaries in bticino alarm control panel, for example:
- AUX 1 status 0 -> disengage
- AUX 3 Status 1 -> engage with ALL zones
- AUX 3 status 1 -> engage with partialization of zones 2 and 3
- AUX 4 status 1 -> engage with partialization of zones 1 and 4
You may find some indication of legrand community forum.

I then configured the auxiliary devices like push on or off button in domoticz.

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Wednesday 08 March 2017 20:37

spugna85 wrote:
dioniso wrote: Sorry Spugna85, but how can i control the alarm?I need to engage/disengage but i don't know how do it...
Can you help me?
With bticino system myhome you can not directly control the alarm system with OpenWebNet protocol, but you can only monitor its status.

The only chance you have is to use the AUXILIARY devices, configuring your alarm control panel to run some commands (eg. Engage alarm)
when it receives a particular OpenWebNet auxiliary command.

I have configured four auxiliaries in bticino alarm control panel, for example:
- AUX 1 status 0 -> disengage
- AUX 2 Status 1 -> engage with ALL zones
- AUX 3 status 1 -> engage with partialization of zones 2 and 3
- AUX 4 status 1 -> engage with partialization of zones 1 and 4
You may find some indication of legrand community forum.

I then configured the auxiliary devices like push on or off button in domoticz.
Here's an example to configure myhome alarm central 3486:

You must configure the automation through a special menu.
Automations allow you to execute a OPEN command when a particular event occurs.
In this case, the events are the changes of state of the auxiliary (who = 9), and the command are burglar alarm command (who=5).

Configuration Automation 1: when AUX-1 go OFF, then DISENGAGE all Zones
Name: Disengaged all zones
Event: command OPEN = *9*0*1##
OPEN command to execute: *5*9##

Configuration Automation 2: when AUX-2 go ON, then ENGAGE active Zones
Name: Engaged active zones
Event: command OPEN = *9*1*2##
OPEN command to execute: *5*8##

Configuration Automation 3: when AUX-3 go ON, then ENGAGE Zone 1 and Zone 4
Name: Engaged zone 1 and zone 4
Event: command OPEN = *9*1*3##
OPEN command to execute: *5*8#14##

Then you can create 3 auxiliary devices in domoticz, first of type 'push OFF button' and the others of type 'push ON button'. This work for me.
I hope this helps ;)
Last edited by spugna85 on Wednesday 22 March 2017 2:17, edited 2 times in total.

dioniso
Posts: 5
Joined: Tuesday 02 August 2016 12:12
Target OS: -
Domoticz version:
Contact:

Re: OpenWebNet developing..?

Post by dioniso » Wednesday 08 March 2017 20:39

GREAT!!!!!
Grazie!!

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Wednesday 08 March 2017 22:35

dioniso wrote:GREAT!!!!!
Grazie!!
If you have a web server device like the F454, remember to disable notifications of auxiliary alarms, you can do this via the Web page.
If you do not do this, when you send the enable / disable alarm operation via the auxiliary, you can receive false notifications as flooding, etc.
Last edited by spugna85 on Monday 22 May 2017 23:44, edited 1 time in total.

fmal
Posts: 21
Joined: Thursday 16 February 2017 15:08
Target OS: Raspberry Pi
Domoticz version:
Location: Italy
Contact:

Re: OpenWebNet developing..?

Post by fmal » Sunday 02 April 2017 14:00

Hi, I'm trying to associate such an automation on my 3486, in order to engage/disengage it from domoticz.
But I have some problems to write correctly the open command: it looks how the keyboard does not follow the normal behavior. I can write * but if I try to write a number pushing repeatly the button, it writes all the characters in order. For examble, instead of *9 I obtain *wxyz9 and I cannot delete/modify the wrong characters.
How can I write an OPEN comman?

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Sunday 02 April 2017 14:13

I do not know, maybe it's a problem of your 3486.
When I enter the open command, I can only type numbers, * or # character.
The letters do not appear, because even in the open command there are no letters.

Are you sure to be in the right menu?

fmal
Posts: 21
Joined: Thursday 16 February 2017 15:08
Target OS: Raspberry Pi
Domoticz version:
Location: Italy
Contact:

Re: OpenWebNet developing..?

Post by fmal » Sunday 02 April 2017 14:45

Sorry, resetting the 3486 now it works well!
Last edited by fmal on Sunday 02 April 2017 14:49, edited 1 time in total.

fmal
Posts: 21
Joined: Thursday 16 February 2017 15:08
Target OS: Raspberry Pi
Domoticz version:
Location: Italy
Contact:

Re: OpenWebNet developing..?

Post by fmal » Sunday 02 April 2017 14:48

Now the 3486 automations are ready, but I do not know how to create AUXn in domoticz. I cannot find info in docs.

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Sunday 02 April 2017 14:57

you can manually add the AUX devices in the switch page.
you have to choose model "Auxiliary OpenWebNet Bus" and then set properly the number of the AUX that you want.

Then if you will use only on or off, you can change the type of device, for example "push ON button" or "push OFF button".

fmal
Posts: 21
Joined: Thursday 16 February 2017 15:08
Target OS: Raspberry Pi
Domoticz version:
Location: Italy
Contact:

Re: OpenWebNet developing..?

Post by fmal » Sunday 02 April 2017 15:22

Great! it works perfectly. TY Spugna85!

spugna85
Posts: 50
Joined: Tuesday 29 March 2016 16:41
Target OS: Raspberry Pi
Domoticz version:
Location: Italia
Contact:

Re: OpenWebNet developing..?

Post by spugna85 » Sunday 02 April 2017 15:36

Here a LUA script to receive some notifications.
You only have to change the name of the devices:

'Home Alarm Status'
'Alarm Zone 1' .. 'Alarm Zone N'
'Battery Status'
'Network Status'


with those of your devices.

I hope this is helpful ;)

Code: Select all

commandArray = {}

if devicechanged then
    for deviceName,deviceValue in pairs(devicechanged) do
        
        -- Alarm Engagement
        if (deviceName=='Home Alarm Status') then
            print(deviceName.. ': ' .. deviceValue)
            if deviceValue == 'Engaged' then
                commandArray['SendNotification']='Alarm Engaged'
            elseif deviceValue == 'DisEngaged' then
                commandArray['SendNotification']='Alarm DisEngaged'
            end
        end
        
        -- Alarm sensor zones
        if (deviceName=='Alarm Zone 1') or (deviceName=='Alarm Zone 2')) then
            print(deviceName .. ': '.. deviceValue)
            if (deviceValue == 'Intrusion') then
                commandArray['SendNotification']="Intrusion ON#" .. deviceName
            else --if ((deviceValue == 'Active') or (deviceValue == 'Inactive')) then
                commandArray['SendNotification']="Intrusion OFF#" .. deviceName
            end
        end
    
        -- General system status alarm
--        if (deviceName=='Alarm System Status') then
--        end
        
        -- Alarm battery status
        if (deviceName=='Battery Status') then
            print(deviceName.. ': ' .. deviceValue)
            if deviceValue == 'Battery Ok' then
                commandArray['SendNotification']='Battery is OK'
            elseif deviceValue == 'Battery Fault' then
                commandArray['SendNotification']='Battery is FAULT!'
            elseif deviceValue == 'Battery Unloads' then
                commandArray['SendNotification']='Battery is Unloads!'
            end
        end
    
        -- Alarm Network status
        if (deviceName=='Network Status') then
            print(deviceName.. ': ' .. deviceValue)
            if deviceValue == 'Network OK' then
                commandArray['SendNotification']='Network is OK'
            elseif deviceValue == 'No network' then
                commandArray['SendNotification']='No network!'
            end
        end
    
    end

 end

return commandArray

fmal
Posts: 21
Joined: Thursday 16 February 2017 15:08
Target OS: Raspberry Pi
Domoticz version:
Location: Italy
Contact:

Re: OpenWebNet developing..?

Post by fmal » Sunday 02 April 2017 16:05

Ty very much, it could be useful in my next steps. Just a question. I cannot understand what is the "Network Status" relative to an alarm. Is it the alarm bus?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests