Hex Licence 5 Minute Log ?

Plugwise Forum about Plugwise devices and the Source software.

Hex Licence 5 Minute Log ?

Postby john9889 » Tue Dec 17, 2013 11:34 am

Hi all,

since a couple of weeks i have the starter set (8circles, 1circle+, licence and 1 stick)
now i want it to log every 5 minutes, instead of 1 hour..

i feel like this option should be part of the source software.
is there some hex change availble to do this??

With friendly greets,
John9889
john9889
Starting Member
Starting Member
 
Posts: 6
Joined: December 2013

Re: Hex Licence 5 Minute Log ?

Postby roheve » Tue Dec 31, 2013 9:13 pm

Technically speaking, and highly speculative.
There could be some setting regarding the firmware of the plugs, possibly even configurable. But as nobody reverse engineered the firmware (as far as I know) we don know if that is possible. There is no official documentation available of all the commands a plug would understand.

There are a few command send to plugs that have 'unknown' parmeters, and source always uses the same values, but it would be a lot of work, to guess what happens when you vary those values (and hope to find some usefull combination). Thre could even be commands that 'source' never uses, but do set or trigger usefull actions in the firmware, but that is pure speculation. (they could also brick your plug).

The PC software 'source' just reads the buffer of the plugs, which by default seems to only store hourly accumulated power readings.
roheve
Starting Member
Starting Member
 
Posts: 47
Joined: April 2011

Re: Hex Licence 5 Minute Log ?

Postby Darwusch » Wed Jan 01, 2014 4:15 pm

Happy new year to everybody!

I explained how to do that in this post:
domoticaforum.eu/viewtopic.php?f=39& ... =75#p64904
On my server, I use all intervals including the 5 min interval.

After you changed the hex code, you have to set the interval in the settings in the Source:
Settings -> Appliances -> right click an appliance -> Properties -> click the small icon at the right of the meter number -> Select the loging interval.
Darwusch
Member
Member
 
Posts: 161
Joined: December 2008
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Postby roheve » Thu Jan 02, 2014 2:36 am

Ok, found two new protocol commands, 0058 with 4 two hex chars as parameter (only seen 00) and 0057 with four chars as parameter (only seen 0000).

SEND 0058 <mac> 00
RECV 0000 1201 00F9 <mac>

SEND 0057 <mac> 0000
RECV 0000 1207 00F8 <mac>

no clue yet how the time-period for archiving is encoded.
roheve
Starting Member
Starting Member
 
Posts: 47
Joined: April 2011

Re: Hex Licence 5 Minute Log ?

Postby Darwusch » Thu Jan 02, 2014 1:48 pm

Yes, the function for 0057 is called PWSetMeasurementIntervalRequestV1_0 in the code.
Command + Data + CRC16(Command + Data)
Command here is "0057"
Data here is MacId, ConsumptionInterval, ProductionInterval

But when you change the interval the way I described, you can see the different data strings and there are only 5 different intervals possible (1, 3, 5, 15, 60).

And 0058 is called PWClearGroupMacTableRequestV1_0

@ roheve: Why do you want to know the coding of the interval?
The only question was how to change the interval for a module to 5 minutes.
And I explained how to do that.
Darwusch
Member
Member
 
Posts: 161
Joined: December 2008
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Postby roheve » Thu Jan 02, 2014 10:00 pm

Darwusch wrote:@ roheve: Why do you want to know the coding of the interval?
The only question was how to change the interval for a module to 5 minutes.
And I explained how to do that.


Yes, you did. Took me a bit of reading in that other forum (where it was a bit of a different subject, 'extended scripting', and assumed that it had to do with reading through the website). After you explained the reason and where to look in an earlier reply in this threat, I found it. I never knew that it was possible with source, but after the tiny mod it was.

The reason I try to find the bare commands is that I do not like the 'source' program. It's spying on you, (got a new 'registration mail', because I toggled a checkmark for sending annon info) and it's a windows program. I run source once about a month to collect data and export it. I use a netbook for that, and 'source'is just a tiny bit to big to fit in the 600 pixel height (e.g. for changing the schedule). I'm, sometimes running scripts for stats fom linux, but that is not finished, just playing.

Roelof
roheve
Starting Member
Starting Member
 
Posts: 47
Joined: April 2011

Re: Hex Licence 5 Minute Log ?

Postby roheve » Thu Jan 02, 2014 10:21 pm

Darwusch wrote:Yes, the function for 0057 is called PWSetMeasurementIntervalRequestV1_0 in the code.
And 0058 is called PWClearGroupMacTableRequestV1_0

Do you know more official names for other commands, and the meaning of the bits in the flags dword in a 0000 reply?
But that discussion is beter in the old 'protocol' threath, that is 'sticky' now (did not notice that before).

My definition for the 0057 command was not quite correct (due to a typo in my PW logfile filter script) :(

The parameters for 0057 are one <16-hex-char> macaddress followed by two <4-char-hex> items, with the meaning you already explained. The protocol uses a 16-bit hex-value, so even intervals longer as 60 min (#003C) minutes might be possible (untested,just speculating, but e.g. 8 hours, 480 min, #01E0).

But for me every 5 minutes would be interesting too.
roheve
Starting Member
Starting Member
 
Posts: 47
Joined: April 2011

Re: Hex Licence 5 Minute Log ?

Postby Digit » Fri Jan 03, 2014 12:54 am

.NET Reflector can be very useful to debug your application, understand how applications work, saves time and simplifies "development" :lol: by letting you see and debug into the source of all the .NET code you work with. :wink:
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Postby Darwusch » Fri Jan 03, 2014 10:36 am

Exactly, you can look up the commands in there.
Darwusch
Member
Member
 
Posts: 161
Joined: December 2008
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Postby john9889 » Thu Jan 23, 2014 12:38 pm

Hi guys,

Sorry for my late answer, but thank you for your answers!!

the problem is, i never scripted, but managed to get the software to the pro status.
so now the 1 min, 5 min etc is there, but does not work.

can anyone tell me what to edit where to make this work :oops:


With friendly greets,
John9889
john9889
Starting Member
Starting Member
 
Posts: 6
Joined: December 2013

Re: Hex Licence 5 Minute Log ?

Postby Darwusch » Thu Jan 23, 2014 7:50 pm

Darwusch wrote:After you changed the hex code, you have to set the interval in the settings in the Source:
Settings -> Appliances -> right click an appliance -> Properties -> click the small icon at the right of the meter number -> Select the loging interval.


I can not make it more clear than this.
Darwusch
Member
Member
 
Posts: 161
Joined: December 2008
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Postby john9889 » Fri Jan 24, 2014 9:39 am

Sorry and thanks Darwush !! it worked and i am verry happy :)
john9889
Starting Member
Starting Member
 
Posts: 6
Joined: December 2013

Re: Hex Licence 5 Minute Log ?

Postby SevenW » Tue Feb 04, 2014 6:47 pm

Ha, this actually the command that is also used to enable production metering next to consumption. I discovered it a while back, before I thought of the .net reflection trick that Digit mentioned.
See domoticaforum.eu/viewtopic.php?f=39& ... ion#p56206

SevenW
SevenW
Starting Member
Starting Member
 
Posts: 25
Joined: May 2012

Re: Hex Licence 5 Minute Log ?

Postby HansA » Thu Oct 02, 2014 4:28 pm

Any one knows the hex code for the new version of source plugwise.images.dll version 2.24?

Thx. in advanced
HansA
Starting Member
Starting Member
 
Posts: 1
Joined: October 2014


Return to Plugwise Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron