Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for generic command frame (WHO=? WHAT=? WHERE=?) #52

Open
llegovich opened this issue Jan 28, 2019 · 8 comments
Open

add support for generic command frame (WHO=? WHAT=? WHERE=?) #52

llegovich opened this issue Jan 28, 2019 · 8 comments
Labels
newWHO Requires support for new WHO
Milestone

Comments

@llegovich
Copy link

Expected Behavior

Create a couple of generic things to post generic command frames on the OWN bus and gather the returned information, like for example:

*1*16*77##
(turn light 77 on for 15 minutes).

This would allow to benefit of full OWN features while enhancing the binding more and more.

To gather feedback from the system, a specific channel should be added in order to intercept all events filtered by a specified mask.
Here below how the things and items may be specified to allow this:

// things
bus_generic_command myOWNCommand [ WHO="1", WHAT="16", WHERE="77" ]
bus_event_capture myOWNEvent [ WHO="1", WHERE="77" ]

// items
Switch mySwitch { channel="openwebnet:bus_generic_command:mybridge:myOWNCommand:genericcmd" }
String myEvent { channel="openwebnet:bus_event_capture:mybridge:myOWNEvent:event" }

// usage (in rules)
mySwitch.sendCommand(ON)   // sends the "*1*16*77##" command on the bus
var s = myEvent.state   // when updated contains the return state or WHAT value

This may be useful also for debugging purposes.

@Gozilla01
Copy link

Gozilla01 commented Jan 31, 2019

This function is already expressed in this issue #22

@mvalla
Copy link
Owner

mvalla commented Feb 2, 2019

In fact the issue is similar, but I prefer the description and specification here, for example to divide WHO,WHAT,WHERE (to avoid wrong frames are sent on the BUS) and to have two separate channels or Things type for sending commands and receiving generic events.

@llegovich
Copy link
Author

sorry, the usage in rules should be something like:

mySwitch.sendCommand("16") // sends the "*1*16*77##" command on the bus

(changed .sendCommand(ON) to .sendCommand("16") in the example. In fact, the sendCommand should be able to send a generic WHAT content).

@Gozilla01
Copy link

Assignee to me

@mvalla mvalla changed the title OWN ENH: Support for generic command frame (WHO=? WHAT=? WHERE=?) add support for generic command frame (WHO=? WHAT=? WHERE=?) Sep 6, 2019
@mvalla mvalla added the newWHO Requires support for new WHO label Sep 8, 2019
@mvalla mvalla added this to the 2.6.0.Mx milestone Oct 6, 2019
@nix1986
Copy link

nix1986 commented Oct 9, 2019

Is possible to have a simple example how to configure properly the "generic device"

im try to get own command to the bus *6*10*4001## to open automatic door but to the bus is no sent anything

i have tryed this code to *.things file:
device cancello "cancello" [who="6" , what="10" , where="4001"]

and this code to *.items file:
Switch cancello "cancello" ["Switchable"] {channel="openwebnet:bus_command:MH202_0003500224b8:cancello:switch"}

the generic device in things list show "Unknown" state and no linked to relative item.

I have found this "v2.5.0.M3.pre12" in Gozilla01 repository but the bus bridge can't connect to the MH200N because is old relase

this version have a bus_command but i think is not same as device

Thanks
Max

@mvalla mvalla modified the milestones: 2.6.0.Mx, 3.x Jun 3, 2020
@admir86
Copy link

admir86 commented Jun 6, 2020

any progress on this? or should this work already?

@francesco-re-1107
Copy link

Hi,
as a workaround you can use this library
Make a python script like this:

from OpenWebNet import OpenWebNet

server = OpenWebNet("192.168.1.35","20000","12345")
server.request("*6*10*4000##")

And use the Exec binding to run the script as you want in openhab.

@mikigp
Copy link

mikigp commented Feb 18, 2023

Hi,

i have a similar problem with my new fresh installation of OH3. No support for the WHO=6. I found your solution @francesco-re-1107 and it's very interesting. The only problem is that i'm not so able with Python.

Can anyone specify all the steps to implement the script in the Exec binding from the beginning (starting from python setup)?

Thank you sooooo much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
newWHO Requires support for new WHO
Projects
None yet
Development

No branches or pull requests

7 participants