Can set dimmable light via VeraLite, but reading fails "after a while"

Here’s the relevant part of the curl output:

  "devices": [
    {
      "name": "Dimmable Light",
      "altid": "2",
      "id": 3,
      "category": 2,
      "subcategory": 0,
      "room": 1,
      "parent": 1,
      "status": "1",
      "level": "51",
      "state": -1,
      "comment": ""
    }
  ],
  "categories": [
    {
      "name": "Dimmable Light",
      "id": 2
    }
  ],

Here’s the curl command I’m using:

curl http://192.168.2.23:3480/data_request?id=sdata | jq

OK. So if you were to start the simulator now you should see 51%.

Yes, that’s what I expect. But I start the sim and the slider jumps to the 51% mark – and the label also flashes – and then the slider goes back to the zero position and the label goes blank.

If there’s any further logging I can add to my project or that I can turn on in some way for the sim that would help with this, just let me know.

Would you mind sending me your project so I can try running it on my machine?

Maybe something with your Slider config is breaking it. Try creating a simple page with just a Label that shows the dimming level. Better yet too, create an entirely new project. Let’s try to eliminate any possibility that something you’re doing is corrupting it. Really sounds like it’s disconnecting from the Vera.

I’ll try that before shipping the project off to you. Maybe not until tomorrow, though. Thanks for all the help.

If it’s disconnecting, it’s probably not only the dimmer that has this issue. All of your other Vera device Labels will go blank or display Unknown as well.

Here’s the bare-bones project: https://www.dropbox.com/s/m405r3lwes3o6qu/SimpleLighting.hrp?dl=0

I see the same behavior as earlier: The label starts out as empty. There’s about a second or so delay, then the label flashes very briefly with the current lighting level, but then the label is cleared again.

It’s not 0%, it’s blank. So that lines up with my earlier console logging indicating the Level is coming back as Unknown.

I normally just have people private message or email me files like this, especially for projects that have credentials. That way you don’t have to worry about any unauthorized users getting ahold of it. You may want to take that down. Also, be sure you have EnableCloudAccess checked. I will not be able to connect to a private IP address that is only accessible on your network. Your other option would be to set up port forwarding. My email is support@thehomeremote.com

I’d removed my credentials before saving the project for precisely that reason.

I’ll take down the dropbox file. Let me make see about using a public URL for the connection. As you pointed out, port forwarding is an option also.

I’ll email you or DM you with the updated connection details and the updated project.

Fascinating. In preparing to share the updated project with you, I find that using the external URL (instead of the internal local address) to connect to the VeraLite device allows the slider to function correctly!

So this looks resolved although I’m sure at some point I’ll go down the rabbit hole of investigating why using the internal address does not work.

Appreciate the help.

smh. I was not specifying https:// on the internal device address, just the numeric internal address. Adding that prefix seems to have fixed the problem.

I don’t know. Something is still not right. The “Host” you supply the Home Remote is only the numeric IP address or host name. It should not include HTTPS. What’s likely happening now for you is that the local connection is failing immediately since you’ve supplied an invalid host. So it’s then just defaulting to the external cloud connection. That could be a solution for you if you’re fine with it always using the cloud connection.

Based on what you’re saying, for me to find the bug, you’re gonna have to set up port forwarding. If you aren’t seeing the issue through MIOS cloud then I won’t either. It’s strange that the issue only happens when using a direct connection.

Looks like you’re right. I supplied a nonsense host and things worked, so the fallback scenario you described sounds likely.

I’ll set up the port forwarding soon – I’ll need to spend some time on my day job first!

I can maybe try to get by without access. Can you send me the entire JSON from the local SDATA response?

It’s possible the bug is in the initial call to load the SDATA. Although based on your observation that it shows 51% for a short time kind of leads me to believe it’s on one of the following calls when it passes in the dataversion parameter. If that’s the case, I am going to need to actually connect to your hub.

Don’t worry about it tonight. It’s past my bedtime too:)

I loaded the data you sent & that was fine.

Do you have the latest firmware on your VeraLite?

My VeraLite is running version 1.7.1040 & that appears to be the latest.

It’s probably the following requests that are using the loadtime, dataversion, timeout, & minimumdelay parameters. Old firmware might not support those parameters locally.

http://192.168.2.23:3480/data_request?id=sdata&loadtime=1609634096&dataversion=634100831&timeout=60&minimumdelay=2000

I noticed that your firmware version is actually in the SDATA you posted last night. You are still running version 1.5. That is very old. Please update your firmware. I have the same VeraLite you have & I am running 1.7.1040.

I had looked earlier at the firmware – but I did so via the VeraLite device itself, which claimed it was up-to-date:

image

But when I connected through getvera.com it said my unit had an update available (1.7.902). I installed that and now things seem to be working much better from the simple test project and my full HR one. (After that update the device itself now says there’s another update available, 1.7.1040 as you mentioned. I’ll deal with that at some point soon!)

Sorry for the rathole and thanks for the help along the way.

1 Like