Coder Social home page Coder Social logo

Comments (11)

Nickduino avatar Nickduino commented on August 25, 2024

Don't forget the 433.42 MHz SAW oscillator.

Tilt commands? Aren't you using up/down buttons for that? If not, it's certainly possible (and quite easy) to add this support but you'll need to know the command code. The only list I found is the following:

0x1 | My | Stop or move to favourite position
0x2 | Up | Move up
0x3 | My + Up | Set upper motor limit in initial programming mode
0x4 | Down | Move down
0x5 | My + Down | Set lower motor limit in initial programming mode
0x6 | Up + Down | Change motor limit and initial programming mode
0x8 | Prog | Used for (de-)registering remotes, see below
0x9 | Sun + Flag | Enable sun and wind detector (SUN and FLAG symbol on the Telis Soliris RC)
0xA | Flag | Disable sun detector (FLAG symbol on the Telis Soliris RC)

from somfy_remote.

buuuudzik avatar buuuudzik commented on August 25, 2024

Thanks for fast respnse;)

When I will have the transmitter I will check then.

This implementation has such commands, but it looks that tilt plus(or upStep) use the up command but it must be little longer. For up is 100ms and for upStep is 300ms.
https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/somfy.lua

Also via original Somfy RS485 Transmitter there is a possibility to choose the value of tilting from 1 to 127.

I also know from practice that there is a little difference in length of command for up/down(600ms) and step command (450ms). But also I've found that the simple remote sends little different frames then RS485 RTS Transmitter.

from somfy_remote.

Nickduino avatar Nickduino commented on August 25, 2024

vsky279 having based his nodemcu code on my sketch, it shouldn't be too hard to implement the "tilt" command on your Arduino. Check out and give it a thought :
https://github.com/nodemcu/nodemcu-firmware/blob/master/app/modules/somfy.c

from somfy_remote.

buuuudzik avatar buuuudzik commented on August 25, 2024

I'm still waiting for resonators but now I have the transmitter so I've checked by radio your code on Arduino UNO with some modification, now it is without webpage but only with API.

But it is little slow(~1s per command) so the best would be to use NodeJS and Orange PI because I currently have also some nice webpage/api server for Somfy and I can little change this to be appropriate for your library.

If you want I can also add this to your repository after finish.

But I need your help because I am not so good in C++ so if you could explain me how can I replace this code to be appropriate for Orange PI:
`DDRD |= 1<<PORT_TX; // Pin 5 an output
PORTD &= !(1<<PORT_TX); // Pin 5 LOW

void SendCommand(byte *frame, byte sync) {
if(sync == 2) { // Only with the first frame.
//Wake-up pulse & Silence
PORTD |= 1<<PORT_TX;
delayMicroseconds(9415);
PORTD &= !(1<<PORT_TX);
delayMicroseconds(89565);
}

PORTD ^= 1<<5;
PORTD |= (1<<PORT_TX);`

And another question where is PORTD declared because g++ produce an error?

from somfy_remote.

buuuudzik avatar buuuudzik commented on August 25, 2024
  1. Can I replace:
    `DDRD |= 1<<PORT_TX; // Pin 5 an output
    // to
    wiringPiSetup();
    pinMode(PORT_TX, OUTPUT);

PORTD &= !(1<<PORT_TX); // Pin 5 LOW
// to
digitalWrite(PORT_TX, 0);`

from somfy_remote.

Nickduino avatar Nickduino commented on August 25, 2024

Yes.

I used direct port manipulation because I thought timing was of the utmost importance, turns out it's not and you can use pinMode and digitalWrite.

from somfy_remote.

buuuudzik avatar buuuudzik commented on August 25, 2024

Thank you very much for your help;)

This one is for me too hard:
PORTD ^= 1<<5;

What its purpose?

from somfy_remote.

Nickduino avatar Nickduino commented on August 25, 2024

It toggles the PORT.

digitalWrite(yourPin, !digitalRead(yourPin)); should do the trick to keep it compact. Otherwise, you'll need an if else.

from somfy_remote.

buuuudzik avatar buuuudzik commented on August 25, 2024

Do you know how can I replace byte type from Arduino in c++? Now I have a "SEGMENTATION ERROR":(

from somfy_remote.

Nickduino avatar Nickduino commented on August 25, 2024

No idea what you're looking for, sorry.

from somfy_remote.

buuuudzik avatar buuuudzik commented on August 25, 2024

No problem, thanks for all;)

from somfy_remote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.