Skip to content
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

Get set names #12

Open
Spijkmans opened this issue May 2, 2021 · 3 comments
Open

Get set names #12

Spijkmans opened this issue May 2, 2021 · 3 comments

Comments

@Spijkmans
Copy link

Spijkmans commented May 2, 2021

I've done some testing on my Hub, Harvi and Zappi (don't have an Eddi), and I figured out these;

/cgi-get-app-key-
It returns a json like this

{
  "Hxxxxxxxx": [
    {
      "key": "Hyyyyyyyy",
      "val": "Sunny Harv"
    },
    {
      "key": "Zzzzzzzzz",
      "val": "Zapping away"
    },
    {
      "key": "pn_.........",
      "val": "{'id':'........-....-....-....-........','enableAll':true,'lastActive':........,'appVersion':'1.5.0 (........)'}"
    },
    {
      "key": "pn_........",
      "val": ""
    },
    {
      "key": "pn_........",
      "val": ""
    },
    {
      "key": "pn_........",
      "val": "{'id':'........-....-....-....-........','enableAll':true,'lastActive':........,'appVersion':'1.5.0 (........)'}"
    },
    {
      "key": "siteName",
      "val": "At My Home"
    }
  ]
}

Note:
Hxxxxxxxx = Hub serial
Hyyyyyyyy = Harvi serial
Zzzzzzzzz = Zappi serial
The '.'-s represent (encryption)keys, and I don't want to share these...

The "val" part in the "key": "Hyyyyyyyy" and "key": "Zzzzzzzzz" are the names I gave to the Harvi and Zappi. The "val" part in the "key": "siteName" is the name I gave to my Hub.

You can set 'New name' for Harvi and Zappi, by using this;

/cgi-set-app-key-Hyyyyyyyy=New%20name
It returns;

{
  "Hxxxxxxxx": [
    {
      "key": "Hyyyyyyyy",
      "val": "New name"
    }
  ]
}

Likewise for Zappi, just replace Hyyyyyyyy with Zzzzzzzzz.

I assume this also works for the Eddi, by using Eeeeeeeee (Eddi serial).
Could someone with an Eddi confirm this?

Getting just the name is done like this;

/cgi-get-app-key-Hyyyyyyyy
or
/cgi-get-app-key-Zzzzzzzzz

Getting and setting the name for the Hub works a little different, it goes like this;
/cgi-get-app-key-siteName

{
  "Hxxxxxxxx": [
    {
      "key": "siteName",
      "val": "At My Home"
    }
  ]
}

/cgi-set-app-key-siteName=New%20Site%20Name

{
  "Hxxxxxxxx": [
    {
      "key": "siteName",
      "val": "New Site Name"
    }
  ]
}

The "key": "pn_..." is likely related to the MyEnergi App itself.
But that is just my guess. And yes there are two people using the app, so the "key": "pn_..." are double.

I just wanted to share this.
But I'm not taking any responsibility, so use carefully. 😉

@ashleypittman
Copy link

This looks awesome, thanks for researching this.

@Spijkmans
Copy link
Author

Spijkmans commented May 2, 2021

Got some more stufff I want to share.

Looks like you can register a Hub with this
/cgi-jregister&[Registration code]&[new Password]&[confirm new Password]

[Registration Code] = the registration code shown on your Zappi (I assume an Eddi will show this too).
[new password] and [confirm new password] a password of your choice, both must be the same!
And can't contain a '&'.

To forget a Hub you can do a
/cgi-jderegister

No parameters needed, the Hub you are logged on to has been forgotten / deleted.
It seems to work for the app, but not sure what the effects are ... Maybe it's best to be careful about using this.

Set Priority (make it system master?)
/cgi-set-priority-Zyyyyyyyy
or
/cgi-set-priority-Eeeeeeeee
Can a Eddi owner validate this?

My Zappi response is (it is the master);

{
  "pri": 1
}

When I try it with my Harvi, an error is returned;

{
  "status": -1,
  "statustext": "",
  "asn": "s2.myenergi.net",
  "fwv": "3401S3051"
}

You can control the lock mode of a Zappi;
/cgi-jlock-Zyyyyyyyy-[mode]
[mode] is one of:
2 = Release lock / Unlock
64 = Ok to Charge

Finally I extracted this return/error code list from the App;

 0 :  O.K. / Success
-1 :  Invalid ID \u2013 The unit or group cannot be found or the user does not have access rights to the ID.
-2 :  Invalid DSR command sequence number.Valid write values or 1 - 15 inclusive.Valid read values are 0 - 15 inclusive.
-3 :  No action taken.Command Sequence Number 'csn' equals 'err' for single unit.i.e.Command Sequence number is same as last number used.
-4 :  Hub not found.No associated hub record for the unit.
-5 :  Internal Error.
-6 :  Invalid load value.
-7 :  Year missing.
-8 :  Month missing or invalid.
-9 :  Day missing or invalid.
-10 :  Hour missing or invalid.
-11 :  Invalid TTL Value.
-12 :  User not authorised to perform operation.
-13 :  Serial No not found.
-14 :  Missing or bad parameter.
-15 :  Invalid password.
-16 :  New passwords don't match.
-17 :  Invalid new password.Password must not contain '&'
-18 :  New password is same as old password.
-19 :  User not registered.
-20 :  Minute missing or invalid
-21 :  Slot missing or invalid
-22 :  Priority bad or missing
-23 :  Command not appropriate for device
-24 :  Check period bad or missing
-25 :  Min Green Level bad or missing
-26 :  Busy - Server is already sending a command to the device.
-27 :  Relay not fitted.

@ashleypittman
Copy link

Error numbers are already known at https://myenergi.info/could-myenergi-provide-a-list-of-error-numbers-ple-t1882.html

The priority is also known and is diverter priority isn't it? I've not used it personally but have seen references to it before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants