VERA Edge controller with FHEM

Begonnen von dgsgp, 22 Mai 2015, 05:14:28

Vorheriges Thema - Nächstes Thema

dgsgp

Hello, i am new to FHEM, i am trying to send commands and read status of zwave devices connected to Vera edge controller zwave network. all posts i see talk about zwave usb sticks connected to FHEM. I hope its possible to issue http / tcpip commands to Vera Edge controller to execute commands and get status of various zwave devices connected to control ... how do i tell FHEM to look at Vera Edge controller to do query and send commands .. can someone help please

rudolfkoenig

Vera is (AFAIK) a Homeautomation software like FHEM, both of them are able to control ZWave devices directly, if a ZWave controller (USB-Stick) is attached to the computer where FHEM/Vera is running.

FHEM is modular, i.e there are separate modules responsible for one specific task, e.g. the ZWave module is responsible to communicate with ZWave devices (through the USB-Stick), the EnOcean module is for EnOcean devices, the HUEDevice module for HUE devices, and so on.
There is also an HTTPMOD module which is capable to poll web servers, analyze their data, and generate FHEM-Events, which can be processed by other modules. The notify module reacts to FHEM-Events, and takes an action.

With notify and HTTPMOD you can use FHEM as a bridge between Vera and devices supported by FHEM but not by Vera. In order to query Vera, you have to set up (define) one or more HTTPMOD instances. If you want to notify Vera if a certain FHEM-Event occured, then you define a notify command, which calls GetHttpFile("http://verahost:port/...").

For more details or exact definitions see the commandref or the fhemwiki.

dgsgp

Thanks Rudolf

I want to issue commands to Vera Bridge via TCPIP and in turn Vera Bridge issue Zwave command to connected devices ..
I am doing the same for my Lightwaverf bridge and devices - i issue a UDP command from FHEM to Lightwaverf bridge and the LWRF bridge in turns issues RF commands to connected devices.

I can do intelligent event corelation inside FHEM with this setup and FHEM can control all devices via thier respective bridges

This should be possible ?

dgsgp


rudolfkoenig

What exactly do you want to know?
As I outlined it before, a Vera to FHEM communication is possible, provided that Vera offers an HTTP interface.

dgsgp

hi Rudolf,

I wanted to ask the following-

  • Can i use inbuilt ZWave classes in fhem to control zWave devices without attaching a zwave dongle to fhem but using zwave controller sitting on same network on tcpip

I understood your point about using HTTPMOD and Notify to interact with Vera using HTTP (yes vera supports https interface) and i will work on building these routines

Second question if you can help  - how can I activate a macro / function (define) running inside fhem using a http call from external systems - just need to know the syntax for this with some examples or if you can point in direction where i can find these.

rudolfkoenig

ZitatCan i use inbuilt ZWave classes in fhem to control zWave devices without attaching a zwave dongle to fhem but using zwave controller sitting on same network on tcpip
Yes. The controller must speak the same protocol as the USB one, and it must be exclusive to FHEM. I dont know of such ZWave controllers, but you can implement one on a remote linux device like RPi with commands like socat. In the ZWdongle FHEM definition specify host:port instead of /dev/ttyXXX. Exclusive means, that Vera is not allowed to communicate with the controller, while FHEM is using it. But this is not what you asked before, and has nothing to do with Vera.

Zitathow can I activate a macro / function
You can implement a macro in FHEM with a notify command, and start it with the trigger command, see http://fhem.de/commandref.html#perl for an example. To start the mentioned trigger via HTTP you can call
http://FHEMHOST:8083/fhem?XHR=1&cmd=trigger%20MyMacro

dgsgp

#7
Thanks Rodolf,

(1) i tried define VERA ZWDongle <1P:3840> ... when i do query on VERA (lets say for nodelist) it return "NO FD Dummy device ? "
Does this mean FHEM is not able to open VERA or getting un recognized response or not able to reach at all ? I am not sure about the port number used here

(2) Thanks for the http call syntax that helps.



rudolfkoenig

Can you tell me how you implemented the 1P:3840 interface?

The ZWDongle module is not able to talk to the Vera software, only to a ZWave controller, and by controller I mean the ZWave-hardware, not Vera. This hardware may be connected by USB or by TCP/IP to FHEM.

Reading data from Vera directly must be done with a different module in FHEM, e.g. HTTPMOD if Vera has an HTTP Interface.

dgsgp

Hi Rodolf,

3840 is listed as port for doing any query to Vera so this surely means it's a Vera software made port.
I have no information about which port on Vera controller can be used for talking directly to zwave hardware ..may be I need to run code on Vera box to translate TCP/IP comms to serial port on Vera box ?