Announcement

Collapse
No announcement yet.

Date stamp does not update

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mikee123
    replied
    There is no rush, but when you have got it please let me know.

    Leave a comment:


  • Ultrajones
    replied
    Originally posted by Ultrajones View Post

    Yes, I was able to find the data. What's interesting is that the Perl script provided uses /device/listZones/ that's not identified in their public API! I was able to get the following zoneState data for the zones:


    "zoneState": {
    "lastRun": "2019-08-31T14:11:26Z",
    "nextRun": "2019-08-31T15:07:48Z",
    "health": "GOOD",
    "lastRunStartCurrent": 193,
    "lastRunEndCurrent": -25,
    "lastRunEndTime": "2019-08-09T15:23:04Z"
    }
    I am running into a few issues deploying this feature. I have posted my questions to Rachio here:
    https://community.rachio.com/t/next-...lemented/20870

    Leave a comment:


  • Ultrajones
    replied
    Originally posted by mikee123 View Post

    Did you get a chance to implement this ? My trial has run out, but once it is implemented I would like to try the PI again if possible.
    Yes, I was able to find the data. What's interesting is that the Perl script provided uses /device/listZones/ that's not identified in their public API! I was able to get the following zoneState data for the zones:


    "zoneState": {
    "lastRun": "2019-08-31T14:11:26Z",
    "nextRun": "2019-08-31T15:07:48Z",
    "health": "GOOD",
    "lastRunStartCurrent": 193,
    "lastRunEndCurrent": -25,
    "lastRunEndTime": "2019-08-09T15:23:04Z"
    }

    Leave a comment:


  • mikee123
    replied
    Originally posted by Ultrajones View Post

    Thanks for posting this. I'll add a new HomeSeer device to reflect the next scheduled run date/time.
    Did you get a chance to implement this ? My trial has run out, but once it is implemented I would like to try the PI again if possible.

    Leave a comment:


  • Ultrajones
    replied
    Originally posted by mikee123 View Post
    I have posted a message on the Rachio forum about adding the next scheduled watering to the api. Looks as if it is implemented already, here is the response I had:


    The zoneState for each zone includes a nextRun attribute with the time it’s next scheduled to run.

    Here is a simple perl script that displays this info for the first controller in the first location on your account. Edit for your email and password before running.

    I’m curious how you will use this data in your automation.
    Code:
    #!/usr/bin/perl
    
    use LWP::UserAgent;
    use JSON;
    
    $user = 'me@mydomain.com'; # replace with the email address for your Rachio account
    $pass = 'mysecret' # replace with your Rachio account password
    
    sub doreq { # print error and exit if request unsuccessful
    my ($name, $resp) = @_;
    return $resp->content if $resp->is_success;
    my $err = $resp->content;
    print "Request for $name failed: $err\n";
    exit(1);
    }
    
    $ua = LWP::UserAgent->new();
    #$ua->proxy(['http', 'https'], 'http://127.0.0.1:8888/');
    
    # get config data
    $cfg = decode_json(doreq('config', $ua->get('https://app.rach.io/env.json')));
    
    # log in and get access token
    $token = decode_json(doreq('login', $ua->post("$cfg->{AUTH_SERVICE_URL}/token",
    [ 'grant_type' => 'password', 'username' => $user, 'password' => $pass,
    'client_id' => $cfg->{CLIENT_ID}, 'client_secret' => $cfg->{CLIENT_SECRET} ])))->{access_token};
    
    # get first device associated with this account
    $devid = decode_json(doreq('device', $ua->get("$cfg->{API_URL}/location/listLocations/true", 'Authorization' => "Bearer $token")))
    ->{locationSummary}->[0]->{location}->{deviceId}->[0];
    
    # get and display zone data
    $listzones = doreq('get zone list', $ua->get("$cfg->{API_URL}/device/listZones/$devid", 'Authorization' => "Bearer $token"));
    print $listzones;
    Thanks for posting this. I'll add a new HomeSeer device to reflect the next scheduled run date/time.

    Leave a comment:


  • mikee123
    replied
    I have posted a message on the Rachio forum about adding the next scheduled watering to the api. Looks as if it is implemented already, here is the response I had:


    The zoneState for each zone includes a nextRun attribute with the time it’s next scheduled to run.

    Here is a simple perl script that displays this info for the first controller in the first location on your account. Edit for your email and password before running.

    I’m curious how you will use this data in your automation.
    Code:
    #!/usr/bin/perl  
        
     use LWP::UserAgent;  
     use JSON;  
        
     $user = 'me@mydomain.com';     # replace with the email address for your Rachio account  
     $pass = 'mysecret'             # replace with your Rachio account password  
        
     sub doreq {                     # print error and exit if request unsuccessful  
         my ($name, $resp) = @_;  
         return $resp->content if $resp->is_success;  
         my $err = $resp->content;  
         print "Request for $name failed: $err\n";  
         exit(1);  
     }  
        
     $ua = LWP::UserAgent->new();  
     #$ua->proxy(['http', 'https'], 'http://127.0.0.1:8888/');  
        
     # get config data  
     $cfg = decode_json(doreq('config', $ua->get('https://app.rach.io/env.json')));  
        
     # log in and get access token  
     $token = decode_json(doreq('login', $ua->post("$cfg->{AUTH_SERVICE_URL}/token",  
                                      [ 'grant_type' => 'password', 'username' => $user, 'password' => $pass,  
                                        'client_id' => $cfg->{CLIENT_ID}, 'client_secret' => $cfg->{CLIENT_SECRET} ])))->{access_token};  
        
     # get first device associated with this account  
     $devid = decode_json(doreq('device', $ua->get("$cfg->{API_URL}/location/listLocations/true", 'Authorization' => "Bearer $token")))  
         ->{locationSummary}->[0]->{location}->{deviceId}->[0];  
        
     # get and display zone data  
     $listzones = doreq('get zone list', $ua->get("$cfg->{API_URL}/device/listZones/$devid", 'Authorization' => "Bearer $token"));  
     print $listzones;

    Leave a comment:


  • mikee123
    replied
    Yes I will do that, so far their support has been pretty good. I'll download the new version as soon as its available in the updater.

    Leave a comment:


  • Ultrajones
    replied
    Originally posted by mikee123 View Post
    Ok that sounds good. Is there anything in the api to retrieve the next scheduled run for each zone ?
    The next schedule water time it not available via the Rachio API. Please go to their message board API section and make sure you request it.

    Leave a comment:


  • Ultrajones
    replied
    UltraRachio3 HSPI version 3.0.7164.18799 was submitted to the HomeSeer updater. It should be available within a few days for install.

    Leave a comment:


  • mikee123
    replied
    Ok that sounds good. Is there anything in the api to retrieve the next scheduled run for each zone ?

    Leave a comment:


  • Ultrajones
    replied
    I made quite a few updates to the plug-in. The minimum refresh interval was changed from 1 to 2 minutes. When the Rachio is watering, the update interval is automatically set to every minute. When it's done watering, the update interval gets set back to the update interval specified in the options. The following HomeSeer devices will have their date/time updated based on the last watered date/time:
    1. Rachio Zone Last Watered
    2. Rachio Zone Last Duration
    3. Rachio Zone Total Runtime [I removed the date/time update for this device because it's based on a schedule]
    4. Rachio Zone Max Runtime [I removed the date/time update for this device because it's the max runtime a zone can run]
    I'll post the update to HomeSeer Tomorrow after I let it run for a day.

    Regards,
    Ultrajones

    Leave a comment:


  • Ultrajones
    replied
    Originally posted by mikee123 View Post
    Is there any update on this ? It seems that most child devices do not update, the last watered seems to work most of the time, the others do not seem to update. What I would like to see is the next scheduled watering. That with a reliable last watered and watering time. If thats not possible, I dont think I have much use for the PI.
    I have 2 weeks trial left, and would be happy to test/debug whatever is needed
    I determined the values for those devices are in the API output, but are not actually changing between runs and therefore the device last update date/time does not change when being updated. I'll update the plug-in to use the lastWateredDate for the timestamp of those devices. I'll reply here when it's been posted to HomeSeer.

    Leave a comment:


  • BlairG
    replied
    Mine have never worked. He might say that they change the API, but those accumulator don't do anything, never have.

    Leave a comment:


  • mikee123
    replied
    Is there any update on this ? It seems that most child devices do not update, the last watered seems to work most of the time, the others do not seem to update. What I would like to see is the next scheduled watering. That with a reliable last watered and watering time. If thats not possible, I dont think I have much use for the PI.
    I have 2 weeks trial left, and would be happy to test/debug whatever is needed

    Leave a comment:


  • Ultrajones
    replied
    Originally posted by mikee123 View Post
    The total watering time and max time are not updating at all (values and timestamp), there are other devices too which do not update. I uninstalled the PI, and deleted all the devices. I reinstalled the PI. The api key was still there though. I did try entering a wrong key, and a restart, then entering the right key again. Some devices still do not update.
    I am not seeing some of the values in the data returned from Rachio. I'll make a post on their support site sometime this weekend. I'll be able to do this after I run my sprinklers tomorrow while in debug.

    Leave a comment:

Working...
X