It is possible to send a value from Arduino to HS for the Output?
Announcement
Collapse
No announcement yet.
How to send Output value from arduino to HS
Collapse
X
-
So you are controlling the output pin with your code, exclusive of HomeSeer and you want to update the status of the HomeSeer Device for that output.
I think Greig will have to chime in on that, because the help file only talks about updating the value or string of an input. The same methods may work, but I have little API experience.
HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
-
I am not sure I understand 100% but I think you just need the SendToHS(Device ,Value ) to be called in your sketch to update the homeseer device with the value of your output.
To Send Data to Homeseer use SendToHS(Device,Value) you can send a int, Long or Float to Homeseer. Eg.. SendToHS(1,200); where 1 is the API device in homeseer and 200 is the value to send In your code
To Receive Data from Homeseer use FromHS(Device) this is an array of the values of your output devices in Homeseer. You can then do what you want with the value. Eg.. digitalWrite(MyPin, FromHS[5]); would set MyPin to the same value as API Output device 5
Greig.Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
What I need is to be able to send SendToHS in the API to change a value in HS that is not part of Arduino plugin (hs.SetDeviceValueByRef(50, 100, True)), at the same time do you think we could have the possibility to read other HS value by reference number. This would give a wide possibility for the API
Comment
-
Originally posted by DonMor View PostWhat I need is to be able to send SendToHS in the API to change a value in HS that is not part of Arduino plugin (hs.SetDeviceValueByRef(50, 100, True)), at the same time do you think we could have the possibility to read other HS value by reference number. This would give a wide possibility for the API
Greig.Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
Originally posted by enigmatheatre View PostI am not sure I understand 100% but I think you just need the SendToHS(Device ,Value ) to be called in your sketch to update the homeseer device with the value of your output.
To Send Data to Homeseer use SendToHS(Device,Value) you can send a int, Long or Float to Homeseer. Eg.. SendToHS(1,200); where 1 is the API device in homeseer and 200 is the value to send In your code
To Receive Data from Homeseer use FromHS(Device) this is an array of the values of your output devices in Homeseer. You can then do what you want with the value. Eg.. digitalWrite(MyPin, FromHS[5]); would set MyPin to the same value as API Output device 5
Greig.
Comment
-
There is an example in this post, see https://forums.homeseer.com/forum/an...vo-and-onewire
It has pictures of the devices in HomeSeer, Arduino set up and the API code used on the NodeMCU board.
I hope this helps.Billy
Comment
-
Originally posted by DonMor View PostJust to really understand, the SendToHS(Device ,Value ) will update only the Input, and FromHS(Device) will read the Ouput, Arduino API don’t update HS output if it change in my program?
eg:
Code:// if the LED is off turn it on and vice-versa: if (ledState == LOW) { ledState = HIGH; SendToHS( 1 , 1 ); } else { ledState = LOW; SendToHS( 1 , 0 ); }
Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
Originally posted by DonMor View PostGreig,
As I'm using the HS output to activate a fonction in my Arduino API, can you add the possibility to be able to send to HS output the value. Same as you do with the Input?
Don
I am not 100% sure I understand what you are trying to do. I think you want to get the value of an output device in your sketch. If so use the following.
To Recieve data from Homeseer look up the FromHS array that is updated when the device value changes.
Eg.. FromHS[5] would be the data from API Output device 5
Greig.Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
-
You can send to and receive the value from HS with FromHS() and SendToHS() and other coding is to be done in your code in the sketch or in an event in HS.
Greig.Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
Scripts = Various
Comment
Comment