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

The app will see the sensor, it will try to find a device with id 00082001 to report the usage. As it will not find this device in your setup it gets ignored.

You can create a composite sensor in the app. Eg select a temp sensor and add the power sensor to it.

The Domoticz Server app will only take a local IP:port address e.g. 192.xxxx or 10…, not sure if you are trying to get something like https://abcbbc.com in there. that will not work. Hubaction is only doing local calls.

Also it seems that sendhubaction has limitations in respect to https…does not sound good.

I do try to acces local LAN (192…)

I have no Idea where to create the composite sensor.
Do I need to modify app code or is it possible via the Smartthings app?

Anyway I am expecting a rPi this week and I plan to move the Domoticz from my Synology to the rPi and I will allow http to the new installation. I hope I can give a try soon

still not showing up for me. probably something on my end.

I have added some additional trace, if you could update from git. run live logging. I am looking for trace info that starts with

[onLocationEvtForUCount]
[onLocationEvtForEveryThing]

if you could post that info, many thanks!

No, it is a function of my app Domoticz Server, if you open it, you will see create composite sensors.

I don’t see the first one

‎12‎:‎05‎:‎21‎ ‎AM: error java.lang.NullPointerException: Cannot invoke method sendEvent() on null object 
12‎:‎05‎:‎21‎ ‎AM: trace [onLocationEvtForEveryThing] stateDevice idxPower132 added to 112 
‎12‎:‎05‎:‎21‎ ‎AM: trace [onLocationEvtForEveryThing] XIAOMI state device found 010EC678 for usage device 0EC67801 
12‎:‎05‎:‎21‎ ‎AM: trace [onLocationEvtForEveryThing] stateDevice idxPower135 added to 134 
12‎:‎05‎:‎21‎ ‎AM: trace [onLocationEvtForEveryThing] XIAOMI state device found 0153DF2A for usage device 53DF2A01 
12‎:‎05‎:‎21‎ ‎AM: trace [onLocationEvtForEveryThing] stateDevice idxPower131 added to 113 
12‎:‎05‎:‎21‎ ‎AM: trace [onLocationEvtForEveryThing] XIAOMI state device found 013E52D1 for usage device 3E52D101 
‎12‎:‎05‎:‎21‎ ‎AM: trace [onLocationEvtForEveryThing] Domoticz response with Title : Devices, number of items returned 55 
‎12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] Domoticz response with Title : Devices, number of items returned 10 
12‎:‎05‎:‎18‎ ‎AM: error java.lang.NullPointerException: Cannot invoke method sendEvent() on null object 
12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] stateDevice idxPower132 added to 112 
12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] XIAOMI state device found 010EC678 for usage device 0EC67801 
12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] stateDevice idxPower135 added to 134 
12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] XIAOMI state device found 0153DF2A for usage device 53DF2A01 
12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] stateDevice idxPower131 added to 113 
12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] XIAOMI state device found 013E52D1 for usage device 3E52D101 
‎12‎:‎05‎:‎18‎ ‎AM: trace [onLocationEvtForEveryThing] Domoticz response with Title : Devices, number of items returned 15

looks like it is making the right connections, to be sure, could you paste state.devices again. I will take a look at the nullPointereException, migt have something to do with it, looks like we are closing in on the root cause :slight_smile:

PS. found the problem with nullpointer, to be sure, could you go into the app and enable “create Power Report device” under create composite sensors? I think i always send an event to this device, even if not defined. If enabled, the null pointer exceptions should be gone.

enabling “create Power Report devices” gave me this

7:09:09 AM: error [addReportDevices] Cannot create child device. 9f442dc4-5a05-44f9-9fdb-c9fe9d844322:Power Reporting Device:10000 Error: physicalgraph.app.exception.UnknownDeviceTypeException: Device type 'domoticzPowerReport' in namespace 'verbem' not found.

the nullPointerException errors are still there :frowning:

here’s the device state…

	{134={port=8080, switchTypeVal=0, idx=134, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:134, deviceId=0153DF2A, ip=192.168.31.228}, 79={port=8080, switchTypeVal=7, idx=79, subType=Lighting Limitless/Applamp, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:79, deviceId=C0A81F8C, ip=192.168.31.228}, 114={port=8080, switchTypeVal=0, idx=114, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:114, deviceId=000140C2, ip=192.168.31.228}, 78={port=8080, switchTypeVal=7, idx=78, subType=Lighting Limitless/Applamp, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:78, deviceId=C0A81FCE, ip=192.168.31.228}, 138={port=8080, switchTypeVal=18, idx=138, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:138, deviceId=0128886A, ip=192.168.31.228}, 112={port=8080, switchTypeVal=0, idx=112, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:112, deviceId=010EC678, ip=192.168.31.228}, 113={port=8080, switchTypeVal=0, idx=113, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:113, deviceId=013E52D1, ip=192.168.31.228}, 136={port=8080, switchTypeVal=8, idx=136, subType=Light/Switch, deviceType=domoticzMotion, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:136, deviceId=01582753, ip=192.168.31.228}, 110={port=8080, switchTypeVal=2, idx=110, subType=Light/Switch, deviceType=domoticzContact, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:110, deviceId=01002B7F, ip=192.168.31.228}, 152={port=8080, switchTypeVal=18, idx=152, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:152, deviceId=000140E8, ip=192.168.31.228}, 171={port=8080, switchTypeVal=, idx=171, subType=Temp + Humidity, deviceType=domoticzSensor, type=sensor, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:171, deviceId=DA96, ip=192.168.31.228}, 153={port=8080, switchTypeVal=7, idx=153, subType=Lighting Limitless/Applamp, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:153, deviceId=C0A81F82, ip=192.168.31.228}, 151={port=8080, switchTypeVal=18, idx=151, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:151, deviceId=000140E7, ip=192.168.31.228}, 198={port=8080, switchTypeVal=0, idx=198, deviceType=domoticzOnOff, subType=Light/Switch, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:198, deviceId=00014116, ip=192.168.31.228}, 174={port=8080, switchTypeVal=, idx=174, subType=Temp + Humidity, deviceType=domoticzSensor, type=sensor, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:174, deviceId=E99B, ip=192.168.31.228}, 199={port=8080, switchTypeVal=0, idx=199, deviceType=domoticzOnOff, subType=Light/Switch, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:199, deviceId=00014117, ip=192.168.31.228}, 109={port=8080, switchTypeVal=8, idx=109, subType=Light/Switch, deviceType=domoticzMotion, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:109, deviceId=01144B47, ip=192.168.31.228}, 82={port=8080, switchTypeVal=7, idx=82, subType=Lighting Limitless/Applamp, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:82, deviceId=C0A81F68, ip=192.168.31.228}, 80={port=8080, switchTypeVal=7, idx=80, subType=Lighting Limitless/Applamp, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:80, deviceId=C0A81F65, ip=192.168.31.228}, 81={port=8080, switchTypeVal=7, idx=81, subType=Lighting Limitless/Applamp, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:81, deviceId=C0A81F67, ip=192.168.31.228}, 99={port=8080, switchTypeVal=18, idx=99, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:99, deviceId=000140B3, ip=192.168.31.228}, 84={port=8080, switchTypeVal=18, idx=84, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:84, deviceId=00F92F59, ip=192.168.31.228}, 98={port=8080, switchTypeVal=0, idx=98, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:98, deviceId=000140B2, ip=192.168.31.228}, 97={port=8080, switchTypeVal=0, idx=97, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:97, deviceId=000140B1, ip=192.168.31.228}, 128={port=8080, switchTypeVal=18, idx=128, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:128, deviceId=299AA1AD, ip=192.168.31.228}, 93={port=8080, switchTypeVal=0, idx=93, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:93, deviceId=000140AD, ip=192.168.31.228}, 200={port=8080, switchTypeVal=0, idx=200, deviceType=domoticzOnOff, subType=Light/Switch, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:200, deviceId=00014118, ip=192.168.31.228}, 92={port=8080, switchTypeVal=, idx=92, subType=Temp + Humidity, deviceType=domoticzSensor, type=sensor, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:92, deviceId=056A, ip=192.168.31.228}, 201={port=8080, switchTypeVal=0, idx=201, deviceType=domoticzOnOff, subType=Light/Switch, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:201, deviceId=00014119, ip=192.168.31.228}, 166={port=8080, switchTypeVal=18, idx=166, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:166, deviceId=00150005, ip=192.168.31.228}, 165={port=8080, switchTypeVal=18, idx=165, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:165, deviceId=00150004, ip=192.168.31.228}, 167={port=8080, switchTypeVal=7, idx=167, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:167, deviceId=00150002, ip=192.168.31.228}, 162={port=8080, switchTypeVal=0, idx=162, subType=Light/Switch, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:162, deviceId=000140F2, ip=192.168.31.228}, 164={port=8080, switchTypeVal=18, idx=164, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:164, deviceId=00150003, ip=192.168.31.228}, 184={port=8080, switchTypeVal=, idx=184, subType=Temp, deviceType=domoticzSensor, type=sensor, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:184, deviceId=14108, ip=192.168.31.228}, 32={port=8080, switchTypeVal=7, idx=32, subType=Lighting Limitless/Applamp, deviceType=domoticzOnOff, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:32, deviceId=005A8294, ip=192.168.31.228}, 185={port=8080, switchTypeVal=8, idx=185, subType=Light/Switch, deviceType=domoticzMotion, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:185, deviceId=0130D687, ip=192.168.31.228}, 53={port=8080, switchTypeVal=5, idx=53, subType=Light/Switch, deviceType=domoticzSmokeDetector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:53, deviceId=000C0402, ip=192.168.31.228}, 89={port=8080, switchTypeVal=18, idx=89, subType=Selector, deviceType=domoticzSelector, type=switch, dni=9f442dc4-5a05-44f9-9fdb-c9fe9d844322:IDX:89, deviceId=013ED06D, ip=192.168.31.228}}

My fault :roll_eyes: , the device handler for domoticzPowerReport was not on git, it is now, and needed for this enabler to work.

I had some problems in the past with updating state, the changes were simply not done. To prevent that it needed a pause after the update as a circumvention, i have put in pause again to see if that is the problem in this case. Your state.devices does not contain the property needed to update power usage, while showing the trace after that update.

So please one more update for the app…

1 Like

oh, yess…

android-270x480

excellent stuff, Martin :slight_smile:
thanks a lot

Phfeww…

now, to bug you with other questions… :wink:

I’m using your app to interface domoticz to Amazon Alexa. voice commands works, even for asking temperature sensors. but why does Alexa recognize domoticzOnOff switches as camera? i can’t see their states (on/off) through alexa app.

app-270x480

of course this is not major issue, as i rarely use alexa app to check states. voice works fine anyway.

thanks

haha…because the graphs the device displays use a capability Image Capture, i use it to display a picture that gets generated. It usually is used with camera´s.

Version 5.00. Updated domoticzPowerReport device. This will collect all kWh usage from domoticz and displays, last 24 hours, month and year graphs in a carrousel. To have the device created go into the domoticz app, select Create Composite Sensors, enable create Power Report Device, Save.

To make this work add domoticzPowerReport device from github devices in the IDE.

domoticzPowerReport Device

Look for thing : Power Reporting Device.

Small update, I moved my Domtocz to rPi and the test devices work. My solar inverter shows the kWh value I added it as a composite sensor (I am not sure about kW yet, since it is dark here) I also added one Daikin inside unit and I can see the inside and outside temperature, but I cant see the setpoint

Setpoint is not something I propagate to St yet.

met vriendelijke groeten,

Martin

hi Martin,

got question about domoticzSelector.
is it possible to render each level in domoticz selector switch as separate tile, rather than “prev” and “next” tiles?
like this switch I have, for example…

thanks

Will check it out and back soon. One of the problems i had was that the number device tiles are not dynamic, you cannot program one additional based on the input you get from DZ selector changes. But i have an idea that might work.

met vriendelijke groeten,

Martin

Can you give it a go?
Update smartapp Domoticz Server
Update DTH domoticzSelector
New DTH domoticzSelectorState

delete the selector devices from ST and wait a while, the states will appear after a while as new buttons in the new devices. It is a composite device, the selector device will create the states as childdevices, you can react to that in automation as well, as the tiles will fire a button event.

It cannot cope right now with changes you make in domoticz to the naming or sequence, that is phase 2… enjoy and let me know any problems.

ok. the states showing nicely…

but there’s one issue.
when selecting “OFF” state on ST, it’s sending OFF command instead of LEVEL 0. DZ doesn’t seem to understand that.

in DZ,
works

/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=On

doesn’t work

/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=Off

works

/json.htm?type=command&param=switchlight&idx=IDX&switchcmd=Set%20Level&level=0