[154] - CurrentCost Envir support

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

JC38
Posts: 51
Joined: Monday 23 June 2014 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Isère, France
Contact:

Re: [154] - CurrentCost Envir support

Post by JC38 »

CurrentCost devices are now integrated as hardware device. CC owners can now test this new opportunity to get their CC device into Domoticz.
Raspberry Pi 3 Domoticz latest public beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows 2012R2 with Essentials + Domoticz Windows (latest) + Open Hardware Monitor
ImperiHome with mdat / Domoticz for Android
steef84
Posts: 37
Joined: Friday 30 August 2013 20:24
Target OS: NAS (Synology & others)
Domoticz version: DS213+
Contact:

Re: [154] - CurrentCost Envir support

Post by steef84 »

Thanks for the hint. Been running a python script for almost a year now. Now need to figure how to migrate that data to the new native counter ...
- Stefan
sarwanov
Posts: 1
Joined: Sunday 27 December 2015 8:00
Target OS: Linux
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by sarwanov »

looking forward to seeing your script
Graduated from Soran University with First Class Degree with Honours in Computer Science.
hendrik6073
Posts: 9
Joined: Wednesday 28 January 2015 12:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by hendrik6073 »

JC38 wrote:CurrentCost devices are now integrated as hardware device. CC owners can now test this new opportunity to get their CC device into Domoticz.
ok, what steps should i take to test it ?
JC38
Posts: 51
Joined: Monday 23 June 2014 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Isère, France
Contact:

Re: [154] - CurrentCost Envir support

Post by JC38 »

Just go to Setup/Hardware and add a new device without forgetting to specify the Serial port.
Add_CurrentCost
Add_CurrentCost
Capture.JPG (41.63 KiB) Viewed 4040 times
Raspberry Pi 3 Domoticz latest public beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows 2012R2 with Essentials + Domoticz Windows (latest) + Open Hardware Monitor
ImperiHome with mdat / Domoticz for Android
JC38
Posts: 51
Joined: Monday 23 June 2014 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Isère, France
Contact:

Re: [154] - CurrentCost Envir support

Post by JC38 »

I've seen that the CurrentCost integration have been done by "JohnAdders". Don't find him in this forum with this name.
Hope he comes here...

John, is-it possible to add support for other devices monitored by the CC ?
Actually, only the sensor 0 (whole house) is logged however getting also the others in separate Domoticz devices would be interesting.
Another question : how often new values are inserted into Dz database ?
Raspberry Pi 3 Domoticz latest public beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows 2012R2 with Essentials + Domoticz Windows (latest) + Open Hardware Monitor
ImperiHome with mdat / Domoticz for Android
steef84
Posts: 37
Joined: Friday 30 August 2013 20:24
Target OS: NAS (Synology & others)
Domoticz version: DS213+
Contact:

Re: [154] - CurrentCost Envir support

Post by steef84 »

been using CC EnviR for 2 days with the native hardware support.
It seems to be counter only, not summing up daily kwh totals. Is there a way to change it?
- Stefan
rostyk
Posts: 9
Joined: Monday 04 January 2016 16:58
Target OS: Windows
Domoticz version: 2.4028
Contact:

Re: [154] - CurrentCost Envir support

Post by rostyk »

No devices added when using CurrentCost Meter with LAN interface (i assume port should be 80)
In a log i just can see:

Code: Select all

 CurrentCost Smart Meter: connected to: 192.168.1.xxx:80
User avatar
gizmocuz
Posts: 2492
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: [154] - CurrentCost Envir support

Post by gizmocuz »

Maybe you could help John and make a git pull request with the code changes ?
Quality outlives Quantity!
JC38
Posts: 51
Joined: Monday 23 June 2014 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Isère, France
Contact:

Re: [154] - CurrentCost Envir support

Post by JC38 »

I am sorry not to be aware at all with GitHub. Even if I know some very little things about coding, I don't know how to use these tools.
The only things I can do is testing and discussing about the approach for solving the problem.
Is it possible to ask John to come to this topic ?
Raspberry Pi 3 Domoticz latest public beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows 2012R2 with Essentials + Domoticz Windows (latest) + Open Hardware Monitor
ImperiHome with mdat / Domoticz for Android
JohnAdders
Posts: 15
Joined: Tuesday 01 December 2015 9:42
Target OS: Linux
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by JohnAdders »

JC38 wrote: Hope he comes here...
Only occationally, I should have tracked to see if it actually works in the wild.
JC38 wrote:John, is-it possible to add support for other devices monitored by the CC ?
Actually, only the sensor 0 (whole house) is logged however getting also the others in separate Domoticz devices would be interesting.
Almost certainly, I've got a CC-128 I think which only has basic output, if I can some real xml generated by other devices I can play with adding more things. Id' be good to see the xml with as many different numbers of devices and types connected as possible.
JC38 wrote: Another question : how often new values are inserted into Dz database ?
Seems to be every time the value change and it's sampled every few seconds. Can smooth it if required
Rene wrote:Also does not keep track of kwh history so far.
The history would be useful, was probably going to add this by integrating the Watt figures eventually just like in asjmcguire's script.
JohnAdders
Posts: 15
Joined: Tuesday 01 December 2015 9:42
Target OS: Linux
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by JohnAdders »

rostyk wrote:No devices added when using CurrentCost Meter with LAN interface (i assume port should be 80)
In a log i just can see:

Code: Select all

 CurrentCost Smart Meter: connected to: 192.168.1.xxx:80
The LAN interface requires a serial to lan converter somewhere else probably with a different port, more than likely you just want the plain USB and get the right serial port.

John
JC38
Posts: 51
Joined: Monday 23 June 2014 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Isère, France
Contact:

Re: [154] - CurrentCost Envir support

Post by JC38 »

JohnAdders wrote: Almost certainly, I've got a CC-128 I think which only has basic output, if I can some real xml generated by other devices I can play with adding more things. Id' be good to see the xml with as many different numbers of devices and types connected as possible.
John, thank you for coming here, and thank you for your job.
You will find as an attachment a zip file containing the xml raw data captured through the COM port.
As you will see, if you want to manage a CC with multiple devices (sensors) you will have to change the settings to ask people for the index (sensor id) of each one. And you also have to create a Domoticz device (type usage / subtype electric) per sensor.
Regarding the temperature, it's useless to upload it again when reading a sensor which id > 0. And even if you upload a new tmpr value each time you get a sensor 0 record, I think this is too much. My script was recording tmpr each time a value was received, and I think it explains why my database size was growing so fast.
I think updating the temperature only once per 10 values received per sensor with id0 is enough
Attachments
capture.zip
XML capture
(108.37 KiB) Downloaded 109 times
Raspberry Pi 3 Domoticz latest public beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows 2012R2 with Essentials + Domoticz Windows (latest) + Open Hardware Monitor
ImperiHome with mdat / Domoticz for Android
JC38
Posts: 51
Joined: Monday 23 June 2014 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Isère, France
Contact:

Re: [154] - CurrentCost Envir support

Post by JC38 »

JohnAdders wrote: Seems to be every time the value change and it's sampled every few seconds. Can smooth it if required
Rene wrote:Also does not keep track of kwh history so far.
The history would be useful, was probably going to add this by integrating the Watt figures eventually just like in asjmcguire's script.
John, I think the CC128 is transmetting its data through a "queue", the day and time pushed are not necessarly the same when it is decrypted by the client (Domoticz). And I don't think you are recording the date/time value from the CC, but the Domoticz timestamp.
In case you are logging the "Real-Time Output" watt values from the CC128, it's not a problem, because you are nearly the real time. And in fact, this is the best method, as the CC can easily be out of time (no daylight timesaving support, no ntp synchronization).
But when you will get the kwr records from the CC128, I can't see how to record these values into Domoticz with the good date/time. These kwh records are pushed as " History Output" and their date/time are the date/time when the value is pushed, not the value when the mesure occured.
Raspberry Pi 3 Domoticz latest public beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows 2012R2 with Essentials + Domoticz Windows (latest) + Open Hardware Monitor
ImperiHome with mdat / Domoticz for Android
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: [154] - CurrentCost Envir support

Post by Nautilus »

JohnAdders wrote: The LAN interface requires a serial to lan converter somewhere else probably with a different port, more than likely you just want the plain USB and get the right serial port.

John
Hi,

just to confirm - do I understand correctly that the LAN interface option is not meant to be working with CurrenCost Bridge (available for EnviR at least)? But the USB option should work just by hooking the unit (EnviR in my case) to the Pi running Domoticz?
JohnAdders
Posts: 15
Joined: Tuesday 01 December 2015 9:42
Target OS: Linux
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by JohnAdders »

Nautilus wrote: just to confirm - do I understand correctly that the LAN interface option is not meant to be working with CurrenCost Bridge (available for EnviR at least)? But the USB option should work just by hooking the unit (EnviR in my case) to the Pi running Domoticz?
Correct

John
JohnAdders
Posts: 15
Joined: Tuesday 01 December 2015 9:42
Target OS: Linux
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by JohnAdders »

JC38 wrote: In case you are logging the "Real-Time Output" watt values from the CC128, it's not a problem, because you are nearly the real time. And in fact, this is the best method, as the CC can easily be out of time (no daylight timesaving support, no ntp synchronization).
I'm using the real time, agree that I shouldn't trust the timestamps which is why I haven't done anything with the history yet. Haven't played for a while but will check what the discrepancy between integrating the real time and the history is.

John
JohnAdders
Posts: 15
Joined: Tuesday 01 December 2015 9:42
Target OS: Linux
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by JohnAdders »

JC38 wrote: As you will see, if you want to manage a CC with multiple devices (sensors) you will have to change the settings to ask people for the index (sensor id) of each one. And you also have to create a Domoticz device (type usage / subtype electric) per sensor.
I think I can automatically create new indexes when I see the sensor xml. Will have a look tomorrow.
JC38 wrote: Regarding the temperature, it's useless to upload it again when reading a sensor which id > 0. And even if you upload a new tmpr value each time you get a sensor 0 record, I think this is too much. My script was recording tmpr each time a value was received, and I think it explains why my database size was growing so fast.
I think updating the temperature only once per 10 values received per sensor with id0 is enough
The updates are every 6 seconds, do you think it's worth averaging every 10 for all readings to thottle to once a minute for the power as well?

John
JohnAdders
Posts: 15
Joined: Tuesday 01 December 2015 9:42
Target OS: Linux
Domoticz version:
Contact:

Re: [154] - CurrentCost Envir support

Post by JohnAdders »

@JC38

Are you able to try this code out? I've added code to support multiple meters and throttle the temp.

https://github.com/JohnAdders/domoticz.git

branch currentcost

John
JC38
Posts: 51
Joined: Monday 23 June 2014 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Isère, France
Contact:

Re: [154] - CurrentCost Envir support

Post by JC38 »

JohnAdders wrote: The updates are every 6 seconds, do you think it's worth averaging every 10 for all readings to thottle to once a minute for the power as well?

John
John, for my point of view you can keep each watt value you catch into the xml. In my opinion only the temperature sensor doesnt need to be updated with each record. 1 value par min = 1440 values/day.... Even a Oregon sensor doesn't send so many data. Once per 5 minutes would be enough. Or even better, send a new value for the tempr only if it's diffrent from the previous one :roll:
Raspberry Pi 3 Domoticz latest public beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows 2012R2 with Essentials + Domoticz Windows (latest) + Open Hardware Monitor
ImperiHome with mdat / Domoticz for Android
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests