Use profile hysteresis to trigger a Switch Item

Hello,

I hope somebody can help me out to understand the usage of hysteresis profile better.

I tried to trigger a item SWITCH connected to a channel of bosch:smartplug. This switch item has also a second channel of shelly:3em with power consumption information and a hysteresis profile. The hysteresis works perfectly but the bosch:smartplug does not.

I thought the configured channels are also used for outgoing data but it seems the configuration of a second channel changes the item’s behaviour to only use the state of smartplug as input.

This means, manually switching of bosch:smartplug changes the item SWITCH to state ON, the same is valid for hysteresis’ state.

But my expectation was that a hysteresis state change to Switch ON, triggered a change of state of bosch:smartplug as well.

I know that I could use a rule with separate smartplug item and hysteresis-ed switch but appreaciate the explanation why my setup won’t work.

Thanks, Daniel

Without actually seeing exactly how you’ve set it up :person_shrugging: .

In general though, if you’ve two different Channels linked to the same Item, you need to use the follow profile to have updates from one Channel be sent as commands to the other Channel. But it’s not bidirectional. Only updates from the first Channel are sent as commands to the second Channel, not the other way around.

If you need bidirectional syncing you need a rule.

Dear @rlkoshak ,
You input was, like everytime, wellcome and correct. I changed the profile of the Bosch Channel to follow and the smartplug started working as expected.

I have one more question about the hystereses profile. Unfortunaltey, I was lacking sun today for testing but for a very short period of time it looked like negative values do react strange.
Do you have any experience?

My purpose is to activate the smartplug whenever my PV modules produce a surplus. Logic behind would be turn on (upper: -80W) and turn off (lower: -20W) - correct? When doing this, the smartplug is ON at +340W consumption. Same ON state for cross-changing upper and lower values.

I believe the correct setting is, upper: -20W, lower: -80W and state inverted. :roll_eyes:

Best regards
Daniel

Where I have hysteresis the profile won’t work for me so I implement it in code. I don’t have any direct experience with the profile.

All I can say is pay attention to the negative numbers. -80 < -20 so wouldn’t -20 be the upper value and -80 the lower value?

Hello @rlkoshak ,
I could test my settings today and can confirm that my requirements were able to setup by UI without rules.

Based on the attached drawing, the hystereses was setup, Upper to -20W, Lower to -80W and output inverted.
This leads to the correct behaviour to only switch the smartplug when enough surplus is generated from my PV system.

Thanks for your help,
best regards
Daniel