Matrix creator and openhab2

Hello! I could not figure out how to connect the matrix creator to openhab2. Where can I see instructions?

google translator

Hi,

We currently don’t have a specific guide for OpenHAB2 but you can give it a try and post your progress and issues here in the community. This Raspberry Pi guide should help you to get started.

Let us know how to help.

I installed openhab2 and installed matrix core. I installed the Java library. The LEDs lit up. It is not clear what to do next on what protocol to connect a matrix with openhab2. Or do I need to create a separate build?

Google translator

I did this briefly a while back, but I didn’t keep the project going. Most of the work is going to be in openhab, and you’re going to have to write the rules etc yourself. As far as I know, there is no existing binding or similar for the matrix - you could look into writing your own (somewhat complicated), or do something like create a command server to interact with the matrix, and use existing openhab solutions to interact with it.

Either way, it’s not going to be simple.

I want to put a usb stick z-wave and connect via z-wave Protocol with matrix creator
openhab doc z-wave
Google translator

how to get data only about temperature? As I understood it is necessary to correct the code

    def humidity_data_callback(data):
        # Extract data
        data = sense_pb2.Humidity().FromString(data[0])
        # Log data 
        print('{0}'.format(data))

I can not understand what exactly it is necessary to write. Could you tell?

I want to send data on MQTT

Hi @NooBAsTiK,

To get temperature only you can use the object returned by the FromString method call. See more details about the protocol buffer message sense.proto.

You should be able to get temperature value as follow:

...
def humidity_data_callback(data):
  # Extract data
  message = sense_pb2.Humidity().FromString(data[0])
  # Log data 
  print('{0}'.format(data))
  print("Humidity: ", message.humidity )
  print("Temperature: ", message.temperature )
...

I did so, but nothing happened.Gives an error message

File "humidity.py", line 44, in humidity_data_callback
    data = sense_pb2.Humidity().FromString(data[2])
IndexError: list index out of range

as soon as I put zero, it works.

Connected to error publisher with port 20019
Connected to data publisher with port 20020
humidity: 29.21299934387207
temperature: 30.0
temperature_raw: 33.14400100708008
temperature_is_calibrated: true

You are right, I just updated it. Please check again.

Not work.

Connected to error publisher with port 20019
Connected to data publisher with port 20020
ERROR:tornado.general:Uncaught exception, closing connection.

File “humidity.py”, line 47, in humidity_data_callback
print("Humidity: ", message.humidity )
NameError: name ‘message’ is not defined

Can you share more of your code ?

I just tested this and it worked:


def humidity_data_callback(data):
    """Capture any data and print them to stdout"""
    message = sense_pb2.Humidity().FromString(data[0])
    print('Humidity:', message.humidity)
    print('Temperature:', message.temperature)

Note:

  • Check the line
    message = sense_pb2.Humidity().FromString(data[0])
    note that I change the name of the variable used from data to message.

changed the date on the message and it worked, thank you!

Glad to hear that. Let us know if you have more questions.

-Yoel