GithubHelp home page GithubHelp logo

Empty string from status about insteonlocal HOT 8 CLOSED

phareous avatar phareous commented on August 19, 2024
Empty string from status

from insteonlocal.

Comments (8)

phareous avatar phareous commented on August 19, 2024

Basically the buffer wraps. I clear the buffer each time I check, but it could still overlap when a bunch of messages are coming in, like after a group command. The last byte in the buffer indicates the last place it wrote, so everything after the location it points to can be ignored (it was from a prior write).

I guess something in this code isn't working but I'm not sure what. Are you using the latest hub 2245? Do you see anything in your log regarding this? If you have these three lines it would be helpful:

    self.logger.info('getBufferStatus: Got raw text of: {}'.format(raw_text))

    self.logger.info('bufferEnd hex {} dec {}'.format(buffer_end, buffer_end_int))
    self.logger.info('getBufferStatus: non wrapped {}'.format(raw_text))

from insteonlocal.

craigjmidwinter avatar craigjmidwinter commented on August 19, 2024

I'll grab that when I go home. I've got a 2012 hub at home, so maybe the buffer looks a little different?

from insteonlocal.

phareous avatar phareous commented on August 19, 2024

I know the 2015 has a buffer twice the size of the 2012 one. I don't think the 2015 does zero-padding either. I think they both handle the last byte the same, but I am not positive.

from insteonlocal.

phareous avatar phareous commented on August 19, 2024

It looks like maybe the 2012 hub doesn't write the last byte with the last location written. I can confirm when I get the raw log from you. If this is the case I may be able to just treat the 2012 hub differently by looking at the total size of the buffer (which should be 100 chars vs the 2015's hub 200+2)

from insteonlocal.

craigjmidwinter avatar craigjmidwinter commented on August 19, 2024

Yeah, the last byte was 00 every time I checked, so that's why I was ending up with an empty string. I'll give you some examples as soon as I get home if it helps

from insteonlocal.

craigjmidwinter avatar craigjmidwinter commented on August 19, 2024

Here's the output

INFO:insteonlocal.Hub:getBufferStatus: http://192.168.0.2:25105/buffstatus.xml
INFO:insteonlocal.Hub:getDirectCommand: http://192.168.0.2:25105/buffstatus.xml
INFO:insteonlocal.Hub:getBufferStatus: Got raw text of: 026230D9270F190006025030D9272CAEA32F02FE000000000000000000000000000000000000000000000000000000000000
INFO:insteonlocal.Hub:bufferEnd hex 00 dec 0
INFO:insteonlocal.Hub:getBufferStatus: non wrapped 
INFO:insteonlocal.Hub:postDirectCommand: http://192.168.0.2:25105/1?XB=M=1
INFO:insteonlocal.Hub:clearBuffer: <Response [200]>
INFO:insteonlocal.Hub:
Dimmer 30D927 status: None
INFO:insteonlocal.Hub:
getDeviceStatus for device 30DA8A
INFO:insteonlocal.Hub:directCommand: Device: 30DA8A Command: 19 Command 2: 00 MsgType: Standard
INFO:insteonlocal.Hub:postDirectCommand: http://192.168.0.2:25105/3?026230DA8A0F1900=I=3
OrderedDict([('error', False),
             ('success', True),
             ('message', ''),
             ('msgs', [])])

from insteonlocal.

craigjmidwinter avatar craigjmidwinter commented on August 19, 2024

So, this seems to be working if I make the following changes:

master...wardcraigj:hass-changes

from insteonlocal.

phareous avatar phareous commented on August 19, 2024

Pull down 0.33... I just changed it to work with your hub..it will only check for the last byte if the buffer size is 202. Could run into issues with your buffer overwriting/overlapping since I wouldn't be able to detect it. Anyways see if that helps. I didn't change the deviceId check as it may resolve itself with the above change. But if not, we can troubleshoot that

from insteonlocal.

Related Issues (12)

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.