Failure to connect via sharptools

Hi,

I control my entire system with sharptools.

Every few weeks I'll get an Sharptools "error sending command" when hitting a button. If I attempt to use sharptools to authorise any devices whilst this is happening, it can't connect to hubitat. When I contacted @josh about this a while ago, he advised me that it was due to the hub failing to be able to connect to the internet.

The only solution was/is a hub reboot.

This happened yesterday whilst I was at work and the wife phoned me, so I couldn't do any trouble-shooting steps at all (checking say, if webcore was still able to control devices or if I could manually control from the hubitat devices page). So I was wondering if anyone had any suggestions on how I might be able to prepare to be able to discover what the root cause to this may be if (when) it happens again? It's often enough to be a real problem, but not often enough to cause any major inconvenience. When I'm at work, I currently need to use teamviewer to access my hub web interface to do a reboot, which is a bit cumbersome.

Ta.

One possibility is that you are getting some small power outages or fluctuations, which plays havoc with hubs, routers, modems, etc. So, putting all of that on a UPS has done wonders for my home automation over the years. On another note...

Some may hate this idea, but I've long used a "backdoor/hard reboot" on my HA hubs by putting them on a wifi plug. That way, if I need to remotely reboot them, I can do so by cutting power and then restarting them 30 seconds later. I don' t use wifi plugs for much of anything except these hub devices, of course (all else is z-wave) but for this purpose it works well. We had a vacation property that was 500 miles away in the past (we live there full time now) but this trick saved me a couple of times back then.

Now, the caveat is that I'm a long-time home automation enthusiast but very new HE user (although so far I love it). So, I have not actually tried this with the HE except once when I did so by accident as I fiddled with the Leviton app, and the HE hub rebooted fine. So, you may want others to chime in before trying this, if you need to reboot often. There is always a chance it might have ill effects, I suppose, although I know nothing about the memory/storage used by Hubitat on their devices. Hard reboots are eventually hard on SD cards, but I've never done it enough to cause a problem, myself. I started doing this wifi solution when I had a Homeseer Zee running at one property, and it came in handy more than once for that. In fact, the lack of reliability with those devices and HS in general is what caused me to abandon Homeseer. I had the same setup for my ISY-994 controllers, but never needed it as they are so ridiculously reliable (but have other shortcomings that caused me to sadly but finally abandon them after years of using that device, and move to the HE).

The first thing I would try, though, is to put your hub AND all internet connection devices (modem, router, switches, etc.) on a UPS. The surge protection alone is a big help, but we get frequent outages at our place (rural Maine) so this prevents many glitches and reboots. Anyway, just some thoughts on ways to possibly mitigate the root problem.

3 Likes

One of the easiest solutions to keeping your Hubitat hub properly and consistently connected to the Hubitat Cloud server, is to make sure you have an IP addressed reserved for the hub in your router's DHCP Server. This best practice has helped many users.

2 Likes

Cheers, at work, so replies limited.

Appreciate the ups comment. I'll look into it.

Already static ip.

1 Like

Hey guys, I have a similar issue, but I am pretty sure that the issue is that my firewall blocks a ton of ads, tracking advices, etc. Can you tell which which domains and subdomains I need to whitelist in order to avoid problems?

Thanks so much. Happy Monday! :slight_smile:

Can you clarify what issue you are having? Are you always seeing a red "error sending command" toast message when trying to send a command from SharpTools to Hubitat (eg, tapping a tile in a dashboard)?

This can be one of two things:

  1. SharpTools doesn't have a valid token for your Hub
  2. Your hub isn't connected to Hubitat's cloud relay

For the first one, you can solve it by reauthorizing your hub starting from your SharpTools.io User Page.

For the latter, the first thing I would try is a reboot of the hub to make sure it establishes a connection to Hubitat's cloud relay. Oftentimes, you'll see a red error bubble in the Hubitat admin UI when the hub is disconnected from the cloud relay and you'll also experience issues with things like Google Assistant or Alexa voice assistants.

Of course, if you consistently have issues connecting to the cloud relay (or getting disconnected), there could be other networking issues as @ogiewon alluded to above.

1 Like