Jump to content


Photo
- - - - -

MQTT for Premise.


  • Please log in to reply
19 replies to this topic

#16 pete_c

pete_c

    Cocoonut

  • -=Gold Supporter=-
  • 8672 posts
  • Location:House
  • Experience:average
  • Software:Main Lobby, Open Source Automation
  • Hardware:HAI OmniPro II, Mi Casa Verde Vera, Ocelot
  • Tech:X10-PLC, X10-RF, UPB, INSTEON, Z-Wave, ZigBee, 1-Wire, xAP, xPL, ALC
  • Audio:Russound
  • Video:MythTV
  • CCTV:analog, ip, dvr
  • Phone:Asterisk, FreePBX, Ooma, POTS, VoIP via ISP

Posted 25 May 2018 - 08:57 AM

Very nice 123.   Curious about the current Premise user base here on Cocoontech? 

 

I have seen you writing about Premise now here for over 10 years.  I am now over 60 here and tinkering keeps me going these days.

 

I was starting to tinker with graphing using Node Red here with Homeseer and the author of the Mosquitto plugin added two created based on payload variables - rate and accumulation (payload numbers) and charting based on either payload or rate of payload or accumulation rate which moved the charting over to the mothership.

 

Charting of payloads was already there and initially wanted to create a rate of payload function in Node Red.

 

Only graphing right now is relating to the old Hobby Boards lightning sensor rate which is working fine.

 

Attached File  lightningrate.jpg   27.71K   1 downloads

 

Ordered a couple of SonOff basic WiFi switches which I will be modifying to utilize with Mosquitto in the next few days with concurrent SSL testing.  This will be modifying the SonOff hardware with new firmware and doing a hands on to the SonOff board.  These used to be around $5 each and now noticed that they are around $7 each.  Still a reasonable price for a remote controlled automation device.



#17 123

123

    Cocoonut

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

Posted 25 May 2018 - 08:04 PM

Pete,

 

I figure there are only a handful of active Premise users left ... and I believe they're all here. The software just works, can still be extended to incorporate new things, so I continue to use it.

 

 

If you're going to flash the Sonoff devices with new firmware, have a look at this blog post where the author compares three popular firmware replacements: Tasmota, ESPEasy, and ESPurna.

https://lobradov.git...rison-overview/

 

It's the first of four articles and it highlights the principal differences between the competing choices. Well worth the read and useful for choosing the one that's bet for your needs.

 

I'm also following this project: https://github.com/Koenkk/zigbee2mqtt  It's open-source firmware for an inexpensive ZigBee adapter and converts the ZigBee protocol to MQTT. It supports several common ZigBee devices from Philips, Ikea and Xiaomi directly (i.e. without requiring the manufacturer's hub or cloud). Xiaomi makes inexpensive ZigBee sensors, typically under sold for under $15 (see GearBest)

 

https://github.com/K...pported-devices

 

Most of the discussion is happening on the Home Assistant forum (but the project is not tied to HASS): https://community.ho...e-tradfri/52108


Edited by 123, 25 May 2018 - 08:12 PM.


#18 pete_c

pete_c

    Cocoonut

  • -=Gold Supporter=-
  • 8672 posts
  • Location:House
  • Experience:average
  • Software:Main Lobby, Open Source Automation
  • Hardware:HAI OmniPro II, Mi Casa Verde Vera, Ocelot
  • Tech:X10-PLC, X10-RF, UPB, INSTEON, Z-Wave, ZigBee, 1-Wire, xAP, xPL, ALC
  • Audio:Russound
  • Video:MythTV
  • CCTV:analog, ip, dvr
  • Phone:Asterisk, FreePBX, Ooma, POTS, VoIP via ISP

Posted 27 May 2018 - 09:50 AM

Thank you 123.

 

Last week purchased a couple of the SonOff basic WiFi modules and flashed one OTA style last night with a Tasmota firmware.

 

Still in tinkering mode learning baby steps style.

 

Historically and today still mostly in analog wired mode for my automation. 



#19 pete_c

pete_c

    Cocoonut

  • -=Gold Supporter=-
  • 8672 posts
  • Location:House
  • Experience:average
  • Software:Main Lobby, Open Source Automation
  • Hardware:HAI OmniPro II, Mi Casa Verde Vera, Ocelot
  • Tech:X10-PLC, X10-RF, UPB, INSTEON, Z-Wave, ZigBee, 1-Wire, xAP, xPL, ALC
  • Audio:Russound
  • Video:MythTV
  • CCTV:analog, ip, dvr
  • Phone:Asterisk, FreePBX, Ooma, POTS, VoIP via ISP

Posted 27 May 2018 - 11:58 PM

I am way behind compared to what you are doing 123 today with Premise. 

 

I am still going very slow here ...as mentioned baby steps...

 

Did my first hardware modifications today to a Sonoff Basic WiFi device turning it in to a low voltage sensor and switch from a high voltage lamp switch and changing the firmware to Tasmota.  It involved cutting the high voltage to relay traces on the Sonoff board, a bit of soldering and installation of some header pins (for JTAG and GPIO access). 

 

This will be the first device that I control using Mosquitto.

 

It is a bit similar to my tinkering with micro travel routers and RPis, using new firmware, exposed GPIO ports and a bit of bit banging over the last few years. 



#20 123

123

    Cocoonut

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

Posted 10 August 2018 - 08:21 AM

UPDATE
 
 
I've enhanced SyseventBroker so that it can export Premise Home devices into OpenHAB format.
 
 
What's the advantage? I can now use OpenHAB's user-interface(s) to control Premise objects. OpenHAB offers "BasicUI", which is rendered in a browser and in OpenHAB's iOS/Android apps, and "HABPanel" which is also rendered in a browser and targeted for touchscreen devices.
 
 
If you have a dimmer in the kitchen called Home>FirstFloor>Kitchen>CeilingLight, it'll get converted into an OpenHAB Dimmer Item. It'll look something like this in the Items file (take a deep breath):
 
Dimmer Home_FirstFloor_Kitchen_CeilingLight "Ceiling Light" (Dimmers, Kitchen) ["Lighting"] {mqtt=">[broker:premise/home/firstfloor/kitchen/ceilinglight/brightness:command:*:default],<[broker:premise/home/firstfloor/kitchen/ceilinglight/brightness:state:default]"}
 

  • Dimmer is the item's type.
  • Home_FirstFloor_Kitchen_CeilingLight is its name for programming purposes.
  • Ceiling Light is its display name in a user-interface.
  • light is its icon for a user-interface.
  • Dimmers, Kitchen are groups this item belongs to.
  • Lighting identifies this item for use with Alexa, Google Assistant, and HomeKit.
  • mqtt is the binding (aka device driver) that allows the item to talk to the actual kitchen light. 

 
Anyway, SyseventBroker takes care of performing the conversion. It also creates location-based Groups that reflect all the buildings, floors, and rooms in your Premise Home as wells as a few function-based Groups like Sensors, Lights, Security and their sub-groups like SecuritySensors, TemperatureSensors, Dimmers, NonDimmers, etc.
 
This diagram shows how objects in a Premise Home are converted to OpenHAB Items.
 
pnm6HKs.png
 
 
So far, I've created one UI using BasicUI and another, much simpler one, using HABPanel. A BasicUI is defined using a text file called a Sitemap. For HABpanel, you define it within the browser; just drag widgets around and define their purpose (super easy). 
 
Both UI's load quickly and responsiveness is excellent so don't let this multistep communications path fool you into believing there'll be unacceptable delays:
Premise on a PC <===>  MQTT Broker on a Raspberry Pi <===> OpenHAB on the same Raspberry Pi.
 
 
Rather than show you my own meagre efforts, I'll direct you to the impressive work done by others.

My next step is to leverage MyOpenHAB.org. It's a free cloud service that allows you to securely access OpenHAB remotely. The phone app detects it is not on your local network so it logs into MyOpenHAB.org (using an account you create) and accesses your OpenHAB machine at home. I believe you can optionally constrain which devices are remotely accessible.


Edited by 123, 10 August 2018 - 08:52 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users