“Virtual” event capability in Hubduino?

I have coded extensively using Hubduino to create projects like:

  1. speaker switcher
  2. interface to VELUX blinds
  3. shower solenoid on/off
  4. lights etc (of course!)

The latest project is an rfid sensors outside the garage that, if successful opens the door.

All the above is fine but what if like to do is be able to report/trigger an attempted access. I’ve tried doing this by creating a contact (but with nothing physically connected) and “forcing” it open/closed with recieveSmartString commands but the state doesn’t change in Hubitat.

I guess I’m really looking for a “virtual” switch/contact that has no physical presence.

Any thoughts on how to report that state of something that is purely software based rather than physical?

So are you saying you have been able to successfully call the HE hub via Maker API?

Instead of calling receiveSmartString (which simulates receiving a command from Hubitat), it sound like you may want to call sendSmartStringNow() instead. This will send a command to Hubitat. In your case, “switch1 on” or “switch1 off” would be appropriate (assuming this is the only “switch” device in your sketch.

See a similar example here…

1 Like

Thanks so much. Will try that.

Works a treat. Fantastic.

1 Like