-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A request to add a Water Counter type #40
Comments
Just to clarify: this is a standard mysensors pulse watermeter, not something exotic, so adding it might be useful |
Have added that particular type / subtype combination to the existing Watermeter service - Head to homebridge-edomoticz/lib...
Test & let me know...! |
[eDomoticz] Initializing platform accessory 'Water Cold'... TypeError: this.name is not a function |
I assume the line I corrected this, and also changed "CurrentConsumption" charachteristic to "Total consumption" The counter is now listed in Eve, but:
|
Ok, here what happens: when the counter changes in Domoticz, the correct value appears in Eve, but very briefly, than changes back to zero. |
OK - give it another try now - I added it to completely the wrong characteristic last time. It’s now been shifted into a different one...
|
Thanks.
|
This type WORKS correctly: { This DOESN'T: |
I’ve only written in Currentconsumption support... haven’t written in total consumption support.
Dammit - I’ll have to drag @xTheRamon in on that - sorry Ramon - think I broke something in my manual merging!
It’s just defaulting to a meter sensor which only shows the output from the Data: field in the JSON as the “Waterflow” subtype isn’t implicitly supported. Different Type/SubType combinations have to be handled differently... for instance the first only presents the Data: field, whereas the second presents Counter & CounterToday which means needing their own service definitions. Units have to be stripped from the readings else you can’t use use the data for any automation rules. I’m going to need MQTT output for the RFXMeter also if you can get it...? For most of my meters that output similarly to the RFXMeter, via MQTT domoticz ONLY sends current consumption. Never sends total consumption. |
I’m going to need MQTT output for the RFXMeter also if you can get it...? For most of my meters that output similarly to the RFXMeter, via MQTT domoticz ONLY sends current consumption. Never sends total consumption. yes, I recall analyzing MQTT output and noticing it. One of many Domoticz oddities. |
Here we go: { |
Cool - ta... but which value - current flow rate, or total flow rate? It’s only sending one. At the moment I’m assuming that’s current flow rate?? |
OK - back up current installation, and pull the mqtt-integration branch again... I’ve now added implicit water flow handling for both sensor types above, hopefully with correct units also. The brightness side of things I’ll have to leave to Ramon as I don’t actually HAVE any dimmers to diagnose with, and he wrote all of the dimming support in the plugin. |
Sorry if I made it not clear. I have 2 data types coming from the water meter: flow and total consumption. There is the third parameter (dayly consumption) that Domoticz calculate itself. The node attached to the hardware counter doesn't send it. I know it for sure since I designed it :-) |
Yep - got all that... latest commit should cover it correctly, for both your RFXMeter > RFXMeter Counter Device (IDX 66 - reading the Counter and CounterToday fields via HTTP, updating the Counter field from svalue1 via MQTT in realtime), and your General > Waterflow device (IDX 62 - reading just the Data field, updating just the data field from svalue1 via MQTT in realtime). What I was trying to establish is: |
usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:52 TypeError: this.getCharacteristic is not a function |
rolls eyes I forgot to add the new services to the inheritance patches. Repull index.js and should be fixed - sorry! |
/usr/local/lib/node_modules/homebridge-edomoticz/lib/domoticz_accessory.js:1250 TypeError: Cannot read property 'on' of undefined |
If you take the MQTT output for IDX66, and compare it to the JSON output for IDX66, which two fields match up. What does svalue1 from the MQTT correlate to in the JSON. MQTT svalue1 "224500" partially correlates to JSON "Data" : "224.500 m3" or "Counter" : "224.500 m3" |
I've only just now read that you dragged me in on this one. Haha. Whoops. I won't fix anything with dimmers now though as it seems they're working perfectly now. |
Create a new issue if still exists in current version - originally raised under v1.x - we’re not on v2.x |
Here is the JSON outcome for the device:
{
"ActTime" : 1472668145,
"ServerTime" : "2016-08-31 21:29:05",
"Sunrise" : "05:34",
"Sunset" : "19:24",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"Counter" : "211.200 m3",
"CounterToday" : "100 Liter",
"CustomImage" : 0,
"Data" : "211.200 m3",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 2,
"HardwareName" : "My GW",
"HardwareType" : "MySensors Gateway USB",
"HardwareTypeVal" : 41,
"HaveTimeout" : false,
"ID" : "0501",
"LastUpdate" : "2016-08-31 20:43:05",
"Name" : "Water Cold",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "RFXMeter counter",
"SwitchTypeVal" : 2,
"Timers" : "false",
"Type" : "RFXMeter",
"TypeImg" : "counter",
"Unit" : 0,
"Used" : 1,
"ValueQuantity" : "",
"ValueUnits" : "",
"XOffset" : "0",
"YOffset" : "0",
"idx" : "1"
}
],
"status" : "OK",
"title" : "Devices"
}
The text was updated successfully, but these errors were encountered: