Please login or register.

Login with username, password and session length

Author Topic: Can the HG XTenLib be used elsewhere?  (Read 5727 times)

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Can the HG XTenLib be used elsewhere?
« on: November 13, 2018, 09:02:00 AM »

https://github.com/genielabs/x10-lib-dotnet/blob/master/README.md

Gene broke the X10 library out of HG a long time ago so it ciuld be used in other projects.  Since Mochad apparently doesn't do everything AHP can (RF, security sensors, etc) and HG can, is there any way to use Gene's library on Domoticz or HA?

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Can the HG XTenLib be used elsewhere?
« Reply #1 on: November 13, 2018, 09:24:56 AM »

Mochad can see all RF even Security sensors I believe most HA software that use mochad only focused only on the pl side of it.
You should be able to use Gene's library but you'd most likely have to create the plug in for it.

I had mochad reporting door window sensors in Domoticz when I was testing it comparing it to HG. I prefere the look and feel of HG as well as the ease of setup over Domoticz or Home Assistant  but those have a larger more active user base.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Can the HG XTenLib be used elsewhere?
« Reply #2 on: November 13, 2018, 11:27:57 AM »

I have been using HG for years and it's fine.  The only issue that I'm really concerned about is the programming of custom scripts.  HG works, but the way you reference modules is not intuitive.  I don't know how HA and Domoticz do it, but HG is NOT like AHP API.  In the AHP approach you wait for a triggered event and respond.  In HG, the code can be triggered by timed events or value changes (sensors, modules, etc) however, you have to loop through everything in the system to figure out which event triggered it.  Unless Gene changed things since I wrote my Advanced Smart Lights code, it's NOT intuitive.

IOW, it is possible to do almost anything you want with HG in code, but the way you get there is not conducive to new people coming in and writing their own code.  In other languages you can have pseudo code and convert it to real code very quickly.  With HG, you can use the pseudo code as  a guide, but it can't be executed in that order necessarily.

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Can the HG XTenLib be used elsewhere?
« Reply #3 on: November 13, 2018, 01:35:41 PM »

https://github.com/genielabs/x10-lib-dotnet/blob/master/README.md

Gene broke the X10 library out of HG a long time ago so it ciuld be used in other projects.  Since Mochad apparently doesn't do everything AHP can (RF, security sensors, etc) and HG can, is there any way to use Gene's library on Domoticz or HA?

You probably could but you would need to write a python wrapper for it. Easy for a python programmer I'd imagine  :)
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Can the HG XTenLib be used elsewhere?
« Reply #4 on: November 13, 2018, 01:47:32 PM »

I have been using HG for years and it's fine.  The only issue that I'm really concerned about is the programming of custom scripts.  HG works, but the way you reference modules is not intuitive.  I don't know how HA and Domoticz do it, but HG is NOT like AHP API.  In the AHP approach you wait for a triggered event and respond.  In HG, the code can be triggered by timed events or value changes (sensors, modules, etc) however, you have to loop through everything in the system to figure out which event triggered it.  Unless Gene changed things since I wrote my Advanced Smart Lights code, it's NOT intuitive.

IOW, it is possible to do almost anything you want with HG in code, but the way you get there is not conducive to new people coming in and writing their own code.  In other languages you can have pseudo code and convert it to real code very quickly.  With HG, you can use the pseudo code as  a guide, but it can't be executed in that order necessarily.

The strength in HG is the ability to code in C#, Python or Ruby.

The X10 side of this project will be very basic but should fulfill any users needs. No it's not AHP but there is no credible alternative to AHP out there and I don't see anyone investing any further time or energy into replicating another AHP.

From initial feedback there doesn't seem to be a huge interest in the whole Pi X10 concept but that shouldn't deter us from providing a platform for users who are to continue using their X10 devices on a Raspberry Pi

Logged

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 160
  • Posts: 1458
Re: Can the HG XTenLib be used elsewhere?
« Reply #5 on: November 13, 2018, 06:39:01 PM »


From initial feedback there doesn't seem to be a huge interest in the whole Pi X10 concept but that shouldn't deter us from providing a platform for users who are to continue using their X10 devices on a Raspberry Pi

It may be a chicken and egg type thing.  Once it's really there and announced people may be more inclined to try it. Cost is certainly no barrier!
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Can the HG XTenLib be used elsewhere?
« Reply #6 on: November 14, 2018, 11:42:45 AM »

I was under the impression that Mochad couldn't do some things.  I wasn't aware that the issue was in the wrapper implementing it into the different HA software.  That being the case, there's no reason to consider using Gene's code since it only works in Mono.  If people went with Domoticz, HA, or some other software it appears that the wrapper should be updated to work with RF better IMO.


From initial feedback there doesn't seem to be a huge interest in the whole Pi X10 concept but that shouldn't deter us from providing a platform for users who are to continue using their X10 devices on a Raspberry Pi

It may be a chicken and egg type thing.  Once it's really there and announced people may be more inclined to try it. Cost is certainly no barrier!
If someone invested $100 into AHP and a CM15A, then spending $10 (looks more like $20 for some reason) on a RPi Zero W and a little more for a few extra components is insignificant.  If the software is easy enough to set up, then people will accept it so long as it is reliable.  I can confirm HG is reliable and for basic things very easy to set up.  The only issue is the RPi and that's only a drawback if someone has no interest.  But, the image that is being worked on should remove that barrier as well.

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Can the HG XTenLib be used elsewhere?
« Reply #7 on: November 14, 2018, 08:23:45 PM »

I was under the impression that Mochad couldn't do some things.  I wasn't aware that the issue was in the wrapper implementing it into the different HA software.  That being the case, there's no reason to consider using Gene's code since it only works in Mono.  If people went with Domoticz, HA, or some other software it appears that the wrapper should be updated to work with RF better IMO.


From initial feedback there doesn't seem to be a huge interest in the whole Pi X10 concept but that shouldn't deter us from providing a platform for users who are to continue using their X10 devices on a Raspberry Pi

It may be a chicken and egg type thing.  Once it's really there and announced people may be more inclined to try it. Cost is certainly no barrier!
If someone invested $100 into AHP and a CM15A, then spending $10 (looks more like $20 for some reason) on a RPi Zero W and a little more for a few extra components is insignificant.  If the software is easy enough to set up, then people will accept it so long as it is reliable.  I can confirm HG is reliable and for basic things very easy to set up.  The only issue is the RPi and that's only a drawback if someone has no interest.  But, the image that is being worked on should remove that barrier as well.

It's exactly like HomeSeer. A Windows program that was adapted to run under Mono. Of course there's the small detail of cost with HomeSeer.

Mono has evolved leaps and bounds but at the end of the day you're running a Windows designed program in a Linux environment on the Raspberry Pi.

Maybe it's a case of the phobia FOL (Fear of Linux) in play here with the Raspberry Pi. Who knows. It doesn't exactly get great press on this forum.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Can the HG XTenLib be used elsewhere?
« Reply #8 on: November 15, 2018, 11:04:06 AM »

I think of Mono a little different.  Yes, you could look at it as a way to make Windows programs run on Linux (or any other Mono capable OS).  I see it as a way to make .NET code work on other OS than just Windows where it was originally designed to operate.  My vision is more of a Java or Python type implementation where you write the functional part of the code which doesn't change no matter where it's deployed and let the OS implementation take care of how it actually works.  Now, I'm not informed enough to say that my view is correct nor if that vision actually works as well as Python/Java.
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.