more G-Labs products

Author Topic: Generic Thermostat APP  (Read 20455 times)

December 01, 2014, 01:41:17 PM
Reply #30

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Marco,

the temperature in the thermostat app is updated from the sensor every 30 seconds.
Anyway I now added real-time update whenever the temperature changes in the sensor module.
Let me know if it's working as expected now.

Cheers,
g.

UPDATE: fixed case insensitive domain/address comparison
« Last Edit: December 01, 2014, 02:11:29 PM by Gene »

December 01, 2014, 07:14:02 PM
Reply #31

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

I Have 2 RaspBerry in my lan.

I Used One Generic Thermostat in the first one and my Gpio Switchs relais are in the second one .
Is it possible to define the GPIO OUT of the second one as ModuleSwitch in the Generic thermostat of the first one ? In case of yes whiech is the label ?

I Validate Status events forwarding in the second RP so when I received  event, a virtual module is created on the first one. If I put it in a group, I can see the state change on the first RP. If I used ON/PFF, the control don't pass to the second RP. Do I miss something ?

I tried to define the SwitchModule with the same label that I found in the module list : HGIC:192_168_1_6.RaspberryPI.Gpio:GPIO10

Cheers
Dani

December 01, 2014, 08:19:40 PM
Reply #32

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
you're right dani, I did not picture of this case =) I'm attacching the fixed app, let me know if it's working this way.

Cheers,
g.

December 01, 2014, 11:54:45 PM
Reply #33

Marco

  • **
  • Information
  • Jr. Member
  • Posts: 36
Hi Gene,
it's working as expected now.
I tested the last one  "78-Generic_Thermostat(6).hgx", exept the  second raspberry like ModuleSwitch, I have only one bananapi and use pin 11 (GPIO 17) for control a relay

My configuration:
Module to switch on/off on set point
RaspberryPI.Gpio:GPIO17

You are great!!   :)

thank
Marco
« Last Edit: December 01, 2014, 11:56:19 PM by Marco »

December 02, 2014, 12:30:50 AM
Reply #34

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Marco,

glad to hear it's finally working =)

Cheers,
g.

December 02, 2014, 08:47:50 AM
Reply #35

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

With your new script ( Release 6),

I have defined the SwitchModule with this label :
 HGIC:192_168_1_6.RaspberryPI.Gpio:GPIO9 but the switch in the second HG RP doesn't work.
For information, the switch doesn't work if I use the direct widget so. Do I miss something for Control command pass over the LAN ?

Cheers
Dani

December 02, 2014, 02:35:25 PM
Reply #36

mblack

  • *
  • Information
  • Newbie
  • Posts: 14
Gene,

I still can't seem to get the current temperature to display in the widget. Does the generic thermostat definitions not poll the thermostat for this info ?

Thanks,
mblack

December 04, 2014, 11:33:43 AM
Reply #37

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
dani, try to look at the modules list on your local pi box:

192.168.1.6/api/HomeAutomation.HomeGenie/Config/Modules.List

see if the remote GPIO9 module contains correct "Routing" infos.
Btw (silly question) does the GPIO9 work when you control it directly on the 192.168.1.6?
Do you see status changes on the other pi where it is supposed to forward the status changes?

g.

December 04, 2014, 01:50:46 PM
Reply #38

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Gene,

Yes, the if I controle the GPIO in the PI 192.168.1.6 directly it's work properly, yes, the state change on the master PI.
In the modules list of the slave PI (192.168.1.6),  Routing label for all GPIO are Empty. Which value we have to put there if any ?
In the modules list of the master PI (localhost),  Routing label for the HGIC:192_168_1_6.RaspberryPI.Gpio.GPIO9 has this value : "192.168.1.6:80"

Dani

« Last Edit: December 04, 2014, 02:02:26 PM by dani »

December 04, 2014, 02:02:08 PM
Reply #39

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
this value should populate automatically when and event is received from the remote pi.

https://github.com/genielabs/HomeGenie/blob/master/HomeGenie/Service/Handlers/Interconnection.cs#L73

if this info is missing then something is wrong in the Events.Push webservice method and HG doesn't know how to route remote module commands.
Can you do some debug?

g.

December 04, 2014, 02:03:22 PM
Reply #40

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
In the modules list of the master PI (localhost),  Routing label for the HGIC:192_168_1_6.RaspberryPI.Gpio.GPIO9 has this value : "192.168.1.6:80"
I think it's good, The Routing value concern the master PI isn't it ?

Dani
« Last Edit: December 04, 2014, 02:08:18 PM by dani »

December 04, 2014, 02:07:11 PM
Reply #41

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
So you have to further investigate on this:

https://github.com/genielabs/HomeGenie/blob/master/HomeGenie/Service/HomeGenieService.cs#L379

where the HG is trying to figure out if the module where is going to issue a command is a remote module or not.
Please debug here.

g.

December 04, 2014, 02:09:15 PM
Reply #42

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
In the modules list of the master PI (localhost),  Routing label for the HGIC:192_168_1_6.RaspberryPI.Gpio.GPIO9 has this value : "192.168.1.6:80"

I think it's good. The routing value is needed on the master PI isn't it ?

Dani

December 04, 2014, 02:09:59 PM
Reply #43

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Also ensure boths endpoint have same login/password set, otherwise they cannot be linked.
This is a basic protection mechanism... perhaps to be improved in the future.

g.

December 04, 2014, 02:14:27 PM
Reply #44

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
No password is defined one the two PI.

Dani