This is caused by not using the </>
code function to insert flows. Use three back tic's (`) one a line before and after your flow and it should be able to be imported by others (see How to share code or flow json)
God afternoon from Gothenburg!
@Christian-Me - Finally I have now everything up and running the problem was the different applications I use in the Homey and the MQTT Broker which needed to be restarted in order to be in sync.
THANK YOU - for helping me out, even if i misled you in my conclusions, there are always simpler solutions than you first expect...
By the way, any one that can share an example of how to control a dimmable light with a slider widget, Property: Dim and ON/OFF in combination
Good afternoon from Yorkshire (UK).
Well done on this Christian, really useful to me - The password bit is working fine in latest version btw.
However I have some issues getting the dropdown list of 'devices' to be correct. I have 10 homie devices on this broker but only 6 show in the dropdown - and 3 of those are not even devices in /homie, or even homie structured - they come from higher in my topic tree. There are no homey-xxxxx devices in homie/
I have two nodes installed - the other on a different broker displays the 7 homie devices correctly. I deleted and recreated the problem node with same result.
I am getting 'device validation' errors though - I rushed a lot of the homie topics so it is almost certainly my fault. I am not sure what homie topics are used and important to you (a list would be useful) . Obviously $nodes and $properties are. Any more detailed information that these 'validation errors' could give would be most useful.
It could also be because there are 'devices' in the dropdown that are not homie devices at all of course.
Let me see what I can deduce about the validation to avoid you looking for something that isn't an issue. I do have a read access user available to my broker/homie tree if you would find that useful - it has a lot if topics (2814) within homie !
Kevin
homie is lightweight with QoS=0 and supports QoS=1 but QoS=2 is not appropriate. It's very hard work on the broker and all clients. /set messages must not be sent retained.
Hi Kevin,
Hi, fine that the password now working.
You will find a lot of information on the console to nail problems down to trace level. Just adjust your log level. The "ghost" devices are strange because the node subscribe only to homie/#. That then must be an issue in the used mqtt module (which is unlikely).
Messages about validation errors you will find when you open the device/node tree in the list. They should be marked with an question mark. Validation errors in the beginning are normal when not all data is available or not received (yet). Many problems came up when devices did not send or the broker did not handled messages as retained see link in documentation. One major problem during validation is that it is impossible to detect when all retained messages are received: MQTT determine when the last "retained" message arrived. So validation is done "on the flight". The validation is made as closely as possible to the convention (V 4.0.0). But the node should work even with some errors found. (i.e. missing $type topics).
$homie, $name, $nodes, $property, &datatype, $settable, $format (for color and enum) comes into my mind (perhaps I missed one or two)
But this could cause the "not homie" devices to show up because the node expects everything inside homie/# as a homie device.As far as I know there is no particular topic defined as an identifications, perhaps I should look for $homie. and filter everything out without that. Better is to keep your homie/# tree clean from other devices
The extensions ($fw / $stats) are not tested very deeply. So here can be a problem too.
You can find a "dump" of the homie data received by the node in global context. (if the option in extras is selected)
You can send me a dump of your broker if you like and I import them to my test broker or a link if it is available online. This helped a lot in the past. (curious to see 2814) I have only 524
QoS is not important for the node. But there is a "strange" relationship between the QoS and the retained flag in the MQTT Spec. Many "can", "should" and "as necessaries" in the MQTT spec which makes me wonder if a standard should be so vague. Worst case is that messages with QoS=0 are not treated as "retained" even if the flag is set at all.
Mosquitto by default treads these as retained as long as you don`t restart the broker or (perhaps) reach a certain threshold (100! I think). If you use mosquitto there are all necessary steps in the docs to get mosquitto behave as needed for the node..
Yes "most" messages (ALL necessary for auto-discovery) must be retained That is the persistence database of the homie convention. Be aware in mqtt explorers tree view all messages look like retained, even if they are not. Look out for the orange label (see docs too). But I think it will stay there even if the broker decides to discards QoS=0 messages "at any time" (see MQTT 3.1 / 3.1.1 spec)
As more I work with the homie convention as more I know that the people done that are quite smart and the convention is well thought out to be flexible and versatile.
I've been journeying with homie too (v3) and a lot of my issues are vagueness in the spec and of course the lack of a higher level model defining $types and how to model complete devices. To do auto recognition of a device type or capability rather than just the endpoint values requires a lot more work here.
I am currently authoring and about to release the MQTT plugin for Hubitat (a similar product to SmartThings) which both publishes devices to and imports / discovers devices using homie and the Home Assistant Discovery spec. My difficulty is trying to find homie implementations to test against. There is of course openHAB too for import into. I chatted with Harrie a lot during his Homey MQTT implementation so use that too.
Can you PM me ? I can't use that feature yet as I just registered on here. I will send you my broker login details then.
cough .. MQTT needs it though
A bit of work for me to do here...
I've found it reliable. I think it displays this label when upon initial connection it immediately gets a payload value (so it must be retained) and then when a subsequent message comes in it removes the label - although typically the topic is still retained. If you log off and on again the retained label will return. Of course if you later publish the payload not retained it would be lost.
I don`t know what you mean with high level but for me the convention covers everything which can be read or set by and computer without defining devices in detail by the convention. But we are talking about homie and not others which might have there own pros and cons.
I was working with openhab form many years but moved to node-red because I found it easier to use a system where I know at least a little bit of the language than openHAB based on than java where I have no knowledge at all and not willing to learn in the future. And then I am totally lost and have to rely on others if something goes "not as expected" this was a long time ago https://github.com/letscontrolit/ESPEasy/issues/1314 but I learned a lot (in this thread are some interesting insides to homie and mqtt covering retained msgs and tons of topics too)
I don't know if homie is still the protocol of choice for openHAB.
mqtt explorer gives some "young players" the impression that what they see is available on the broker even it is send with retained=false and will be sent to the node when subscribing. Was just trying to narrow the possible issues. In my case the retained flag stays as long the new msg carries this flag (and with the mosquitto configured as described even when sent with QoS=0) see screenshot. If not the msg might not be retained by the broker?
Yes that is very true... they look upon it as a database.
This is what I mean, really to achieve some plug and play usage for MQTT device discovery between systems, which will be essential for widespread adoption. This may not be the roll of homie as a lower layer definition but already things like $type are used in there and not well defined.
We will need some âcapabilitiesâ of devices defined as types that have mandatory sub nodes and optional ones too, so you could expose something more complex like a thermostat, AV amplifier, keypad or lock device. The presentation of enumerated values needs some standards recommended too. Maybe another higher level spec sat over homie 4 which is I agree already thorough at the individual node payload value definition.
All fun for the future..
So I'm not getting all my devices listed (6 of 10) so I guess that's to do with sizing restrictions so I kludged it by setting the root topic to
`homie/development'
to get one device 'development' which seems to work !
It has a validation error for $state at the node level in onoff but I don't think $state is required or expected there ?
All my device validation errors seem to be caused by $state being absent at the node level - it is present at the device level
I'm not sure about the name hierarchy displayed at the top either but that maybe because I kludged the root topic..
maybe it's the $type you're not liking ?
I don`t know that adding another hierarchic level into the root topic works. It was never intended or tested
Perhaps you still have to make sure that your mqtt broker provides all the retained messages. I think you never wrote which broker you are using or which kind of devices you are trying to connect.
Sorry, I`m too busy at the moment but perhaps this old flow can help to do your tests. This was my "proof of concept" before I decided to roll out a contrib node:
[{"id":"ff7f8cd5.1f168","type":"function","z":"25cbe481.e10bec","name":"payload>0","func":"if (msg.payload>0) {\n return msg;\n}","outputs":1,"noerr":0,"x":1290,"y":600,"wires":[["6909e129.6d064"]]},{"id":"fe7c3d31.aaeb","type":"function","z":"25cbe481.e10bec","name":"Homie","func":"var homieData = global.get(\"homieData\",\"file\") || {}\nvar elements = msg.topic.split('/');\nvar date = new Date();\nvar changed = false;\n\nif (homieData[elements[1]]===undefined) homieData[elements[1]]={\"mame\":elements[1]};\nif (elements.length==2) { // unit\n msg.unit = elements[1];\n msg.measurement = elements[1];\n msg.intervalUpdate = date.getTime() - homieData[elements[1]].lastUpdated;\n homieData[elements[1]].lastUpdated=date.getTime();\n} else {\n if (homieData[elements[1]][elements[2]]===undefined) homieData[elements[1]][elements[2]]={\"mame\":elements[2]};\n if (elements.length==3) { // device\n msg.unit = elements[1];\n msg.device = elements[2];\n msg.measurement = elements[1]+\"/\"+elements[2];\n msg.intervalUpdate = date.getTime() - homieData[elements[1]][elements[2]].lastUpdated;\n homieData[elements[1]][elements[2]].lastUpdated=date.getTime();\n } else {\n if (homieData[elements[1]][elements[2]][elements[3]]===undefined) homieData[elements[1]][elements[2]][elements[3]]={\"mame\":elements[3]};\n if (elements.length==4) { // parameter\n msg.unit = elements[1];\n msg.device = elements[2];\n msg.parameter = elements[3];\n msg.measurement = elements[1]+\"/\"+elements[2]+\"/\"+elements[3];\n if (homieData[elements[1]][elements[2]][elements[3]].$datatype!==undefined) {\n if (homieData[elements[1]][elements[2]][elements[3]].$datatype==\"integer\") {\n msg.payload=Math.floor(Number(msg.payload));\n }\n if (homieData[elements[1]][elements[2]][elements[3]].$datatype==\"float\") {\n msg.payload=Number(msg.payload);\n }\n }\n msg.intervalUpdate = date.getTime() - homieData[elements[1]][elements[2]][elements[3]].lastUpdated;\n homieData[elements[1]][elements[2]][elements[3]].lastUpdated=date.getTime();\n if (homieData[elements[1]][elements[2]][elements[3]].payload!=msg.payload) {\n msg.intervalChange = date.getTime() - homieData[elements[1]][elements[2]][elements[3]].lastChanged;\n homieData[elements[1]][elements[2]][elements[3]].payload=msg.payload;\n homieData[elements[1]][elements[2]][elements[3]].lastChanged=date.getTime();\n changed = true;\n } \n } else if (elements.length==5) { // parameter Info\n homieData[elements[1]][elements[2]][elements[3]][elements[4]]=msg.payload;\n }\n }\n}\n\nglobal.set(\"homieData\",homieData,\"file\");\nif (changed) return [msg,msg];\n else return [msg,null];","outputs":2,"noerr":0,"x":310,"y":540,"wires":[["ea69dec0.d0125"],["69a30ff7.6d3a3","323fa9a.3078456"]],"outputLabels":["all Messages","updated Messages"],"icon":"node-red/bridge.png"},{"id":"744898eb.220ac8","type":"mqtt in","z":"25cbe481.e10bec","name":"","topic":"homie/#","qos":"0","datatype":"auto","broker":"6389f524.8a4e3c","x":140,"y":540,"wires":[["fe7c3d31.aaeb","22286578.f0b08a"]]},{"id":"ea69dec0.d0125","type":"debug","z":"25cbe481.e10bec","name":"allValues","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":502,"y":459,"wires":[]},{"id":"22286578.f0b08a","type":"debug","z":"25cbe481.e10bec","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":310,"y":580,"wires":[]},{"id":"7c6b6568.d90a8c","type":"ui_level","z":"25cbe481.e10bec","group":"43e7dd36.28fbe4","order":0,"width":0,"height":0,"name":"Pumpe Power","label":"Leistung","colorHi":"#df0000","colorWarn":"#00b700","colorNormal":"#ff0000","colorOff":"#595959","min":0,"max":100,"segWarn":"45","segHigh":"55","unit":"w","layout":"sh","channelA":"","channelB":"","decimals":"1","animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#000000","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"x":1140,"y":680,"wires":[]},{"id":"6a35eb2.ba3fd14","type":"switch","z":"25cbe481.e10bec","name":"Energy","property":"parameter","propertyType":"msg","rules":[{"t":"eq","v":"Power","vt":"str"},{"t":"eq","v":"Voltage","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":940,"y":720,"wires":[["1c80ab26.6c4a05","7c6b6568.d90a8c","6909e129.6d064"],["e6409eaf.30f3f","fbc1c902.17dda8","6909e129.6d064"]]},{"id":"fbc1c902.17dda8","type":"ui_level","z":"25cbe481.e10bec","group":"43e7dd36.28fbe4","order":0,"width":0,"height":0,"name":"Pumpe Voltage","label":"Spannung","colorHi":"#df0000","colorWarn":"#00b700","colorNormal":"#ff0000","colorOff":"#595959","min":"190","max":"250","segWarn":"210","segHigh":"230","unit":"V","layout":"sh","channelA":"","channelB":"","decimals":"0","animations":"soft","shape":2,"colorschema":"fixed","textoptions":"default","colorText":"#000000","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":true,"x":1140,"y":760,"wires":[]},{"id":"69a30ff7.6d3a3","type":"switch","z":"25cbe481.e10bec","name":"unit","property":"unit","propertyType":"msg","rules":[{"t":"eq","v":"Bewaesserung-1","vt":"str"},{"t":"eq","v":"Bewaesserung-2","vt":"str"},{"t":"eq","v":"Bewaesserung-3","vt":"str"},{"t":"eq","v":"Teichpumpe","vt":"str"},{"t":"eq","v":"Teichventil","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":490,"y":540,"wires":[["87239fb.9860e6"],[],["5b959dfc.708394"],["cfd0cd9f.24754"],["b9d5baa.29a6848"]]},{"id":"cfd0cd9f.24754","type":"switch","z":"25cbe481.e10bec","name":"Teichpumpe","property":"device","propertyType":"msg","rules":[{"t":"eq","v":"Energy","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":720,"wires":[["6a35eb2.ba3fd14"]]},{"id":"5b959dfc.708394","type":"switch","z":"25cbe481.e10bec","name":"Bewaesserung-3","property":"device","propertyType":"msg","rules":[{"t":"eq","v":"BME280","vt":"str"},{"t":"eq","v":"BH1750","vt":"str"},{"t":"eq","v":"Rain","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":710,"y":540,"wires":[["824f522c.9241a"],["615b88e7.437fa8"],["4abc5d8e.055d74"]]},{"id":"824f522c.9241a","type":"switch","z":"25cbe481.e10bec","name":"BME280","property":"parameter","propertyType":"msg","rules":[{"t":"eq","v":"Temperature","vt":"str"},{"t":"eq","v":"Humidity","vt":"str"},{"t":"eq","v":"Pressure","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":940,"y":440,"wires":[["4707cb3e.73c874","6909e129.6d064","7ff6e58a.de588c"],["e9a281de.5463","6909e129.6d064"],["67e608be.47ec78","6909e129.6d064"]]},{"id":"4707cb3e.73c874","type":"ui_gauge","z":"25cbe481.e10bec","name":"Temperatur","group":"5ffa92f6.040b6c","order":1,"width":0,"height":0,"gtype":"gage","title":"Innentemperatur","label":"°C","format":"{{value | number:1}}","min":"-20","max":"45","colors":["#9ab1c2","#5ea83e","#a92e2e"],"seg1":"7","seg2":"30","x":1130,"y":400,"wires":[]},{"id":"615b88e7.437fa8","type":"switch","z":"25cbe481.e10bec","name":"BH1750","property":"parameter","propertyType":"msg","rules":[{"t":"eq","v":"Lux","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":940,"y":540,"wires":[["6909e129.6d064"]]},{"id":"67e608be.47ec78","type":"ui_text","z":"25cbe481.e10bec","group":"5ffa92f6.040b6c","order":2,"width":0,"height":0,"name":"","label":"Druck","format":"{{msg.payload}}","layout":"row-spread","x":1110,"y":480,"wires":[]},{"id":"e9a281de.5463","type":"ui_text","z":"25cbe481.e10bec","group":"5ffa92f6.040b6c","order":3,"width":0,"height":0,"name":"","label":"Luftfeuchte","format":"{{msg.payload}} %","layout":"row-spread","x":1130,"y":440,"wires":[]},{"id":"1c80ab26.6c4a05","type":"ui_chart","z":"25cbe481.e10bec","name":"","group":"763687d.660d278","order":2,"width":0,"height":0,"label":"Leistung","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"bezier","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1120,"y":720,"wires":[[]]},{"id":"87239fb.9860e6","type":"switch","z":"25cbe481.e10bec","name":"Bewaesserung-1","property":"device","propertyType":"msg","rules":[{"t":"eq","v":"Boden","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":710,"y":240,"wires":[["32f83a4c.e24d96"]]},{"id":"32f83a4c.e24d96","type":"switch","z":"25cbe481.e10bec","name":"Boden","property":"parameter","propertyType":"msg","rules":[{"t":"eq","v":"Temperature","vt":"str"},{"t":"eq","v":"Humidity","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":930,"y":240,"wires":[["beec2d09.0d7bb","a9fa8df7.44573","6909e129.6d064"],["6909e129.6d064","5a518902.cf5178","e0881662.c6eba8"]]},{"id":"beec2d09.0d7bb","type":"ui_gauge","z":"25cbe481.e10bec","name":"Temperatur","group":"9ee1b18d.51ece","order":2,"width":"3","height":"2","gtype":"gage","title":"Temperatur","label":"°C","format":"{{value | number:1}}","min":"-20","max":"45","colors":["#9ab1c2","#5ea83e","#a92e2e"],"seg1":"7","seg2":"30","x":1130,"y":180,"wires":[]},{"id":"4abc5d8e.055d74","type":"switch","z":"25cbe481.e10bec","name":"Rain","property":"parameter","propertyType":"msg","rules":[{"t":"eq","v":"Count","vt":"str"},{"t":"eq","v":"Total","vt":"str"},{"t":"eq","v":"Time","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":930,"y":620,"wires":[["1831d1d9.ab84ee","ff7f8cd5.1f168"],["1831d1d9.ab84ee"],[]]},{"id":"1831d1d9.ab84ee","type":"ui_chart","z":"25cbe481.e10bec","name":"","group":"4723b9bd.fb3598","order":2,"width":0,"height":0,"label":"Regen","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"step","nodata":"warte auf Regen","dot":false,"ymin":"0","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1110,"y":600,"wires":[[]]},{"id":"a9fa8df7.44573","type":"ui_chart","z":"25cbe481.e10bec","name":"","group":"9ee1b18d.51ece","order":1,"width":0,"height":0,"label":"Bodentemperatur","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"bezier","nodata":"warte auf Daten","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1130,"y":220,"wires":[[]]},{"id":"e6409eaf.30f3f","type":"ui_chart","z":"25cbe481.e10bec","name":"","group":"763687d.660d278","order":2,"width":0,"height":0,"label":"Spannung","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"bezier","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1130,"y":800,"wires":[[]]},{"id":"323fa9a.3078456","type":"debug","z":"25cbe481.e10bec","name":"changed","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":502,"y":612,"wires":[]},{"id":"b9d5baa.29a6848","type":"switch","z":"25cbe481.e10bec","name":"Teichventil","property":"device","propertyType":"msg","rules":[{"t":"eq","v":"Temperatur1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":880,"wires":[["e71d17ca.e3eca8"]]},{"id":"e71d17ca.e3eca8","type":"switch","z":"25cbe481.e10bec","name":"Temperatur1","property":"parameter","propertyType":"msg","rules":[{"t":"eq","v":"Temp1","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":880,"wires":[["50cf7b79.4db344","8b8a4e79.25681","6909e129.6d064"]]},{"id":"50cf7b79.4db344","type":"ui_chart","z":"25cbe481.e10bec","name":"Temperatur","group":"fa42e847.06d618","order":2,"width":0,"height":0,"label":"{{msg.parameter}}","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"step","nodata":"warte auf Daten","dot":false,"ymin":"0","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1130,"y":900,"wires":[[]]},{"id":"8b8a4e79.25681","type":"ui_gauge","z":"25cbe481.e10bec","name":"Temperatur","group":"fa42e847.06d618","order":1,"width":0,"height":0,"gtype":"gage","title":"Wassertemperatur","label":"°C","format":"{{value | number:1}}","min":"-5","max":"30","colors":["#9ab1c2","#5ea83e","#a92e2e"],"seg1":"7","seg2":"25","x":1130,"y":860,"wires":[]},{"id":"5a518902.cf5178","type":"ui_gauge","z":"25cbe481.e10bec","name":"Bodenfeuchte","group":"9ee1b18d.51ece","order":3,"width":"3","height":"2","gtype":"gage","title":"Feuchte","label":"%","format":"{{value | number:1}}","min":"40","max":"60","colors":["#008000","#5ea83e","#ffff80"],"seg1":"","seg2":"","x":1140,"y":260,"wires":[]},{"id":"e0881662.c6eba8","type":"ui_chart","z":"25cbe481.e10bec","name":"","group":"9ee1b18d.51ece","order":4,"width":0,"height":0,"label":"Bodenfeuchte","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"warte auf Daten","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1118,"y":300,"wires":[[]]},{"id":"7ff6e58a.de588c","type":"ui_chart","z":"25cbe481.e10bec","name":"","group":"5ffa92f6.040b6c","order":4,"width":"7","height":"7","label":"Temperatur","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"warte auf Daten","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"86400","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1130,"y":360,"wires":[[]]},{"id":"6909e129.6d064","type":"influxdb out","z":"25cbe481.e10bec","d":true,"influxdb":"30064ba2.1a2874","name":"to influxDB","measurement":"","precision":"","retentionPolicy":"","x":1510,"y":460,"wires":[]},{"id":"6389f524.8a4e3c","type":"mqtt-broker","z":"","name":"lol-server","broker":"192.168.2.14","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"43e7dd36.28fbe4","type":"ui_group","z":"","name":"Pumpe","tab":"23f4d58e.4acb7a","order":7,"disp":false,"width":"7","collapse":false},{"id":"5ffa92f6.040b6c","type":"ui_group","z":"","name":"Gewächshaus","tab":"23f4d58e.4acb7a","order":1,"disp":false,"width":"7","collapse":false},{"id":"763687d.660d278","type":"ui_group","z":"","name":"Energie Chart","tab":"97c2c784.50f0a8","order":6,"disp":true,"width":"8","collapse":true},{"id":"9ee1b18d.51ece","type":"ui_group","z":"","name":"Boden","tab":"23f4d58e.4acb7a","order":2,"disp":false,"width":"8","collapse":false},{"id":"4723b9bd.fb3598","type":"ui_group","z":"","name":"Regen","tab":"23f4d58e.4acb7a","order":3,"disp":false,"width":"8","collapse":false},{"id":"fa42e847.06d618","type":"ui_group","z":"","name":"Teich","tab":"23f4d58e.4acb7a","order":5,"disp":true,"width":"8","collapse":false},{"id":"30064ba2.1a2874","type":"influxdb","z":"","hostname":"192.168.2.14","port":"8086","protocol":"http","database":"openhab","name":"","usetls":false,"tls":"97f7df1d.bb18a"},{"id":"23f4d58e.4acb7a","type":"ui_tab","z":"","name":"Garten","icon":"dashboard","order":6,"disabled":false,"hidden":false},{"id":"97c2c784.50f0a8","type":"ui_tab","z":"","name":"Energie","icon":"power","order":12,"disabled":false,"hidden":false},{"id":"97f7df1d.bb18a","type":"tls-config","z":"","name":"1st Test","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"ca.crt","servername":"AH-BERLIN-0148","verifyservercert":true}]
This flow splits the homie input in its components and stores everything into global context. Perhaps you have to modify global.get and global.set to fit your contextStorage.
Hi Kelvin, I connected to your broker and yes there are problems with the node - some data is missing in the context store, that`s an indication. Sorry I could not dig deeper but I will do as soon as possible - after Christmas.
Please raise an issue on github because otherwise we spam this topic here.
Thank you for your contribution and have a nice Christmas.
hey @Christian-Me i built my own mqtt-based abstraction for my smart home devices some time ago. i have various adapters implemented using node-red, which translate device specific messages to my own message topology and vica-versa.
recently, i stumbled over the homie convention and i am playing with the thought of migrating my own homebrew-implementation to a homie-compliant one ever since. further research brought me here: great stuff you did so far with node-red-contrib-homie-convention
as i understand, i could "simply" ( ) replace/extend my own adapters with your homie-node
node in order to migrate to homie. what is the current status of your library? are you still working on it, or did you put it aside? the "beta" remarks leave me a bit nervous, though i am still keen to give your lib a try once
cheers,
manuel
Hi @swissmanu. welcome
the current release is not updated for a while and will probably never except of bugfixes.
But the project is still active active. The next release will likely break some flows but it needed a facelift and a lot of refurbishment under the hood. I recently pushed a development branch with the redesigned nodes.
-
The
homie-device
node supports now multiple base topics and individual selection of nodes and/or branches. This is mostly finished and will need some bugfixes
-
I separated the dashboard stuff in a separate node. As a lot of things changed in the dashboard over time there are a lot of broken features. (Slider and switch are working)
-
What will interest you most is the homie-pro node. It is designed to represent Node-RED and other devices on the broker via homie. It is completely redesigned, featuring multi base ids, a mqtt connection per device to have LWT
$state=lost
working,$state=disconnected
on Node-Red shutdown.$stats/uptime
updates and many more. It lacks a fancy editor ui but benefits from flexible JSON configuration (even via messages):
You can even design your own extensions and mess around with the convention.
I can promise further development and I'm open to any input. But my time is limited so I can't promise fast development. I'm using the old and the new version in my live systems so they work here to some extent. But every implementation is different and there are certainly a lot of sharp edges.
Chris
hi chris
thank you for the extensive overview on the most recent progression on node-red-contrib-homie-convention
. this looks all very interesting (a like a lot of work )
i will give it a try in the upcoming weeks, if i find some spare time. if i stumble over any bugs or i see something that could be improved, i am happy to contribute to your project.
until then, take care
manuel