-
it's a miracle... I thought 15 mins ago... long time no answers on Espruino, and here you are, both :-)
I did not make any updates or trials, while my code was working on 1.94 and I was happy with it.
I am rather waiting your OO version that works.p.s. I will try upgrade to 1.95 and check if my script works same. Also I will consider comments from Gordon on right modules.
-
-
-
-
-
-
What a relief - I managed upgrade Puck to 1.94 by using 3 years old Samsung J5 mobile.
But with newest Huawei P9 Light it is still not possible.btw, for testing purposes. After the upgrade to 1.94, I tried to connect with Huawei again and make an upgrade... it is still not possible. Both Android phones installed today nRF Toolbox 2.5.3
Huawei P9 Lite Android 7.0
Samsung J5 Android 5.1.1 -
-
I still have problems with Puck.js and firmware update from 1.92 to any above, nRF Toolbox disconnects in 10 secs.
Taking Gordon's advice about the low battery, I even risked to burn it - powered it on 3.3 pin.
Still the same problem - nRF Toolbox connects for 10 secs and disconnect with error.I already connected Puck with TTL now, but trying Espruino IDE it does not work either, returns the message Puck.js cannt be updated from IDE, make other choice.
The only way would be upload with phyton script (I use it successfully for flashing on ESP8266)
Please advice what is command line for Puck.jsfor ESP8266 the command line is:
python "E:\Espruino\000 software\esptool-master\esptool.py" --port COM3 --baud 115200 write_flash --flash_freq 80m --flash_mode qio --flash_size 32m 0x0000 boot_v1.6.bin 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin -
-
thanks for the links, none of that would work with ESP, apart that naming variables with 4 digits (that sucks... noone will understand the code in 2 months :-) ).
a. I woud wait PaddeK with his optimization and OO restricturing, should be half-day work :-)
b. I have access to Phillips HUE SDK docs and have 2 dimming devices... will focus on that as next.
https://www.developers.meethue.com
https://github.com/PhilipsHue -
hi.
Any final solution on that ? Can you share please.
My current idea that all IoT devices (Espruino) that are connected to local Wifi will automatically update JS script:
- (pull) devices automatically check if there is any update script on network and upload it and restart.
- (push) implement some UDP broadcast msg with http link to the JS file to update current script.
It must be safe enough, like ... in case script failing it must return to last script that worked or at least the device AP must be available so sending another script should be still possible.
- (pull) devices automatically check if there is any update script on network and upload it and restart.
-
Dear Espruino's Community.
Here is complete Alexa integration implementation!!!!! YUHUUUU!!!!
I also implemented the response to GetStatus that is introduced very recently.If anyone can optimize or restructure it to OO program, please do so.
Please remember to leave untouched: variables for PINs for device and Led, also status high/low to be configurable.
-
Lazy to copy it here....good article to read about Alexa protocol and what is actually received and to be sent back
Best article to read about the protocol
https://objectpartners.com/2014/03/25/a-groovy-time-with-upnp-and-wemo/
or
https://github.com/n8henrie/fauxmo/blob/master/protocol_notes.mdand here is my next todo - implement group of lights on one device and also dimming
https://www.hardill.me.uk/wordpress/2015/08/15/updated-wemo-control-script/ -
-
-
-
Thanks for suggestions. works fine with string.indexof().
The script has been cleaned .... but big problem came - "out of memory" and even Minimization did not help.
Popup showing "Minimization 15000 to 7200", but while uploading I still see error
"ERROR: Too big to save to flash (14508 vs 12284 bytes)"any hint how I can overcome it (apart from obvious code restructure)?
complete code attached (change your wifi id first)
-
-
Thanks.... I will try tonight both solutions regexp and xmltojson class
actually as there are 2 options only, the fastest way would be using 2 times
String.contains(<BinaryState>1</BinaryState>) String.contains(<BinaryState>0</BinaryState>)
I am wondering about the memory size... device itself has quite a big memory (divided by half due to boot-1 and boot-2). I was writing a small script and get already out-of-memory for a script less than 2 pages. If I understood correctly in case there is a module (incorporated into the firmware) than there is no issue with memory usage.
-
-
-
I still have Puck with original 1.92 and was not able to make an upgrade .... On my Android phone the nRF Connect and nRF Toolbox did connect to Puck only for 10 secs and disconnect homehow. No firmware upgrade possible so far :-(
1) If firmware can bring better results I will give one more "harder" try :-)
2) In case I have to use transistor (1 input leg only), should I use 2 transistors ? each one for Cathode and Anode pins?
Hi. I do not remember anymore this thread.
My implementation for Alexa works fine with Sonoff, you can check source code and use it.
http://forum.espruino.com/conversations/313813/?utm_campaign=mentioned&utm_medium=email&utm_source=notification&offset=25#comment14013238