eWeLinkCUBE / node-red-contrib-ewelink-cube

Node-RED nodes to control eWeLink Cube.
MIT License
1 stars 0 forks source link

Control Device - TRV #1

Closed petersturrock closed 8 months ago

petersturrock commented 10 months ago

First of all, many thanks for this repo. It's let me create some heating control logic that I can't achieve in iHost.

Is it possible to add control device logic to allow control of the Sonoff TRVs? This should allow control of the TRVs using external temperature sensors.

SuiKaSan commented 8 months ago

Sorry about the delay. By saying allow control of the TRVs using external temperature sensors. I can list two scenario below:

  1. Register a virtual device as temperature sensor in iHost and use it in scene to control TRVs.
  2. Set up the temperature sensor in node-red and upload temperature info to control TRVs.

First one is feasible and supported in iHost. But the second one is not. Because TRVs is not supported in node-red yet.

petersturrock commented 8 months ago

Thanks for the follow up.

Ideally I'd like to do (2) so I can have all the logic in Node Red and set the temperatures on TRVs based on various sensors I have installed in Node Red.

(1) might help with some logic that I need. I have successfully registered a virtual temp sensor with 'Register Device'. But I'm currently having difficulty setting the temperture using the 'Put Device State'. I'm getting a 'not properly configured' error when I select the virtual temp sensor.

Should the put node allow me to change the value of the virtual temp sensor?

SuiKaSan commented 8 months ago

Can you send me a screenshot of your virtual device node configuration so I can pinpoint the problem?

petersturrock commented 8 months ago
image

This is my latest attempt. The device is created but I can't create a valid 'Put Device State' node to set and change the values. I first tried to create a temperature only sensor but wasn't able to use 'Device Initial State' to initialise the values.

SuiKaSan commented 8 months ago

Please post your put-device-state node configuration as well.

SuiKaSan commented 8 months ago

I tried to register a virtual temperature sensor and reproduce the problem. Here are some results.

  1. Use 'Device Innitial State' to initialise the temperature: lQLPJwSivSyvhtfNA8LNBwCwUQhMIYrDhzwFoUbuecPQAA_1792_962 lQLPKG4gu-PeLhfM-c0CK7BkwD7RR7dAOAWhRxEFBU0A_555_249

  2. Use 'Put Device State' node to change temperature: f85ca84781de5a73de2795ffe11b8f97 8f775740ee766f6f73113833e727e0e2 e45429b75b868b9471c575f6ac0352d9

Both of them working pretty well. Please double check your configuration with mine.

petersturrock commented 8 months ago

I've recreated the above and added the JSON for the initial state and inject. It works and updates the temperature but I always get a red triangle in the put-device-state and an error during the deploy

image

image

image

SuiKaSan commented 8 months ago

It's a known bug but won't affect any of your node's behavior besides warning. We'll fix it in next version of node-red-contrib-ewelink-cube.

petersturrock commented 8 months ago

Thanks for the investigation on this. Do you know if the control device node will be upgraded to allow TRV control ?

SuiKaSan commented 8 months ago

TRV will be supported in the end of next month.