Dummy commands in API Topic is solved

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
peychart
Posts: 2
Joined: Friday 09 August 2019 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Dummy commands in API

Post by peychart »

Hello,
I'm new here, so I do not know if I'm in the right place to ask my question ...
I designed WiFi modules based on the ESP8266 to control my home lighting (https://github.com/peychart/WiFiPowerStrip).
several control modes can be used:
- wall switches,
- the web interface included in the modules
- or via domoticz and http request.
The problem is that when the wall switches or the html interface of the sensors are used, the state of the lights is not updated in the domoticz interface ...

So I wrote a small nodeJS application that receives notifications from the ESP8266 module each time it changes state and converts it to a command sent to the domoticz API.

But the new problem that appears is that domoticz returns a new activation command during this update of the sensor states ...

Is there a way to change the state of a virtual sensor in the domoticz interface without this change generating new http commands sent to the sensor from domoticz (like a "dummy" option in the API command sent) ?

Or am I doing it wrong?

Thank you for your suggestions.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dummy commands in API

Post by waaren »

peychart wrote: Friday 09 August 2019 23:33 But the new problem that appears is that domoticz returns a new activation command during this update of the sensor states ...
Is there a way to change the state of a virtual sensor in the domoticz interface without this change generating new http commands sent to the sensor from domoticz (like a "dummy" option in the API command sent) ?
use something like
http://<>domoticz ip>:<domoticz port>/json.htm?type=command&param=udevice&nvalue=1&svalue=1&idx=<device idx>
to switch On and
http://<>domoticz ip>:<domoticz port>/json.htm?type=command&param=udevice&nvalue=0&svalue=0&idx=<device idx>
to switch Off
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
peychart
Posts: 2
Joined: Friday 09 August 2019 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dummy commands in API

Post by peychart »

Exactly what I needed,
Thank you very much.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest