www.homeseer.com    
 

Go Back   HomeSeer Message Board > 3rd Party Plug-Ins/Scripts > Plug-ins by Author > Click Here for List of Author Forums > MCS Plug-Ins and Scripts > mcsMQTT (3P)

mcsMQTT (3P) Discussion of mcsMQTT plug-in

Reply
 
Thread Tools Display Modes
  #301  
Old May 27th, 2018, 01:51 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,442
@Michael,

Curious about the picture in the mcsMQTT plugin manual showing Garage Door manual parameters configuration page showing relay pulse and maximum time for input change where as mine only shows top half of parameters.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #302  
Old May 27th, 2018, 02:57 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,783
The Garage Door was my first Tasmota mod and there was some "hard coded" logic that worked for me, but was later changed to make it more generalized. The GPIO were selected to be 09 and 10 Switch1 and Switch2. With mcsTasmota there are 56 and 57 for Door Open and Door Closed sensors. If you select these then then relay and max time settings on the browser should be available. I dont remember what testing I did again for Door control after I added these. If you have an issue I can look back at it with one of my extra Sonoff's. I dont want to mess with my Sonoff that is working well in the garage now. There is also firmware_door.bin (December) and firmware_door_counter.bin (March) and firmware_hue.bin (May) which are images I captured as each project was done. The mcsTasmota added irrigation scheduling.
Reply With Quote
  #303  
Old May 27th, 2018, 03:13 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,442
Thank you Michael.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #304  
Old May 29th, 2018, 11:04 PM
taylormia taylormia is offline
Seer Plus
 
Join Date: Aug 2015
Location: USA
Posts: 94
Attached is a guide to integrate the following with HomeSeer HS3 using Node-Red and the mcsMQTT plugin:
• RFLink Gateway with 433Mhz temperature/humidity sensors.
• Weather Underground API for current weather. (New free WU API keys are not available. Existing free API keys still work for now)
• Dark Sky API for next day forecast
Also shown is a way to easily visualize the live weather data with the Node-Red Dashboard

Please post this guide as needed.
Attached Images
File Type: pdf RFLink-Weather-Node-Red-HS3-mcsMQTT-HowTo.pdf (1.70 MB, 27 views)
Reply With Quote
  #305  
Old May 30th, 2018, 08:53 AM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,442
Thank you taylormia!!!

Very nice!!

Node Red and Michaels mcsMQTT plugin is addicting.

Here is my basement RPi2 - Stretch Node Red - OWFS - MQTT set up for 12 sensors which cover the main floor, garage, basement and outside.

I massage the values with the Node Red function object for conversions of C and F and rounding off values as presented to the mcsMQTT plugin.

BTW there are many marine coastal facilities using Davis weather stations and you can get to all of the data a few layers down on the web sites. It is all there live.

Name:  noderedowfs.jpg
Views: 163
Size:  222.5 KB
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; May 30th, 2018 at 09:04 AM.
Reply With Quote
  #306  
Old May 30th, 2018, 09:37 AM
taylormia taylormia is offline
Seer Plus
 
Join Date: Aug 2015
Location: USA
Posts: 94
Quote:
Thank you taylormia!!!
Very nice!!
You're welcome. It was fun putting it together..

Quote:
Node Red and Michaels mcsMQTT plugin is addicting.
Yes, indeed it is

Quote:
Here is my basement RPi2 - Stretch Node Red - OWFS - MQTT set up for 12 sensors which cover the main floor, garage, basement and outside.
What kind of sensors are you using?

Quote:
I massage the values with the Node Red function object for conversions of C and F and rounding off values as presented to the mcsMQTT plugin.
Would you mind sharing your node-red flows for these?

Quote:
BTW there are many marine coastal facilities using Davis weather stations and you can get to all of the data a few layers down on the web sites. It is all there live.
I live in the middle of the country, so coastal weather stations would not help me. On the bright side, I will be getting my own Davis VP2 in the next couple of months
Reply With Quote
  #307  
Old May 30th, 2018, 05:53 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,442
What kind of sensors are you using?

1-Wire temperature, humidity combo, dual counters (water, rain tipping bucket, lightning), barometer, et al connected to a Maxim 9097U which plugs in to the RPi running Node Red.

Plus a Davis / Console / big buffer serial board/cable from Australia and recently purchase a MeteoStick for more sensors.

Needed for the 1-Wire node red stuff is:

1 - 9097U and sensors
2 - apt get install owfs
3 - node red modules for OWFS and MQTT.

Here is one temperature flow. They are all the same except for the mac address of the 1-wire sensor and function to convert C to F and Mosquitto stuff.

Here is one 7 node flow. Note the payload conversion formula is just a one liner.

Code:
[{"id":"871c18ec.0f366","type":"inject","z":"6be1d6c0.f7c008","name":"26.F37-Temp","topic":"26.F372E7000000/temperature","payload":"temperature","payloadType":"str","repeat":"10","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":1000,"wires":[["d346f8db.245de"]]},{"id":"d346f8db.245de","type":"nro-read out","z":"6be1d6c0.f7c008","config":"f0cd99d8.329ed8","path":"26.F372E7000000/temperature","name":"26.F37-Temp","x":220,"y":1000,"wires":[["7f441e49.1d5268"]]},{"id":"7f441e49.1d5268","type":"change","z":"6be1d6c0.f7c008","name":"26.F37-Temp","rules":[{"t":"set","p":"retain","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1000,"wires":[["c979bf80.9db35"]]},{"id":"c979bf80.9db35","type":"function","z":"6be1d6c0.f7c008","name":"26.F37-Temp","func":"msg.payload = Math.round((msg.payload * 1.8 + 32) * 10) / 10;\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":1000,"wires":[["7ee40d45.3757c4","7409a181.3d403"]]},{"id":"7ee40d45.3757c4","type":"mqtt out","z":"6be1d6c0.f7c008","name":"26.F37-Temp","topic":"","qos":"","retain":"","broker":"8b363e4a.a0761","x":580,"y":940,"wires":[]},{"id":"7409a181.3d403","type":"debug","z":"6be1d6c0.f7c008","name":"26.F37-Temp","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","x":680,"y":1000,"wires":[]},{"id":"5b3b8dea.4f3fbc","type":"comment","z":"6be1d6c0.f7c008","name":"Combo Sensor Outside - HB 12VDC - 26F37","info":"","x":190,"y":960,"wires":[]},{"id":"f0cd99d8.329ed8","type":"nro-config","z":"","host":"localhost","port":"4304"},{"id":"8b363e4a.a0761","type":"mqtt-broker","z":"","name":"Temperature","broker":"localhost","port":"1883","tls":"f60d5ae5.e3919","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"10.8A23CB010800/temperature","birthQos":"1","birthRetain":"true","birthPayload":"10.8A23CB010800/temperature"},{"id":"f60d5ae5.e3919","type":"tls-config","z":"","name":"pete","cert":"","key":"","ca":"","certname":"MQTT_Broker.crt","keyname":"MQTT_Broker.key","caname":"MQTT_CA.crt","verifyservercert":false}]
Davis makes a good weather station.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #308  
Old May 31st, 2018, 08:26 AM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,442
Relating to RF weather / Davis et al there is also a DIY combo Arduino board(s) off on a bit of a tangent here...

called WeatherDuino

Author utilizes the Davis serial language for a combination device receiver/transmitter that utilizes Davis or any other kind of weather sensor.
Cumulus works with this device. Thing is the author of Cumulus is retiring and now traveling / sightseeing. (hence tinkering with WeeWx - mostly python).

Ideally if the WeatherDuino device spoke Mosquitto ....

Name:  wd0.jpg
Views: 151
Size:  369.5 KB
Name:  wd-1.jpg
Views: 150
Size:  212.4 KB
Name:  wd2.jpg
Views: 152
Size:  224.0 KB
Name:  wd3.jpg
Views: 151
Size:  293.9 KB
Name:  wd4.jpg
Views: 153
Size:  312.2 KB
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; May 31st, 2018 at 08:38 AM.
Reply With Quote
  #309  
Old May 31st, 2018, 02:48 PM
taylormia taylormia is offline
Seer Plus
 
Join Date: Aug 2015
Location: USA
Posts: 94
Hey Pete, See my post on this in the HS3 Weather Discussion forum...
Reply With Quote
  #310  
Old June 2nd, 2018, 07:11 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,442
@Michael,

Can I add a DHT22 combo sensor to the Sonoff Basic module and will it work with your current firmware?
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #311  
Old June 2nd, 2018, 07:50 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,783
I branched off at Tasmota 5.9.1. I did not intentionally remove any of its capability, but added to it. I see many references to DHT22 in the source so it should work.
Reply With Quote
  #312  
Old June 2nd, 2018, 09:08 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,442
Thank you Michael.
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.4449

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT
Reply With Quote
  #313  
Old July 6th, 2018, 06:34 PM
_ThaNerd_ _ThaNerd_ is offline
Seer Plus
 
Join Date: Nov 2012
Location: Canada
Posts: 80
Does the mosquito have to be installed on a ubuntu server or can it be installed on a Windows server (the same server where I have hs3 installed)?
Reply With Quote
  #314  
Old July 6th, 2018, 06:59 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,783
Anywhere on the network is fine for Mosquitto.
Reply With Quote
  #315  
Old July 10th, 2018, 12:53 PM
qwiksilver96 qwiksilver96 is offline
Seer
 
Join Date: Aug 2010
Location: NC
Posts: 39
Retained messages

Micheal, is there a way to set messages to be retained when sent via an event? I know it can be done via a script, but I would like to simplify this. If not currently available, could the feature be added to the script dialog box?

Best,
Frank
Reply With Quote
  #316  
Old July 10th, 2018, 08:32 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,783
Do you need retain to be different on a event by event and device by device basis? Currently it is a global set on General tab. It also can be different for each device so when the value or string changes for the associated device the message will have the desired retain property.
Reply With Quote
  #317  
Old July 12th, 2018, 08:51 AM
qwiksilver96 qwiksilver96 is offline
Seer
 
Join Date: Aug 2010
Location: NC
Posts: 39
Quote:
Originally Posted by Michael McSharry View Post
Do you need retain to be different on a event by event and device by device basis? Currently it is a global set on General tab. It also can be different for each device so when the value or string changes for the associated device the message will have the desired retain property.
No need to retain differently on an event by event basis. For some reason, the setting in the general tab did not stick when I had previously turned it on. I checked the setting and noticed it was off. Enabled it and it is working as desired.

Thank you,
Frank
Reply With Quote
  #318  
Old July 15th, 2018, 04:20 PM
geirra geirra is offline
Viewer
 
Join Date: Jul 2018
Location: Europe
Posts: 2
Quote:
Originally Posted by Michael McSharry View Post
I'm here to help whenever you have time.



Switch --Zwave-->HS (e.g. Device 123)
mcsMQTT Device 123 has Publish (status) topic HS/Dimmer/, Subscribe (status) topic setup for NR/Dimmer

1. Switch turns ON -> HS Device 123 Value = 100
2. HS Event Device 123 changed to 100 -> msMQTT
3. mcsMQTT Publishes HS/Dimmer with payload 100
4. Broker sends HS/Dimmer=100 to NR
5. NR publishes NR/Dimmer=40 (set to 40% DIM)
6. Broker sends NR/Dimmer=40 to mcsMQTT
7. mcsMQTT sets Device 123 to 40

mcsMQTT debug will time-stamp steps 2, 6 and 7 which are its interface boundaries. The debug checkbox on the General tab needs to be set to get this visibility.
Step 2 will be "HSEvent Do= "
Step 6 will be "ActoOnMessageFor Trigger Topic "
Step 7 will be "Update Accepted "
Wireshark or similar can measure the network traffic timing

If my seven step flow is correct then I actually expect step 8 to generate another HS Event call to mcsMQTT to reflect a change to 40 and the flow would repeat again. It may be that my interpretation is not totally correct, but at least it should show intent and method to understand timing debug available.

In the above there are no user events setup within HS to manage MQTT traffic. It is all done through devices. There are no virtual devices setup as everything is managed through the one real device.
Probally something i have missed, but i got mcsMQTT to publish my zwave unit, but it does push the changes back.

Set it up as below.


What am i missing?
Reply With Quote
  #319  
Old July 15th, 2018, 06:31 PM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,783
I need some help on your terminology. What I think you indicated is that the status topic (..._Multilevel_1) is being published on a change in Device 111, but when some external node publishes the control topic (..._Multilevel_1_set) there is no change in the Zwave device or HS device 111.

Assuming this is the question, then the control topic payload needs to match something that the Zwave device can understand. If you provide the debug output for time when the control topic is published then more specific input can be provided. Debug is enabled on the General tab and the output in the file \Data\mcsMQTT\mcsMQTT Debug.txt.
Reply With Quote
  #320  
Old July 16th, 2018, 10:17 AM
geirra geirra is offline
Viewer
 
Join Date: Jul 2018
Location: Europe
Posts: 2
Quote:
Originally Posted by Michael McSharry View Post
I need some help on your terminology. What I think you indicated is that the status topic (..._Multilevel_1) is being published on a change in Device 111, but when some external node publishes the control topic (..._Multilevel_1_set) there is no change in the Zwave device or HS device 111.

Assuming this is the question, then the control topic payload needs to match something that the Zwave device can understand. If you provide the debug output for time when the control topic is published then more specific input can be provided. Debug is enabled on the General tab and the output in the file \Data\mcsMQTT\mcsMQTT Debug.txt.
Thanks

Yes, this is correct.
The zwave dimmer is using 0 to 99 as values, i have tried to push, 0, 10 and 99 none where passed on

In the logs below i have changed the device to switch4 HS ref 19
other than that same syntax, verified that the messages are sent on the bus

Log: https://pastebin.com/raw/UuarwQ6G
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERRO Calling SetIOMulti in plugin Arduino Plugin:Object reference not set to an in fvhemert Arduino Plugin (3P) 5 April 28th, 2017 10:15 AM
Nest Plugin Errors - cannot change temperature via plugin TimSRQ Nest Devices (3P) 2 August 15th, 2016 08:48 AM
Upgrade procedure for ACRF plugin from W800 free plugin htsource ACRF Processor (3P) 14 January 26th, 2006 11:21 AM
Switch-to messages, plugin restart, and plugin startup Michael McSharry Plug-In Development 4 January 27th, 2003 11:20 PM


All times are GMT -4. The time now is 12:48 PM.


Copyright HomeSeer Technologies, LLC