Project by Michael; WiFi Garage Door Controller with Raspberry Pi Pico W

Hi Michael and thank you for this great idea. I have figured out how to add pwa functionality so that when you add it to your screen it’s in a standalone look by serving a manifest.
So far I’ve only made it standalone display and name but plan to add background color and maybe an icon. Check out the progress at:

2 Likes

Awesome, @Mr270063 :smiley:

I’d love to see a screenshot of your demo when it’s done!
Presently every time I open my bookmarklet from my home screen it opens a new tab every time in my browser… it means my browser is often littered with Garage Door tabs :sweat_smile:
I’m guessing that creating this as a PWA would prevent this?

2 Likes

All done. I put a generic icon in there but it’s fine. Check out the process screenshots and code. Feel free to update yours with the new stuff if you like.

2 Likes

That looks great @Mr270063 - nice upgrade :smiley:
Thanks for sharing this in the comments of the original project. I’m sure other curious users will find there way here to make use of your upgrades. Nice one :+1:

2 Likes

Hi from France,

I tested your project and thank a lot for your share. Now I have a small problem for my application who is different of your native project. In fact I want to manage my pool curtain.
For that i need to add a time for open or close it. As I am newbie with micorpython language I have some difficulties.
At the beginnig I thought to add a line inside this part of your program :

def blink_led(frequency = 0.5, num_blinks = 3):
    for _ in range(num_blinks):
        led.on()
        time.sleep(frequency)
        led.off()
        time.sleep(frequency)

def control_door(cmd):
    if cmd == 'stop':
        pin_stop.on()
        blink_led(0.1, 1)
        pin_stop.off()
        
    if cmd == 'up':
        pin_up.on()
        blink_led(0.1, 1)
        pin_up.off()
    
    if cmd == 'down':
        pin_down.on()
        blink_led(0.1, 1)
        pin_down.off()

But when I add a line with “delay (1000)” I break your program.

Can you help me ?

Sorry but my english language is so bad :wink:

Hi @JeanClaude289253

Welcome to the forum!

From what you mentioned it sounds like you would need to amend the code to be something closer to this:

def blink_led(frequency = 0.5, num_blinks = 3):
    for _ in range(num_blinks):
        led.on()
        time.sleep(frequency)
        led.off()
        time.sleep(frequency)

def control_door(cmd):
    if cmd == 'stop':
        pin_stop.on()
        blink_led(0.1, 1)
        time.sleep(1000)
        pin_stop.off()
        
    if cmd == 'up':
        pin_up.on()
        blink_led(0.1, 1)
        time.sleep(1000)
        pin_up.off()
    
    if cmd == 'down':
        pin_down.on()
        blink_led(0.1, 1)
        time.sleep(1000)
        pin_down.off()

This would leave the pin high for an additional second after the LED has flashed.