sinricpro / esp8266-esp32-sdk

Library for https://sinric.pro - simple way to connect your device to Alexa, Google Home, SmartThings and cloud
https://sinric.pro
Other
236 stars 125 forks source link

Update state of devices on Sinric Pro Server #71

Closed jdecmac closed 4 years ago

jdecmac commented 4 years ago

Hello, In Sinric (NO Sinric Pro) I used a function void setPowerStateOnServer(String deviceId, String value) for update te state of my items to the Sinric server.

In the past I found that function in the sinric examples.

I not found a similar option for make that on Sinric Pro, is possible?

Now, I rewrite my code for translate my devices from Sinric to Sinric Pro, but I'm Stopped in this part.

Thanks!

kakopappa commented 4 years ago

In pro, you call sendPowerStateEvent

https://github.com/sinricpro/esp8266-esp32-sdk/blob/master/examples/Switch/Switch.ino#L83

https://sinricpro.github.io/esp8266-esp32-sdk/class_sinric_pro_device.html#a8006e256414deac0f9a4e28774b47773

jdecmac commented 4 years ago

Thanks a lot.

It works perfectly!!

regards