Interest in a homeduino binding

Hello,

At this moment I have both pimatic and openHAB running. However I like openHAB and want to switch completely.

With Pimatic I’m using RF 433,92 Mhz devices (Klik-aan-klik-uit) with an Arduino running homeduino (https://github.com/pimatic/homeduino), this is a cheap alternative for the RFXCOM. See an example hardware setup on: https://github.com/pimatic/pimatic-homeduino

I like the solution and it works well. Since I’m a professional Java developer I’m planning on building a homeduino binding for Openhab. It runs over a Serial connection with a simple textual protocol so the implementation should not be too tough.

Are more people interested in such a binding?

Besides that I run Openhab 1.9 now, but should I develop the plug-in for 1.9 or for 2.0?

For the configuration I would expect a configuration where you can specifiy

  • device
  • baudrate
  • receiverPin
  • transmitterPin
    ? number of repeats

And for the items I plan to be compatible with the RFXCOM implementation if other people have positive experience with, if not I will try to make up something myself.

3 Likes

Another option might be to use the Serial binding but I don’t yet see how I can use it to communicate with this device.

I have some idea how to use the Serial binding to send signals with it, but I have no idea how to send the request to receive signals from a certain pin on connection. If someone has ideas about that that is of course welcome.

][quote=“martinvw, post:1, topic:8017”]
Besides that I run Openhab 1.9 now, but should I develop the plug-in for 1.9 or for 2.0?
[/quote]

Any new binding should be written for OH 2. OH 1.x is end of life.

If it is so similar to the RFXCOM in so many ways, does it make sense to add homeduino to the RFXCOM binding rather than creating a new binding?

I wouldn’t say it’s as simple as that. There may be good reasons to develop a 1.x binding, such as wanting to have it run on the 1.x runtime, the only current non-beta openHAB. Other reasons might indicate the opposite choice.

.[quote=“rlkoshak, post:3, topic:8017”]
Any new binding should be written for OH 2. OH 1.x is end of life
[/quote]
One other reason I was not aiming for OH2 is because I could not find the Serial binding there, is it maybe in move into the Eclipse SmartHome instead of OH2

I just checked the source code of the RFXCOM binding, it already contains two different internal connectors, so it sounds like a good idea to add a third one, thanks!

yes, it would be really great to get a pimatic openhab binding.

That is not what I’m aiming for, I was aiming for porting one specific functionality. I don’t want to have both servers running :slight_smile:

True. Perhaps I’m too terse when replying on my phone. But my understanding from comments made by Kai is that OH 2 is far preferable target to OH 1 in all but extreme circumstances. Perhaps I’m reading too much into those comments.

All OH 1 bindings theoretically work in OH 2. If a binding is not yet listed as being supported by OH 2 all that means is it hasn’t been tested yet to confirm that it works.

I would love to see such support! I’m currently in the process of implementing homeduino as a receiver for my shutter remote controls, so that i can have real time status updates for my shutters.

Just found this discussion. I’m in a similar situation like you.
I have a lot of the cheap 433mhz devices I like to keep but also prefer the openhab UI and engine.

I would love if somebody will create a binding for the (awesome!) homeduino.

Also I can support with testing - but only starting from June :frowning: Gap year, you know :smiley:

Today I processed my first incomming message :raised_hands:

It gave some trouble (with RTS & DTR) but seems to work okay now.

However its seems short button presses on my remote are not registered by the homeduino, while my CoCo plug’s have no problems with short button pushes. This makes me doubt whether the investment of time is usefull :slight_smile:

Would you be willing to post the code for the plugin before you drop it?

I was not planning to drop it (yet) :slight_smile:

I’m resuming already :wink:

I’ll read some more about how commit messages should be stated and then I can at least push the code to my github. What makes the job extra hard is that I’m trying to integrate in the RFXCom binding and trying to be compatible.

Huh … I see how that can be extra difficult … But thumbs up never the less …

I’m now at the point where I can switch a virtual switch with my remote via the homeduino and vice versa. My current code still needs some cleaning, but I am getting closer.

I now support more or less two devices my KlikAanKlikUit (CoCo) remote and my doorbell (older CoCo protocol).

So I have two questions now.

  1. As what would I add my doorbell normally in openHAB2 (via the RFXCom binding), its not smart its just wireless.Would it be a contact?

  2. Can you (the other people using homeduino) supply with some information for what kind of devices you would need this binding so I can focus on supporting that, because homeduino supports a big set of protocols but mapping them all might be tough job.

Please supply me with the configuration used in pimatic and if possible the real string which is registered by homeduino. An example of such a string would be:

Foy my doorbell:
RF receive 352 1052 10864 0 0 0 0 0 01100101010101010110011001100101011001100110011002

Which was configured in pimatic as

“pir1”,“options”: {
“id”: 4,
“unit”: 14
}

Or for my CoCo remote:
RF receive 284 2800 1352 10760 0 0 0 0 010002020000020002000200020200020000020200000200020200000200020002020002000200020002000200020002000200000202000002000200020002000203

“name”: “switch1”,
“options”: {
“id”: 17638398,
“unit”: 0
},

The configuration is the most import and will most likely give enough information but the raw string will definitely improve the chances that it will work. You can extract the string from the pimatic logging if you run it in debug mode.

Thanks for your help!

Awesome work martin!
I’d love to see Shutter3 protocol implementation.
Here are my captures and decodes from pimatic debug:

Remotes
#1
shutter3:  { id: 384309098, channel: 1, command: 'stop' }

    16:40:32debug [pimatic-homeduino]: shutter3:  { id: 384309098, channel: 1, command: 'stop' }
    16:40:32debug [pimatic-homeduino]: awning2:  { id: 1537236392, command: 'stop' }
    16:40:32debug [pimatic-homeduino]: received: [ 368, 728, 1696, 5284, 10456 ] 3210011010011010100110010101010101100110101001101001100110010101100110011001100114
    16:40:32debug [pimatic-homeduino]: data: "RF receive 5284 1696 728 368 10456 0 0 0 0123322323322323233223323232323232233223232332232332233223323232233223322332233224"

#2
shutter3:  { id: 65542026, channel: 1, command: 'stop' }

    16:41:05debug [pimatic-homeduino]: shutter3:  { id: 65542026, channel: 1, command: 'down' }
    16:41:05debug [pimatic-homeduino]: received: [ 364, 732, 1712, 5096, 10956 ] 3201010110101010100110010101010101100110101010010101100110010101100101101010100104
    16:41:05debug [pimatic-homeduino]: data: "RF receive 5096 1712 364 732 10956 0 0 0 0123232332323232322332232323232323322332323232232323322332232323322323323232322324"
    16:41:02debug [pimatic-homeduino]: shutter3:  { id: 65542026, channel: 1, command: 'up' }
    16:41:02debug [pimatic-homeduino]: received: [ 364, 732, 1708, 5100, 10896 ] 3201010110101010100110010101010101100110101010010101100110010101100101011010101004
    16:41:02debug [pimatic-homeduino]: data: "RF receive 5100 1708 364 732 10896 0 0 0 0123232332323232322332232323232323322332323232232323322332232323322323233232323224"
    16:41:02debug [pimatic-homeduino]: shutter3:  { id: 65542026, channel: 1, command: 'up' }
    16:41:02debug [pimatic-homeduino]: awning2:  { id: 262168104, command: 'in' }
    16:41:02debug [pimatic-homeduino]: received: [ 320, 464, 740, 1716, 5268, 10448 ] 4302020220202020210220020202020202210221212121020202210221020202210202022002020225
    16:41:02debug [pimatic-homeduino]: data: "RF receive 5268 1716 320 740 464 10448 0 0 0123232332323232342332232323232323342334343434232323342334232323342323233223232335"

#3
shutter3:  { id: 535300684, channel: 0, command: 'stop' }

    16:42:08debug [pimatic-homeduino]: shutter3:  { id: 535300684, channel: 0, command: 'stop' }
    16:42:08debug [pimatic-homeduino]: awning2:  { id: 2141202736, command: 'stop' }
    16:42:08debug [pimatic-homeduino]: received: [ 356, 736, 1704, 5280, 10824 ] 3210101010101010100110010101010101011001100101100101101001010101010110011001100114
    16:42:08debug [pimatic-homeduino]: data: "RF receive 5280 1704 736 356 10824 0 0 0 0123232323232323233223323232323232322332233232233232232332323232323223322332233224"
    16:41:39debug [pimatic-homeduino]: shutter3:  { id: 535300684, channel: 0, command: 'stop' }
    16:41:39debug [pimatic-homeduino]: awning2:  { id: 2141202736, command: 'stop' }
    16:41:39debug [pimatic-homeduino]: received: [ 356, 736, 1552, 5288, 10976 ] 3210101010101010100110010101010101011001100101100101101001010101010110011001100114
    16:41:39debug [pimatic-homeduino]: data: "RF receive 5288 1552 736 356 10976 0 0 0 0123232323232323233223323232323232322332233232233232232332323232323223322332233224"


#4
shutter3:  { id: 4724618, channel: 1, command: 'stop' }
    16:44:29debug [pimatic-homeduino]: shutter4:  { id: 4724618, channel: '0', all: true, command: 'stop' }
    16:44:29debug [pimatic-homeduino]: shutter3:  { id: 4724618, channel: 1, command: 'stop' }
    16:44:29debug [pimatic-homeduino]: awning2:  { id: 18898472, command: 'stop' }
    16:44:29debug [pimatic-homeduino]: received: [ 356, 736, 1712, 5272, 10452 ] 3201010101010110010110010101010101100110101010010101100110010101100110011001100114
    16:44:29debug [pimatic-homeduino]: data: "RF receive 5272 1712 356 736 10452 0 0 0 0123232323232332232332232323232323322332323232232323322332232323322332233223322334"
    16:44:20debug [pimatic-homeduino]: shutter4:  { id: 4724618, channel: '0', all: true, command: 'stop' }
    16:44:20debug [pimatic-homeduino]: shutter3:  { id: 4724618, channel: 1, command: 'stop' }
    16:44:20debug [pimatic-homeduino]: awning2:  { id: 18898472, command: 'stop' }
    16:44:20debug [pimatic-homeduino]: received: [ 360, 736, 1692, 5292, 10452 ] 3201010101010110010110010101010101100110101010010101100110010101100110011001100114
    16:44:20debug [pimatic-homeduino]: data: "RF receive 5292 1692 360 736 10452 0 0 0 0123232323232332232332232323232323322332323232232323322332232323322332233223322334"

#5
shutter3:  { id: 90704460, channel: 0, command: 'down' }

    16:35:06debug [pimatic-homeduino]: shutter3:  { id: 90704460, channel: 0, command: 'down' }
    16:35:06debug [pimatic-homeduino]: received: [ 276, 460, 752, 1768, 5204, 11196 ] 4302022102210221210221020202020202022102210202210202212102020202020202212121210205
    16:35:06debug [pimatic-homeduino]: data: "RF receive 5204 1768 276 752 460 11196 0 0 0123233423342334342334232323232323233423342323342323343423232323232323343434342325"
    16:35:06debug [pimatic-homeduino]: shutter3:  { id: 90704460, channel: 0, command: 'down' }
    16:35:06debug [pimatic-homeduino]: awning2:  { id: 362817840, command: 'out' }
    16:35:06debug [pimatic-homeduino]: received: [ 348, 744, 1708, 5268, 10836 ] 3201011001100110100110010101010101011001100101100101101001010101010101101001011014
    16:35:06debug [pimatic-homeduino]: data: "RF receive 5268 1708 348 744 10836 0 0 0 0123233223322332322332232323232323233223322323322323323223232323232323323223233234"
    16:34:59debug [pimatic-homeduino]: shutter3:  { id: 90704460, channel: 0, command: 'stop' }
    16:34:59debug [pimatic-homeduino]: awning2:  { id: 362817840, command: 'stop' }
    16:34:59debug [pimatic-homeduino]: received: [ 336, 448, 748, 1572, 5264, 11000 ] 4302022002200220210220020202020202022002200202200202202002020202020220022102210225
    16:34:59debug [pimatic-homeduino]: data: "RF receive 5264 1572 336 748 448 11000 0 0 0123233223322332342332232323232323233223322323322323323223232323232332233423342335"

#6
shutter3:  { id: 373819980, channel: 0, command: 'stop' }

    16:35:39debug [pimatic-homeduino]: shutter3:  { id: 373819980, channel: 0, command: 'stop' }
    16:35:39debug [pimatic-homeduino]: awning2:  { id: 1495279920, command: 'stop' }
    16:35:39debug [pimatic-homeduino]: received: [ 348, 744, 1724, 5272, 10824 ] 3210011010010110010110010101010101011001100101100101101001010101010110011001100114
    16:35:39debug [pimatic-homeduino]: data: "RF receive 5272 1724 744 348 10824 0 0 0 0123322323323223323223323232323232322332233232233232232332323232323223322332233224"
    16:40:43debug [pimatic-homeduino]: shutter3:  { id: 373819980, channel: 0, command: 'stop' }
    16:40:43debug [pimatic-homeduino]: awning2:  { id: 1495279920, command: 'stop' }
    16:40:43debug [pimatic-homeduino]: received: [ 348, 744, 1564, 5272, 10824 ] 3210011010010110010110010101010101011001100101100101101001010101010110011001100114
    16:40:43debug [pimatic-homeduino]: data: "RF receive 5272 1564 744 348 10824 0 0 0 0123322323323223323223323232323232322332233232233232232332323232323223322332233224"

#7
shutter3:  { id: 285739596, channel: 0, command: 'stop' }

    16:35:53debug [pimatic-homeduino]: shutter3:  { id: 285739596, channel: 0, command: 'stop' }
    16:35:53debug [pimatic-homeduino]: awning2:  { id: 1142958384, command: 'stop' }
    16:35:53debug [pimatic-homeduino]: received: [ 348, 744, 1704, 5124, 10972 ] 3210010101100101010110010101010101011001100101100101101001010101010110011001100114
    16:35:53debug [pimatic-homeduino]: data: "RF receive 5124 1704 744 348 10972 0 0 0 0123323232233232323223323232323232322332233232233232232332323232323223322332233224"
    16:39:14debug [pimatic-homeduino]: shutter3:  { id: 285739596, channel: 0, command: 'stop' }
    16:39:14debug [pimatic-homeduino]: awning2:  { id: 1142958384, command: 'stop' }
    16:39:14debug [pimatic-homeduino]: received: [ 348, 744, 1704, 5272, 10988 ] 3210010101100101010110010101010101011001100101100101101001010101010110011001100114
    16:39:14debug [pimatic-homeduino]: data: "RF receive 5272 1704 744 348 10988 0 0 0 0123323232233232323223323232323232322332233232233232232332323232323223322332233224"

Please let me know if you require more …

The information is exactly what I require, although your situation requires some big code changes. The matching has to become more fuzzy, I have been working on it and the outline is already in place.
But I went on vacation and had some other distractions, so it’s time to continue, I hope to start again this Wednesday. I’ll keep you updated.

@martinvw have you made any progress?

I just merged 106 incomming commits and I pushed the current state to my github https://github.com/martinvw/openhab2-addons/tree/feature/849-support-for-homeduino

However my unit test is not even working now. I’m in the middle in converting from one possible recognized messages to multiple. I.e. if we receive a signal A which could also have been a signal B. Then we just dump both of them on the event bus.

In the meantime I bought an RFXCom module, the benefit is that I can get some experience and compare the result and even test some regression.

@TRIROG I think about really continuing the project, but I want to validate some things

  1. Are you using or planning to use OpenHAB 2, because current binding will only work on OH2.
  2. I am having serious stability issues with my homeduino, does it stay connected for a weeks at a time at your place?