Sending html commands to apex

ozborn99

Active Member
View Badges
Joined
Nov 6, 2017
Messages
100
Reaction score
67
Rating - 0%
0   0   0
Anyone know how to send a feed command to their Apex through a command line? I've been wanting to setup a hyperlink file to send a command to turn off things without jumping into Apex fusion on my phone and clicking several times to do that.

I've been looking but Google just gives links to buy an Apex.
 
Yeah. I saw that. I didn't want to go that route and get another home assistant installed in my home. I figure there's gotta be another method of you know the commands to send, via dos or powershell
 
Yeah. I saw that. I didn't want to go that route and get another home assistant installed in my home. I figure there's gotta be another method of you know the commands to send, via dos or powershell
Makes sense, FWIW you can use the Alexa App on your phone without buying an Echo Device. Maybe quicker that opening the fusion app and flipping switches.

A breakout box with a physical button as a feed switch could be handy also.

If you find the HTML let us know :)
 
1.You can start by opening chrome going to fusion and hitting F12
2.Open networking tab.
3.Click whatever you need to happen on the fusion page.
4.See what info is sent to fusion
5.Right click on the line that was added as you clicked
6. Find Copy -> cURL (cmd)

Thats the actual code you need to run to perform that particular action.

The cookies will eventually expire so you might need to get new ones created every once in a while.

A better approach would be to create a Selenium instance and automate it that way. But that seems like a lot of work.

Also ask the actual neptune engineers to give us API access. So you wouldn't have to reverse engineer this at all.

Event better:

Lines 250 to 270 is exactly what you want. Just use whatever language you want. (this will only work on local network). so at home only or through a VPN.

If you need more help feel free to ask:)
 
Last edited:
1.You can start by opening chrome going to fusion and hitting F12
2.Open networking tab.
3.Click whatever you need to happen on the fusion page.
4.See what info is sent to fusion
5.Right click on the line that was added as you clicked
6. Find Copy -> cURL (cmd)

Thats the actual code you need to run to perform that particular action.

The cookies will eventually expire so you might need to get new ones created every once in a while.

A better approach would be to create a Selenium instance and automate it that way. But that seems like a lot of work.

Also ask the actual neptune engineers to give us API access. So you wouldn't have to reverse engineer this at all.

If you need more help feel free to ask:)
Thanks for the info. I should have thought about inspecting the webpage. Duh!! Do you think they use authentication tokens? That'd probably be part of a hang-up, if I need to have a token generated to send a command to fusion (messing with dynamically loaded websites is where I get lost and lose interest in reverse engineering things).
 
Thanks for the info. I should have thought about inspecting the webpage. Duh!! Do you think they use authentication tokens? That'd probably be part of a hang-up, if I need to have a token generated to send a command to fusion (messing with dynamically loaded websites is where I get lost and lose interest in reverse engineering things).
yep:(

Looking through mine: "csrf-token:"

But I edited my earlier reply, if you are not opposed to be confined to local network only, please check out that github link, and use JS or PHP or whatever you like.

Also Neptune specifically prohibits reverse engineering, so if something gets borked they wont help, but i seriously doubt that would happen.

Happy reefing:)
 
Thanks. I always love GitHub projects. I'll be playing w that this weekend.
 
Had a minute before heading home for the day, this should get you started:
var user = 'whatever user you have, usually admin';
var pass = 'blah';

$.ajax
({
type: "POST",
url: "http://apex.local/cgi-bin/status.cgi",
dataType: 'json',
async: false,
data: '{"FeedCycle": "Feed", "FeedSel" : 1, "noResponse": 1}',
beforeSend: function (xhr) {
xhr.setRequestHeader ("HOST", "apex.local:80",); //not sure if needed
xhr.setRequestHeader ("Authorization", "Basic " + btoa(user + ":" + pass));
xhr.setRequestHeader ("Content-Type", "application/json");
// xhr.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded"); //or try this
},
success: function (){
alert("It's Feeding time!");
}
});
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top