Search:

Type: Posts; User: caseyp; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.22 seconds.

  1. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    The numbers I gave were for illustration...

    The numbers I gave were for illustration purposes. I didn't mean for them to be converted to hex. My point was 1=100 and 3=3 so 1 is the more significant numeral in this case. I didn't realize...
  2. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    I just read this Wikipedia article...

    I just read this Wikipedia article and I think I've got a better understanding of endianess. It looks to me like it's about numerical position and not value as I thought. So in the number 123 one...
  3. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ron, in a previous post you provided the...

    Ron, in a previous post you provided the following code and said it took care of the endianess. How does it take care of the endianess? Is it simply reversing the bytes without any regard to their...
  4. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    I think you're right, I believe it is ms since...

    I think you're right, I believe it is ms since epoch. To be honest, I don't know if I need it or not. I guess I just had it in my mind that I would decode everything but maybe I don't need to worry...
  5. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    This is just a modified version of all the unpack...

    This is just a modified version of all the unpack functions that can do any size. The results coming out are pretty much the same.


    I found that Lua 5.3 can do 64bit integers but that doesn't do...
  6. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Hey Ron, I could use your help again. I'm making...

    Hey Ron, I could use your help again. I'm making good progress on the LIFX script however I'm having trouble parsing what I believe are time stamp fields called updated_at. First off, they are 64bit...
  7. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ok, I just wanted to make sure I wasn't...

    Ok, I just wanted to make sure I wasn't misunderstanding endianess. This api is fairly poorly documented. I found one reserved section that was completely left out of the example and yet it seems...
  8. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    I actually figured that out later on Ron and...

    I actually figured that out later on Ron and ended up writing an unpack8, 24, 32, 48, and 64 to handle other parts of the protocol. What I'm still puzzled by and maybe I didn't explain it well...
  9. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ron, I'm playing around with unpack16 and I...

    Ron, I'm playing around with unpack16 and I thought at first I had it figured out but then I started getting some results I don't understand...




    LIFX RESP: 29 00 00 54 CB 17 C6 09 D0 73 D5 14...
  10. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ok Ron, I'll look into it later. I'm focusing on...

    Ok Ron, I'll look into it later. I'm focusing on football now. Have a happy New Year. Thanks for the help, I'm learning quite a bit.
  11. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ok, the module thing makes sense. I just thought...

    Ok, the module thing makes sense. I just thought that since it's a global thing it would be available.

    As for feeding the response directly to unpack I assume I just send the data variable to it....
  12. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    I've tried to construct a listener based on what...

    I've tried to construct a listener based on what you have in the Girder manual and I'm getting some strange results.




    function callback( connection, data, address, port )
    ...
  13. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    OK, that makes sense but sure makes debugging...

    OK, that makes sense but sure makes debugging more of a pain. Another issue I've run into is I'm trying to write a function to parse the responses from the lights. I'm assuming this was why you...
  14. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ron, I'm using ZeroBrane Studio for my Lua...

    Ron, I'm using ZeroBrane Studio for my Lua editing and debugging however whenever I try to run something that requires transport.lua I seem to run into problems. So far the only way I've been able...
  15. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Looks good Ron! Once I get finished adding all...

    Looks good Ron! Once I get finished adding all the additional functionality I'll post it back up here for your review.

    UPDATE: Ron, I saved the file in a Girder6/lua/lifx folder as instructed and...
  16. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Looks pretty good Ron, there might be hope for...

    Looks pretty good Ron, there might be hope for you yet;). Now I'm disappointed because I couldn't get mine to work. I will agree that their documentation needs some work but after about the 10th...
  17. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ron, After rereading what you sent me previously...

    Ron, After rereading what you sent me previously and rereading their api it occurred to me the binary portion of the head should be treated as two separate parts. I kept seeing it as 0011 0100 0000...
  18. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Hey Ron, I feel like I'm getting pretty close...

    Hey Ron, I feel like I'm getting pretty close but I've run into an issue. The following function, while fairly ugly seems to be converting both binary & decimal to hex like I want. The problem I'm...
  19. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Ok, will do. When I do manage to get the packet...

    Ok, will do. When I do manage to get the packet built would simple transport be my best bet for sending it via udp?
  20. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Well I think at this point Ron I'm not real...

    Well I think at this point Ron I'm not real worried about getting responses from the lights as I'm mainly just wanting to tell them what to do and as far as I can tell I won't need to listen for a...
  21. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    I threw the following code together Ron, is it...

    I threw the following code together Ron, is it not correct? I know it's probably not very elegant as I'm not very good with Lua but I'm getting the result I expect to see.


    function...
  22. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    I did a little more digging Ron and I found the...

    I did a little more digging Ron and I found the following:



    local dec = tonumber("0011010000000000",2)
    local hex = math.decimaltohex(dec)
    print(hex) -- outputs 3400


    I have to admit I...
  23. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Where does the "\52\00" value come from Ron? I...

    Where does the "\52\00" value come from Ron? I ran your code and I got "0034" as expected, I'm just not sure how you came up with the value you entered. I have used an online binary to hex...
  24. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    Hi Ron, I found those functions after posting...

    Hi Ron, I found those functions after posting however I'm extremely confused by them. The LIFX API walks you through building a binary packet then it shows it has to be converted to little endian...
  25. Thread: LIFX bulbs

    by caseyp
    Replies
    44
    Views
    4,435

    I'm looking into it but I'm running into problems...

    I'm looking into it but I'm running into problems working with hex values in Lua. The LIFX Lan protocol is binary/hex and is difficult to deal with in Lua. It doesn't appear to me that there's any...
Results 1 to 25 of 26
Page 1 of 2 1 2