Author Topic: PiGateway v9.1.0 Released  (Read 9578 times)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6595
  • Country: us
    • LowPowerLab
PiGateway v9.1.0 Released
« on: April 19, 2020, 09:45:11 PM »
The CHANGELOG is in this blog post.
This thread can serve as discussion, bug reporting, and help with upgrading to this release.

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: PiGateway v9.1.0 Released
« Reply #1 on: April 22, 2020, 08:19:06 PM »
IP for thermostat no longer in settings?  Or am I missing something


Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6595
  • Country: us
    • LowPowerLab
Re: PiGateway v9.1.0 Released
« Reply #2 on: April 24, 2020, 09:28:42 AM »
You're right, first bug is in!
I somehow dropped that when I merged the diffs for the settings file, and I had it on my Gateway unchanged so I totally missed it in testing.
I posted a commit and if you install the latest code it will pick it up otherwise you can add that section to your settings.json5 file.
Thanks!!

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: PiGateway v9.1.0 Released
« Reply #3 on: April 24, 2020, 10:58:17 AM »
Thanks Felix!

Also;

* Have you personally used or tested the "Garage: Auto CLOSE" metric you have in the example folder?  I haven't been able to get it to work.

* On the UI drop down, Gateway Uptime and Freq. show unknown.. where is it grabbing this information from?

Thanks for all the great work!
« Last Edit: April 24, 2020, 03:07:59 PM by sparky »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6595
  • Country: us
    • LowPowerLab
Re: PiGateway v9.1.0 Released
« Reply #4 on: April 24, 2020, 03:21:59 PM »
Quote
* Have you personally used or tested the "Garage: Auto CLOSE" metric you have in the example folder?  I haven't been able to get it to work.
It was contributed and I haven't used it. Hence no interest or time to debug it. I would welcome help fixing bugs though!

Quote
* On the UI drop down, Gateway Uptime and Freq. show unknown.. where is it grabbing this information from?
Those come from the sketch running on the RF Gateway. You will need to update your RF Gateway sketch as mentioned in the blog release.

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: PiGateway v9.1.0 Released
« Reply #5 on: April 24, 2020, 03:41:35 PM »
It was contributed and I haven't used it. Hence no interest or time to debug it. I would welcome help fixing bugs though!

I'll keep trying

Quote
Those come from the sketch running on the RF Gateway. You will need to update your RF Gateway sketch as mentioned in the blog release.

Menu after updating PiGateway sketch attached

« Last Edit: April 24, 2020, 05:55:39 PM by sparky »

ssmall

  • Full Member
  • ***
  • Posts: 156
  • Country: us
Re: PiGateway v9.1.0 Released
« Reply #6 on: April 25, 2020, 10:54:35 AM »
With regard to Garage: Auto CLOSE not working with PiGateway V9.x.x, I believe the reason for this is that the node is updated in the event and saved to the database.  However the function

global.runAndReschedule = function(functionToExecute, node, eventKey) which invokes the event calls

global.schedule = function(node, eventKey).  This function updates the executeDateTime on the node.  It then retrieves the node from the database sets the event on the retrieved node and saves the node back to the database.  I believe it is here that the data that was written by the Garage: Auto CLOSE is overwritten by global.schedule causing the metric to not work properly.

@Felix, I am open to suggestions as to how to fix the issue.  It looks like it would involve reworking how scheduled events work.

Hope that makes sense,

-Steve

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: PiGateway v9.1.0 Released
« Reply #7 on: April 25, 2020, 01:58:05 PM »
@ssmall

Thanks for the info.

HeneryH

  • Full Member
  • ***
  • Posts: 229
Re: PiGateway v9.1.0 Released
« Reply #8 on: April 25, 2020, 03:50:16 PM »
Anyone have any experience with this
Quote
npm-request replaced with native node http module this is to handle any http requests (like for the CT50 Thermostat)

Can this be used for sending http posts to the gateway to initiate events?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6595
  • Country: us
    • LowPowerLab
Re: PiGateway v9.1.0 Released
« Reply #9 on: April 26, 2020, 06:32:04 PM »
@sparky, does your sketch send an UPTIME message response? (Ie if you type UPTIME in terminal)
Both the sketch is made to send that, and the gateway to ask for it, when they restart.

@ssmall, a PR with the fix would be great.

@HeneryH,
It does not matter to PiGateway how you generate the HTTP request so long as it is valid.

HeneryH

  • Full Member
  • ***
  • Posts: 229
Re: PiGateway v9.1.0 Released
« Reply #10 on: April 26, 2020, 07:14:16 PM »
@HeneryH,
It does not matter to PiGateway how you generate the HTTP request so long as it is valid.
Is there any reference anywhere as to what 'valid' is?

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: PiGateway v9.1.0 Released
« Reply #11 on: April 26, 2020, 07:37:38 PM »
@sparky, does your sketch send an UPTIME message response? (Ie if you type UPTIME in terminal)
Both the sketch is made to send that, and the gateway to ask for it, when they restart.

No response in terminal when sending UPTIME.. or SYSFREQ..

When doing a restart the only thing I get other than normal node data is;
11:53:09.563 : SERVERTIME OFFSET: 3161ms

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6595
  • Country: us
    • LowPowerLab
Re: PiGateway v9.1.0 Released
« Reply #12 on: April 26, 2020, 08:13:44 PM »
Is there any reference anywhere as to what 'valid' is?

Not 100% sure what you're asking.
I blogged about this feature in the 9.0 release.

Here is a simple GET request with a query string:  https://raspberrypi/httpendpoint/?id=1234&MOTION&F=77.77
You could simply type this in the browser and it will post the 2 metrics to node 1234.
If you need to generate a HTTP request from some other place, then there are MANY methods to do so.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6595
  • Country: us
    • LowPowerLab
Re: PiGateway v9.1.0 Released
« Reply #13 on: April 26, 2020, 08:18:29 PM »
No response in terminal when sending UPTIME.. or SYSFREQ..

When doing a restart the only thing I get other than normal node data is;
11:53:09.563 : SERVERTIME OFFSET: 3161ms

Did you verify you have the correct PiGateway sketch running on your RF gateway?
Look starting at line 191 in the link above. It prints out a few commands back to the gateway.

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: PiGateway v9.1.0 Released
« Reply #14 on: April 26, 2020, 08:39:21 PM »
Did you verify you have the correct PiGateway sketch running on your RF gateway?
Look starting at line 191 in the link above. It prints out a few commands back to the gateway.

Yes, that's the sketch I'm using..

Results from SEND & SIMULATE UPTIME msg;

08:15:47.823 : /dev/ttyUSB0(simulated)>:[1]UPTIME
08:15:46.563 : GARAGE POLL STATUS: CLOSED
08:15:40.458 : /dev/ttyUSB0>:[6] CM:3 SS:-28
08:15:24.328 : /dev/ttyUSB0>:DEBUG:handleSerialData:1:UPTIME

But I never get a response.
« Last Edit: April 27, 2020, 08:19:17 AM by sparky »