Search found 925 matches

by kevinkk525
Tue Apr 24, 2018 7:55 am
Forum: ESP8266 boards
Topic: [workaround used] esp8266 gets stuck periodically
Replies: 35
Views: 10281

[workaround used] esp8266 gets stuck periodically

I'm running a smarthome project based on uasyncio which publishes sensor values using mqtt. It works fine for several days but sometimes gets stuck for 1h 10 minutes, then continues to work. Within that time the WIFI connection is there but the mqtt library of Peter Hinch reconnects after that time....
by kevinkk525
Mon Apr 23, 2018 7:53 pm
Forum: General Discussion and Questions
Topic: Problems with running umqtt client asynchronously in main.py
Replies: 4
Views: 3155

Re: Problems with running umqtt client asynchronously in main.py

I used the official mqtt once and wrapped it in asyncio. I attached the file below for you, maybe it helps. Just ignore all the functions you don't need. It worked quite well but I changed to the enhanced version of Peter Hinch a while ago as it has a lot more features. import gc import json from py...
by kevinkk525
Sun Apr 08, 2018 3:26 pm
Forum: ESP8266 boards
Topic: pin change interrupt + debouncing
Replies: 18
Views: 8806

Re: pin change interrupt + debouncing

Yes you capture the value of the first trigger but you won't get past 50ms if the pin state is already stable at 30ms as there won't be an interrupt after that. As you are using uasyncio anyways, you could either try the aswitch library of Peter Hinch: https://github.com/peterhinch/micropython-async...
by kevinkk525
Sun Apr 08, 2018 1:58 pm
Forum: ESP8266 boards
Topic: pin change interrupt + debouncing
Replies: 18
Views: 8806

Re: pin change interrupt + debouncing

I can tell you why: You have a callback() that is only called by an interrupt. In your callback you run this: if diff > 50: if pin_state == 0: value += 1 print('pin change', value) else: print("Button up") else: print("Debouncing...", diff) Now what happens if the button gets into a stable state wit...
by kevinkk525
Fri Apr 06, 2018 4:34 pm
Forum: Programs, Libraries and Tools
Topic: Interest Check in Android/iOS Remote for MicroPython Devices
Replies: 6
Views: 3604

Re: Interest Check in Android/iOS Remote for MicroPython Devices

There are Apps that provide an mqtt broker (haven't tested it yet). Then the ESP would not need to be programmed differently than in your local network where it could be controlled by mqtt. If you use uasyncio instead of normal sockets you don't have any blocking problem. The other possibility is to...
by kevinkk525
Wed Apr 04, 2018 11:01 pm
Forum: Programs, Libraries and Tools
Topic: Interest Check in Android/iOS Remote for MicroPython Devices
Replies: 6
Views: 3604

Re: Interest Check in Android/iOS Remote for MicroPython Devices

I like the thoughts here. And I especially like the way pidou46 tries to do an app as for most people in this community it's probably easier to write an app in python over any other language although the process of building the app looks a bit complicated. I only programmed one app yet for work usin...
by kevinkk525
Mon Apr 02, 2018 6:33 am
Forum: General Discussion and Questions
Topic: A MicroPython logo?
Replies: 8
Views: 2631

Re: A MicroPython logo?

I don't like that logo. You do not really recognize it as an M and apart from that it has nothing in it that says "python". I like the original one more but it's of course more like a picture than a logo. Why not use something obvious like this: a microcontroller with a python logo in it. or are the...
by kevinkk525
Fri Mar 30, 2018 10:31 am
Forum: ESP32 boards
Topic: Code editor
Replies: 8
Views: 3776

Re: Code editor

I am using Eclipse with pydev plugin for development. I am using Windows (mainly, at least on my main pc). To connect to the ESP I made myself some scripts that I run as external tools that sync my files, build the firmware, flash the firmware and connect using rshell/mpfshell. These tools are made ...
by kevinkk525
Thu Mar 29, 2018 12:03 pm
Forum: ESP8266 boards
Topic: NodeMCU and WiFi disconnects
Replies: 10
Views: 7109

Re: NodeMCU and WiFi disconnects

Although I have a coroutine running that checks the WIFI state and reconnects, one of my µC went offline for 1h 10 minutes again.. I don't know what the reason for this is. It did not went offline in the logs of my WIFI-Router but to the mqtt broker. A problem with the broker can actually be ruled o...
by kevinkk525
Wed Mar 28, 2018 9:15 pm
Forum: ESP32 boards
Topic: MicroPython on ESP32 with SPIRAM support
Replies: 462
Views: 195477

Re: MicroPython on ESP32 with SPIRAM support

according to the docs it is machine.DHT (or machine.dht?). Try it, my ESP is not next to me atm.