snowdd1 / homebridge-knx

KNX platform shim for homebridge
https://github.com/nfarina/homebridge
GNU General Public License v2.0
97 stars 56 forks source link

Irrigation System #180

Open miticolars opened 3 years ago

miticolars commented 3 years ago

Hi, thank you for your work and for this plugin. Is it possible to configure an Irrigation System with this plugin? I've a KNX relay module that drives some valves of my irrigation system and I would to control it with homebridge. Thank you.

snowdd1 commented 3 years ago

That might be possible, I think there are services for irrigation and valves. But I don't have any so I cannot test that myself.

miticolars commented 3 years ago

Yes, there is the IrrigationSystem service but is not clear how can I set the knx_config.json to use my knx relay module (obviously I know all the knx address needed). Or if needed to develop some code. Thank you

marcobastianon commented 3 years ago

hi @miticolars i'm plaing to crate some irigation zone using ( like you ) knx switch.. i've create this configuration:

    {
        "DeviceName": "Goccia Aiuola",
        "Services": [
            {
                "ServiceType": "IrrigationSystem",
                "ServiceName": "Goccia Aiuola",
                "Characteristics": [
                    {
                        "Type": "Active",
                        "Set": ["1/1/68"],
                        "Listen": ["1/2/68"]
                    },
                    {"Type": "ProgramMode"},
                    {
                        "Type": "InUse",
                        "Listen": ["1/2/68"]
                    },
                    {"Type": "RemainingDuration"}
                ]
            }
        ],
    },

i've status of irrigation correctly, but if i click on the icon nothing start.

miticolars commented 3 years ago

Hi Marco, thank you. I think that IrrigationSystem must include some valves (zones), but I don’t know the correct syntax. I’m working on it. Paolo

miticolars commented 3 years ago

@marcobastianon I tried changing the Service from IrrigationSystem to Valve and it works, but I would to use the IrrigationSystem Service to drive my valves. Let me know if you find some way to do it. Thanks!

marcobastianon commented 3 years ago

maybe we need to write this service?

"Type": "Active", "Set": ["1/1/68"], "Listen": ["1/2/68"]

in my systen this "type" do nothing, clicching on the icon give me only the status.

"Type": "InUse", "Listen": ["1/2/68"]

this works beacuse change the icon (i've connected 1/2/68 @status of light 1/1/68 and i can turn on and off uning normal light)

miticolars commented 3 years ago

@marcobastianon try this:

{
    "DeviceName": "Goccia aiuola",
    "Services": [
        {                                    
            "ServiceType": "Valve",          
            "ServiceName": "Goccia aiuola",           
            "Characteristics": [             
                {                            
                    "Type": "Active",        
                    "Set": [                 
                        "1/1/68"              
                    ],                       
                    "Listen": [              
                        "1/1/68"              
                    ],                       
                    "DPT": "DPT1"            
                },                           
                {                            
                    "Type": "InUse",         
                    "Listen": [              
                        "1/1/68"             
                    ],                       
                    "DPT": "DPT1"            
                },                           
                {                            
                    "Type": "ValveType"      
                },                           
                {                            
                    "Type": "SetDuration"    
                },                           
                {                             
                    "Type": "RemainingDuration" 
                }                               
            ]
        }                                       
    ]
}

The icon is not the correct one (I would want to see the sprinkler icon and not the faucet) and the timer doesn't work. Bye

-- edit: using three backticks instead of one to format code

marcobastianon commented 3 years ago

how can we set { "Type": "ValveType" } to 1?

miticolars commented 3 years ago

how can we set { "Type": "ValveType" } to 1?

I don't know how to do it, if you find the solution just let me know

snowdd1 commented 3 years ago

how can we set { "Type": "ValveType" } to 1?

I don't know how to do it, if you find the solution just let me know

You could use a group address that answers with 1 - in that case no programming required. Of course you need to have such an address.

miticolars commented 3 years ago

how can we set { "Type": "ValveType" } to 1?

I don't know how to do it, if you find the solution just let me know

You could use a group address that answers with 1 - in that case no programming required. Of course you need to have such an address.

yeah, that's a solution, i try to find an address that can be useful in this way. Thanks!

marcobastianon commented 3 years ago

@snowdd1 thx!! image

works!! super fantastik!

i need only to work with default time.. start all time @00.00 infinite

now i've only the temperature issue :) realy lovely!!

miticolars commented 3 years ago

@snowdd1 thx!! image

works!! super fantastik!

i need only to work with default time.. start all time @00.00 infinite

now i've only the temperature issue :) realy lovely!!

@marcobastianon can you use the timer to run the sprinkler (remaining time, etc...)?

marcobastianon commented 3 years ago

no, i've added "SetDuration" and i can see on bus 300s (5min) but nothing decrease and time is still 00.00 (infinite) i think we need to decrees using handler or from knx logic module. (i preff from handler)

miticolars commented 3 years ago

how can we set { "Type": "ValveType" } to 1?

I don't know how to do it, if you find the solution just let me know

You could use a group address that answers with 1 - in that case no programming required. Of course you need to have such an address.

I don't have an address that answer always 1. I have an address that answer always 0, but the Reverse attribute doesn't work (if I understand what this atrribute do).

marcobastianon commented 3 years ago

you can send 1 @ new group address, with ets maybe.. the valveType 1=sprinkler

On Wed, 16 Sep 2020 at 18:44 miticolars notifications@github.com wrote:

how can we set { "Type": "ValveType" } to 1?

I don't know how to do it, if you find the solution just let me know

You could use a group address that answers with 1 - in that case no programming required. Of course you need to have such an address.

I don't have an address that answer always 1. I have an address that answer always 0, but the Reverse attribute doesn't work (if I understand what this atrribute do).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/snowdd1/homebridge-knx/issues/180#issuecomment-693527681, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQTQBOSZIXYA3KVOZ4RCOTSGDTPDANCNFSM4QLQMFKQ .

ctschach commented 3 years ago

I have created an custom handler which also supports the timer when using the eve app.

You can head over to

https://github.com/ctschach/homebridge-knx

and test out this version. I'm about to do some final clean ups and then submit a pull request.

miticolars commented 3 years ago

I have created an custom handler which also supports the timer when using the eve app.

You can head over to

https://github.com/ctschach/homebridge-knx

and test out this version. I'm about to do some final clean ups and then submit a pull request.

Thank you for your time and your job! I tested your version and I'm able to set the correct sprinkler icon and the timer.

Great!