MQTT Plugin
Moderator: Willem4ever
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
MQTT Plugin
Gisteren ben ik begonnen aan de development van een plugin die zich subscribed op een MQTTT broker. Zie hier de eerste screenshot van de plug-in met zeer beperkte functionaliteit - het ontvangen van de P1 data van mijn smartmeter. Als er forum members zijn met interesse dan hoor ik graag waar jullie zoal naar op zoek zijn.
Re: MQTT Plugin
Zou mooi zijn als alle status en value changes van andere devices ook naar de broker gestuurt kunnen worden en op deze manier Homeseer te ontsluiten.
Rene.
Re: MQTT Plugin
Mijn 2e gedachte (de 1e staat er al) was om de raw sensor data een format mee te kunnen geven, als in "%3.2f" en dergelijke.
Mooi werk!
Mooi werk!
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
Re: MQTT Plugin
Dat zit erin;Zou mooi zijn als alle status en value changes van andere devices ook naar de broker gestuurt kunnen worden en op deze manier Homeseer te ontsluiten.
/homeseer/floor/room/lampie 60
/homeseer/floor/room/lampie 0
/homeseer/floor/room/lampie 70
/homeseer is nu een vaste default prefix, floor en room zijn de locatie parameters, lampie is de naam van het device.
Re: MQTT Plugin
Ziet er goed uit! Is deze MQTT Plugin ook ergens beschikbaar?
Re: MQTT Plugin
Daar ben ik ook benieuwd naar. Digit maakt mij enthousiast maar mijn programming skills zijn nog niet op het niveau dat ik drivers kan maken. Maar ik gebruik wel homeseer.
Verstuurd vanaf mijn GT-I9300 met Tapatalk
Verstuurd vanaf mijn GT-I9300 met Tapatalk
groeten,
Harry
Harry
Re: MQTT Plugin
Ik ben gisteren ook begonnen met onderzoek naar MQTT, de broker is geïnstalleerd en ik kan verbinding maken vanaf een Android client. Ik wil hem gebruiken om vanuit een Asterisk server CallerID te versturen naar HomeSeer
Wanneer komt de plugin beschikbaar ?
Wanneer komt de plugin beschikbaar ?
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MQTT Plugin
Ik ben mijn HomeSeer systeem (al enige tijd) aan het migreren naar een systeem op basis van MQTT/Node.js/websockets (he, waar hebben we dat meer gehoord?).
Om 'de winkel open te houden' en toch te kunnen migreren heb ik een plugin geschreven die het mogelijk maakt HomeSeer devices te koppelen aan MQTT topics. (Vergelijkbaar met Willems plugin)
Met deze versie (v0.4) van de plugin is het alleen mogelijk MQTT topic data te ontvangen in HomeSeer. In volgende versies zal het ook mogelijk zijn device aan te sturen of devices MQTT topics te laten updaten.
Veel plezier ermee!
Groet,
Ronald
Om 'de winkel open te houden' en toch te kunnen migreren heb ik een plugin geschreven die het mogelijk maakt HomeSeer devices te koppelen aan MQTT topics. (Vergelijkbaar met Willems plugin)
Met deze versie (v0.4) van de plugin is het alleen mogelijk MQTT topic data te ontvangen in HomeSeer. In volgende versies zal het ook mogelijk zijn device aan te sturen of devices MQTT topics te laten updaten.
Veel plezier ermee!
Groet,
Ronald
- Attachments
-
- HSPI_MQTT v0.4.zip
- HSPI_MQTT v0.4
- (30.75 KiB) Downloaded 895 times
Re: MQTT Plugin
I also started to fidle around with MQTT (owntracks and broker on Ubuntu Server) and i would like to know how the development is going. I` m currently running Domotiga which is sending me updates about my Youless and would like to add HS2 to the MQTT network to since this is my main domotica system
I also installed OpenHAB and and MQTT is running in my test setup. Now i need a way to connect HS2 to OpenHAB using MQTT so i would like to be able to send MQTT messages from HS2
I also installed OpenHAB and and MQTT is running in my test setup. Now i need a way to connect HS2 to OpenHAB using MQTT so i would like to be able to send MQTT messages from HS2
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MQTT Plugin
Een kleine update van de HomeSeer MQTT plugin.
Deze versie publiceert statuswijzigingen van HS devices automatisch in een MQTT topic: homeseer/reference id/status met de nieuwe status en homeseer/reference id/value met de nieuwe waarde.
Enjoy.
Deze versie publiceert statuswijzigingen van HS devices automatisch in een MQTT topic: homeseer/reference id/status met de nieuwe status en homeseer/reference id/value met de nieuwe waarde.
Enjoy.
- Attachments
-
- HSPI_MQTT v0.6.ZIP
- (31.63 KiB) Downloaded 913 times
Re: MQTT Plugin
Very nice, in the future I'll use your plugin to test some stuff. Thanks.
groeten,
Harry
Harry
Re: MQTT Plugin
How can i debug this plugin it does not seems to send/recieve any updates
The log gives me the following warning
13-1-2015 10:29:22 - Warning - 'status' property on device MQTT homeseer/K92/status was accessed - this property has been deprecated and should not be used.
Config
When i publish a test message to homeseer/K92/status with value "Dit is een test" the HomeSeer device is updated with those values. So reception of values seems to be working but sending status updates by homeseer is not working
Update:
I just learned the name referenceID is not the device CODE but the reference id as stated in the Additional Information Field under the device
The log gives me the following warning
13-1-2015 10:29:22 - Warning - 'status' property on device MQTT homeseer/K92/status was accessed - this property has been deprecated and should not be used.
Config
Code: Select all
<?xml version="1.0"?>
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MQTTServer>tcp://mqtt.hiddendomain.nl:1883</MQTTServer>
<HomeSeerRootTopic>homeseer</HomeSeerRootTopic>
<MQTTClientId>HOME_HS2</MQTTClientId>
<Mappings>
<Mapping>
<DeviceId>B1</DeviceId>
<TopicName>smartmeter/consumed_low</TopicName>
<Format>{0:#.##} kWh</Format>
</Mapping>
<Mapping>
<DeviceId>B2</DeviceId>
<TopicName>smartmeter/consumed_high</TopicName>
<Format>{0:#.##} kWh</Format>
</Mapping>
<Mapping>
<DeviceId>B3</DeviceId>
<TopicName>smartmeter/actual_rate</TopicName>
</Mapping>
<Mapping>
<DeviceId>B4</DeviceId>
<TopicName>smartmeter/actual_consumed</TopicName>
<Format>{0:#.##} kW</Format>
</Mapping>
<Mapping>
<DeviceId>B5</DeviceId>
<TopicName>smartmeter/gas</TopicName>
<Format>{0:#.##} m3</Format>
</Mapping>
<Mapping>
<DeviceId>B6</DeviceId>
<TopicName>homeseer/K92/status</TopicName>
<Format>{0:#.##} m3</Format>
</Mapping>
</Mappings>
</Settings>
Update:
I just learned the name referenceID is not the device CODE but the reference id as stated in the Additional Information Field under the device
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MQTT Plugin
Hi Raymon,
I know it's a bit odd that you should use the DeviceId for topic subscriptions, while topic publishing uses the ReferenceId. This seems inconsistent, but is due to the fact that both Id's are being used within the topic name and the DeviceId can contain characters which are not allowed (or are reserved) within a MQTT namespace (such as the #, and + characters ).
Of course, if you like, this behavior can be changed quite easily in a future version of the plugin. For example by using a switch in the configuration file: UseReferenceIdInTopic = false, which will use the DeviceId instead of the ReferenceId in the (auto generated) published topic name.
Please also be aware that this version of the plugin does not catch all the status changes. It only catches the status changes of devices which have their Supports Status property set (true). I've noticed that many (third party) scripts and plugins create devices without this property set (false). This ends up HomeSeer ignoring the device (and my plugin also) when it changes its status (or value)... I'm currently investigating an alternative event mechanism which should be able the detect 99% of the device status changes. Now, all I need is some free time
Regards,
Ronald
I know it's a bit odd that you should use the DeviceId for topic subscriptions, while topic publishing uses the ReferenceId. This seems inconsistent, but is due to the fact that both Id's are being used within the topic name and the DeviceId can contain characters which are not allowed (or are reserved) within a MQTT namespace (such as the #, and + characters ).
Of course, if you like, this behavior can be changed quite easily in a future version of the plugin. For example by using a switch in the configuration file: UseReferenceIdInTopic = false, which will use the DeviceId instead of the ReferenceId in the (auto generated) published topic name.
Please also be aware that this version of the plugin does not catch all the status changes. It only catches the status changes of devices which have their Supports Status property set (true). I've noticed that many (third party) scripts and plugins create devices without this property set (false). This ends up HomeSeer ignoring the device (and my plugin also) when it changes its status (or value)... I'm currently investigating an alternative event mechanism which should be able the detect 99% of the device status changes. Now, all I need is some free time
Regards,
Ronald
Re: MQTT Plugin
For now it is working for me I get the status updates for my temperature sensors in OpenHAB
Little update:
When the MQTT broker connection is lost due to different reasons (broker restart, connection lost) the MQTT plugin is not reconnecting and gives the following error. Can this be fixed in the plugin?
Little update:
When the MQTT broker connection is lost due to different reasons (broker restart, connection lost) the MQTT plugin is not reconnecting and gives the following error. Can this be fixed in the plugin?
Code: Select all
In event STATUS_CHANGE callback for plug-in MQTT, object not removed, error: You need to connect to a broker before trying to Publish Source: Microsoft.VisualBasic
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Re: MQTT Plugin
Hi,
any plans for a HS3 version of this plugin?
Today my smart meter has been installed, and I am planning to publish the smart meter data using MQTT.
I am running HS3 and a plugin for this Homeseer version will get me up-and-running in little time.
Regards,
Geert-Jan
any plans for a HS3 version of this plugin?
Today my smart meter has been installed, and I am planning to publish the smart meter data using MQTT.
I am running HS3 and a plugin for this Homeseer version will get me up-and-running in little time.
Regards,
Geert-Jan