Jump to content

- - - - -

MQTT for Premise.

  • Please log in to reply
32 replies to this topic

#31 123



  • Registered
  • PipPipPipPip
  • 2146 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 15 May 2019 - 02:41 PM

… with the assortment of drivers and other functionality, why keep Premise on the backend?


Because Home Assistant lacks two important drivers I require:

- HAI Omnistat/2



I have little time or desire to create them for Home Assistant. It's far easier for me to just run Premise and Home Assistant together (bridged via a common protocol, namely MQTT).


- Premise handles all my 'legacy' devices and executes all the automation logic I've developed over the years.

- Home Assistant provides a UI plus functionality unavailable in Premise.


It's not all that different from how others rely on more than one system to provide a complete solution. For example, the last I heard, etc6849 bridged his Premise system with SmartThings and uses its UI to control Premise (and leverage all of SmartThings functionality). Some openHAB and Home Assistant users choose not to use the product's built-in 'rule engine'. They offload it to Node-Red (a completely independent system). In fact, SyseventBroker relies on Node-Red to provide MQTT functionality for Premise. MQTT allows for a level of modularity and inter-operability that was unknown to HA hobbyists a decade ago.

#32 chucklyons


    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 777 posts
  • Software:Premise

Posted 15 May 2019 - 08:34 PM

Thanks, 123...Appreciate the data points!


I'll give it a try at some point, no doubt, after I finish my Premise-only polling UI - (because I need to finish this quest! And I apparently love windmills).


I have 6 months to get my RTI work done, so I'll have time shortly.


MQTT is definitely a key to keeping Premise alive. At least until they Open Source it  :wacko:

#33 chucklyons


    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 777 posts
  • Software:Premise

Posted 28 May 2019 - 11:18 AM

I've been running a lot of overnight tests with polling, using FF, Edge, and Chrome. My experience is somewhat echoed by a PCWorld article on browser performance. (Opera was #1, then Chrome, Edge, FF)


In my updated Minibrowser version, all the devices are 'active' on the main page. The views use CSS to 'hide' devices, which means they are still polling. However, some devices  ( the 'big' ones - thermostats, mediazones, security systems) can be drilled into. At that point, polling is only active for what is displayed on that page.(e.g. Mediazone - now playing, controls, time, weather, newscast)


I poll 'mbStatus' for each device. mbStatus gets the state for each device. (e.g. mbStatus for Lighting contains on/off state, dimming level, and time of change). The state is put into the respective div tags for each device.


So the list below is what's displayed on the primary page and what is being polled simultaneously:


HVAC         (17 Devices) -  3 Thermostats -( Fan State, Mode, Inside/Outside temps, Temp Set), rain, windspeed, dampers, etc. On/Off, rates and percentages (when applicable)  and time of change (except thermostats). (5 secs)

AudioVideo (4 MediaZones) - volume/mute states, volume level,  groups, group status, source, and now playing. No times. (5 secs)

Lighting       (18 lights and 2 outlets)  - on/off, dimming and times. (5 secs)

Security      (1 security system, 5 zones, 10 sensors and 1 zwave lock) - triggers and times. (still working on the system). (1 sec)

Appliances (4 Devices) On/Off and times. (5 secs)

Safety         (4 devices) triggers and times. (5 secs)

Keypads     (none)

Weather     (from OpenWeathermap) - Temp, Sunset, High/Low Temp, Condition, Icon. (1 min)

Newscast   (from 123) (10 min)

Time           (not polling per se)


All run overnight without issue(s). Chrome is by far the best on memory and CPU usage. Edge is okay - it will soon be based on Chrome, so... FF will run all night, but it seems to be a hog. I changed the disk write time to 30 mins as it was really thrashing my SSD and really isn't necessary for a 'dedicated' UI. I haven't tried any Apple devices. Interval times could probably be adjusted on some things, or maybe restructured a bit. (I'd want volume and mute status fast, but now playing and groups probably could be more than 5 secs)


For my modest place, this seems to be working okay. In reality, visual indicators (White-Normal; Yellow-Info; Red-Alarm) would probably be second in line to audible indicators (Smoke Detector, Siren), so I don't think the lag is too troublesome.


Edited by chucklyons, 28 May 2019 - 12:07 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users