Page 1 of 1

Problem with Mqttlamp in Lampgroup

Posted: Wed May 13, 2020 2:36 pm
by Taggbricka
I have tested a new thing today.
Bought a bunch of Deltaco SH-P01 Tuya compliant switches.
Reflashed them with Tasmota firmware.
They are running fine from NetHomeServer as "MqttLamp" via a Mosquitto broker.
Defined as "MqttLamp" they can be turned "on" and "off".

PROBLEM: When I include the "MqttLamp" in a "LampGroup" the "LampGroup" can't control the lamp.
What to do?

Below is the start log and some items from the default.xml file.

Code: Select all

20.04.30 21:13:22 HomeServer Activated 65 of 65 Items
20.04.30 21:13:20 MqttClient Connected to MQTT Server tcp://192.168.1.25
20.04.30 21:13:17 HomeItemFileLoader Loading Items from default.xml
20.04.30 21:13:17 HomeManagerStarter Logging to: /home/la/HomeManager%g.log
20.04.30 21:13:17 HomeManagerStarter **Starting HomeManager 3.0-c10e9**

Code: Select all

   <HomeItem Class="MqttLamp" >
        <Attribute Name="ID">206</Attribute>
        <Attribute Name="Name">MQTT_Plug3</Attribute>
        <Attribute Name="State">Off</Attribute>
        <Attribute Name="Topic">cmnd/MQTT_Plug3/power</Attribute>
        <Attribute Name="OnMessage">on</Attribute>
        <Attribute Name="OffMessage">off</Attribute>
        <Attribute Name="QOS">0</Attribute>
        <Attribute Name="Retain">No</Attribute>
        <Attribute Name="MqttClient"></Attribute>
    </HomeItem>

Code: Select all

<HomeItem Class="LampGroup" >
        <Attribute Name="ID">213</Attribute>
        <Attribute Name="Name">Test1</Attribute>
        <Attribute Name="State">Off</Attribute>
        <Attribute Name="Lamps">206</Attribute>
        <Attribute Name="Delay">0</Attribute>
    </HomeItem>

Code: Select all

        <HomeItem Class="MqttClient" >
        <Attribute Name="ID">201</Attribute>
        <Attribute Name="Name">Mqtt broker</Attribute>
        <Attribute Name="State">Connected</Attribute>
        <Attribute Name="Port">1883</Attribute>
        <Attribute Name="Address">tcp://192.168.1.25</Attribute>
        <Attribute Name="ClientName">OpenNetHomeServer-6833</Attribute>
        <Attribute Name="UserName"></Attribute>
        <Attribute Name="Password"></Attribute>
        <Attribute Name="BaseTopic">#</Attribute>
    </HomeItem>

Re: Problem with Mqttlamp in Lampgroup

Posted: Thu May 28, 2020 7:33 pm
by Taggbricka
Another find, when testing via port 8005, call,MQTT_Plug1,Toggle,call,MQTT_Plug1,On and call,MQTT_Plug1,Off works.
Calling the LampGroup in the same way shows no action.

Re: Problem with Mqttlamp in Lampgroup

Posted: Fri Jun 05, 2020 7:54 pm
by Taggbricka
Further random testing gives useful results, control type "Scene" can control up to six MQTT lamps.
One Scene for "On" and one Scene for "Off" is needed, These can be called from e.g. a "Timer".

Re: Problem with Mqttlamp in Lampgroup

Posted: Fri Jan 01, 2021 2:56 pm
by stefangsbb
Sorry for very slow response. I have fixed the problem in the MQTTLamp. The on/off commands were defined with capital letters, which messed up things for the LampGroup. The corrected version is uploaded in the nightly build.