iobroker-community-adapters / ioBroker.hmip

Adapter for the Homematic IP Cloud Accesspoint
MIT License
31 stars 20 forks source link

"Create Token" isn't possible without PIN #532

Open RP70DP opened 3 months ago

RP70DP commented 3 months ago

Adapter version: 1.22.0 JS-Controller: 5.0.19

The "Create Token"-Button has to be clickable without specifying a PIN.

For more information please see: ioBroker-Forum

loskrachos commented 2 months ago

I have activated "Einstellungen->Benutzerverwaltung->Benutzerrechte" and hereby generated an "Administrator-PIN". Using this PIN but Token Request fails.

RP70DP commented 2 months ago

That's because if you activate "Administrator-PIN" the "System-PIN" will be deactivated. Unfortunately the "System-PIN" is still necessary for activate the token button....

RP70DP commented 2 months ago

I don't know if this information is helpfull for fixing the bug: with version 1.21.1 (2024-01-15) the create token button is still working.

loskrachos commented 2 months ago

The button is only working, if you still have a system PIN. EQ3 removed the system PIN. The API is working fine without PIN. it is just the adapter frontend that is designed to get the system PIN as a mandatory input to make the Generate button active. Shouldn’t be a big thing.

mcm1957 commented 2 months ago

workaround see https://github.com/iobroker-community-adapters/ioBroker.hmip/issues/539#issuecomment-2029474877

tecfreakz commented 2 months ago

@Apollon77 @mcm1957 This issue is not the same like #539 , in 539 there is wrote from impossibility to connect the current version of this adapter to HMIP.

And it's right, it's of course a very significant bug!

Currently nobody can connect his new HMIP to iobroker with latest version of this adapter, it's not working, yet.

Here at this topic we tell about the ability to type in no pin to create a token. But it dosen't matter...on no way you can create a token and get your HMIP working with iobroker, not with and not without pin, if you try to create a token everytime in logs comes this error:

image

Just a fallback to an older version ≤1.19 gives the ability to Set up an new HMIP connection to iobroker.

Please fix it highly prioritized!

Apollon77 commented 1 month ago

@GermanBluefox Please make the PIN an optional field in jsconfig and mainly also in the custom component. Thank you

loskrachos commented 1 month ago

@GermanBluefox I just pulled the 1.23 from the beta repository and created a new instance from that. Token creation without filling the PIN Field is still not possible. Wasn't this the aim of that fix?

mcm1957 commented 1 month ago

I'm not aware that 1.23.0 conatins any code changes. Please see changelog.

I'll check why this issue has been marked fixed.

tecfreakz commented 1 month ago

The dev seems not understand, which the problem is about, isn't it? 🙈

mcm1957 commented 1 month ago

The dev seems not understand, which the problem is about, isn't it? 🙈

No that's definitly not the problem. Either the change was lost on the way between dev system and githubg (aka was not comiited) or the setting of "fixed" was done on error. At the moment this issue must be considered "not fixed". Release 1.23.0 was created due to chnages in test enviroment is independent of this issue.

loskrachos commented 1 month ago

As this adapter is not usable for any Access Point that needs to be connected to ioBroker it would really be great if there could be a fix. It was reported almost 2 month ago. I really appreciate the work of all devs but it is not even a hard bug as the API is supporting token creation without PIN. Could this issue please be prioritized and fixed. Thanks in advance!

Apollon77 commented 1 month ago

In fact 1.23 was never supposed to contain the fix and was published before ... so please donot confuse things. es we will clrify why Denis set fixed :-)

Apollon77 commented 1 month ago

Ok, now commit is there. So if anyone likes please try GitHub version ...

loskrachos commented 1 month ago

Ok, now commit is there. So if anyone likes please try GitHub version ...

I tried, using the "Installieren aus eigener URL" --> GitHub --> hmip function.

Bildschirmfoto 2024-04-30 um 10 42 15

Without PIN the "TOKEN ERSTELLEN" button is still deactivated.

Bildschirmfoto 2024-04-30 um 10 44 19
loskrachos commented 1 month ago

I corrected the second part - F711 - no difference

GermanBluefox commented 1 month ago

tabs

Works by me. May be iob u hmip ?

Apollon77 commented 1 month ago

Ok I will prepare a release

mcm1957 commented 1 month ago

@loskrachos wrote at 29.4.2024:

@GermanBluefox I just pulled the 1.23 from the beta repository and created a new instance from that. Token creation without filling the PIN Field is still not possible. Wasn't this the aim of that fix?

One additional question / remark - not really related to problem but to clearify what you have installed at which time: How did you manage to pull 1.23 from beta repository while 1.23 never was available at beta repository?

image image

loskrachos commented 1 month ago

I switched to Beta releases and was able to install 1.23 from the release list 🤷‍♂️

mcm1957 commented 1 month ago

fixed with 1.23.1

loskrachos commented 1 month ago

Sorry for spamming this thread but idk what goes wrong. I am on a test system. only installed adapters:

Bildschirmfoto 2024-04-30 um 21 19 27

I get the hmip version 1.23.1 from github, add an instance and the button stays inactive, no matter if i enter a valid sgtin or just random numbers as you demonstrated.

Bildschirmfoto 2024-04-30 um 21 24 22
mcm1957 commented 1 month ago

You do not spam if you report a problem. Don't worry. BUT: Nobody told you to install from github. Installing from github should be done ONLY when adviced by developer. Releases at Github can contain any intermediate and even non working or broken code,

Please install using latest repository and either admin interface (preferred) or iobroker cli command.

loskrachos commented 1 month ago

Thought it might be helpful… testing it asap. when do you think it is released? I have no experience how long it takes from commit to the release.

Apollon77 commented 1 month ago

npm released, should become in latest over night

mcm1957 commented 1 month ago

npm released, should become in latest over night

Was available short after creating the release. I did an extra update due to urgency. So attime of my last posting it was already available at latest.

Please check latest always when waiting for a fix. And use Check for updates" button to refresh your local cache too (local cache is normally updates only once a day)

loskrachos commented 1 month ago

I am going nuts... "TOKEN GENERIEREN" is now active, as soon as I enter anything. Thanks for that!

But Token generation isn't working. I have set up a completely new ioBroker on Raspi4 - only adapter I installed additionally was hmip 1.23.1 from beta repository. (in stable only 1.22 is available)

I enter SGTIN and get immediately "Während der Token-Generierung ist ein Fehler aufgetreten. Sehen Sie sich die Protokolle an"

System completely new and clean Router restarted Raspi restarted I tried with 2 different HM APs - same behavior

--> if you like we can have a remote session to give you the chance to get more information

Protocol:

2024-05-01 20:20:29.550  - silly: hmip.0 (846) States system redis pmessage io.messagebox.system.adapter.hmip.0/io.messagebox.system.adapter.hmip.0:{"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":22,"ack":false,"time":1714587629548},"_id":45960483}
2024-05-01 20:20:29.551  - debug: hmip.0 (846) message received - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":22,"ack":false,"time":1714587629548},"_id":45960483}
2024-05-01 20:20:29.552  - silly: hmip.0 (846) sendTo "requestTokenState" to system.adapter.admin.0 from system.adapter.hmip.0
2024-05-01 20:20:32.597  - silly: hmip.0 (846) States system redis pmessage io.messagebox.system.adapter.hmip.0/io.messagebox.system.adapter.hmip.0:{"command":"requestToken","message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"from":"system.adapter.admin.0","callback":{"message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"id":23,"ack":false,"time":1714587632595},"_id":45960484}
2024-05-01 20:20:32.599  - debug: hmip.0 (846) message received - {"command":"requestToken","message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"from":"system.adapter.admin.0","callback":{"message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"id":23,"ack":false,"time":1714587632595},"_id":45960484}
2024-05-01 20:20:32.599  - silly: hmip.0 (846) sendTo "requestToken" to system.adapter.admin.0 from system.adapter.hmip.0
2024-05-01 20:20:32.600  - info: hmip.0 (846) started token request
2024-05-01 20:20:32.676  - info: hmip.0 (846) auth step 1
2024-05-01 20:20:32.772  - warn: hmip.0 (846) Request error data: [object Object]
2024-05-01 20:20:32.772  - warn: hmip.0 (846) Request error status: 403
2024-05-01 20:20:32.773  - error: hmip.0 (846) error requesting token: Error: error
2024-05-01 20:20:32.913  - silly: hmip.0 (846) States system redis pmessage io.messagebox.system.adapter.hmip.0/io.messagebox.system.adapter.hmip.0:{"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":24,"ack":false,"time":1714587632911},"_id":45960485}
2024-05-01 20:20:32.915  - debug: hmip.0 (846) message received - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":24,"ack":false,"time":1714587632911},"_id":45960485}
2024-05-01 20:20:32.915  - silly: hmip.0 (846) sendTo "requestTokenState" to system.adapter.admin.0 from system.adapter.hmip.0
mcm1957 commented 1 month ago

OK - I'll reopen of course and ask dev to check.

mcm1957 commented 1 month ago

Thanks for the complet log provided. I'm sorry to say but at the moment no dev with a matching hardware is available.

In the meantime I would like to ask whether you could try to install an older working adapter version and to create a debug log with working token generation. Maybe we could detect the difference with this information.

loskrachos commented 1 month ago

anything that might be helpful... but is there really an older version, that can handle the APs with the "switched off" System PIN? As written, I can also offer to support a remote session with my hardware. It is a test system, we can do whatever neccessary. We can temporarily switch to mail or other communication channels (WA etc.) I would really be happy to support! just mailto:loskrachos@gmx.de If no other option I had also another WiFi AP I don't use anymore. I could "donate" it.

mcm1957 commented 1 month ago

Well, there : https://github.com/iobroker-community-adapters/ioBroker.hmip/issues/539#issuecomment-2029474877 seems to be a description for work around.

I do not have any HMIP HW so I do not really know hwo to use and it makes no sense to try a remote session. Sorry. The main dev is currently busy outside germany and cannot work on this at the meoment.

tecfreakz commented 1 month ago

Hi Guys,

i agree to that, with a version >1.20 it's not possible to generate a token yet and in last consequence this adapter in newest version is broken and for new users or new installed systems currently useless caused of impossibility to register/first connect with an hmip gateway.

The used hardwae dosen't matter, i've tested it on proxmox, fully installed Debian, Ubuntu and in rpi4 and 5 with raspbian and ubuntu, in every systemscenario the same issue (No token generation possible).

Strongly need a Dev now to check/analyze and fix, it's a major bug (this adapter is partly unusable a few months ago since release of 1.20!) and should be max prioritized.

My workaround at https://github.com/iobroker-community-adapters/ioBroker.hmip/issues/539#issuecomment-2029474877 works well, but this shouldn''t be best solution to get the iobroker work with hmip.

Kind regards

loskrachos commented 1 month ago

I just tried the workaround and indeed it is working!

Here is the Log: (only debug, not silly)


2024-05-01 22:50:58.714  - debug: hmip.0 (1377) ready
2024-05-01 22:50:58.716  - info: hmip.0 (1377) token not yet created
2024-05-01 22:51:03.100  - debug: hmip.0 (1377) message recieved - {"command":"requestToken","message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"from":"system.adapter.admin.0","callback":{"message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"id":1649,"ack":false,"time":1714596663098},"_id":45962118}
2024-05-01 22:51:03.103  - info: hmip.0 (1377) started token request
2024-05-01 22:51:03.226  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1650,"ack":false,"time":1714596663112},"_id":45962119}
2024-05-01 22:51:03.237  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1651,"ack":false,"time":1714596663235},"_id":45962120}
2024-05-01 22:51:03.248  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1652,"ack":false,"time":1714596663247},"_id":45962121}
2024-05-01 22:51:03.259  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1653,"ack":false,"time":1714596663257},"_id":45962122}
2024-05-01 22:51:03.270  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1654,"ack":false,"time":1714596663268},"_id":45962123}
2024-05-01 22:51:03.289  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1655,"ack":false,"time":1714596663280},"_id":45962124}
2024-05-01 22:51:03.300  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1656,"ack":false,"time":1714596663298},"_id":45962125}
2024-05-01 22:51:03.311  - info: hmip.0 (1377) auth step 1
2024-05-01 22:51:03.324  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1657,"ack":false,"time":1714596663309},"_id":45962126}
2024-05-01 22:51:03.335  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1658,"ack":false,"time":1714596663333},"_id":45962127}
2024-05-01 22:51:03.346  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1659,"ack":false,"time":1714596663344},"_id":45962128}
2024-05-01 22:51:03.359  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1660,"ack":false,"time":1714596663355},"_id":45962129}
2024-05-01 22:51:03.371  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1661,"ack":false,"time":1714596663369},"_id":45962130}
2024-05-01 22:51:03.382  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1662,"ack":false,"time":1714596663380},"_id":45962131}
2024-05-01 22:51:03.393  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1663,"ack":false,"time":1714596663392},"_id":45962132}
2024-05-01 22:51:03.405  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1664,"ack":false,"time":1714596663403},"_id":45962133}
2024-05-01 22:51:03.419  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1665,"ack":false,"time":1714596663414},"_id":45962134}
2024-05-01 22:51:03.428  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1666,"ack":false,"time":1714596663427},"_id":45962135}
2024-05-01 22:51:03.440  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1667,"ack":false,"time":1714596663438},"_id":45962136}
2024-05-01 22:51:03.450  - info: hmip.0 (1377) auth step 2
2024-05-01 22:51:03.461  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1668,"ack":false,"time":1714596663448},"_id":45962137}
2024-05-01 22:51:03.472  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1669,"ack":false,"time":1714596663471},"_id":45962138}
2024-05-01 22:51:03.484  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1670,"ack":false,"time":1714596663482},"_id":45962139}
2024-05-01 22:51:03.494  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1671,"ack":false,"time":1714596663493},"_id":45962140}
2024-05-01 22:51:03.505  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1672,"ack":false,"time":1714596663503},"_id":45962141}

**now i cropped a few repeating lines, as I almost forgot to press the button on the AP ;-)**

2024-05-01 22:51:12.763  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2505,"ack":false,"time":1714596672762},"_id":45962974}
2024-05-01 22:51:12.775  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2506,"ack":false,"time":1714596672773},"_id":45962975}
2024-05-01 22:51:12.786  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2507,"ack":false,"time":1714596672784},"_id":45962976}
2024-05-01 22:51:12.835  - info: admin.0 (751) <== Disconnect system.user.admin from ::ffff:192.168.188.5 
2024-05-01 22:51:30.617  - info: hmip.0 (1377) auth step 3
2024-05-01 22:51:37.854  - info: admin.0 (751) ==> Connected system.user.admin from ::ffff:192.168.188.5
2024-05-01 22:51:37.954  - debug: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2511,"ack":false,"time":1714596697952},"_id":45962980}
2024-05-01 22:51:43.665  - info: host.smarterfranke stopInstance system.adapter.hmip.0 (force=false, process=true)
2024-05-01 22:51:43.673  - info: hmip.0 (1377) Got terminate signal TERMINATE_YOURSELF
2024-05-01 22:51:43.676  - info: hmip.0 (1377) cleaned everything up...
2024-05-01 22:51:43.677  - info: hmip.0 (1377) terminating
2024-05-01 22:51:43.679  - debug: hmip.0 (1377) Plugin sentry destroyed
2024-05-01 22:51:43.680  - info: hmip.0 (1377) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
2024-05-01 22:51:43.745  - info: host.smarterfranke stopInstance system.adapter.hmip.0 send kill signal
2024-05-01 22:51:43.769  - info: admin.0 (751) <== Disconnect system.user.admin from ::ffff:192.168.188.5 
2024-05-01 22:51:44.182  - info: hmip.0 (1377) terminating
2024-05-01 22:51:44.222  - info: host.smarterfranke instance system.adapter.hmip.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
2024-05-01 22:51:46.775  - info: host.smarterfranke instance system.adapter.hmip.0 started with pid 1392
2024-05-01 22:51:48.404  - debug: hmip.0 (1392) Redis Objects: Use Redis connection: 127.0.0.1:9001
2024-05-01 22:51:48.435  - debug: hmip.0 (1392) Objects client ready ... initialize now
2024-05-01 22:51:48.438  - debug: hmip.0 (1392) Objects create System PubSub Client
2024-05-01 22:51:48.440  - debug: hmip.0 (1392) Objects create User PubSub Client
2024-05-01 22:51:48.461  - debug: hmip.0 (1392) Objects client initialize lua scripts
2024-05-01 22:51:48.470  - debug: hmip.0 (1392) Objects connected to redis: 127.0.0.1:9001
2024-05-01 22:51:48.488  - debug: hmip.0 (1392) Redis States: Use Redis connection: 127.0.0.1:9000
2024-05-01 22:51:48.496  - debug: hmip.0 (1392) States create System PubSub Client
2024-05-01 22:51:48.497  - debug: hmip.0 (1392) States create User PubSub Client
2024-05-01 22:51:48.510  - debug: hmip.0 (1392) States connected to redis: 127.0.0.1:9000
2024-05-01 22:51:48.541  - debug: hmip.0 (1392) Plugin sentry Initialize Plugin (enabled=true)
2024-05-01 22:51:49.050  - info: hmip.0 (1392) starting. Version 1.19.2 in /opt/iobroker/node_modules/iobroker.hmip, node: v18.20.2, js-controller: 5.0.19
2024-05-01 22:51:49.073  - debug: hmip.0 (1392) ready
2024-05-01 22:51:49.707  - debug: hmip.0 (1392) createObjectsForDevices
2024-05-01 22:51:49.802  - debug: hmip.0 (1392) createObjectsForGroups
2024-05-01 22:51:50.558  - debug: hmip.0 (1392) createObjectsForClients
2024-05-01 22:51:50.657  - debug: hmip.0 (1392) createObjectsForHomes
2024-05-01 22:51:50.757  - debug: hmip.0 (1392) connectWebsocket
2024-05-01 22:51:50.765  - debug: hmip.0 (1392) updateDeviceStates
2024-05-01 22:51:50.837  - info: hmip.0 (1392) ws connection opened
2024-05-01 22:51:51.729  - debug: hmip.0 (1392) subscribeStates
2024-05-01 22:51:51.732  - info: hmip.0 (1392) hmip adapter connected and ready
tecfreakz commented 1 month ago

I just tried the workaround and indeed it is working!

Here is the Log: (only debug, not silly)

2024-05-01 22:50:58.714  - �[34mdebug�[39m: hmip.0 (1377) ready
2024-05-01 22:50:58.716  - �[32minfo�[39m: hmip.0 (1377) token not yet created
2024-05-01 22:51:03.100  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestToken","message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"from":"system.adapter.admin.0","callback":{"message":{"accessPointSgtin":"3014-F711-A000-XXXX-YYYY-ZZZZ","clientId":"","pin":"","deviceName":"iobroker"},"id":1649,"ack":false,"time":1714596663098},"_id":45962118}
2024-05-01 22:51:03.103  - �[32minfo�[39m: hmip.0 (1377) started token request
2024-05-01 22:51:03.226  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1650,"ack":false,"time":1714596663112},"_id":45962119}
2024-05-01 22:51:03.237  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1651,"ack":false,"time":1714596663235},"_id":45962120}
2024-05-01 22:51:03.248  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1652,"ack":false,"time":1714596663247},"_id":45962121}
2024-05-01 22:51:03.259  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1653,"ack":false,"time":1714596663257},"_id":45962122}
2024-05-01 22:51:03.270  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1654,"ack":false,"time":1714596663268},"_id":45962123}
2024-05-01 22:51:03.289  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1655,"ack":false,"time":1714596663280},"_id":45962124}
2024-05-01 22:51:03.300  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1656,"ack":false,"time":1714596663298},"_id":45962125}
2024-05-01 22:51:03.311  - �[32minfo�[39m: hmip.0 (1377) auth step 1
2024-05-01 22:51:03.324  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1657,"ack":false,"time":1714596663309},"_id":45962126}
2024-05-01 22:51:03.335  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1658,"ack":false,"time":1714596663333},"_id":45962127}
2024-05-01 22:51:03.346  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1659,"ack":false,"time":1714596663344},"_id":45962128}
2024-05-01 22:51:03.359  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1660,"ack":false,"time":1714596663355},"_id":45962129}
2024-05-01 22:51:03.371  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1661,"ack":false,"time":1714596663369},"_id":45962130}
2024-05-01 22:51:03.382  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1662,"ack":false,"time":1714596663380},"_id":45962131}
2024-05-01 22:51:03.393  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1663,"ack":false,"time":1714596663392},"_id":45962132}
2024-05-01 22:51:03.405  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1664,"ack":false,"time":1714596663403},"_id":45962133}
2024-05-01 22:51:03.419  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1665,"ack":false,"time":1714596663414},"_id":45962134}
2024-05-01 22:51:03.428  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1666,"ack":false,"time":1714596663427},"_id":45962135}
2024-05-01 22:51:03.440  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1667,"ack":false,"time":1714596663438},"_id":45962136}
2024-05-01 22:51:03.450  - �[32minfo�[39m: hmip.0 (1377) auth step 2
2024-05-01 22:51:03.461  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1668,"ack":false,"time":1714596663448},"_id":45962137}
2024-05-01 22:51:03.472  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1669,"ack":false,"time":1714596663471},"_id":45962138}
2024-05-01 22:51:03.484  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1670,"ack":false,"time":1714596663482},"_id":45962139}
2024-05-01 22:51:03.494  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1671,"ack":false,"time":1714596663493},"_id":45962140}
2024-05-01 22:51:03.505  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":1672,"ack":false,"time":1714596663503},"_id":45962141}

**now i cropped a few repeating lines, as I almost forgot to press the button on the AP ;-)**

2024-05-01 22:51:12.763  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2505,"ack":false,"time":1714596672762},"_id":45962974}
2024-05-01 22:51:12.775  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2506,"ack":false,"time":1714596672773},"_id":45962975}
2024-05-01 22:51:12.786  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2507,"ack":false,"time":1714596672784},"_id":45962976}
2024-05-01 22:51:12.835  - �[32minfo�[39m: admin.0 (751) <== Disconnect system.user.admin from ::ffff:192.168.188.5 
2024-05-01 22:51:30.617  - �[32minfo�[39m: hmip.0 (1377) auth step 3
2024-05-01 22:51:37.854  - �[32minfo�[39m: admin.0 (751) ==> Connected system.user.admin from ::ffff:192.168.188.5
2024-05-01 22:51:37.954  - �[34mdebug�[39m: hmip.0 (1377) message recieved - {"command":"requestTokenState","message":null,"from":"system.adapter.admin.0","callback":{"message":null,"id":2511,"ack":false,"time":1714596697952},"_id":45962980}
2024-05-01 22:51:43.665  - �[32minfo�[39m: host.smarterfranke stopInstance system.adapter.hmip.0 (force=false, process=true)
2024-05-01 22:51:43.673  - �[32minfo�[39m: hmip.0 (1377) Got terminate signal TERMINATE_YOURSELF
2024-05-01 22:51:43.676  - �[32minfo�[39m: hmip.0 (1377) cleaned everything up...
2024-05-01 22:51:43.677  - �[32minfo�[39m: hmip.0 (1377) terminating
2024-05-01 22:51:43.679  - �[34mdebug�[39m: hmip.0 (1377) Plugin sentry destroyed
2024-05-01 22:51:43.680  - �[32minfo�[39m: hmip.0 (1377) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
2024-05-01 22:51:43.745  - �[32minfo�[39m: host.smarterfranke stopInstance system.adapter.hmip.0 send kill signal
2024-05-01 22:51:43.769  - �[32minfo�[39m: admin.0 (751) <== Disconnect system.user.admin from ::ffff:192.168.188.5 
2024-05-01 22:51:44.182  - �[32minfo�[39m: hmip.0 (1377) terminating
2024-05-01 22:51:44.222  - �[32minfo�[39m: host.smarterfranke instance system.adapter.hmip.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
2024-05-01 22:51:46.775  - �[32minfo�[39m: host.smarterfranke instance system.adapter.hmip.0 started with pid 1392
2024-05-01 22:51:48.404  - �[34mdebug�[39m: hmip.0 (1392) Redis Objects: Use Redis connection: 127.0.0.1:9001
2024-05-01 22:51:48.435  - �[34mdebug�[39m: hmip.0 (1392) Objects client ready ... initialize now
2024-05-01 22:51:48.438  - �[34mdebug�[39m: hmip.0 (1392) Objects create System PubSub Client
2024-05-01 22:51:48.440  - �[34mdebug�[39m: hmip.0 (1392) Objects create User PubSub Client
2024-05-01 22:51:48.461  - �[34mdebug�[39m: hmip.0 (1392) Objects client initialize lua scripts
2024-05-01 22:51:48.470  - �[34mdebug�[39m: hmip.0 (1392) Objects connected to redis: 127.0.0.1:9001
2024-05-01 22:51:48.488  - �[34mdebug�[39m: hmip.0 (1392) Redis States: Use Redis connection: 127.0.0.1:9000
2024-05-01 22:51:48.496  - �[34mdebug�[39m: hmip.0 (1392) States create System PubSub Client
2024-05-01 22:51:48.497  - �[34mdebug�[39m: hmip.0 (1392) States create User PubSub Client
2024-05-01 22:51:48.510  - �[34mdebug�[39m: hmip.0 (1392) States connected to redis: 127.0.0.1:9000
2024-05-01 22:51:48.541  - �[34mdebug�[39m: hmip.0 (1392) Plugin sentry Initialize Plugin (enabled=true)
2024-05-01 22:51:49.050  - �[32minfo�[39m: hmip.0 (1392) starting. Version 1.19.2 in /opt/iobroker/node_modules/iobroker.hmip, node: v18.20.2, js-controller: 5.0.19
2024-05-01 22:51:49.073  - �[34mdebug�[39m: hmip.0 (1392) ready
2024-05-01 22:51:49.707  - �[34mdebug�[39m: hmip.0 (1392) createObjectsForDevices
2024-05-01 22:51:49.802  - �[34mdebug�[39m: hmip.0 (1392) createObjectsForGroups
2024-05-01 22:51:50.558  - �[34mdebug�[39m: hmip.0 (1392) createObjectsForClients
2024-05-01 22:51:50.657  - �[34mdebug�[39m: hmip.0 (1392) createObjectsForHomes
2024-05-01 22:51:50.757  - �[34mdebug�[39m: hmip.0 (1392) connectWebsocket
2024-05-01 22:51:50.765  - �[34mdebug�[39m: hmip.0 (1392) updateDeviceStates
2024-05-01 22:51:50.837  - �[32minfo�[39m: hmip.0 (1392) ws connection opened
2024-05-01 22:51:51.729  - �[34mdebug�[39m: hmip.0 (1392) subscribeStates
2024-05-01 22:51:51.732  - �[32minfo�[39m: hmip.0 (1392) hmip adapter connected and ready

Congratulations 😉

But this adapter in latest versions is still not working for token generation, strongly a bugfix needed.

hahn-th commented 1 month ago

Hi there. Has IQ3(HomematicIP-Cloud) changed anything in the interface or the Auth-Token process or does this only affect the ioBroker adapter?

overwerk commented 1 month ago

The old version (1.21.1 from January) of the adapter is still working fine. So I assume its just a bug in the newer versions. Probably no one tested to add a new device.

RP70DP commented 1 month ago

@GermanBluefox

Can you please recheck the following commit:

mcm1957 commented 1 month ago

Hi there. Has IQ3(HomematicIP-Cloud) changed anything in the interface or the Auth-Token process or does this only affect the ioBroker adapter?

It's most likely a problem with the adapter. Bluefox will check as soon he has time to do this.

And thanks to all who provided logs. Maybe this will help to identify the difference.

mcm1957 commented 3 weeks ago

@GermanBluefox @Apollon77

Hi Bluefox, can you please check this issue?

maik-h commented 1 week ago

The problem exists for me too

GermanBluefox commented 1 week ago

Please test a new version v1.23.2

maik-h commented 1 week ago

I should press the blue button as usual. If this happens to me, unfortunately nothing else Screenshot 2024-05-24 121556 Screenshot 2024-05-24 121719

GermanBluefox commented 1 week ago

At least now we are by step 2...

Apollon77 commented 6 days ago

@maik-h Wann genau hast Du denn hier den blauen knopf gedrückt im Log oben? kamen wirklich nur diese 2 fehlerlogs? und danach hast Du gedrückt? oder wann wars? Kam nachdem du gedrückt hast nochmal eine logzeile?

Hintergrund meiner Frage: Bisher wurde ein zurückgegebener Fehler in Step 2 nicht geloggt ... formal wären die logs also ddamit ggf zu ignorieren ...

maik-h commented 6 days ago

Hallo, beim ersten versuch hat es nicht geklappt es wurde auch nichts weiter gelogt. Ich habe allerdings den Host heute einmal neu gestartet und schon hat das ganze funktioniert. Wie kann ich euch ein kleines Trinkgeld zukommen lassen ?

maik-h commented 6 days ago

Hier für euch nochmal der aktuelle Log falls es intersant ist Screenshot 2024-05-26 150840 Screenshot 2024-05-26 150857

Apollon77 commented 6 days ago

@GermanBluefox It seems that the "check if auth" endpoint does return error 400 when it is "not yet authorized", so adjust the response validator then the error is nt logged but just false is returned for 400 :-) Then we should be done

Apollon77 commented 6 days ago

@sewo-x could you maybe please also validate it?

sewo-x commented 5 days ago

Thanks for the update.

Steps to reproduce from my side:

  1. Homematic AccessPoint (HmIP-HAP JS1) restarted (disconnected from the power supply)
  2. Stopped iobroker (console: iobroker stop)
  3. 'Fixed' iobroker (console: iobroker fix)
  4. Restarted iobroker (console: iobroker start)
  5. Added SGTIN and PIN in adapter settings
  6. Clicked on blue button within iobroker to create token
  7. After prompting pressed button on AccessPoint
  8. Result: nothing happend after pressing button on AP

image

image

sewo-x commented 5 days ago

@Apollon77 log attached:

2024-05-27 11:41:23.792 - info: hmip.0 (88236) started token request 2024-05-27 11:41:23.954 - info: hmip.0 (88236) auth step 1 2024-05-27 11:41:24.068 - info: hmip.0 (88236) auth step 2 2024-05-27 11:41:24.242 - warn: hmip.0 (88236) Request error data: [object Object], ({"errorCode":"INVALID_REQUEST"}) 2024-05-27 11:41:24.242 - warn: hmip.0 (88236) Request error status: 400 2024-05-27 11:41:26.295 - warn: hmip.0 (88236) Request error data: [object Object], ({"errorCode":"INVALID_REQUEST"}) 2024-05-27 11:41:26.295 - warn: hmip.0 (88236) Request error status: 400