maxwellhadley / node-red-contrib-rfxcom

node-RED nodes to access an RFXtrx433 transceiver
BSD 2-Clause "Simplified" License
22 stars 13 forks source link

Support for Somfy #9

Closed Averelll closed 6 years ago

Averelll commented 8 years ago

Would it be possible to add support for Somfy shutters? I have it working in node.js, not that complex. Not sure if many others are interested.

maxwellhadley commented 8 years ago

This is possible, but requires changes to the node-rfxcom package which underpins node-red-contrib-rfxcom. There is a long-standing PR to that effect, but it went quiet a while back, before I became a committer for that package. The PR is lacking unit tests, and there have been substantial changes since, including changes to the actual RFXtrx433E data format, that will affect it. I don't have any Somfy blinds here, and my RFX is the non-E version, so I may not even be able to test it. I've contacted @gizimoto (who raised the original PR) to see if he can update it. If/when Somfy is working in node-rfxcom I have some ideas for a basic blinds/curtains/shutters/doors (and other things that open & close) node which might suit.

Averelll commented 7 years ago

I took @gizimoto's update node-rfxcom modules, tested it in node.js, it looks similar to what I did on an older version, but he now applied his stuff to the latest version. Then I created a very dirty hack to get it to work, made a somfy-out node, left out all the checks, but it works. I can control my blinds via node-red now. see averelll/node-red-contrib-rfxcom. I will update once I build in all the nice checks, and I should find a more elegant way to handle the rfy var. First I want to fix the serialport issues I encounter with node-rfxcom though...

maxwellhadley commented 7 years ago

Any progress on this?

smar000 commented 7 years ago

Hi @Averelll. Did you manage to get anywhere with this?

Thanks.

Averelll commented 7 years ago

I have it working, never made it elegant though. I fixed the serialport issues by updating the node-rfxcom code to use the latest version of serialport. This is actually due to using node.js 6. Somfy works perfectly fine, but i didnt find time to fix the code. You can use my fork, it will work.

smar000 commented 7 years ago

Thanks, I'll give that a try.

coyotte14 commented 7 years ago

Hello Averelll, thanks for sharing your rfx-somfy-out module, and sorry for my bad english. I can manage my RTS Somfy shutter with RFXmngr, but don't understant how to configure the rfx-somfy-out module, my ID is 05 05 02 and unit code is 1 I send a msg.payload=UP, and I try lot of solution for msg.topic : 05050201 , rfy/05050201 rfy/05,05,02,01 , rfy/rfy/05,05,02,01 ...... But nothing OK. what is the good syntax ? Thanks.

Manewu commented 7 years ago

@coyotte14. Tested the fork from Averell, it's working for me. In the Inject node: Payload: Type String - "up" or "down" or "stop" (it seems to be case-sensitive, maybe this was your problem), as Topic in your case: 05050201.

coyotte14 commented 7 years ago

@Manewu . Thanks, I have it working. I wanted to change the topic, but it was the payload string that was wrong !! Thanks for your help.

maxwellhadley commented 7 years ago

I'm currently working on merging a PR into node-rfxcom to add blinds1 handling. When that's done I'll look at @Averelll's fork, and the serialport issues with node 6.9.2, and then have a go at the blinds in/out nodes for node-red. Life has been a bit full recently, so it may take a while. Any comments, suggestions, or even help welcome!

maxwellhadley commented 7 years ago

Package node-rfxcom now supports blinds1 devices! I've located someone with Somfy blinds I can use for testing and ordered a new RFXtrx433E so I can work on it. This may take a while as I'm still madly busy, but I should be able to put a new version together before too long, then updating node-red-contrib-rfxcom is pretty simple. Sorry for the delay!

coyotte14 commented 7 years ago

Hello maxwellhadley, Thank you very much for sharing your work. I use somfy blind Averelll module for several weeks, it works perfectly. An integration with Package node-rfxcom would be perfect! Thanks

maexle74 commented 7 years ago

Hello maxwellhadley, I look foward for your new version for the Somfy shutters with RFXtrx433E. Thank you for all of your work on this!!

maxwellhadley commented 7 years ago

@Averelll @coyotte14 @Manewu @smar000 I'm working on merging @gizmoto's code into a new branch of the node-rfxcom package that underlies this node - https://github.com/rfxcom/node-rfxcom/pull/38. Please check out the discussion and feel free to join in. With luck, we should be able to bring Somfy (and blinds1) support into the main node-red-contrib-rfxcom package soon!

coyotte14 commented 7 years ago

Hello maxwellhadley, great, thanks for your hard work !!

maxwellhadley commented 7 years ago

Somfy/RFY is now supported fully by the node-rfxcom package. Sorry this is all taking so long!

ramon-roca commented 7 years ago

Newbie at node-red, by now with just a basic knowledge with emoncms, just starting. Sorry if asking something trivial.

just saw that now supports somfy/rfxcom (thanks!), and since I've somfy remotes & blinds, I want to give a try to this.

I've installed sunpos & blindcontroller, and able to determine if the sun is going through the window or not. but from there, how I have to send the commands to the rfxcom? there is a prebuilt node I've to install (contrib-rfxcom has a few, for sensors, lights, but no RFY/Somfy devices), maybe serial port? another?

A working example will be very much appreciated.

Thanks!

maxwellhadley commented 7 years ago

Sorry to disappoint you, but my last comment was to say that Somfy is now supported by the underlying node-rfxcom package: I still have to add support for it in the node-RED nodes. This is actually quite tricky because of the convoluted way in which blinds work - some have 'open' and 'close', and some have 'up' and 'down', and it isn't always obvious which corresponds to which! I may possibly have some time to look at this over the holiday, but I can't guarantee it.

ramon-roca commented 7 years ago

You're not disappointing. What I am is garetful to you for seeing this work progressing. You're right, for example in my case I've to send a distinct command for open, at the RFXmgr for one blind has to be send "Up", and with another, "Up (transmit > 2 seconds)"... no idea why.

Why about a generic node able to send all commands to a given remote, but the user choice depending on his needs / flows? IMHO a node able to send whatever user choice command would be a nice start and flexible for any need ;)

Thanks!

ghost commented 6 years ago

Do you have any plans to integrate RFY support ? I would be happy with a generic node like ramon-roca wrote. Thanks.

maxwellhadley commented 6 years ago

Sorry it's taken so long (this has been a very difficult year for me personally), but I have finally got round to adding Somfy support, plus all the other blinds & curtains types, in version 2.2.0.

ocverclock commented 5 years ago

hi, how to send the order with the node rfx-blind to somfy. in the RFXmngr, it's okay for the control, but in node-red i don't stand how send the order. in node Inject , payload string up and in topic 04050401 (in the RFXmngr it's Id 4 05 04 and unit 1). Please can you say me.

maxwellhadley commented 5 years ago

See #71 for the solution to @ocverclock's issue