I had protected the payload, but had not considered the topic with quotes. Should be fixed in 3.0.4.2.
Announcement
Collapse
No announcement yet.
mcsMQTT Plugin
Collapse
This is a sticky topic.
X
X
-
Originally posted by qwiksilver96 View PostThe IP I referred to is for the plugin connection to the HS3 instance upon plugin startup. Once that connection is live, then the plugin connects to the MQTT Broker.
Best,
Frank
Must say after getting this working I'm hooked on mqtt devices....
PeteHS 2.2.0.11
Comment
-
Hi,
i've been following this thread and finally tried this plugin...
I have to say that it's becoming very powerful! Kudos to the author!
When I added a Sonoff temperature sensor I have the same parsing issue someone else had in this thread:
is there a way to remove the bracket?
The original message is:
Code:Info: Received MQTT topic: tele/sonoff_caldaia/SENSOR payload: {"Time":"2018-01-07T17:38:49","Switch2":"ON","DS18B20":{"Temperature":45.3},"TempUnit":"C"}
And also, the decimal point is shown as ".", any idea of an easy way to change it to "," ?
Using the other MQTT plugin, I made a script that read the whole string, trims out the XX.X and transform to XX,X.
Not the best way to do it but it worked.
Comment
-
In other plugins I tried to determine regional settings for comma vs period to handle things properly. I will look to see what I implemented for mcsMQTT. If I have the provisions then I will need you help with some test code to properly detect and handle it.
I thought I had the parsing working fine with the latest, but will look into it for the following. The prior problem with an actual parsing error and in this case it looks to be the closing } is included as JSON content.
Code:{"Time":"2018-01-07T17:38:49","Switch2":"ON","DS18B20":{"Temperature":45.3},"TempUnit":"C"}
Comment
-
Parsing corrected again in 3.0.4.3. Still working with HST to get the plugin in the updater. The original is there now, but these updates are not yet showing up. http://mcsSprinklers.com/mcsMQTT_3_0_4_3.zip
For the comma vs. period we need to look at what is happening as DeviceValue is being updated. In the example with the parsing error the item was not numeric so it was stored in DeviceString. With the updated version look at Device Management page and see what is actually stored in the Value and see how HS3 converts it to Status for display.
Comment
-
Originally posted by doppiaemme View PostHi,
i've been following this thread and finally tried this plugin...
I have to say that it's becoming very powerful! Kudos to the author!
When I added a Sonoff temperature sensor I have the same parsing issue someone else had in this thread:
is there a way to remove the bracket?
The original message is:
Code:Info: Received MQTT topic: tele/sonoff_caldaia/SENSOR payload: {"Time":"2018-01-07T17:38:49","Switch2":"ON","DS18B20":{"Temperature":45.3},"TempUnit":"C"}
And also, the decimal point is shown as ".", any idea of an easy way to change it to "," ?
Using the other MQTT plugin, I made a script that read the whole string, trims out the XX.X and transform to XX,X.
Not the best way to do it but it worked.
// WARNING: Select none for default one DS18B20 sensor or enable one of the following two options for multiple sensors
//#define USE_DS18x20 // Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
You need to go back into the user_config.h file and put a // infront of the define. Compile it and you can do an OTA upgrade and it will be sorted :-)
If you want different delimiters you will need to experiment in the Tasmota code to find where the mqtt message is created
PeteHS 2.2.0.11
Comment
-
Maybe I've missed it, but is there a way with this plugin to specify a topic to receive and create a device for it if it's not in the list on the plugin config page? I'm switching over from the other MQTT plugin and I have devices for the number of broker connections and subscriptions to use as diagnostic tools ($SYS/broker/clients/connected and $SYS/broker/subscriptions/count). These topics don't appear in the list but are published when I subscribe to them with other clients.
Comment
-
The plugin subscribes to Topic template # so everything the broker sees should also be visible to the plugin. Do you know why they may not be visible? Could it be that the Topic has not been published since the plugin was activated?
To answer you question explicitly, there is no provision to receive a Topic that has not been previously published. I can add it, but first need to understand the need. There is a means to publish Topic that are not associated with existing received or existing HS3 devices. While it is available, I do not see where many will use it.
Comment
-
Originally posted by doppiaemme View Post
is there a way to remove the bracket?
The original message is:
Code:Info: Received MQTT topic: tele/sonoff_caldaia/SENSOR payload: {"Time":"2018-01-07T17:38:49","Switch2":"ON","DS18B20":{"Temperature":45.3},"TempUnit":"C"}
{"Time":"2018-01-08T08:49:51","AM2301":{"Temperature":44.6,"Humidity":5.0},"T empUnit":"C"}HS 2.2.0.11
Comment
-
Hi Michael
That last update broke the temp/humidity value. Example message sent from broker to mcs_mqtt
{"Time":"2018-01-08T08:49:51","AM2301":{"Temperature":44.6,"Humidity":5.0},"T empUnit":"C"}
The humidity value is set to 5.0}
I've rolled back to the previous version and its fine...ie: 5.0
Cheers..PeteHS 2.2.0.11
Comment
-
Michael,
Here have created a 1-wire hub in the attic for the second floor temperature and humidity sensors.
Currently using both Digitemp and OWFS on an RPi in the attic. Digitemp creates a CSV file which is on a shared drive on the HS3 Linux mothership.
A VB script runs every 5 minutes which reads the values and creates dynamic variables.
Only thing is that the script is statically configured per 1-wire device reads. IE: adding a sensor is not a dynamic thing.
What would be the best or easiest methodology to broadcast these values with MQTT using OWFS or Digitemp?
I see a few python scripts that do this out there in internetlandia.
Here is one that I am looking at: mqtt-owfs-temp- Pete
Auto matorHomeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram
HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
HSTouch on Intel tabletop tablets - Asus AIOX10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant
Comment
-
That last update broke the temp/humidity value. Example message sent from broker to mcs_mqtt
{"Time":"2018-01-08T08:49:51","AM2301":{"Temperature":44.6,"Humidity":5.0},"T empUnit":"C"}
The humidity value is set to 5.0}
What would be the best or easiest methodology to broadcast these values with MQTT using OWFS or Digitemp?
Comment
-
Originally posted by Michael McSharry View PostTook a deeper look and more thorough test. Update in 3.0.4.4 http://mcsSprinklers.com/mcsMQTT_3_0_4_4.zip
I have not ventured from the .NET connector for mono and the ESP8266 contained in the Sonoff units. I know 1-wire is supported by the Tasmota software that is installed on the Sonoff, but never tried to understand details. MQTT is part of Tasmota as well as several Aurdino-class products. It may even be possible to get the MQTT libraries from Tasmota or similiar for repurposing. Sorry I cannot be much help, but my breadth of usage is not large.
The WeMOS/Nodemcu configurations are extremely handy as you couple them with a DS18b20 or am2301 temp/humid sensor and they are a temp node. Cost is less than $5...
Cheers & thanks
PeteHS 2.2.0.11
Comment
-
Originally posted by Pete View PostMichael,
Here have created a 1-wire hub in the attic for the second floor temperature and humidity sensors.
Currently using both Digitemp and OWFS on an RPi in the attic. Digitemp creates a CSV file which is on a shared drive on the HS3 Linux mothership.
A VB script runs every 5 minutes which reads the values and creates dynamic variables.
Only thing is that the script is statically configured per 1-wire device reads. IE: adding a sensor is not a dynamic thing.
What would be the best or easiest methodology to broadcast these values with MQTT using OWFS or Digitemp?
I see a few python scripts that do this out there in internetlandia.
Here is one that I am looking at: mqtt-owfs-temp
Sent from my SM-N950U using Tapatalk
Comment
-
Originally posted by Michael McSharry View PostThe plugin subscribes to Topic template # so everything the broker sees should also be visible to the plugin. Do you know why they may not be visible? Could it be that the Topic has not been published since the plugin was activated?
To answer you question explicitly, there is no provision to receive a Topic that has not been previously published. I can add it, but first need to understand the need. There is a means to publish Topic that are not associated with existing received or existing HS3 devices. While it is available, I do not see where many will use it.
https://mosquitto.org/man/mosquitto-8.html
https://github.com/mqtt/mqtt.github.io/wiki/SYS-Topics
https://www.hivemq.com/blog/mqtt-ess...best-practices
These don't appear in a subscription to #, and have to be subscribed to directly. Is it possible to add the ability to subscribe to a topic blindly, even if it hasn't already been published?
Sent from my SM-N950U using Tapatalk
Comment
Comment