RoyOltmans / somfy_esp8266_remote_arduino

Somfy ESP8266 Remote 433.24 RTS
43 stars 8 forks source link

[Question] Pin-naming on ESP8266 #1

Open CrimsonAC opened 3 years ago

CrimsonAC commented 3 years ago

Hello and first of all thank you for this project. I am right now trying to get it running, but at the moment to no avail.

I tried a Raspberry Pi B+ with the code from Nickduino and that works, so the prepared Transmitter with the swapped 433.42MHz crystal is operating correctly.

So i guess i just have a problem sorting out what Pin on the ESP8266 i should use. In the config.h is PORT_TX set to 5. But where on the ESP is that? I found a translation table that says Arduino Pin 5 is WeMos D1 mini Port D1 for example. I tried (among others) to use PORT_TX 4 or alternativley the constant D2, but i get no reaction on my shutters.

Thanks in advance.

AlexHello commented 3 years ago

So exctied to see your post.

I am using NODE MCU V3 - ESP8266 and i cant work this out either !

Update: After seeing your comment about the D1 pin on the wemos i tried it on my ESP and it worked

CrimsonAC commented 3 years ago

Hm, good to hear that it now works for you. But it makes me wonder why it doesn't work for me. I use a D1 mini Board, which is a NodeMCU based on a ESP8266-12F chip as well.

If i got the documentation correctly, i could use either D1 or 5 in Arduino to address the Pin named D1 on the board. The NodeMCU-numbering for the D1 Pin should be just 1. But that also does not work. Maybe the problem is somewhat else.

Maybe you could share a picture or a drawing on how you connected everything up.

AlexHello commented 3 years ago

Yes of course will post later. Did you checkout the photos from the project might this help if your D1 mini is the same ...

https://github.com/marmotton/Somfy_Remote/blob/master/doc/assembly.jpg?raw=true

CrimsonAC commented 3 years ago

Yeah i've seen the pics in that repo. Maybe i have some time tomorrow and give it another shot.

AlexHello commented 3 years ago

1617223930167569986479496586045 16172239598662787386974977837886 16172239821839034863055487278639

Good luck. This is my setup on nodemcu v3 esp.

Also I've ordered a wemos d1 from China and once it arrives will give it a shot aswell but delivery will likely take a month.

CrimsonAC commented 3 years ago

Thanks for the photos. I just took another D1 mini, resoldered everything, flashed the sketch (with the constant "D4" as pin to use) and it works. I don't know if the first D1 was damaged somehow or i messed up soldering, but now it works.

Thanks again and thanks to Roy Oltmans for the code.

AlexHello commented 3 years ago

YAY !!! So happy. Im still struggling to expand the code to control more than one blind if you work this out let me know :)

On Thu, Apr 1, 2021 at 8:10 AM CrimsonAC @.***> wrote:

Thanks for the photos. I just took another D1 mini, resoldered everything, flashed the sketch (with the constant "D4" as pin to use) and it works. I don't know if the first D1 was damaged somehow or i messed up soldering, but now it works.

Thanks again and thanks to Roy Oltmans for the code.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RoyOltmans/somfy_esp8266_remote_arduino/issues/1#issuecomment-811698244, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIUIPFQB5CK6TCQQAZZYGLTGQL73ANCNFSM4ZMRX3NA .

CrimsonAC commented 3 years ago

Sure!

You just have to modify that "Remote vector" in the config.h There is already one remote configured: std::vector<REMOTE> const remotes = {{0x184623, "home/nodemcu/somfy/[DEVICE ID YOU USE]", 1, 0} };

Mine for example looks like this: std::vector const remotes = {{0x123456, "edomi/status/internal/1108", 1, 0 } ,{0x971547, "edomi/status/internal/1109", 1, 4 } ,{0x346124, "edomi/status/internal/1110", 1, 8 } ,{0x187542, "edomi/status/internal/1111", 1, 12 } ,{0x244412, "edomi/status/internal/1112", 1, 16 } };

I hope this helps.

AlexHello commented 3 years ago

Thanks it does. For the above example what are your status topics ( line 35-37 in the sample code ).

Do they need need to be duplicated for each remote ?

CrimsonAC commented 3 years ago

Cool. I have not really used the status topics so far. The "state" for example delivers an 'open' as response, no matter what remote i used last. So i guess it's universal.

AlexHello commented 3 years ago

Thanks that word a dream for getting them controlled. I have these setup in home asstant now but i think there needs to be a state / availablity topic. All my blinds in HASS control the correct blind but controlling one updates the states for all the others at the same time.