Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

REST subscribe problems

Featured Replies

I am trying without luck to subscribe to EISY events using an Arduino program. I am trying to follow the SDK manuals examples, but I am apparently doing something wrong such that all attempts to do a rest/subscribe fail with either an error 400 or 401.

Attached is a screenshot of a Wireshark capture of Postman trying to connect to the EISY. Any idea of what I am doing wrong? I tried both port 80 and 8080. I want to get things working on Postman before I commit to coding the Arduino REST subscription/event handling.

Can someone send me Postman setup params that can launch a subscription session on EISY?

Note that I can successfully poll nodes on the EISY using the same credentials and REST, but this causes home automation reliability issues when I poll the EISY too frequently. There will be 3 Arduino systems connected to my ISY, so that is a lot of polling.

My Arduino project retrieves thermostat mode/setpoint settings from the EISY and forms binary Infrared signals that it sends to the mini-split air conditioning units in my workshop. They have no human interface other than handheld infrared remote controls.

Captured001.png

Captured002.png

  • Author

Yes, I know that a 401 error means there was a failure to authorize. The problem is that I used the same basic authorization on my EISY polling software as I am doing with the attempted REST subscription. Polling works, subscribing to EISY events does not work using the same auth code.

Once I get past the auth problem I need an example of subscribing to EISY events using REST. The EISY documentation is not too helpful for this.

  • Author

For the lurkers:

I did a bit more research by sniffing the packets generated by UD Mobile that arrive at the EISY network connection. I found that subscribing to EISY events is done using SOAP. UD Mobile starts off by querying the local time on the EISY with a Connection: Keep-Alive. My guess is that this is just a way to get the subscription conversation started since we don't really care what time of day the EISY thinks it is.

The red text comes from UD Mobile and the blue text was generated by the EISY. I blacked out my authorization credentials.

Captured001.png

Now that we have a nailed-up keep-alive connection, UD Mobile subscribes to EISY node events using a SOAPAction call:

Captured002.png

The EISY replies with a gazillion XML packets that show the status of every node it knows about - in my case, around 100 of them. Last, it sends updates for node values that change.

I am currently researching if it is possible to subscribe to a single node instead of doing a core-dump of all my nodes. I don't want to be drinking from the firehose in a tiny Arduino project. I suppose I could filter out all node events that don't match my thermostat node ID.

I started down the path of subscribing to EISY events and after a couple weeks, I dumped it in favor of polling with the REST API. You may have a better experience but I found that pulling the data at my defined interval was less of a load on the EISY than the subscription and I was getting a lot of stuff I didn't need.

Look here ISY Developers:API:REST Interface - Universal Devices, Inc. Wiki

and try this in a browser with your EISY IP address

192.168.3.19:8080/rest/status

And that allows me to use the data to format it like this:

image.png

Edited by Andy P

  • Author

Andy,

I had the exact opposite problem with polling. I have 3 Arduino boxes (one per HVAC zone in my workshop) each polling my EISY every 10 seconds. My EISY seems to lock up from time to time, apparently from hammering it, 18 times a minute when it has better things to do. -)

I poll frequently since I use Alexa to change HVAC settings and too much lag between voice command and sending the HVAC Infrared signal is annoying.

It doesn't lock up if I stop polling.

That is why I'd like to do a subscription model, preferably subscribing to a single thermostat node (one per Arduino zone box). Yeah, the initial subscribe connection will be a massive data dump but it should quiet down to just show the occasional node update as time goes on.

I built this box that powers a 2441TH Insteon thermostat and creates IR remote control signals for the AC unit. It would also work with any thermostat that can communicate with the EISY.

Blueridge IR.png

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.