Here is my second contribution to this community. This module was the first one I started to work on but had difficulty in getting the syntax correct that actually gets me the switches state; whether it's on or off. It's pretty much a duplicate of the SensorsPolling module provided by Z-Way. I modified it slightly to get the switch state of course. Most of the credit goes to the team that wrote the SensorsPolling module.
If you are running version 1.7.1 or earlier, you will need to extract the contents of the zip package to your /opt/z-way-server/automation/modules directory in a folder named SwitchPolling. The full path should be '/opt/z-way-server/automation/modules/SwitchPolling'. If you are running version 1.7.2, the SwitchPolling folder should be placed in the userModules directory. After placing it in the appropriate directory you will need to restart z-way-server. One of the methods to do that is by executing this command `sudo service z-way-server restart`.
Thank you for sharing your work.
I will have a deeper look on it in the next days, just wanted to confirm, that I could successfully load your code into the server and see sensors in the list.