I must be as thick as a bump on a log or I'm missing something.
Moskus C# sample HS3 plugin had two very useful functions the core of lots of what I did....
1. public virtual bool DeviceExists(string name, string location, string location2)
2. public int CreateBasicDevice(string deviceName, string location, string location2)
I've spent the better part of today looking at how to recreate these and really got nowhere.
I discovered that getting devices by name is a no no in HS4 and that you can create multiple devices with exactly the same fullname. I must admit my brain thinks of devices by name the "living room fan" rather than device 4567.
Two of my HS3 plugins MQTT and MySensors relied on the above functions.
One idea I had was just read all the device refs into my plugin and handle the location/name stuff within the plugin, that just doesn't seem right. Am I missing something?
BTW The HS4 sample plugin is sadly lacking.
Moskus C# sample HS3 plugin had two very useful functions the core of lots of what I did....
1. public virtual bool DeviceExists(string name, string location, string location2)
2. public int CreateBasicDevice(string deviceName, string location, string location2)
I've spent the better part of today looking at how to recreate these and really got nowhere.
I discovered that getting devices by name is a no no in HS4 and that you can create multiple devices with exactly the same fullname. I must admit my brain thinks of devices by name the "living room fan" rather than device 4567.
Two of my HS3 plugins MQTT and MySensors relied on the above functions.
One idea I had was just read all the device refs into my plugin and handle the location/name stuff within the plugin, that just doesn't seem right. Am I missing something?
BTW The HS4 sample plugin is sadly lacking.
Comment