Search found 969 matches

by kevinkk525
Wed Dec 19, 2018 8:49 am
Forum: Programs, Libraries and Tools
Topic: custom library - fota for non networked devices
Replies: 7
Views: 4171

Re: custom library - fota for non networked devices

Thanks. Looks like there's some work done although it is not as easy as the OTA solution provided in loboris port for esp32.
by kevinkk525
Tue Dec 18, 2018 4:53 pm
Forum: Programs, Libraries and Tools
Topic: custom library - fota for non networked devices
Replies: 7
Views: 4171

Re: custom library - fota for non networked devices

Well you definitely need a way of uploading/downloading the new firmware (WLAN, I2C, some bus, GSM, ...) and an OTA module. ESP32 (at least loboris port) has an OTA module that can be used with WLAN and ethernet. I don't know about the pyboard and esp8266 does not seem to have support for that yet.
by kevinkk525
Tue Dec 18, 2018 1:58 pm
Forum: Programs, Libraries and Tools
Topic: custom library - fota for non networked devices
Replies: 7
Views: 4171

Re: custom library - fota for non networked devices

For remotely updating firmware your device has to be networked in some kind (WLAN, i2c, ...).
I don't know if anything is done in that direction. Apparently not even OTA works for esp8266 yet.
by kevinkk525
Tue Dec 18, 2018 1:04 pm
Forum: Programs, Libraries and Tools
Topic: custom library - fota for non networked devices
Replies: 7
Views: 4171

Re: custom library - fota for non networked devices

If your device is not networked, how is this going to work and how is this different than connecting a pc to it and flashing a new firmware?
by kevinkk525
Tue Dec 18, 2018 9:30 am
Forum: ESP8266 boards
Topic: Global Variables
Replies: 3
Views: 6531

Re: Global Variables

That's not possible in python, only in lua.
If you want to have accessible globals you have to declare those in a module e.g. "config.py" and then import that module in every other file/module that wants to access these.
by kevinkk525
Fri Dec 14, 2018 10:17 am
Forum: Programs, Libraries and Tools
Topic: Config via MQTT
Replies: 1
Views: 2850

Re: Config via MQTT

If you don't need updating configuration during runtime after the initial configuration has been received (as this would be very difficult as you have to unload the initial configuration first), you can have a look at my smarthome framework: https://github.com/kevinkk525/pysmartnode Changing configu...
by kevinkk525
Fri Dec 14, 2018 10:02 am
Forum: General Discussion and Questions
Topic: str/bytes splitting without heap reallocation
Replies: 10
Views: 5590

Re: str/bytes splitting without heap reallocation

Yes the header part will get allocated as it will be saved as a variable but as the header is very small, it can be ignored. I was a lot more concerned about the data part of the message which could get quite big but this does not allocate additional memory. At least not as far as I can tell. Ujson ...
by kevinkk525
Thu Dec 13, 2018 5:58 pm
Forum: General Discussion and Questions
Topic: str/bytes splitting without heap reallocation
Replies: 10
Views: 5590

[solved] Re: str/bytes splitting without heap reallocation

Thanks for the clarification and the example! More interesting than the sending direction the other way, receiving the string 'myheader{"a": 1, "b": 2}' and converting it into header and dict: >>> c='header{"hi": "ho", "hoho": "hi"}' >>> s=uio.StringIO(c) >>> s.read(6) 'header' >>> json.load(s) {'hi...
by kevinkk525
Thu Dec 13, 2018 10:31 am
Forum: ESP8266 boards
Topic: Type Casting
Replies: 2
Views: 2127

Re: Type Casting

please give us more details: content of set.txt, content of v1 (printed in the program), v2 and what is tmp??
My guess is, v1 still contains a newline character.

Edit: simultaneous post.. sorry :D
by kevinkk525
Thu Dec 13, 2018 8:56 am
Forum: General Discussion and Questions
Topic: str/bytes splitting without heap reallocation
Replies: 10
Views: 5590

Re: str/bytes splitting without heap reallocation

what would be a stringstream-like object? ujson could probably be used with a normal stream but not with uasyncio StreamReader as far as I know. But as this network layer receives a string object, it's not an option anyway. I guess that could be done but I lack the knowledge and implementing things ...