Connection to Domoticz defined devices like Blinds and On/Off switches

Hi Darren, i am not at home this week. But no troubles in the comms between dz and st.

But why would you want to have two instances of the app, you can select multiple rooms.

@dudz40 - Thanks for coming back to me.

Multiple apps, only because I was trying to separate out the devices to provide me with more flexibility until I establish what suits me best, without thinking through the idea completely :slight_smile:

In relation to the comms, based on your response, I think I know what the issue is. You are 100% correct, there isnā€™t an issue between the two systems, but there may be an issue with the ST app.

If i turn on the light in Domoticz, the light comes on. However the light is not represented as On in the ST App. BUT if I go into the light on the ST App and hit the refresh button, then the light in the app shows as being On (ie refreshes from Off to On)

If I turn off the light from the ST app, it shows ā€œTurning Offā€. The light goes off immediately and the Domoticz light goes off too. However the ST light, turns back to On. But if I go back into the light and hit refresh, then it shows as being off (ie refreshes from On to Off).

Iā€™ve had 2 ST app updates in the last week since the new hub firmware and this refreshing wasnā€™t required, prior to one of the 3 updates. Iā€™m on an Android device, with Version 2.3.1 Build Number: 211001

The above information may be of use to others if anyone experiences similar.

As i think of it, you cannot have two instances of the app. Domoticz is
using notifications to inform st that something has happened. St then asks
for a status update just like refresh does. Notigications use a single
endpoint into the app to do that. So only one app will receive these
notifications. It will only happen if the notifications from dz are not
arriving in the app.

You might want to check your notification setup in dz by reading the
relevant part in the wiki :laughing:

@Dudz40 Things are becoming clearer :-). Yes the original urlCustomActionHttp that I had used was no longer valid, as I went through a few different creation and deletions. A valuable lesson learned there.

During my latest re-creation I encountered something else :frowning: , I know what the issue is, just have no idea how to go about resolving.

My Domoticz is created on a Raspberry PI3 under a non default port, 2016. I have the PI3 set to a static LAN Address and a static WiFi address for example 192.168.1.10 for LAN and 192.168.1.11 for Wifi

The PI is connected to my LAN via Wifi. If I use any of my home devices, PC, tablet or phone I can connect to the Domoticz GUI using 192.168.1.11:2016 without issues. When I use your ST app to configure the server and choose the option rooms, when I use the Wifi IP address, the rooms donā€™t appear. When I just choose to take everything your App can find, again it finds nothing. I rebooted the PI and ST and killed the ST app in case there was a caching issue. Still no joy.

I thought it may be a port issue, so i configured Domoticz on my PC using the same port and your App had no problem connection (ruled out port issue).

Next I tired connecting my LAN cable to the PI3 and retrying your app. It worked perfectly first time. I deleted your App again and retried connecting under the WiFi IP again no joy.

I did notice that when you enter the first IP on your App and subsequently change it, the options donā€™t refresh so I thought I would try and take advantage of this. So I tried your App again, connecting to the LAN IP of the PI3 and got my list of rooms. I then changed the IP on your App to the WiFi IP and the rooms stayed available. I got my lights and followed up with the rest of the configuration.

The lights and notification worked flawlessly with the LAN cable was connected to the PI, but failed again when I unplugged the LAN cable attempting to force the use of the WiFI IP Address.

(I didnā€™t really expect the above to work as I figured, I think correctly that the information stored was from the first IP Address entered the LAN one and not the WiFi one).

Do you have any idea why iā€™m failing to connect from your App to my Domoticz server when using the PI3 WiFi Static IP Address?

Hmmmmā€¦ i need to carefully read this. It will be saturday. My pi is lan
connected, so i need to recreate. But normally it should be the combi of
the domoticz port for the service and the pi ip.
It mighg indeed be that the ip is not changed in the app. Originally itwas used to create unique devices. That is nolonger the case. So i could allow ip changeā€¦

I guess the ip change may be needed if someone moved their server or mergered servers together.

Looking forward to seeing how you get on with your test. It has me stumped.

So the flow you follow is:

you use the lan IP first and the rooms showā€¦you change the IP to wifi and the rooms do not show anymore? also the operations that should use the wifi IP fail now as well?

I have updated smartapp to V3.09, No need to redo all, just fill in the correct IP/Port and see if this works for youā€¦

@dudz40 not able to test currently, but shall be tomorrow and will report back then.

@dudz40, I can confirm that I can now successfully connect to the Domoticz Server when running the PI3 over WIFI. I can also confirm that when you change from one IP to another it will pick up the new items on the new IP.

Those are brilliant changes you have brought to the app. Thank you very much.

I have updated the Smart Screens app. You can now choose between using DarkSky and OpenWeatherMap as your provider for current weather data. For my environment DarkSky was off too many times, I found OWM to be more accurate, that might be a geo thing.

Hi @dudz40

Iā€™ve come across a scenario that Iā€™m not sure what the options are. Perhaps you might be able to assist.

In addition to having Domoticz Server on my Pi3 I also have installed HA Bridge (http://bwssystems.com/) I only use HA Bridge to leverage my Echo to turn on my lights. The HA Bridge acts like a Hue Emulator. I dont have this connected into ST. Iā€™m trying to keep as much processing local as i can :slight_smile:

Since the last ST firmware upgrade and its annoying (at least to me) the find all my LAN devices is started every time you add a new ST device, thus meaning it now picks up my HA Bridge and adds in the hub and associated lights. When that happens the Notification synch between Domoticz and ST now longer works, thus meaning lights stay on when they should go off etc.

Delete the newly added Hue bridge and its associated items and the Notification synch works perfectly again.

Just wondering have you come across this scenario and if there an alternative way to keep the synch working when the HA bridge gets added?

Cheers

Hi Darren, no did not came across it before. Try to get my head around how this can go wrong.
Do you now have lights that are in domoticz, and are added twice in st? Once by the domoticz server app and once by super lan connect?

I myself have the hue lights added by lan connect too and notifications do work for all devices. But i do not have hue lights both in domoticz and st. I have a bridge defined in dz, but i have only added the groups in dz and thus replicated to st. All other devices stayed defined as unused in dz.

Ps, what version if the domoticz server smartapp are you using.

Hi Martin

In my case no, iā€™m not doubling up on lights (which is due to my set up). Basically all my lights are in DZ. I use your App to take over nearly all the lights except those in my living room. I use the HA Bridge with the DZ integration and only include my living room lights. And these lights I use with my echo.

When the hub is added to ST, only the lights in the HA Bridge are added ie my living room lights. In my case the lights I have on the bridge are named differently (in essence an alias) than I have in DZ and the alias named lights are added to ST.

In DZ i have added rooms and basically added a single light to a room (just for easier control on my setup). From the DZ ST App i add each room. ST App version is 3.12

I have acquired a new token from the DZ St app and updated DZ, that didnt resolve the issue.
I have had a look at the Hue Device information against a DZ Light Device and the Network IDs are different. I donā€™t see any common elements.

Hope the above makes sense.

Can you take a look at the dz log and see if there are http notification failures?

Iā€™ll take a look later when back from work.

Kingsday overhere in NL, so day off!!

what you could test as a circumvention is the following:

So for the test: delete the current Hue Bridge in ST.
add a custom Hue Connect from the marketplace and have it just discover the bridge (that is a guess) and see if Super Lan connect leaves your HAbridge alone now.

Hope you had a good day off.

With all my messing and testing different scenarios i managed to loose my Domoticz items from the app. Not sure why or how. Of all my lights I had included from my different rooms, only one light was left.

I updated your app only last night, so this is the first time I have re-added in my Domoticz items. I ended up deleting my lights and then the app. When i attempted to re-add your app, and choose to add room plan, I keep getting ā€œSelect the rooms. You canā€™t current add thisā€.

I restarted my PI Domoticz server and also my ST hub, Iā€™m still having the same issue.

I connected your App to my Dev Domoticz server on my PC and Iā€™m encountering the same issue.

Am I doing something daft or has something changed between the App versions?

Will check. Yes i have changed the structure on how i process responses from domoticz, as i was interchanging much more info in the last version. Might indeed messed up something.

I does not dynamically build the the selectable rooms, i will change that. As a workaround, deselect Support Room Plans and select it again, it should fill the rooms that you have, just tested this here and that worked.