Code Monkey home page Code Monkey logo

Comments (8)

pmoscetta avatar pmoscetta commented on June 21, 2024

Just replying you for blynk usage: https://www.instructables.com/id/HOW-TO-CONTROL-a-WiFi-LYT8266-LED-BULB-WITH-BLYNK-/

from lyt-scripted.

Torxgewinde avatar Torxgewinde commented on June 21, 2024

Hi,
Yes, this project is the Arduino sourcecode so you can compile a binary. This binary is a file that can be copied (aka flashed) to the LYT8266 lamp. It makes use of several libraries that can be selected in the Arduino-IDE (the Program), but this project is not a library itself. A library normally is focused on being reusable in other projects, while this project here combines everything to resemble a more or less useful software for the LYT8266 lamp.

To install you need the programming cable that can be purchased from Authometion as well. Other programmers could also be used as long as they provide the same electrical signals. The maximum voltage is important, it should not exceed 3.3V. Also, if you consider purchasing from Authometion they will provide a connector that fits the socket on the LYT8266 lamp. Without that connector it is a bit difficult to establish electrical contact. From within the Arduino-IDE you can then upload (=copy) the binary to the little flash-storage inside the LYT8266 lamp. Once the binary was copied subsequent transfers can also be done via WiFi once the lamp successfully connects to your WiFi. See the video from the Readme.md file, it shows how the firmware is compiled and flashed. Also, you can see the serial to USB converter used to flash the device.

To create a sunrise effect you can either change the firmware and implement such a feature. This requires some experience but is a rewarding experience. Also, once done and debugged you can share your sourcecode with others so they participate from the fruits of your work.

Alternatively you can remote control the LYT8266 from a home automation server. Many people like FHEM, OpenHAB, Homeassistant, NodeRed and many more. Those automation servers can send a HTTP request to the LYT8266 and set the color that way.

There is a strong trend for opensource projects to use MQTT protocol to control several little networking enabled devices at home. The matching buzzword is IoT and MQTT is definitely a protocol to consider for such a task. It is well supported by truly open homeautomation-servers. MQTT was not implemented for this firmware.

As the origin for this project was a light that was not installed in my home, but at a remote location without a homeautomation server, I decided the LYT8266 can query an internet server every minute. Contacting a server was necessary anyway to retrieve the current time, so I thought why not polling the server for the desired colors. This enables me to change the code for the color by changing the program that runs at the server and this way I can react to new wishes for the remote LYT8266 once the owners tell me on the phone. Polling a server is not the best approach, but it is easy to grasp.

I haven't looked into Blynk, so I cannot say how that works in detail.

I hope that already gives a good overview, just ask away if you like to know more.

Kind regards,
Tom

from lyt-scripted.

hycday avatar hycday commented on June 21, 2024

thanks a lot for the info Tom !

so i guess your library is compatible with what i had in mind :)
i will buy the bulb + the cable to update the firmware to yours.
then i will point out the bulb to my server to get info about the time and about the color to display for sunrise (i can share some code of course), but i will extend the logic to : get update from server to get sunrise time, stop checking server until sunrise, when sunrise comes, update colors ever 20seconds by fading.
I only need to understand, this code, it will need to be another library ? i.e. i still dont get the files that are the firmware, and the files that are an example code.

also, there is no clock in the LYT8266 ? that would highly ease up the code :/

pmoscetta, thanks for the link for Blynk, will check it out

from lyt-scripted.

hycday avatar hycday commented on June 21, 2024

also, the LYT8266 Programming cable kit is out of stock :( if you know where i can find another one (Europe) at a reasonable price, lmk :)

from lyt-scripted.

pmoscetta avatar pmoscetta commented on June 21, 2024

You can try from our Switzerland distributor: https://www.play-zone.ch/en/authometion-lyt8266-programming-cable-kit.html

from lyt-scripted.

hycday avatar hycday commented on June 21, 2024

You can try from our Switzerland distributor: https://www.play-zone.ch/en/authometion-lyt8266-programming-cable-kit.html

Fr.21.06 of delivery fee, thats too much :( i will find a way no worries

from lyt-scripted.

Torxgewinde avatar Torxgewinde commented on June 21, 2024

Hello hycday,
all the *.ino files are the firmware. When clicking the checkmark-button or the upload button the Arduino IDE will join all the *.ino files together, create temporary files for the compiler and compile the firmware image. This project is not a library but can be used as a start to write your own firmware. I found it easier to separate the firmware into several *.ino files, but I agree that this seems to be uncommon for typical Arduino-projects. Each files is dedicated to a certain topic, one for example deals with the WiFi topics, another one deals with the LED topics. To have them in a certain order in the tabs, I named the *.ino files so that they are sorted how I liked it.

The ESP8266 does not have an internal clock, true. Due to this, the LYT8266 needs to query a server to get the time. This is the reason why I started to poll the time and desired color anyway from an internet-server. Alternatively there is a NTP library for ESP that might be useful in your scenario. To use it you need to install it and then make use of it by adding the include statement in your code.

Kind regards,
Tom

from lyt-scripted.

Torxgewinde avatar Torxgewinde commented on June 21, 2024

Closing as I assume issues are sorted. Please reopen if not.

from lyt-scripted.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.