Interest in a homeduino binding

Switch2 seems to partially work.
I tested another remote in hope that it is supported by binding. It is ELRO remote for remote outlets. These are the results:

Pressing D OFF Button

2017-02-20 21:39:33.743 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 316 972 10016 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:39:33.750 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch2:32466789:3_2' to inbox.
2017-02-20 21:39:33.756 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch4:32466789:2_3' to inbox.
2017-02-20 21:39:33.761 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:pir1:32466789:2_3' to inbox.
2017-02-20 21:39:33.767 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:pir2:32466789:15_21' to inbox.

Pressing B OFF button

2017-02-20 21:46:12.370 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 320 968 10012 0 0 0 0 0 01100110011001010101011001010110011001100110010102
2017-02-20 21:46:12.376 [DEBUG] [g.homeduino.handler.HomeduinoHandler] - Received message from bridge: homeduino:homeduino:32466789 message: org.openhab.binding.homeduino.internal.messages.homeduino.Switch2Message@135e09
2017-02-20 21:46:12.390 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch4:32466789:8_3' to inbox.
2017-02-20 21:46:12.396 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:pir1:32466789:8_3' to inbox.
2017-02-20 21:46:12.402 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:pir2:32466789:15_21' to inbox.

Notice no [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch2:32466789:3_8' to inbox.
Pressing B OFF button Again

2017-02-20 21:39:39.418 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 316 972 10024 0 0 0 0 0 01100110011001010101011001010110011001100110010102
2017-02-20 21:39:39.423 [DEBUG] [g.homeduino.handler.HomeduinoHandler] - Received message from bridge: homeduino:homeduino:32466789 message: org.openhab.binding.homeduino.internal.messages.homeduino.Switch2Message@dae1a4

Pressing B OFF button Again

2017-02-20 21:39:39.583 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 324 964 10036 0 0 0 0 0 01100110011001010101011001100110011001101010101002
2017-02-20 21:39:39.586 [ERROR] [ernal.messages.HomeduinoEventMessage] - Error occurred
org.openhab.binding.homeduino.internal.exceptions.InvalidInputForProtocol: Unsupported token: '1010' for protocol Protocol
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.map(HomeduinoProtocol.java:43)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.Switch2Message$Protocol.process(Switch2Message.java:79)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.process(HomeduinoProtocol.java:224)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.HomeduinoEventMessage.getInterpretations(HomeduinoEventMessage.java:75)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.handler.HomeduinoBridgeHandler$HomeduinoMessageListener.packetReceived(HomeduinoBridgeHandler.java:233)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoSerialConnector.sendMsgToListeners(HomeduinoSerialConnector.java:160)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoStreamReader.run(HomeduinoStreamReader.java:91)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
2017-02-20 21:39:39.589 [ERROR] [ernal.messages.HomeduinoEventMessage] - Error occurred
org.openhab.binding.homeduino.internal.exceptions.InvalidInputForProtocol: Unsupported token: '1010' for protocol Protocol
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.map(HomeduinoProtocol.java:43)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoCoCo1.process(HomeduinoCoCo1.java:40)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.process(HomeduinoProtocol.java:224)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.HomeduinoEventMessage.getInterpretations(HomeduinoEventMessage.java:75)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.handler.HomeduinoBridgeHandler$HomeduinoMessageListener.packetReceived(HomeduinoBridgeHandler.java:233)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoSerialConnector.sendMsgToListeners(HomeduinoSerialConnector.java:160)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoStreamReader.run(HomeduinoStreamReader.java:91)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
2017-02-20 21:39:39.594 [ERROR] [ernal.messages.HomeduinoEventMessage] - Error occurred
org.openhab.binding.homeduino.internal.exceptions.InvalidInputForProtocol: Unsupported token: '1010' for protocol Protocol
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.map(HomeduinoProtocol.java:43)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoCoCo1.process(HomeduinoCoCo1.java:40)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.process(HomeduinoProtocol.java:224)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.HomeduinoEventMessage.getInterpretations(HomeduinoEventMessage.java:75)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.handler.HomeduinoBridgeHandler$HomeduinoMessageListener.packetReceived(HomeduinoBridgeHandler.java:233)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoSerialConnector.sendMsgToListeners(HomeduinoSerialConnector.java:160)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoStreamReader.run(HomeduinoStreamReader.java:91)[240:org.openhab.binding.homeduino:2.1.0.201702152258]

Other buttons are detected normally in switch2 protocol

2017-02-20 21:41:57.665 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 320 968 10016 0 0 0 0 0 01100110011001010101010101100110011001100110010102
2017-02-20 21:41:57.672 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch2:32466789:3_16' to inbox.
2017-02-20 21:41:57.680 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch4:32466789:16_3' to inbox.
2017-02-20 21:41:57.689 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:pir1:32466789:16_3' to inbox.

2017-02-20 21:47:11.360 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 320 968 10012 0 0 0 0 0 01100110011001010101011001100101011001100110010102
2017-02-20 21:47:11.367 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch2:32466789:3_4' to inbox.
2017-02-20 21:47:11.374 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch4:32466789:4_3' to inbox.
2017-02-20 21:47:11.381 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:pir1:32466789:4_3' to inbox.

2017-02-20 21:47:37.270 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 316 972 10016 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:47:37.277 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch2:32466789:3_2' to inbox.
2017-02-20 21:47:37.286 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:switch4:32466789:2_3' to inbox.
2017-02-20 21:47:37.293 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'homeduino:pir1:32466789:2_3' to inbox.

However they do produce the same error occasionally:

2017-02-20 21:49:41.602 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 316 972 10020 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:49:41.766 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 312 976 10032 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:49:41.933 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 312 980 10036 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:49:42.098 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 312 976 10036 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:49:42.261 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 308 980 10032 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:49:43.621 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 316 972 10024 0 0 0 0 0 01100110011001010101011001100110010101100110010102
2017-02-20 21:49:44.332 [DEBUG] [duino.handler.HomeduinoBridgeHandler] - Message received (HOMEDUINO_RF_EVENT): RF receive 324 964 10044 0 0 0 0 0 01100110011001010101011001100110011001101010101002
2017-02-20 21:49:44.334 [ERROR] [ernal.messages.HomeduinoEventMessage] - Error occurred
org.openhab.binding.homeduino.internal.exceptions.InvalidInputForProtocol: Unsupported token: '1010' for protocol Protocol
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.map(HomeduinoProtocol.java:43)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.Switch2Message$Protocol.process(Switch2Message.java:79)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.process(HomeduinoProtocol.java:224)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.HomeduinoEventMessage.getInterpretations(HomeduinoEventMessage.java:75)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.handler.HomeduinoBridgeHandler$HomeduinoMessageListener.packetReceived(HomeduinoBridgeHandler.java:233)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoSerialConnector.sendMsgToListeners(HomeduinoSerialConnector.java:160)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoStreamReader.run(HomeduinoStreamReader.java:91)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
2017-02-20 21:49:44.336 [ERROR] [ernal.messages.HomeduinoEventMessage] - Error occurred
org.openhab.binding.homeduino.internal.exceptions.InvalidInputForProtocol: Unsupported token: '1010' for protocol Protocol
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.map(HomeduinoProtocol.java:43)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoCoCo1.process(HomeduinoCoCo1.java:40)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.process(HomeduinoProtocol.java:224)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.HomeduinoEventMessage.getInterpretations(HomeduinoEventMessage.java:75)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.handler.HomeduinoBridgeHandler$HomeduinoMessageListener.packetReceived(HomeduinoBridgeHandler.java:233)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoSerialConnector.sendMsgToListeners(HomeduinoSerialConnector.java:160)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoStreamReader.run(HomeduinoStreamReader.java:91)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
2017-02-20 21:49:44.339 [ERROR] [ernal.messages.HomeduinoEventMessage] - Error occurred
org.openhab.binding.homeduino.internal.exceptions.InvalidInputForProtocol: Unsupported token: '1010' for protocol Protocol
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.map(HomeduinoProtocol.java:43)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoCoCo1.process(HomeduinoCoCo1.java:40)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.homeduino.HomeduinoProtocol.process(HomeduinoProtocol.java:224)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.messages.HomeduinoEventMessage.getInterpretations(HomeduinoEventMessage.java:75)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.handler.HomeduinoBridgeHandler$HomeduinoMessageListener.packetReceived(HomeduinoBridgeHandler.java:233)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoSerialConnector.sendMsgToListeners(HomeduinoSerialConnector.java:160)[240:org.openhab.binding.homeduino:2.1.0.201702152258]
        at org.openhab.binding.homeduino.internal.connector.HomeduinoStreamReader.run(HomeduinoStreamReader.java:91)[240:org.openhab.binding.homeduino:2.1.0.201702152258]

This also got me thinking:
Is there a way to manually create/add things?
Should be possible by adding a new thing in the <file>.things in things subfolder in configuration folder.
Iā€™ve tried but failed as i have no clue what the configuration parameters are.

You should be able to create items manually via the paperui, however I am not sure if you can create items manually in a things file if you configured the bridge (refers to the receiver) via the paperui, because the examples I saw used some nesting the things inside the bridge configuration.

Regarding the protocol it seems to be some information that is incorrectly received / processed by the homeduino, do you run a recent version or might it be a problem in the firmware. Does it switch correctly the rest of the time?

Iā€™m talking only about things here - not items:
eg. binding wonā€™t detect thing homeduino:switch2:32466789:3_8ā€™ adn add it to inbox, so iā€™d like to manually create it:
If
button A = 'homeduino:switch2:32466789:3_16ā€™
button C = 'homeduino:switch2:32466789:3_4ā€™
button D = 'homeduino:switch2:32466789:3_2ā€™
then iā€™m kinda assuming that button B = ā€˜homeduino:switch2:32466789:3_8ā€™ and would like to create a thing manually so i can connect an item to it.

Note that this should be considered more of a ā€œrethoricalā€ approach, as iā€™ve confirmed that my outlets work normally with both switch4 and switch2 protocol and with switch4 i can detect all buttons.

However there is another positive side to this approach, as it would allow advanced users to create and configure multiple things via files and thus ease their lives ( e.g.i have to detect and add almost 24 things for shutters only, meaning pressing quite a lot of buttons, just to be able to get things in inbox to add them and only then can i link items to things (via .items file))

Regarding the protocol:
it might be that the homeduino it a bit dated (not sure/will check)ā€¦ however i get this error when receiving not sending.

If you click on add device, then select the binding and then choose: ā€˜Thing not listed? ADD MANUALLYā€™ doesnā€™t it work as you would expect?

Ohh ā€¦ havenā€™t seen that option or known it existed ā€¦ i never thought iā€™d say that but i guess PaperUI is too graphical for me :wink:

BTW i get the Switch2 protocol listed twice?

Thanks Iā€™ll look into that

Switch2 is already supported, it would be great if you could already have some first tests with it.

@Partone I will work on the others, do they have any order of priority? And could you supply some testdata, so I can add proper tests.

The second one is the really special switch2-weather1 protocol :blush:

Hey martin,

thanks for your reply. I will test switch2 as soon as I can!

Thereā€™s no priority. Be free :slight_smile: I try to give you some debug output from the devices. But I currently have no raspberry running pimatic.Iā€™m waiting for a delivery.

Anyway: Iā€™m using an arduiono (UNO) over USB with my receiver and sender. Do I have to configure any special to get it work with openhab?

Ok. Looked at your installation guide. It already detected two of my RF weather stations (WEATHER1) :slight_smile: Works like a charm. Will try to give you debug output if Iā€™m home. Thumbs up!

After a while it seems the binding is exiting its task. (Switch on/off a switch multiple times)
Then its not possible to send and receive anymore. Things are shown as offline.

2017-02-21 17:52:24.076 [WARN ] [ome.core.thing.internal.ThingManager] - Handler for thing homeduino:switch2:6978b493 takes more than 5000ms for processing event

A restart of openhab2 fixes it

OFFTOPIC: The ā€œUPā€ Button of my shutter screen remote (switch14 in pimatic) gets detected as ā€œPIR2ā€ in my inbox. But its not possible to add it as thing.

2017-02-21 18:02:57.977 [WARN ] [g.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type homeduino:pir2.

I assume it occurred during sending signals via openHAB, itā€™s caused by the performance of the/your transmitter. It cannot keep it with the speed on which fire requests at it. You should be able to improve it by decreasing the number of repeats. I hope that it will recover after a minute so should not have to restart openHAB completely.

What version do you have installed? I was broken in the past but has been tested successfully by others as well.

I just added a new version with additional support for switch3 and contact4, the total support is now the following:

  • contact4
  • switch3
  • pir1
  • pir2
  • switch1
  • switch2
  • switch4
  • weather1

Download: 2.1.0.201702211848

Notes at: https://hackmd.io/s/BkVLvEeFe

Youā€™re great! Will check the installed version and install the latest.
Why isnā€™t this binding in the official repo?

Thanks in advance!

Because its still work in progress and I want to make sure that the the maintainers of the homeduino / rfcontroljs donā€™t have any problems with us porting the reverse engineered protocols to another platform; before putting it in to the official repo

Thumbs up! Just updated to your latest release. It discovered my door contact (CONTAC4) instantly. Works great!

Thanks for your work! Is it possible to enable debug / raw output when receiving rf? This way I would be able to give you some data for switch14 if needed.

See:

Would it be possible to implement rolling1protocol - https://github.com/pimatic/pimatic/issues/386?
Sending only, but that should be enough.