Hex Licence 5 Minute Log ?

Plugwise Forum about Plugwise devices and the Source software.
Post Reply
john9889
Starting Member
Starting Member
Posts: 8
Joined: Tue Dec 17, 2013 12:30 pm

Hex Licence 5 Minute Log ?

Post by john9889 »

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
roheve
Starting Member
Starting Member
Posts: 49
Joined: Tue Apr 19, 2011 8:38 am
Contact:

Re: Hex Licence 5 Minute Log ?

Post by roheve »

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.
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Post by Darwusch »

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.
roheve
Starting Member
Starting Member
Posts: 49
Joined: Tue Apr 19, 2011 8:38 am
Contact:

Re: Hex Licence 5 Minute Log ?

Post by roheve »

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.
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Post by Darwusch »

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.
roheve
Starting Member
Starting Member
Posts: 49
Joined: Tue Apr 19, 2011 8:38 am
Contact:

Re: Hex Licence 5 Minute Log ?

Post by roheve »

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: 49
Joined: Tue Apr 19, 2011 8:38 am
Contact:

Re: Hex Licence 5 Minute Log ?

Post by roheve »

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.
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: Hex Licence 5 Minute Log ?

Post by Digit »

.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:
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Post by Darwusch »

Exactly, you can look up the commands in there.
john9889
Starting Member
Starting Member
Posts: 8
Joined: Tue Dec 17, 2013 12:30 pm

Re: Hex Licence 5 Minute Log ?

Post by john9889 »

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
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

Re: Hex Licence 5 Minute Log ?

Post by Darwusch »

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.
john9889
Starting Member
Starting Member
Posts: 8
Joined: Tue Dec 17, 2013 12:30 pm

Re: Hex Licence 5 Minute Log ?

Post by john9889 »

Sorry and thanks Darwush !! it worked and i am verry happy :)
SevenW
Starting Member
Starting Member
Posts: 26
Joined: Tue May 29, 2012 10:04 am
Contact:

Re: Hex Licence 5 Minute Log ?

Post by SevenW »

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
HansA
Starting Member
Starting Member
Posts: 1
Joined: Thu Oct 02, 2014 5:02 pm

Re: Hex Licence 5 Minute Log ?

Post by HansA »

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

Thx. in advanced
Post Reply

Return to “Plugwise Forum”