Git Product home page Git Product logo

Comments (60)

snowdd1 avatar snowdd1 commented on July 16, 2024

What GAs does such a lamp need? I don't have one, so I cannot say if it works without additional work, but I heard of people having it done.

from homebridge-knx.

dosordie avatar dosordie commented on July 16, 2024

The following config works fine with my RGB Stripes (Gira HS Logic converts the values Brightness, Hue and Saturation from HB in 3x 0-100% Red Green Blue KNX/Dali)

` {

        "DeviceName": "LED Wohnzimmer",
        "Services": [
            {
                "ServiceType": "Lightbulb",
                "ServiceName": "LED Wohnzimmer",
                "Characteristics": [
                    {
                        "Type": "On",
                        "Set": [
                            "1/4/11"
                        ],
                        "Listen": [
                            "1/4/37"
                        ]
                    },
                    {
                        "Type": "Brightness",
                        "Set": [
                            "1/4/40"
                        ],
                        "Listen": [
                            "1/4/40"
                        ],
                        "DPT": "DPT5"
                    },
                    {
                        "Type": "Hue",
                        "Set": [
                            "1/4/41"
                        ],
                        "Listen": [
                            "1/4/41"
                        ],
                        "DPT": "DPT9"
                    },
                    {
                        "Type": "Saturation",
                        "Set": [
                            "1/4/42"
                        ],
                        "Listen": [
                            "1/4/42"
                        ],
                        "DPT": "DPT5"
                    }
                ],
                "KNXReadRequests": [
                    "1/4/37",
                    "1/4/40",
                    "1/4/41"
                ],
                "subtype": ""
            }
        ],
        "UUID": ""
    }, `

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

@dosordie : So you're getting a hue value and convert it to RGB values? And saturationof course, missed that.

from homebridge-knx.

dosordie avatar dosordie commented on July 16, 2024

@snowdd1
The Values hue, saturation and brightness are needed that Homebridge knows this is an RGB Device. Only "hue" won´t work.

With this values you can calculate the RGB values.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Do you have a formula for that?

from homebridge-knx.

dosordie avatar dosordie commented on July 16, 2024

Take a look at this http://www.rapidtables.com/convert/color/rgb-to-hsv.htm

For me, my Homeserver does that. https://service.knx-user-forum.de/?comm=download&id=12234

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

http://www.rapidtables.com/convert/color/hsv-to-rgb.htm

cool, that's what we can put into an add-in.

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

@dosordie @snowdd1
Thank you for this information.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

@Mit9l Dima,
can you give me the DPTs for the R,G,B channels?

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

I assumed DPT5 (0..255), you might test this draft:

https://github.com/snowdd1/homebridge-knx/blob/master/lib/addins/RGBLight.js

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

@snowdd1
at this moment i don't know how i can do this (configure rgb) and i don't know which DPT use.
oh....i'm crying) my home system based on homebridge-knx 0.2.0. To do this i must update and this is sadness ))))

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

@snowdd1
at this week i buy sd card, install new plugin and test your draft
thank you for this solution

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Hello, sorry for the long silence, i didn't have a chance....
Today i'm testing the plugin and at the moment the situation next:
this my code:

room.txt

RGB doesn't work((( maybe i'm doing something wrong?
I'm write in terminal next command:
knxtool groupswrite local: 15/1/2 255
or
knxtool groupswrite local: 15/1/0 1
and nothing happens.....except for one moment: all devices are not available in iPhone (as if the HomeBrшdge is shut down). but after 10-20 seconds all restored.

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

There is another point that I believe is important. RGB device (room rgb) added to HomeKit on iPhone, but when i push on him - the same thing happens, all devices are not available...

P.S. Sorry for my english

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Looks as if the response to HomeKit is considered non-compliant. If I find time this evening I will have a look into that.
And for knxtool groupswrite - I think for DPT5 you need knxtool groupwrite without the s, because s means short, I think up to 3 bits, and DPT5 is 8 bits long.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

knxtool groupswrite local: 1/15/2 255

KNX group addresses cannot have values that exceed 31/7/255, so 1/15/2 is illegal! So your code make break there. I am wondering why the group address check did not throw an exception there. How did you get these addresses into your device?

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Ok, found one: The characteristic "Saturation" is required for the service; that was missing in the Documentation - however, that should have led to wrong colors only.

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

I'm sorry, not correctly written group addresses here (changed).
15/1/2 -I created this group in ETS
Maybe I do not refer to him properly?
Maybe something should be written in Suturation?! But i don't now what i can write here....
Tell me please, can i watch the documentation? can you give me a link?

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Sure, it was in the source file: https://github.com/snowdd1/homebridge-knx/blob/master/lib/addins/RGBLight.js#L92

But as I said, the {"Type":"Saturation"}, entry is missing next to hue.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Your room.txt Attachement is also wrong, it contains 1/15/x addresses as well, if that's from your knx_config.json it will break.

I updated the sample config to contain Saturation characteristic and added some logging that is written out when you change color in iOS.
https://github.com/snowdd1/homebridge-knx/blob/master/lib/addins/RGBLight.js#L100

you can install that patch with npm install snowdd1/homebridge-knx or if you have a global installation, with sudo npm install -g snowdd1/homebridge-knx

please report back.

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

ok, thanks. I'm testing on the next week and report to you

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Hello, i tested rgb and i want to say - we have some changes. When i push the button (color light) on the iphone - shows color palette. When i select the color he wrote me - device doesn't respond and homebridge is shutdown (

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Can you get some debug output and paste it here?

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Ofcourse, but if you tell me how i can take log file... Or what should I do?
p.s. When i push the button in ETS -> Group Monitoring - nothing shows...

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

How do you start homebridge?

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

on boot with systemd

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

You can edit the service definition with

sudo nano /etc/systemd/system/homebridge.service

For debugging the file looks something like that:

[Unit]
Description=Homebridge Automation Service
Documentation=https://github.com/nfarina/homebridge

[Service]
Environment=DEBUG=*
ExecStart=/usr/bin/node /home/pi/node_modules/homebridge/bin/homebridge -D
User=pi
Group=pi
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=homebridge.service
Restart=never

[Install]
WantedBy=multi-user.target

I added the Environment=DEBUG=* line, and disabled restarting by changing the valid always to the invalid never entry.

Then load the new configuration:

sudo systemctl disable homebridge
sudo systemctl daemon-reload
sudo systemctl start homebridge

Watch (or copy) the log by entering sudo journalctl -u homebridge
Most interesting will be the 20 last lines before homebridge becomes unreactive when changing the color in home app.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

To re-enable your homebridge afterwards you may remove the DEBUG line, and set the restart again to always. Then

sudo systemctl stop homebridge
sudo systemctl daemon-reload
sudo systemctl enable homebridge
sudo systemctl start homebridge

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

ExecStart=/usr/bin/node /home/pi/node_modules/homebridge/bin/homebridge -D

Homebridge swear on this line.
HomeBridge I installed globally
knx_config.json and config.json -------- I have is in the /var/homebridge folder

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Sorry I meant just add the environment line and edit the restart line. Do not change the other lines of your service file!

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

this my debug file.

rgb-debug.txt

sorry for the not good quality, but the errors you can identify

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Please add a characteristic Saturation

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

See #60 (comment)

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

hello
this is new bug report
debug.txt

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Try DPT5 instead of DTP5

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

sorry, but i don't understand...in my file (knx_config.json) only DPT5, i don't have DTP5.

knx_config.txt

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

oh, i think i understand...DPT5 instead of DTP5 in addins (line 90-91)?

or adapt to these values in my knx_config.json file ?

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Sorry, didn't see it came from line 90+ from the add in. Thought it was from config. Maybe I can fix it tomorrow, you might change it yourself in your copy to test upfront.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Just found out I can change that in Github using a web browser, and did that. You might test again.

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

i change in my copy and i will try to test today

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Hello. I tested the new version and almost all good, color pallete, brihtness - it works.
Does not work ON/OFF... nothing happens when i click the icon.
I upload 2 debug file
First not full
debug_1.txt

Second - full
debug_2.txt

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Looking at the log file, when you click on the action ON/OFF he sent the wrong data, but how to fix it, I do not know (

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

as I understand it, when you turn on it should send 255,255,255 1
when you turn off - 0,0,0,0
but he sends a very different data ...

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Right, it's not yet implemented.
Does it need to send 0s on all four characteristics, or just for the On characteristic? And vice-versa, 255 for all colors and a 1 to the On address?

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Look, when i write in terminal knxtool groupwrite local: 15/1/4 1 all RGB tape ON
when i write in terminal knxtool groupwrite local: 15/1/4 0 all RGB tape OFF
15/1/4 - this is group address, with it i completely turn on or turn off the rgb tape

If i'm understanding you correctly, i think - "or just for the On characteristic" and "a 1 to the On address"

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Actually i'm not too sure, please give me a time to think

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

But it sounds consistent. You just need the On characteristic to turn it on or off, and the color triple (Brightness, Saturation, Hue) for color and brightness.
I'll give it a test shot.

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

All the same, i think that should bo controled at 1 address

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Hello
ON - works
OFF - doesn't works

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Though I found there is still an error in logging, would you mind pasting a log of switching on and switching off ?

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

of course

debug_3.txt

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Sorry didn't find it. Could you make logs off "on" and "off" separately so I can better see what's going on?

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

ok, this is updated file

debug_3.txt

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Hello
Raoul, did you have any ideas?

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Not really. In the German discussions somebody got it to work with his color led stripes (see link to issue 38 above). His problem was at first to have the knxd configured to send the telegrams to fast for his gateway. Might that be an issue for your gateway too?

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

In my situation all fine works, nearly....). color pallete - works, situration - works, ON - works, but OFF - doesn't works (when i click on iPhone...) if i write (in terminal on raspberry pi) knxtool groupsmonitor local: 15/1/4 0 my rgb device is shuting down

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

I connect to bus with TPUART USB interface

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Really strange. Switching OFF with Home app should start with a an entry like

INFO: onHKValueChange(On, 1, 0)

But that doesn't appear to be in your log. I can see entries (On, 0, 1) which means switching from 0 off to 1 on, but no on-to-off entries.

from homebridge-knx.

Mit9l avatar Mit9l commented on July 16, 2024

Hello, Raoul!
Everything is working!)
The server was not configured correctly....
I think this issue can be closed
Thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Thank you for the feedback!

from homebridge-knx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.