This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed

Zeptrion switch as device with http app

viktorviktor Member
Hi all

I have couple Zeptrion devices and i want to upgrade them with the wifi modul. I have the API now and i can post the switch or blinds status to them.

Can i make a virtual device with the help of HTTP request app? At the moment i was thinking to make a flow with the POST command and name it like switch_x_on? Or with better logics: boolean switch_x is true than http POST body cmd=on, when false  cmd=off?



Do you have any other sugestions?

Thanks
Viktor

Comments

  • That will work. You'll need to format the 2nd parameter of the HTTP Post Form card as a valid JSON object, so {"cmd": "on"} for your example.
    For a better logic boolean you can add a 'bitflip' device, and with that the device is controllable from the normal device user interface:

  • viktorviktor Member
    @ErikVanDongen ;

    Cool, thanks. I have Post form, not the JSON form, do i still need the {}?
  • Yes. The card expects a JSON formatted string, and will parse that to valid form data in the POST request. 
    I will improve the documentation on this. 
This discussion has been closed.