# \[APP\]\[Cloud & Pro\] Somfy Tahoma & Connexoon (v4.0.124, test v4.0.152)

**URL:** <https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206>\
**Category:** Apps\
**Tags:** official, homey-pro\
**Created:** [September 29, 2020, 3:01pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206 "2020-09-29T15:01:37Z")\
**Posts on this page:** 20\
**Page:** 11

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 1:23pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/204 "2020-10-10T13:23:57Z")

</div>

That’s exactly what I said:

> [@rvdeijk](#):
>
> However the moment I press the login button in your homey somfy app, then Homey does receive position state updates

I thought it was after I controlled the cover once, but maybe it’s indeed when the next poll (sync time) happens. In my case also 10 sec.

---

<div class="post-metadata">

**Author:** ![Baldhor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/baldhor/32/27028_2.png) [@Baldhor](https://community.homey.app/u/Baldhor)\
**Post date:** [October 10, 2020, 1:24pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/205 "2020-10-10T13:24:40Z")

</div>

just a tiny bug to solve on restart, and it’s all good 🙂 (at least for us)

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 1:30pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/206 "2020-10-10T13:30:40Z")

</div>

Indeed and let’s hope that the remaining 401 error issue is Somfy related and not app related.

> [@\[APP\]\[Cloud & Pro\] Somfy Tahoma & Connexoon (v4.0.37, test v4.0.70)](https://community.homey.app/t/somfy-tahoma-connexoon-v2-0-3-test-v2-0-10/35206/181):
>
> I have had a message from a user on GitHub about the possible authentication issues: I can confirm that this has nothing to do with the email about usage of /setup end point. Somfy’s support have confirmed they have an issue with authentication on [Tahomalink.com](http://Tahomalink.com) which is desynced… Apprently for some users changing their password will resync but not for all. They have no idea when this will be fixed.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 2:04pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/207 "2020-10-10T14:04:00Z")

</div>

Thanks for the input guys, that information has been very helpful.  
I am now in the process of adding more ‘locks’ in the code to make sure the startup order is well controlled. The joys of an asynchronous system without proper semaphores and locks.  
The old /setup endpoint method had the advantage of one global collector function that then distributed the data. The way the new method has evolved by discovering new parts of the secrets over a few days has fragmented the operations. So, time to, almost, start over with all the new knowledge.

The Somfy API actually seems pretty good. If only they would make it official and publish some of the documents I have come across, the third party systems that have been built would probably be a lot more friendly to their servers. They could also hand out official OAuth2 IDs and secrets that allowed basic access to the system, while protecting more sensitive stuff.

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 2:07pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/208 "2020-10-10T14:07:04Z")

</div>

> [@Adrian\_Rockall](#):
>
> The Somfy API actually seems pretty good. If only they would make it official and publish some of the documents

Have you send @iMick a direct message? I thought he wanted to send you some documention of the full API:

> [@iMick](#):
>
> Could you possibly send me a DM? I would like to share the full API documentation with you privately

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 2:09pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/209 "2020-10-10T14:09:15Z")

</div>

Yes I did that and the document is the one I have mentioned. It has been very useful.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 2:18pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/210 "2020-10-10T14:18:08Z")

</div>

Just out of interest, what Homey’s are people using that are having the startup problem?

I have a Homey Pro so I am wondering if it can start the various parts of the system more efficiently with the 2 core CPU’s.

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 2:23pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/211 "2020-10-10T14:23:15Z")

</div>

> [@Adrian\_Rockall](#):
>
> what Homey’s are people using that are having the startup problem?

I have an Homey Pro (early 2019) together with a Somfy Connexoon.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 2:49pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/212 "2020-10-10T14:49:29Z")

</div>

Well that rules out my theory 🙂

---

<div class="post-metadata">

**Author:** ![Baldhor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/baldhor/32/27028_2.png) [@Baldhor](https://community.homey.app/u/Baldhor)\
**Post date:** [October 10, 2020, 3:16pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/213 "2020-10-10T15:16:27Z")

</div>

there are a lock mecanism in homey.  
Syntax is something like this :  
private static Lock = new Mutex();

```
@synchronize(VirtualThermostat.Lock)
public async onDeleted() {

```

edit: make me think I need update several apps to the new beta version ☹

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 4:47pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/214 "2020-10-10T16:47:42Z")

</div>

That sounds interesting.

Is that a Homey function or Node.js?  
Is it documented somewhere?

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 5:42pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/215 "2020-10-10T17:42:04Z")

</div>

Version 2.0.11 is now in test. I have added flags around functions and retry methods to control the startup sequence.  
Hopefully now the app should finish the log in procedure before the devices start trying to communicate with Tahoma.

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 6:05pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/216 "2020-10-10T18:05:07Z")

</div>

I installed 2.0.11, then I cleared the logs.  
I restarted the app and moved my cover with the connexoon app. In homey the position state didn’t change. Also the info and state log are empty.

When I manually login then everything works fine.  
I have send the info log. It starts with 2020-10-10T18:01:22.887Z

So unfortunately nothing changed. Except that I see Tahoma login in the log instead of Simple login.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 6:30pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/217 "2020-10-10T18:30:36Z")

</div>

Just to make sure I understand, after starting the app the information log was completely empty?  
The when you logged in manually it filled with the data you sent?

The app automatically clears the information log when it initialises. So after restarting it you should see it fill up.  
If it’s not showing anything then something is interupting the initialisation. I will add yet more logging earlier in the process.  
One thing you could try is, after starting the app and waiting a few minutes, then tap on the Create Diagnostic Report. If the app has consumed an error then it might show something.

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 7:28pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/218 "2020-10-10T19:28:41Z")

</div>

> [@Adrian\_Rockall](#):
>
> Just to make sure I understand, after starting the app the information log was completely empty?  
> The when you logged in manually it filled with the data you sent?

Correct.

I restarted the app and after 2 hours it is still completely empty.

> If it’s not showing anything then something is interupting the initialisation.

So this seems to be the case.  
diagnostic report:  
f2265f00-d19b-45ed-94df-666f90b3eed6

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [October 10, 2020, 7:31pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/219 "2020-10-10T19:31:37Z")

</div>

Where did you read that? Node.js runs JS-code single-threaded (unless you use worker threads, but they are explicit and weren’t introduced until Node v14, which Homey doesn’t run).

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 8:07pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/220 "2020-10-10T20:07:26Z")

</div>

> [@rvdeijk](#):
>
> So this seems to be the case.  
> diagnostic report:  
> f2265f00-d19b-45ed-94df-666f90b3eed6

Thanks for the report. It did indeed pin point an error in the app init function (linkUrl instead of linkurl) that stopped the function in it’s tracks. It was fine on mine because the setting had been saved and therefore bypassed the placed it was used.

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 8:14pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/221 "2020-10-10T20:14:43Z")

</div>

I tested 2.0.12 and now directly after the update the log is filled. I also tried a restart and the log is filled immediately 😃

When I change the position of the roller shutter with connexoon, then Homey shows the state.

So great job, problem solved!!

---

<div class="post-metadata">

**Author:** ![rvdeijk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rvdeijk/32/22542_2.png) [@rvdeijk](https://community.homey.app/u/rvdeijk)\
**Post date:** [October 10, 2020, 9:21pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/222 "2020-10-10T21:21:15Z")

</div>

Will you let us know when you have a reply from Somfy what an acceptable sync/poll value is.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [October 10, 2020, 9:55pm UTC](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206/223 "2020-10-10T21:55:43Z")

</div>

I will pass it on if they let me know. I’m still not sure how much they will communicate with me as I am using the unofficial api. I have a suspicion they will tolerate it, provided it doesn’t stress their servers, but give no specific guidance in case that implies permission.  
I have been informed by a Homey user who works for Somfy that they received a company email. It basically said they are aware of our situation and are hopeful it will be resolved by the deadline. The user also thanked me for my work. So I took that as a positive.  
My feeling is 30 seconds should be safe and possibly as low as 10 seconds. I don’t know if they will give heavy users a warning first or just block them.

[Previous page](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206.md?page=10)

[Next page](https://community.homey.app/t/app-cloud-pro-somfy-tahoma-connexoon-v4-0-124-test-v4-0-152/35206.md?page=12)
