GithubHelp home page GithubHelp logo

Comments (10)

Nickduino avatar Nickduino commented on August 24, 2024

Hi,

Thanks for your input.

I should totally improve the readme! Procrastination, procrastination...

In short:
Power your transmitter with the Pi and connect its input to the pin you choose as TXGPIO (default is GPIO 4). I do power mine with the 5V rail and it works flawlessly with the 3.3V Pi's output but I can't guarantee it will be the same for you.

To register a new remote, you have to press the Program button of your original remote (generally, you have to remove the plastic cover) and hold it until your blinds move up a bit and down a bit, then send a program command from your virtual remote (the code is 0x8, you can either modify the Python script to do so or use the arduino sketch).

You can register the same virtual remote to several blinds if you wish but do them one by one.

Let me know if you have any problem, we'll try to troubleshoot them. And kudos for the Alexa integration, that will be sweet.

from pi-somfy.

tholu avatar tholu commented on August 24, 2024

@Nickduino Thanks for your fast response, I will try that (perhaps I can update the README already while doing it)!

from pi-somfy.

Nickduino avatar Nickduino commented on August 24, 2024

from pi-somfy.

steph-dam avatar steph-dam commented on August 24, 2024

Hi,
First, many thanks for your code. I test it on my pi without any modification and while using your example files, I have an error occuring : "TypeError : bytearray indices must be integers or slices, not float" corresponding to the code : if ((frame[i/8] >> (7-(i%8))) & 1):
Any idea of what happens ?
Thx

from pi-somfy.

Nickduino avatar Nickduino commented on August 24, 2024

That's weird. What happens if you print your i value?

from pi-somfy.

steph-dam avatar steph-dam commented on August 24, 2024

if I print i just before the line 'if ((frame...' it returns 0.
It don't make error if I use '//' instead of '/' in frame[i/8]. But is it correct in the logic of the program ?

from pi-somfy.

Nickduino avatar Nickduino commented on August 24, 2024

And after the division?
// marks a comment in C/Arduino, so there is no chance the code will work.

from pi-somfy.

steph-dam avatar steph-dam commented on August 24, 2024

In fact, as I said in my first question, I have a raspberry pi so I've used the python download (Pi-Somfy).
As i is increasing from 0 to 56, i/8 can't be an integer. That's why I've tried the integer division. But I'm still waiting for the SAW resonator at 433.42 MHz so I can't make trials with my blinds.

To answer your question : i/8 for i=0 is 0.0 then i/8=0.125 ; 0.25 ; etc.

from pi-somfy.

Nickduino avatar Nickduino commented on August 24, 2024

Sorry for the comment about comments, I mixed things up.

i/8 for i=1 should be 0.
And i%8 for i=1 is 1. It the remainder of the Euclidean division.
And i%8 for i=19 is 3. Still the remainder of the Euclidean division.

But Python 3 behave differently (thus why many people prefer to use Python 2.7) than other languages. So, in short, yes for i//8.

from pi-somfy.

steph-dam avatar steph-dam commented on August 24, 2024

Thanks to have confirmed and you are totally apologized for your comment :)
If it works, I will put a new comment and also try the code in python 2.7

from pi-somfy.

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.