Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement sensors #50

Open
alexyao2015 opened this issue Jan 5, 2021 · 8 comments
Open

Implement sensors #50

alexyao2015 opened this issue Jan 5, 2021 · 8 comments
Labels
confirmed We know what should be done to resolve the issue enhancement New feature or request

Comments

@alexyao2015
Copy link
Member

Sensors endpoint isn't currently supported. This results in Hue essentials effects stored on the bridge not functioning.

@marcelveldt
Copy link
Collaborator

What exactly does a sensor have to do with effects ? What sensor is it missing exactly ?
Adding some sensors from HASS should be pretty easy I guess.

@alexyao2015
Copy link
Member Author

It seems that hue essentials uses some sensor stuff to get effects working on the bridge only without having to use the phone. If you try adding those effects, you will see what I mean.

@alexyao2015 alexyao2015 added enhancement New feature or request confirmed We know what should be done to resolve the issue labels Jan 8, 2021
@alexyao2015
Copy link
Member Author

Seems like HueLabs also uses the same sensors trick for effects.

@tomrennen
Copy link

Once this issue has been resolved, it may be possible to add support for simple Routines. This could maybe be achieved by converting them to Home Assistant automations. See further: #103

@ktown007
Copy link

ktown007 commented Mar 3, 2021

The Home Assistant sensors did not import to Alexa, I was thinking to trigger some Alexa routines based on real or virtual HA sensors. The sensors do not show in the json. Do they export automatically or is there come configuration required?

@ktown007
Copy link

ktown007 commented Mar 14, 2021

curl http://{ip}/api/{user}/sensors

{
	"1": {
		"state": {
			"daylight": null,
			"lastupdated": "none"
		},
		"config": {
			"on": true,
			"configured": false,
			"sunriseoffset": 30,
			"sunsetoffset": -30
		},
		"name": "Daylight",
		"type": "Daylight",
		"modelid": "PHDL00",
		"manufacturername": "Signify Netherlands B.V.",
		"swversion": "1.0"
	},
	"2": {
		"state": {
			"temperature": 2039,
			"lastupdated": "2021-03-14T16:43:11"
		},
		"swupdate": {
			"state": "noupdates",
			"lastinstall": "2019-03-15T18:32:32"
		},
		"config": {
			"on": true,
			"battery": 100,
			"reachable": true,
			"alert": "none",
			"ledindication": false,
			"usertest": false,
			"pending": []
		},
		"name": "Hue temperature sensor 1",
		"type": "ZLLTemperature",
		"modelid": "SML001",
		"manufacturername": "Signify Netherlands B.V.",
		"productname": "Hue temperature sensor",
		"swversion": "6.1.1.27575",
		"uniqueid": "00:17:88:01:02:03:c3:a5-02-0402",
		"capabilities": {
			"certified": true,
			"primary": false
		}
	},
	"3": {
		"state": {
			"presence": false,
			"lastupdated": "2021-03-14T16:44:41"
		},
		"swupdate": {
			"state": "noupdates",
			"lastinstall": "2019-03-15T18:32:32"
		},
		"config": {
			"on": true,
			"battery": 100,
			"reachable": true,
			"alert": "none",
			"ledindication": false,
			"usertest": false,
			"sensitivity": 2,
			"sensitivitymax": 2,
			"pending": []
		},
		"name": "Living room sensor",
		"type": "ZLLPresence",
		"modelid": "SML001",
		"manufacturername": "Signify Netherlands B.V.",
		"productname": "Hue motion sensor",
		"swversion": "6.1.1.27575",
		"uniqueid": "00:17:88:01:02:03:c3:a5-02-0406",
		"capabilities": {
			"certified": true,
			"primary": true
		}
	},
	"4": {
		"state": {
			"lightlevel": 27009,
			"dark": false,
			"daylight": true,
			"lastupdated": "2021-03-14T16:44:28"
		},
		"swupdate": {
			"state": "noupdates",
			"lastinstall": "2019-03-15T18:32:32"
		},
		"config": {
			"on": true,
			"battery": 100,
			"reachable": true,
			"alert": "none",
			"tholddark": 16000,
			"tholdoffset": 7000,
			"ledindication": false,
			"usertest": false,
			"pending": []
		},
		"name": "Hue ambient light sensor 1",
		"type": "ZLLLightLevel",
		"modelid": "SML001",
		"manufacturername": "Signify Netherlands B.V.",
		"productname": "Hue ambient light sensor",
		"swversion": "6.1.1.27575",
		"uniqueid": "00:17:88:01:02:03:c3:a5-02-0400",
		"capabilities": {
			"certified": true,
			"primary": false
		}
	},
	"5": {
		"state": {
			"status": 0,
			"lastupdated": "2021-03-14T16:41:37"
		},
		"config": {
			"on": true,
			"reachable": true
		},
		"name": "MotionSensor 3.Companion",
		"type": "CLIPGenericStatus",
		"modelid": "PHA_STATE",
		"manufacturername": "Philips",
		"swversion": "1.0",
		"uniqueid": "MotionSensor 3.Companion",
		"recycle": true
	}
}

curl http://{ip}/api/{user}/sensors/3

{
	"state": {
		"presence": false,
		"lastupdated": "2021-03-14T16:46:31"
	},
	"swupdate": {
		"state": "noupdates",
		"lastinstall": "2019-03-15T18:32:32"
	},
	"config": {
		"on": true,
		"battery": 100,
		"reachable": true,
		"alert": "none",
		"ledindication": false,
		"usertest": false,
		"sensitivity": 2,
		"sensitivitymax": 2,
		"pending": []
	},
	"name": "Living room sensor",
	"type": "ZLLPresence",
	"modelid": "SML001",
	"manufacturername": "Signify Netherlands B.V.",
	"productname": "Hue motion sensor",
	"swversion": "6.1.1.27575",
	"uniqueid": "00:17:88:01:02:03:c3:a5-02-0406",
	"capabilities": {
		"certified": true,
		"primary": true
	}
}

Let me know if there is more info needed.

@Madd0g
Copy link

Madd0g commented Aug 16, 2021

will it be possible to support triggering routines on the echo with the sensors feature? I'd love to be able to trigger echo routines based on HA entities

@blasserre
Copy link

will it be possible to support triggering routines on the echo with the sensors feature? I'd love to be able to trigger echo routines based on HA entities

HI! how can I control hue emulation with echo device?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed We know what should be done to resolve the issue enhancement New feature or request
Projects
Development

No branches or pull requests

6 participants