Page 3 of 3
Re: Device Sharing
Posted: Sunday 19 January 2020 21:41
by FireWizard
Hans,
To add to my confusion: I checked the sensors coming in on my central Domoticz, and noticed that the Raspberry Pi Motherboard sensors plugin actually uses a couple of General Custom Sensor devices. And they really do come through across the 6144 link!
So why are these sensors different from the ones that I create using the "create virtual sensors: button in the hardware tab?
Sorry, I do not know. I noticed it too. And Yes, using MQTT is a workaround.
Regards
Re: Device Sharing
Posted: Sunday 19 January 2020 22:07
by evertide
Hi,
I agree that it would be more then nice to have the virtuals in the remote share. I have been using the Sonoff mini in quite a few remote light bulbs and since they are virtual devices they are not shared.
Setting up an alternative MQTT stream feels counter intuitive.
What would be the reason of not sharing virtual devices and how can we help?
Regards
Verzonden vanaf mijn iPad met Tapatalk
Re: Device Sharing
Posted: Sunday 19 January 2020 22:29
by manjh
It gets weirder as time progresses...
I decided to grab an old temperature sensor that my RFLink picked up a long time ago.
Wrote a small LUA to grab the download value and stick it into the sensor.
I can see the value on my remote Domoticz, but it never comes in at the central!
Could it have something to do with the way a device is updated?
Re: Device Sharing
Posted: Sunday 19 January 2020 23:46
by FireWizard
Hi,
It is a long existing issue.
See:
https://github.com/domoticz/domoticz/issues/2642
It has indeed something to do with the way, the devices are updated.
Regards
Re: Device Sharing
Posted: Monday 20 January 2020 15:29
by manjh
Ah, yes. So it is not necessarely the type of sensor, but more in the way of updating values.
I tried doing it via a LUA script, so nothing exotic.
Code: Select all
commandArray['UpdateDevice'] = tostring(otherdevices_idx["test"])..'|0|'..tostring(down)
Where "down"is the variable containing the value I want to transmit.
Is there an alternative?
Edit: I found out that the "tostring" for the value is not needed for numeric devices. Does not solve the problem, though...
Re: Device Sharing
Posted: Monday 20 January 2020 19:04
by manjh
FireWizard wrote: ↑Sunday 19 January 2020 21:41
Hans,
To add to my confusion: I checked the sensors coming in on my central Domoticz, and noticed that the Raspberry Pi Motherboard sensors plugin actually uses a couple of General Custom Sensor devices. And they really do come through across the 6144 link!
So why are these sensors different from the ones that I create using the "create virtual sensors: button in the hardware tab?
Sorry, I do not know. I noticed it too. And Yes, using MQTT is a workaround.
Regards
So, without any scientific proof: I get the feeling that these devices are updated, but the mechanism to send it out to the master Domoticz does not notice this. And, since the R-Pi motherboard sensors are actually transmitted, it must be possible somehow. I would look into the code for this plugin, but that is above my paygrade...
Isn't there a trick to this? Some kind of "grep" to mark a device as "updated"?
Re: Device Sharing
Posted: Monday 20 January 2020 21:54
by manjh
Latest finding... I "borrowed" an active sensor which I know for a fact that is being sent to my central Domoticz, and inserted a fake value into it.
I can see the device reading change on my remote Domoticz, but on the central nothing happens.
After a while the "normal" reading comes in and is shown both remote and local.
So I guess this proves that it is not the nature of the device, but the way it is updated.
Is there anyone in this community that understands this, and (hopefully) can supply a solution?
Re: Device Sharing
Posted: Tuesday 21 January 2020 19:20
by manjh
Just a thought... I am using a JSON call from a bash file to put the values into the devices.
Anything to be gained there?
This is an example of a call:
Code: Select all
http://$host/json.htm?type=command¶m=udevice&idx=$idxdl&svalue=$download
Where:
$host contains userid:pw@url:port.
$idxdl has the idx of the device
$download has the value I want to store
I tried to find a list of params to the command, but did not get any solution from that...
Help, someone?
Re: Device Sharing
Posted: Wednesday 22 January 2020 14:07
by manjh
Another way to update: from Node-Red.
I see the device change value in the remote Domoticz, but it is still not transmitted to central Domoticz.
So I guess this uses the same update mechanism, and results in the same error: not being transmitted.
Re: Device Sharing
Posted: Thursday 23 January 2020 22:20
by manjh
I decided to take the MQTT route to transfer these values to my central Domoticz.
Immediately I noticed something weird: Domoticz does not "see" the device change, therefor it does not transmit via the shared device link.
But: it DOES transmit into MQTT!
Weird, if it transmits to MQTT, then why not the "own" link...
Anyway, this is what I did to get things done:
1. install MQTT and Node-Red on the remote R-Pi, and add MQTT in the hardware tab of Domoticz
2. open the MQTT port in the router in the central location and redirect it into the R-Pi
3. install an MQTT-out node from the remote Node-Red into the central MQTT
4. install an MQTT-in node on the central Node-Red
5. fiddle around with the data, and submit a JSON update into Domoticz on the central location. This updates a locally defined device with the value from remote
This works. Took a lot of trial-and-error to get it done, but step by step I got it to work.
Re: Device Sharing
Posted: Tuesday 10 March 2020 17:04
by HM31
Hi,
I'm using Domoticz V4.9700 on two Synology NAS and I got the same issue that seems to be based on the type of device more than on the type of hardware (and them may be the way it is updated). I mean, I have to virtual devices on the slave server, one as a Switch device (On/Off) and one as a Text device. Both updated using a lua script.
The switch is synced with the master server but the Text device never appears on the master.
I'll try using json executed from slave to master after creating the receptive virtual device on the master server ... Configuring MQTT seems to be overkill just for that for my needs.
Re: Device Sharing
Posted: Thursday 12 March 2020 10:43
by manjh
HM31 wrote: ↑Tuesday 10 March 2020 17:04
Hi,
I'm using Domoticz V4.9700 on two Synology NAS and I got the same issue that seems to be based on the type of device more than on the type of hardware (and them may be the way it is updated). I mean, I have to virtual devices on the slave server, one as a Switch device (On/Off) and one as a Text device. Both updated using a lua script.
The switch is synced with the master server but the Text device never appears on the master.
I'll try using json executed from slave to master after creating the receptive virtual device on the master server ... Configuring MQTT seems to be overkill just for that for my needs.
Makes sense, that's what I found as well. The strange thing is the fact that Domoticz does not synchronize via the shared device link, but it does pass the update on to MQTT. That puzzles me.
After I put an MQTT link in place for the two text devices that I wanted to share, I decided to leave the shared device approach, and transfer all devices that I need on my central server via MQTT. Works 100% OK, and it feels like more control. On the downside, it takes a bit of work to set up, where the shared device approach is more or less automatic..
Re: Device Sharing
Posted: Monday 30 March 2020 8:26
by Number8
I have had for quite a long time a master / slave working setup. I recently add a zwave device on the slave that has been discovered on the master without problem. I have also an Oregon Temp/Hum sensor on the slave that will not show up in the master devices list. I removed it, reinserted it, no luck. Since I read that update mechanism is related to the type of sensor, could it be that a Temp/Hum sensor is not transmitted? I know I could make an dzvent script to update a virtual temp/hum sensor on the master, it is a bit overkilled I guess. Any clue?
Thank you
Running
RPi 2020.1 on the slave
RPi 4.11214 on the master
Re: Device Sharing
Posted: Thursday 29 February 2024 16:39
by blueberryPie
Looks like somewhere between 2024.1 and 2024.4 the Domoticz Device Sharing protocol was changed.
As of 2024.1 Device sharing was working to versions as far back as 2021.1. But now device sharing produces the following error on the remote Domoitcz:
Error: UNHANDLED PACKET TYPE: FS20 49
Updating the remote Domoticz does seems to resolve the issue but creates all new devices that need to be replaced into the old devices.
Re: Device Sharing
Posted: Thursday 29 February 2024 17:01
by waltervl
blueberryPie wrote: ↑Thursday 29 February 2024 16:39
Looks like somewhere between 2024.1 and 2024.4 the Domoticz Device Sharing protocol was changed.
Updating the remote Domoticz does seems to resolve the issue but creates all new devices that need to be replaced into the old devices.
Indeed, see for example
https://www.domoticz.com/forum/viewtopi ... =6&t=41411