Closed lukaszzyla closed 6 years ago
Hi!
I have created a release with a jar you can download. Just drop it in your openhab addons folder and it should install just fine. Please also review the documentation in the readme for instructions on how to config.
Please note this is just a hobby project and there could be bugs etc. I have not had time to finish the binding to submit it as an official one.
Good luck!
Hi!
Thank you very much for quick answear and compiled release. I really appreciate your work and I think it has got great potential! I do not want to be a pain in your ..work... 😉 but I would really appreciate some help. I have faced 2 very basic problems so far...
my.email@gmail.commailto:my.email@gmail.com And password – correct password for entering hc2 (not the fibaro id one, although I tried that one too. I even tried changing username and passwords in HC2 for another. I get the Status:
Status: OFFLINE - CONFIGURATION_ERROR Failed to connect to the Fibaro gateway through api call 'http://192.168.2.100/api/devices'. Please check that username, password and ip is correctly configured. But when I go to that address I do get some data, even without entering credentials: [cid:image003.png@01D41257.3D6C4EF0]
There is also another issue in HC2 script. When I try to start it I get some debug errors. [cid:image004.png@01D41256.36DC9460]
I do not understand this part of the script neither. It is declaring locals – that I know. But how is the deviceID going to be changed or trigerred? I must be doing something wrong. Could you help? Thanks Lukasz
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
From: Johan Williams notifications@github.com Sent: Monday, July 2, 2018 4:30:50 PM To: johanwilliams/org.openhab.binding.fibaro Cc: lukaszzyla; Author Subject: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Hi!
I have created a release with a jar you can download. Just drop it in your openhab addons folder and it should install just fine. Please also review the documentation in the readme for instructions on how to config.
Please note this is just a hobby project and there could be bugs etc. I have not had time to finish the binding to submit it as an official one.
Good luck!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-401824947, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfY9sHaJLIUPb_0Rn0w3My6o3ewT_ks5uCi6agaJpZM4U-dSZ.
I do understand the HC2 script now. It gets trigger from using an actual device (one of those I configure in globals) to send command to openhab. I do see some green OK reports when triggering the device:
[DEBUG] 23:10:49: [1;31m2018-07-02 23:10:49.742077 [ fatal] Unknown exception: /opt/fibaro/scenes/122.lua:42: Assertion failed: Expected number [DEBUG] 23:10:56: FAIL: http://192.168.2.8:9000 - {"value":"0","name":"Night light right","property":"value","id":123} [DEBUG] 23:14:22: OK: http://192.168.2.8:9000 - {"name":"Night light right","id":123,"value":"1","property":"value"} [DEBUG] 23:14:37: OK: http://192.168.2.8:9000 - {"value":"0","name":"Night light right","id":123,"property":"value"} [DEBUG] 23:15:29: OK: http://192.168.2.8:9000 - {"property":"value","name":"Night light right","value":"1","id":123} [DEBUG] 23:15:37: OK: http://192.168.2.8:9000 - {"id":123,"value":"0","property":"value","name":"Night light right"}
But my HC2 connection is still offline... Any ideas on what to check? I was suspecting the username syntax (email address) but apart from that I have no clue. What could I possibly do wrong? [cid:image001.png@01D4125C.6C919B40]
I am looking forward to hearing from you. Best Regards and many thanks Lukasz
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
From: Johan Williams notifications@github.com Sent: Monday, July 2, 2018 4:30:50 PM To: johanwilliams/org.openhab.binding.fibaro Cc: lukaszzyla; Author Subject: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Hi!
I have created a release with a jar you can download. Just drop it in your openhab addons folder and it should install just fine. Please also review the documentation in the readme for instructions on how to config.
Please note this is just a hobby project and there could be bugs etc. I have not had time to finish the binding to submit it as an official one.
Good luck!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-401824947, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfY9sHaJLIUPb_0Rn0w3My6o3ewT_ks5uCi6agaJpZM4U-dSZ.
Hi,
Just checked my config gateway config. The ip is of course your ip to your fibaro home center. The port can ba any port you like (i have 9022) as long as you have the same port configured in the fibaro scene (configured in the parameter openhabPort). The binding sets up a connection on this port to listen for updates from the fibaro. The login/pwd should be the admin login you use when you login to the fibaro interface. For me it is "admin" as login (no email adress).
The binding communicates with fibaro through its api (located at http://ipToYourHomecenter/docs). You can try for example the "devices" api call to get a list of all devices. If that works the binding should able be able to query the api if configured correctly.
Hi. I do have hc2 not lite. I think that since introduction of fibaro id the only way to login is with email address through superuser account. Have you not migrated to fibaro id?
I feel it has to do smth with the admin username in email format. I have tried even using %40 instead of @ as a http syntax wiuld give two @ in regular way:
Lukasz.zyla@gmail.com:password@192.168.2.100
Get Outlook for Androidhttps://aka.ms/ghei36
From: Johan Williams notifications@github.com Sent: Tuesday, July 3, 2018 9:12:25 AM To: johanwilliams/org.openhab.binding.fibaro Cc: lukaszzyla; Author Subject: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Hi,
Just checked my config gateway config. The ip is of course your ip to your fibaro home center. The port should be 9022 (if you have not changed anything manually). The login/pwd should be the admin login you use when you login to the fibaro interface. For me it is "admin" as login (no email adress).
One question though. Are you using the fibaro home center 2 or fibaro home center light? This has been developed for the home center 2. Not sure if it will work at all for the light version.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-402036303, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfS-G2ORc_kRxYHyqm_A1v_HytuNYks5uCxlZgaJpZM4U-dSZ.
If you look at my HC2 administration page you can see 3 users: superuser (admin) which has to be in email format as it is the same as your fibaro id. I thought everybody is using the fibaro id already as this is the only supported login method at the moment. And you can see 2 regular users that I have created – for use with phone app. But those 2 users are not admins and even though I tried using their credentials in your binding – it won’t work… How come you can still use the admin username? Have you never used remote access and fibaro id? I am on 4.180 HC2 firmware version. Some screens below… If you want to change the superuser account – you can only change the email address and password – although you still have to use email address format for a username… What I have found out in the meantime, that chrome still accpets http syntax with username/pass but IE does not! And it happens in IE because of 2 @ in the string: Lukasz.zyla@gmail.com@192.168.2.100mailto:Lukasz.zyla@gmail.com@192.168.2.100 IE accepts this format though: Lukasz.zyla%40gmail.com@192.168.2.100mailto:Lukasz.zyla%40gmail.com@192.168.2.100
But your binding doesnt seem to like it. I was thinking about other solution too. If I could find the actual THING (Gateway) file in the openHAB I could try manually alter the config file. I was looking for it everywhere but my /share/openHAB/userdata/etc/things only has one readme file, despite I have already 2 things added (Gateway and onkyo receiver). Any clues?! BR Lukasz [cid:image002.png@01D412D1.B3E71E00]
[cid:image006.png@01D412D1.B3E71E00]
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
Od: Johan Williams notifications@github.com Wysłane: Tuesday, July 3, 2018 9:12:25 AM Do: johanwilliams/org.openhab.binding.fibaro DW: lukaszzyla; Author Temat: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Hi,
Just checked my config gateway config. The ip is of course your ip to your fibaro home center. The port should be 9022 (if you have not changed anything manually). The login/pwd should be the admin login you use when you login to the fibaro interface. For me it is "admin" as login (no email adress).
One question though. Are you using the fibaro home center 2 or fibaro home center light? This has been developed for the home center 2. Not sure if it will work at all for the light version.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-402036303, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfS-G2ORc_kRxYHyqm_A1v_HytuNYks5uCxlZgaJpZM4U-dSZ.
Hi!
I'm on firmware 4.180 as well but I have not migrated to fibaro id. I do use the app but I connect to my house through a vpn so the app can work on the local network. I'm a bit paranoid and don't trust security in all the apps to connect to my home ;)
I can't see why an @ sign would do any difference though.. Have you tried to access the fibaro api? What credentials do you use there?
It is also possible to configure the binding using config files (I do). You don't need to set it up through the paper UI.
My config file (fibaro.things) in the /things folder in the openhab config folder looks like this:
Bridge fibaro:gateway:hc2 [ ipAddress="192.168.1.4", username="admin", password="xxxxxx", port=9022 ] {
// Dimmers
Thing actor DIM01 [ id=141 ]
Thing actor DIM02 [ id=145 ]
// Switches
Thing actor SW01 [ id=46 ]
Thing actor SW02 [ id=180 ]
// Power outlets
Thing actor PO01 [ id=10 ]
Thing actor PO02 [ id=12 ]
}
And the items can of course also be configured in an .item config file. An example:
// Entrance light
Dimmer Dimmer_Entrance "Entrance light" <dimmablelight> (gDimmers, gBlink) [ "Lighting" ] { channel="fibaro:actor:hc2:DIM01:dimmer" }
Number DimmerE_Entrance "Entrance light energy [%.2f kWh]" <energy> (gDimmersE) { channel="fibaro:actor:hc2:DIM01:energy" }
Number DimmerP_Entrance "Entrance light power [%.2f W]" <energy> (gDimmersP) { channel="fibaro:actor:hc2:DIM01:power" }
I just looked in the code. When the bridge gateway initialises (in FibaroGatewayBridgeHandler.java) it first checks you have entered ip, username, pwd and port number. Then it makes a call to the api http://" + getIpAddress() + "/api/devices using configured username/password as credentials to get the value of all devices.
If this call fails the gateway will be put OFFLINE.
What happens if you paste this url in a browser window: http://192.168.2.100/api/devices and enter the credentials you have configured?
Thank you very much for your support. I do not think I will be able to manage that myself as I do not have skills to understand JAVA. I hope that you find a solution to this fibaroID issue. I tried configuring the simplest Fibaro.things and played with it for a while, but no matter what I was doing and how username was entered - the Gateway would no go online. I will keep checking how is your development going. Thanks again and regards Lukasz
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
From: Johan Williams notifications@github.com Sent: Tuesday, July 3, 2018 3:57:22 PM To: johanwilliams/org.openhab.binding.fibaro Cc: lukaszzyla; Author Subject: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
I just looked in the code. When the bridge gateway initialises (in FibaroGatewayBridgeHandler.java) it first checks you have entered ip, username, pwd and port number. Then it makes a call to the api http://" + getIpAddress() + "/api/devices using configured username/password as credentials to get the value of all devices.
If this call fails the gateway will be put OFFLINE.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-402166697, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfdvt_YEqvh9gNeyWRljfqH31COvvks5uC3hCgaJpZM4U-dSZ.
Let's not give up yet ;)
I will try to help you! Try this:
When you enter the correct credentials you should see a page with tons of text. If you do, the username and password should be the username and password you enter in the binding configuration. Then the binding should go ONLINE (or you have found a bug ;)
I think I was able to isolate the problem. I have even tried 2 releases of OpenHAB – the regular 2.2 that comes a QNAP qpkg and also the latest 2.4-SNAPSHOT that I have installed for testing purposes. Currently I am on 2.4-SNAPSHOT. This is what I have now:
My Fibaro.things config: [cid:image002.png@01D41363.F6D807F0]
And corresponding UI VIEW: [cid:image006.png@01D41363.F6D807F0]
With gateway config: [cid:image007.png@01D41363.41E4A2E0] After clearing the history and saved passwords. When I try to log in with web browser to API: [cid:image008.png@01D41363.758641D0]
Entering credentials: [cid:image009.png@01D41363.A041BDA0]
And VOILA: [cid:image012.png@01D41363.F6D807F0]
So it does work through web browser. I checked with IE, Chrome and EDGE... There must be an issue with authorization in my opinion. Looks like the auth scheme is not working in my opinion... Let me know what you think and if you need any other tests. BR Lukasz
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
From: Johan Williams notifications@github.com Sent: Tuesday, July 3, 2018 10:30:27 PM To: johanwilliams/org.openhab.binding.fibaro Cc: lukaszzyla; Author Subject: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Let's not give up yet ;)
I will try to help you! Try this:
When you enter the correct credentials you should see a page with tons of text. If you do, the username and password should be the username and password you enter in the binding configuration. Then the binding should go ONLINE (or you have found a bug ;)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-402283342, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfevYSIJZFQPX-awUChk4CPF1pbg-ks5uC9RjgaJpZM4U-dSZ.
I have also found this: https://github.com/stiansoevik/hc2gw It is in python but has information on updated script to support @ in username… BR Lukasz
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
Od: Johan Williams notifications@github.com Wysłane: Tuesday, July 3, 2018 10:30:27 PM Do: johanwilliams/org.openhab.binding.fibaro DW: lukaszzyla; Author Temat: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Let's not give up yet ;)
I will try to help you! Try this:
When you enter the correct credentials you should see a page with tons of text. If you do, the username and password should be the username and password you enter in the binding configuration. Then the binding should go ONLINE (or you have found a bug ;)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-402283342, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfevYSIJZFQPX-awUChk4CPF1pbg-ks5uC9RjgaJpZM4U-dSZ.
The problem seems to be more complex... Or different. It might not be the fibaro id that causes the problem but something else. One of colleagues has told me to try with another user. Not the superuser but one of regular users with full permissions. I do have this kind of user for use with my phone app. I was quite sure that I will not be granted permissions to see 192.168.2.100/api/devices Using this credentials but I was very surprised to see that it DOES WORK from the browser! So I am able to access api/devices using normal user. Of course I tried to do it but it does not work from within openhab (I tried configuring through .things and also throu UI). So maybe problem is somewhere else? Have you tried running the 0.9 compiled snapshot on your system? The one that is in releases. Maybe just this compilation has some bug? BR Lukasz
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
From: Johan Williams notifications@github.com Sent: Tuesday, July 3, 2018 10:30:27 PM To: johanwilliams/org.openhab.binding.fibaro Cc: lukaszzyla; Author Subject: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Let's not give up yet ;)
I will try to help you! Try this:
When you enter the correct credentials you should see a page with tons of text. If you do, the username and password should be the username and password you enter in the binding configuration. Then the binding should go ONLINE (or you have found a bug ;)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-402283342, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfevYSIJZFQPX-awUChk4CPF1pbg-ks5uC9RjgaJpZM4U-dSZ.
Ok, I might migrate to fibaro ID eventually and run into the problem myself. I am running the same version of the binding as you.
One thing you could try to get some more information would be to turn on debug logging for the binding. You can do this in the console by typing:
log:set DEBUG org.openhab.binding.fibaro
If you don't know how the console works you can find some good docs here: https://docs.openhab.org/administration/console.html
Hmm not much more than we know from OH UI. But it seems it reads device list… [cid:image003.png@01D4146A.C3EDD6A0]
Wysłane z aplikacji Pocztahttps://go.microsoft.com/fwlink/?LinkId=550986 dla Windows 10
From: Johan Williams notifications@github.com Sent: Thursday, July 5, 2018 12:16:39 PM To: johanwilliams/org.openhab.binding.fibaro Cc: lukaszzyla; Author Subject: Re: [johanwilliams/org.openhab.binding.fibaro] JAR please (#18)
Ok, I might migrate to fibaro ID eventually and run into the problem myself.
One thing you could try to get some more information would be to turn on debug logging for the binding. You can do this in the console by typing: log:set DEBUG org.openhab.binding.fibaro
If you don't know how the console works you can find some good docs here: https://docs.openhab.org/administration/console.html
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/johanwilliams/org.openhab.binding.fibaro/issues/18#issuecomment-402675849, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AjQnfTpv0pEYVCNxQYFGctEVWHzf0dvdks5uDeeHgaJpZM4U-dSZ.
I can't see those screenshots you send.. Not here on Github and not on my Gmail.. But ok, so it reads the device list. Then it seems like it can communicate with the api at least..
Could you please make a compiled version for download together with a short instruction on how to install?