Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

I started with zigbee2mqtt a few years back.
Worked nice in my home, but after moving to an other house, i didn't got it working correctly.
The reasons was the range in my home. Used extenders, but still having problems. Had to do weekly a re-pair of devices
Then i found the somfy zigbee bridge. Not new on the marked, but new for me.
Bought 1 of them, flashed them with tasmota zigbee and started with testing.
The testing went great, that i bought 2 more. Each level at our home has its own coordinator. I changed the zigbee channel, that they don't overlap.
For me this was the solution, the zigbee now works stable for me

Image

Tasmota sents out a mqtt message.
It is possible to add rules. For some simple things this is no problem.
But i found, that sometimes the device update triggers domoticz scripts. So rules where not the way to go.
I went with nodered. First a simple flow. Made everything to work. But i still needed to work in de nodered code it self, not low-level.
So i created a webpage in nodered. To add devices, remove devices, setup the idx numbers for domoticz, etc etc.
All devices in domoticz are dummies, i did not make a plugin. The reason for this, i want to keep it in nodered. There is (or was) a problem with domoticz plugins and the pi firmware.
I am not a programmer guy, so there could be some lines somebody would make different. ;)

What did i make?
Everything is in dutch on the webpage. But could be changed in the flow by rename the tags
The main page.
On left top, the tasmota devices (could also be other tasmota devices, i left this open, maybe fo future things)
On middle top, you could let the bridge send messages.
On right top, rename the devices
In the middle left, on the left you can set the idx numbers and the device type
in the middle right, the device table with the values which are setup by the user
On the bottom, The realtime status of your devices and some debug add-ons
flowUI.png
flowUI.png (119.75 KiB) Viewed 2372 times
Once every 24 hours there is a check to my github page, to see if there is an update.
Update could be new devices, bugs fixes or other features
update.JPG.jpg
update.JPG.jpg (23.22 KiB) Viewed 2372 times
In one of the latest versions i added the option, that you could add the nodered webpage to domoticz.
custom.JPG.jpg
custom.JPG.jpg (48.7 KiB) Viewed 2372 times
The list of supported devices is not that big as zigbee2mqtt or zigate (or maybe other).
But it is open to add/change things in the flow by your self. Please, when you added a new device, post the data here, then i can update the flow on my github. All devices in the list are tested, otherwise not released

Heiman Monoxide (HS1CA-M)
Heiman Smoke (HS1SA)
Ikea Light (ICPSHC24-10EU-IL-1)
Ikea Motion (E1525)
Ikea Motion (E1745)
Ikea Plug (E1603)
Ikea Plug (E1702)
Ikea Plug (E1708)
Ikea Remote (E1743)
Lidl Plug (HG06620)
Lidl Door (HG06336)
Lidl Motion (HG06335)
Lidl Motion (HG07310)
Lidl Light (HG06106A)
Lidl Light (HG06106B)
Lidl Light (HG06106C)
Lidl Light (HG06492A)
Lidl Light (HG06492B)
Lidl Light (HG06492C)
Osram Remote (AC0251100NJ)
Osram Remote (AC0251600NJ)
Osram Remote (AC0251700NJ)
Sonoff Motion (SNZB-03)
Sonoff Plug (S26R2ZB)
Sonoff Remote (SNZB-01)
Sonoff Temp (SNZB-02)
Tuya Remote (TS0044)
Xiaomi Cube (MFKZQ01LM)
Xiaomi Door (MCCGQ12LM)
Xiaomi Door (MCCGQ14LM)
Xiaomi Lux (GZCGQ01LM)
Xiaomi Motion (RTCGQ01LM)
Xiaomi Motion (RTCGQ12LM)
Xiaomi Smoke (JTYJ-GD-01LM/BW)
Xiaomi Temp (WSDCGQ01LM)
Xiaomi Temp (WSDCGQ11LM)
Xiaomi Temp (WSDCGQ12LM)
Xiaomi Water (SJCGQ11LM)

This is the location, where the flow can be found
https://github.com/Hoeby/Sonoff-Zigbee- ... flows.json
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
ikkuh
Posts: 2
Joined: Sunday 10 January 2021 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by ikkuh »

wow, thanks!
Will try this today, I need the Nodered route too.
TomDoRpi
Posts: 3
Joined: Tuesday 19 July 2022 17:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by TomDoRpi »

Hi, looks like a graet solution.
Any updates meanwhile?
Can you give a more detailed description how to install please?
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

Sorry, late reaction.

There are a few updates made.
No new devices, because i don't nothing new to add in my home environment.
But i can try to help is needed, if there is a new device needed

To get it work, i assume you already have nodered running.
Then copy the flow from the link which is posted in the first post of this thread.
Import this flow in your nodered. it is possible you get errors, because nodered is missing nodes

These modules have to be installed in nodered, to prevent those errors (tru manage-pallette)
- node-red-dashboard
- node-red-contrib-simple-gate
- node-red-node-ui-table
- node-red-contrib-schedex
- node-red-contrib-flogger

The release notes after the first release

Code: Select all

16-01-2023 R1:
- changed: flwo changed to run on Nodered release V2.X.X or V3.X.X
13-01-2023 R1:
- Bug: Save data folder was read to late, restore devices went wrong.
10-01-2023 R1:
- Change: Flow changed, save data folder can be changed in 1 node and not in multi nodes
25-12-2022 R1:
- Change: Flow changed, mqtt server credentials can be changed in 1 node and not in multi nodes
03-12-2022 R1:
- Added: ZbLeave and ZbForget for devices, when removing a device from the UI page.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by sincze »

Cewl initiative, let me try to set this up in Node-Red.
It seems I am missing by default.

- Gate
- Flogger
- uit_table
- schedex

Any hints on the best palette options/candidates ?
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

These palette options are used:

- node-red-contrib-flogger
- node-red-contrib-simple-gate
- node-red-dashboard
- node-red-node-ui-table
- node-red-contrib-schedex
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by sincze »

Ok imported everything:

Updated block: Central MQTT Settings
- Message to MQTT-Server
- Message from MQTT-Server

So it can find my MQTT Server, now let's wait what will pop up.

So I do see ZIGBEE devices flying in but nothing happening in the dashboard for further configuration
noderedimage.PNG
noderedimage.PNG (8.89 KiB) Viewed 1863 times
To have it to start to work:

Code: Select all

ZbNoPrefix
SetOption100	remove Zigbee ZbReceived value from {"ZbReceived":{xxx:yyy}} JSON message
0 = disable (default)
1 = enable
SetOption100 should be set to 0

Also

Code: Select all

ZbOmitDevice
SetOption119	Remove device addr from JSON payload
0 = disable (default)
1 = enable
SetOption119 should be set to 0
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

Sorry, default zigbee settings are not mentioned how to set them.

but do i get it right, it now works?
This after changing options 100 and 119 set to 0
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

This is how the messages from the bridge have to look like (tasmota messages).
If they don't look like this, then the flow doesn't work.
tasmota message.png
tasmota message.png (15.11 KiB) Viewed 1849 times
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by sincze »

Ah yes. Made it work

So for the documentation ;-) and the rest of the people that modified the TASMOTA ZIGBEE SETTINGS ;-) I mentioned it.

So it now created this
tasmota2.PNG
tasmota2.PNG (121.37 KiB) Viewed 1843 times
Would you be so kind to explain
- Do I really need a separate IDX for battery ?
- Can IDX Percentage and Switch be the same ? (A light can dim and do on/off)

I would like to add the Philips HUE lights ;-) and some NEO Tuya Powerplugs
Any Guidance in how to do that ?

https://www.zigbee2mqtt.io/devices/TS011F_plug_1.html
Is the on i want to help adding :)

AND similar lights.
https://www.zigbee2mqtt.io/devices/433714.html
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

sincze wrote: Sunday 12 March 2023 20:35 So for the documentation ;-) and the rest of the people that modified the TASMOTA ZIGBEE SETTINGS ;-) I mentioned it.
I added on top of the UI page, that those 2 settings also have to be set at 0, just like the SetOption83 which is written.
- Do I really need a separate IDX for battery ?
You can leave it at 0, then nothing will happen.
It is made, that it needs its own IDX
If it is possible to add battery to a dummy switch device, for example, please post a link how to do this.
Untill now i haven't found information, that this is possible with dummies
- Can IDX Percentage and Switch be the same ? (A light can dim and do on/off)
Documentation is not made for this. The percentage is also for the battery, not for a light.
Most battery devices give a voltage and a percentage value. You can choose which to use.
When you setup the dummy with the correct sensor type, then the ON/OFF and dim should work, with the same idx number
I would like to add the Philips HUE lights ;-) and some NEO Tuya Powerplugs
Any Guidance in how to do that ?
I never made a manual how to do this. This is because you need to modify 5 nodes which are all over the flow, to add just 1 device.
If you want a new brand, then there are more changes needed.

But i can help and you can test it.
Connect the device to you tasmota bridge.
Make all possible state changes and copy the data out of the tasmota console and post it here. Please add the brand/device name, for documentation. Then i will try to add these and you can test them. Maybe it is also a good start, to start with the manual how to add things

Just 1 example of the message from tasmota, which is needed

Code: Select all

21:33:00.855 MQT: tele/tasmota_96373D/SENSOR = {"ZbReceived":{"0xC582":{"Device":"0xC582","Name":"CO-Melder-CV","ZoneStatus":32,"CO":0,"Endpoint":1,"LinkQuality":26}}}
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

Already tried to add the tuya powerplug, this is the easier part of the devices you want to add.
It is not tested. I give the release a beta state. Please test it.
The lights need more work because of ON/OFF/DIM (maybe rgb). I need the tasmota messages for that.

The node-red flow will check once a day if there is an update on github. That will be 24hours after the last "deploy" you did in nodered (so it will be custom for everybody). If there is a new update, the bar on top right will be red. When you click on it you will see the release notes and also the possibility to download the latest version. When downloading it will download a json file to you machine. This json file needs to be imported in nodered, just like you did with the flow. Advice to follow the next steps, after downloading the json file:
- Disable the flow you have running
- Import the json file (ctrl+i), in the pop-up there is an option "select a file to import", choose here the json file and import
- There will be a notification that there is duplicate of the nodes, this is correct.
- Test the new release
- If happy, remove the flow you disabled on step 1. This also removes the duplicated nodes.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by sincze »

Thank you for your assistance.
- Do I really need a separate IDX for battery ?
You can leave it at 0, then nothing will happen.
It is made, that it needs its own IDX
If it is possible to add battery to a dummy switch device, for example, please post a link how to do this.
Untill now i haven't found information, that this is possible with dummies

Code: Select all

msg.payload = {};
msg.payload.idx =  idx;
msg.payload.nvalue = nvalue;
msg.payload.Battery = batt;
msg.payload.level = level;
msg.payload.svalue = level.toString();
or

Code: Select all

msg.payload = { "command": "switchlight", "idx": idx_motion, "switchcmd": "On", "rssi": rssi, "Battery": batt };
Gives:
Aquacell-Battery.PNG
Aquacell-Battery.PNG (11.24 KiB) Viewed 1808 times
I would like to add the Philips HUE lights ;-) and some NEO Tuya Powerplugs
Any Guidance in how to do that ?
I never made a manual how to do this. This is because you need to modify 5 nodes which are all over the flow, to add just 1 device.
If you want a new brand, then there are more changes needed.

But i can help and you can test it.
Connect the device to you tasmota bridge.
Make all possible state changes and copy the data out of the tasmota console and post it here. Please add the brand/device name, for documentation. Then i will try to add these and you can test them. Maybe it is also a good start, to start with the manual how to add things

Just 1 example of the message from tasmota, which is needed

Code: Select all

21:33:00.855 MQT: tele/tasmota_96373D/SENSOR = {"ZbReceived":{"0xC582":{"Device":"0xC582","Name":"CO-Melder-CV","ZoneStatus":32,"CO":0,"Endpoint":1,"LinkQuality":26}}}
Let me start collecting these values ;-)

PHILIPS LIGHTS
(https://www.zigbee2mqtt.io/devices/046677578138.html)

Example for On / Off / Dim

Code: Select all

zbsend {"device":"Lamp-Overloop","send":{"power":true}}
{"ZbReceived":{"0xF1E7":{"Device":"0xF1E7","Name":"Lamp-Overloop","Power":1,"Endpoint":11,"LinkQuality":45}}}

zbsend {"device":"Lamp-Overloop","send":{"power":false}}
{"ZbReceived":{"0xF1E7":{"Device":"0xF1E7","Name":"Lamp-Overloop","Power":0,"Endpoint":11,"LinkQuality":58}}}

zbsend {"device":"Lamp-Overloop","send":{"dimmer":50}}
{"ZbReceived":{"0xF1E7":{"Device":"0xF1E7","Name":"Lamp-Overloop","Dimmer":50,"Power":1,"Endpoint":11,"LinkQuality":45}}}

{"ZbReceived":{"0xF1E7":{"Device":"0xF1E7","Name":"Lamp-Overloop","Dimmer":254,"Endpoint":11,"LinkQuality":50}}}
I also have found this:

NEO Powerplug
https://www.zigbee2mqtt.io/devices/TS011F_plug_1.html

switch (state), power_outage_memory, indicator_mode, power, current, voltage, energy, lock (state), linkquality

On

Code: Select all

zbsend {"device":"Powerplug","send":{"power":true}}
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","Power":1,"Endpoint":1,"LinkQuality":45}}}
Off

Code: Select all

zbsend {"device":"Powerplug","send":{"power":false}}
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","Power":0,"Endpoint":1,"LinkQuality":45}}}
According to the info I found Data that needs to be polled from these plugs.

Voltage reading (V):

Code: Select all

ZbSend { "device":"Powerplug", "endpoint":"0x01", "cluster":"0x0B04", "read":"0x0505" }  
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","RMSVoltage":235,"Endpoint":1,"LinkQuality":45}}}
Active power reading (W): (With and Without LOAD)

Code: Select all

ZbSend { "device":"Powerplug", "endpoint":"0x01", "cluster":"0x0B04", "read":"0x050B" }
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","ActivePower":0,"Endpoint":1,"LinkQuality":45}}}
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","ActivePower":57,"Endpoint":1,"LinkQuality":40}}}
Current reading (mA)

Code: Select all

ZbSend { "device":"Powerplug", "endpoint":"0x01", "cluster":"0x0B04", "read":"0x0508" }  
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","RMSCurrent":0,"Endpoint":1,"LinkQuality":45}}}
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","RMSCurrent":244,"Endpoint":1,"LinkQuality":40}}}

Energy consumption

Code: Select all

ZbSend { "device":"Powerplug", "endpoint":"0x01", "cluster":"0x0702", "read":"0x0000" }
{"ZbReceived":{"0x5B7F":{"Device":"0x5B7F","Name":"Powerplug","EnergyTotal":"0x000000000008","Endpoint":1,"LinkQuality":45}}}
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
hyeronimo
Posts: 54
Joined: Saturday 11 March 2023 8:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hyeronimo »

Hi Hoeby,

Great work! The flow will find my sonoff hub (Zbridge pro) and I can see the attached zigbee sensor. However it seems unable to find the save directory (I created it by hand) . Any ideas on how to fix this?

Jeroen
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by sincze »

hoeby wrote: Sunday 24 July 2022 20:26
Once every 24 hours there is a check to my github page, to see if there is an update.
Update could be new devices, bugs fixes or other features

This is the location, where the flow can be found
https://github.com/Hoeby/Sonoff-Zigbee- ... flows.json
Yes it seems I am entitled for my first update :D

Would this be like:
- Copy the new json
- Re-import in Nodered
- Adjust the MQTT servers to point to my MQTT machines
- Enjoy the new functionalities ?

Sándor
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

sincze wrote: Tuesday 14 March 2023 9:35 Would this be like:
- Copy the new json
- Re-import in Nodered
- Adjust the MQTT servers to point to my MQTT machines
- Enjoy the new functionalities ?
This are the steps i would do
- Disable the flow you have running
- Import the json file (ctrl+i), in the pop-up there is an option "select a file to import", choose here the json file and import
- There will be a notification that there is duplicate of the nodes, this is correct.
- Adjust the MQTT server to point your MQTT machines
- Test the new release
- If happy, remove the flow you disabled from step 1. This also removes the duplicated nodes.
- If not happy, remove the new flow and enable the old one

hyeronimo wrote: Tuesday 14 March 2023 7:44 However it seems unable to find the save directory (I created it by hand) . Any ideas on how to fix this?
Because you have written, that it is created by hand.
Is it the same as in the nodes from "Central save file location"?
If yes, does the folder have the correct writting/reading rights?
If no, change the location in the node to the correct location (choose the correct one, pi or docker)
pi.png
pi.png (13.81 KiB) Viewed 1777 times
sincze wrote: Monday 13 March 2023 17:48

Code: Select all

msg.payload = {};
msg.payload.idx =  idx;
msg.payload.nvalue = nvalue;
msg.payload.Battery = batt;
msg.payload.level = level;
msg.payload.svalue = level.toString();
or

Code: Select all

msg.payload = { "command": "switchlight", "idx": idx_motion, "switchcmd": "On", "rssi": rssi, "Battery": batt };
Didn't know about this, thanks. It opens a new world of idea's.
I want to change the flow to this kind of registration. This will limited the needed idx numbers.
But because every device has to change in the flow. I think it is easier to make a V2 version, because the stored data will be different

For now i tried to add the powerplug and the light, both not tested.
These both are just made for functions (on/off and for light dimm is added).
The rssi/battery and everything else is not in it. This needs to move to the V2 version.
But before i can start on V2, i want to test if it works like you posted
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by sincze »

hoeby wrote: Tuesday 14 March 2023 18:21
For now i tried to add the powerplug and the light, both not tested.
These both are just made for functions (on/off and for light dimm is added).
The rssi/battery and everything else is not in it. This needs to move to the V2 version.
But before i can start on V2, i want to test if it works like you posted
The Powerplug is responding to my On / Off Virtual Sensor in Domoticz

I also see this in NodeRed

Code: Select all

3/14/2023, 7:57:42 PMnode: Tuya devices
function : (error)
"TypeError: Cannot read properties of undefined (reading 'type')"
For the Philips Light I added a SWITCH with DIMMER but that is not responding.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

sincze wrote: Tuesday 14 March 2023 19:51 The Powerplug is responding to my On / Off Virtual Sensor in Domoticz
I also see this in NodeRed

Code: Select all

3/14/2023, 7:57:42 PMnode: Tuya devices
function : (error)
"TypeError: Cannot read properties of undefined (reading 'type')"
Can you try to remove this part in the node "Tuya devices"?
Yes remove, you read it correct. It is there because i try to use default code in de nodes (each node the same code and small changes to get it working). But the tuya sends info, without "type" info.

Code: Select all

if (msg.payload.ZbInfo) {
    if (msg.payload.ZbInfo.type === "Remote (TS0044)") {
        return [msg, null];
    } else if (msg.payload.ZbInfo.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
For the Philips Light I added a SWITCH with DIMMER but that is not responding.
Can be correct that it doesn't work. This is what the flow info is saying.
dummy.png
dummy.png (11.95 KiB) Viewed 1758 times
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
User avatar
sincze
Posts: 1299
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by sincze »

Please find attached my Settings for Philips.
Settings-plugin.png
Settings-plugin.png (29.13 KiB) Viewed 1741 times
No response from this virtual Sensor.

To get rid of:

Code: Select all

3/14/2023, 7:57:42 PMnode: Tuya devices
function : (error)
"TypeError: Cannot read properties of undefined (reading 'type')"
I Modified the 'Tuya Devices' function to:
Spoiler: show

Code: Select all

/*
if (msg.payload.ZbReceived) {
    if (msg.payload.ZbReceived.type === "Remote (TS0044)") {
        return [msg, null];
    }else if (msg.payload.ZbInfo.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
*/

/*
if (msg.payload.ZbInfo) {
    if (msg.payload.ZbInfo.type === "Remote (TS0044)") {
        return [msg, null]
    } else if (msg.payload.ZbInfo.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
*/

if ( msg.src === 'domoticz' ) {
    if (msg.payload.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
hoeby
Posts: 528
Joined: Saturday 02 June 2018 11:05
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.1
Location: Echt, Netherlands
Contact:

Re: Nodered flow for tasmota somfy zigbee bridge (not usb-stick)

Post by hoeby »

sincze wrote: Wednesday 15 March 2023 17:42 To get rid of:

Code: Select all

3/14/2023, 7:57:42 PMnode: Tuya devices
function : (error)
"TypeError: Cannot read properties of undefined (reading 'type')"
I Modified the 'Tuya Devices' function to:
Spoiler: show

Code: Select all

/*
if (msg.payload.ZbReceived) {
    if (msg.payload.ZbReceived.type === "Remote (TS0044)") {
        return [msg, null];
    }else if (msg.payload.ZbInfo.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
*/

/*
if (msg.payload.ZbInfo) {
    if (msg.payload.ZbInfo.type === "Remote (TS0044)") {
        return [msg, null]
    } else if (msg.payload.ZbInfo.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
*/

if ( msg.src === 'domoticz' ) {
    if (msg.payload.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
I see the problem. A bad copy/past job from me

The top part has a msg.payload.ZbInfo in it, that is not available
It has to be this

Code: Select all

if (msg.payload.ZbReceived) {
    if (msg.payload.ZbReceived.type === "Remote (TS0044)") {
        return [msg, null];
    }else if (msg.payload.ZbReceived.type === "Plug (TS011F)") {
        return [null, msg];
    }
}
The lights need work, first have to investigate what is going wrong.
Thin-client --> Docker Domoticz main environment
Pi3A+ --> Google home (GAssistPi)
Pi3B+ --> Docker (P1monitor, Domoticz test environment, Ubiquity controller)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest