Na lange tijd het schrijven van een scriptje om mijn RFID labels uit mijn CD verzameling in te lezen weer gestart.
Scriptje is er nog even fine tunen.
Vergeet niet in de seetings.ini het regeltje ScriptingReferences = Phidgets.RFID;Phidget21.NET.dll toe tevoegen en de phidgets.dll file onder de root van homeseer te kopieren.
Een Device aangemaakt met ref 963 (met als naam TAG) Daarin komt de tag ID en de device gaat op on als er een tag op werdt gelegd en op off als hij weer wordt verwijderd.
Imports Phidgets.RFID
Dim WithEvents phidgetRFID As Phidgets.RFID
Private WithEvents tagTxt As String
Sub Main(ByVal varParameters)
phidgetRFID = New Phidgets.RFID()
phidgetRFID.open()
End Sub
'attach event handler..populate the details fields as well as display the attached status. enable the checkboxes to change
'the values of the attributes of the RFID reader such as enable or disable the antenna and onboard led.
Private Sub phidgetRFID_Attach(ByVal sender As Object, ByVal e As Phidgets.Events.AttachEventArgs) Handles phidgetRFID.Attach
hs.WriteLog("RFID connected", phidgetRFID.Attached & " " & (Str(phidgetRFID.SerialNumber)))
phidgetRFID.LED = True
phidgetRFID.LED = False
End Sub
'Tag event handler...we'll display the tag code in the Device string of HS3
Private Sub phidgetRFID_Tag(ByVal sender As Object, ByVal e As Phidgets.Events.TagEventArgs) Handles phidgetRFID.Tag
phidgetRFID.LED = True
phidgetRFID.outputs(1) = True
tagTxt = e.Tag
hs.SetDeviceString(300,tagTxt, True)
hs.SetDeviceValueByRef(300, 100, True)
hs.WriteLog("Tag", tagTxt)
End Sub
Private Sub phidgetRFID_RFIDTagLost(ByVal sender As Object, ByVal e As Phidgets.Events.TagEventArgs) Handles phidgetRFID.TagLost
phidgetRFID.LED = False
phidgetRFID.outputs(1) = False
tagTxt = "Geen CD"
hs.SetDeviceString(300,tagTxt, True)
hs.SetDeviceValueByRef(300, 0, True)
hs.WriteLog("Tag", tagTxt)
End Sub
Private Sub phidgetRFID_Detach(ByVal sender As Object, ByVal e As Phidgets.Events.DetachEventArgs) Handles phidgetRFID.Detach
If phidgetRFID.Attached = True Then
phidgetRFID.close()
End If
End Sub
Phidgets Script
Forum over Homeseer scripts (DUTCH forum)
Return to “Homeseer Scripts Forum”
Jump to
- Forum matters
- ↳ News Forum
- ↳ Suggestions, Questions & Feedback
- Hardware Forum (English)
- ↳ Announcements & News Forum
- ↳ Questions & Discussions Forum
- ↳ Kickstarter, Indiegogo and other crowdfunding related smartthings
- ↳ Rfxcom Receivers & Transmitters Forum
- ↳ X10, A10 Xanura Marmitek Forum
- ↳ Z-Wave Forum
- ↳ Fibaro
- ↳ Plugwise Forum
- ↳ Gadgets Forum
- ↳ Visonic Alarm systems
- ↳ LEDS, DMX & Lights Forum
- ↳ Hvac, Heating Opentherm Forum
- ↳ Opentherm Gateway Forum
- ↳ Opentherm Gateway Forum (NL)
- ↳ Philips Pronto (TSU9600), IRtrans and other remotes
- ↳ Touchpanels, Displays & UMPC devices.
- ↳ 1-Wire Forum
- ↳ Click On Click Off & Home Easy
- ↳ Raspberry, Arduino, Cubietruck and other clones Forum
- ↳ Homematic, FS20, FHT, ESA and ELV
- ↳ PLCBUS Forum
- ↳ Smart Metering Forum
- ↳ ZigBee Forum
- ↳ Eneco Toon as Domotica controller
- Toon Thermostat Smart Home Automation controller (English)
- ↳ Toon news and information
- ↳ Manuals/tutorials
- ↳ Toon Apps
- ↳ Toon Rooting
- ↳ Toon Hardware
- ↳ Toon Firmware
- ↳ Toon external control
- ↳ Toon miscellaneous
- ↳ Toon software development
- ↳ Toon issues and support (Nederlands toegestaan)
- ↳ Toon wanted/for sale (Nederlands toegestaan)
- Software Forum (English)
- ↳ Announcements & News
- ↳ Questions & Discussions Forum
- ↳ Linux Forum
- ↳ Windows Forum
- ↳ DomotiGa Forum
- ↳ OpenHAB Forum
- ↳ MQTT & Node.js
- Projects Forum (English)
- ↳ Home Automation Projects
- ↳ Bwired Forum
- ↳ Who has a realtime website
- Homeseer Forum (Dutch Allowed)
- ↳ Homeseer algemeen Forum
- ↳ Homeseer Scripts Forum
- ↳ Homeseer HStouch Forum
- ↳ Homeseer Plugins Forum
- ↳ Homeseer Alphatronics Visonic receiver Plugin Forum
- ↳ Homeseer Buienradar monitor HS3 plugin
- ↳ Homeseer Fritz!box Plugin Forum
- ↳ Homeseer IPPower Plugin Forum
- ↳ Homeseer MQTT Plugin Forum
- ↳ Homeseer Nemef Radaris Evolution plugin Forum
- ↳ Homeseer P1 Smart Meter - Plugin HS3
- ↳ Homeseer Philips Hue - Plugin HS3
- ↳ Homeseer Plugwise Plugin Forum
- ↳ Homeseer PMIX35, CTX15, CTX35 - Plugin HS3
- ↳ Homeseer Rfxcom Plugin Forum
- ↳ Homeseer Thermostaat plug-in forum
- ↳ Homeseer Visonic Powermax plugin Forum
- ↳ Homeseer Xtreamer Plugin Forum
- Other (English)
- ↳ For Sale Forum (Dutch allowed)
- ↳ Miscellaneous Home Automation topics
- ↳ Security & Alarmpanels Forum
- ↳ Energycontrol & Home Automation Forum
- ↳ Webcams & Camera Stuff Forum
- ↳ Off Topic
- ↳ Downloads & Links Forum
- ↳ Domoticaboek Heino Peters
- ↳ Dealers Corner
- ↳ Domotica for Dummies Forum
- ↳ Groups purchases or -ideas
- ↳ Test