Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Library to access the ELV FHZ series of devices.

License

NotificationsYou must be signed in to change notification settings

scy/php-fhz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a PHP package to access the FHZ 1000 family of SRD860 transceivers and parse messages from sensors.

At least that's what it currently does.The features are limited to what the author currently needs:

  • connect to a FHZ 1000 PC from Linux (tested on WSL as well)
  • receive temperature and humidity readings from several HMS100T and HMS100TF sensors and make them available as PHP objects

Installation

composer require scy/fhz should be sufficient.In case you want to trythe example script, make sure you install the development dependencies.Recent versions of Composer do that automatically, older ones need the--dev switch.

Usage

Create anew Connection, passing the path to the serial device your FHZ is connected to as a parameter.You can optionally supply a PSR-3 logger as the second parameter.

Callingread($seconds) on the resulting object will listen for incoming transmissions and return the first incoming message.If no messages arrived after$seconds (a float), the method will returnfalse.Messages that arrive while yourread() is not running will be buffered by your operating system's IO buffer and returned one by one when you callread() the next time.(That buffer is limited, so don't get too crazy.)

The message is returned as a aMessage object or a subclass of it.

Currently, only one subclass is implemented:TemperatureMessage.It represents a single reading of a HMS100T (temperature) or HMS100TF (temperature/humidity) sensor.Use methods likegetTemperature() to access the data.

You can alsohave a look at some example code, which probably explains it better.

Status

I'm currently integrating this library into a management and logging interface for my van.The API isn't stable, but shouldn't change too much either.

Documentation, error handling and code structure could use some improvements.

Meta

This library is free software released under the terms of theMIT license.It is written and maintained by Tim Weber and its source code is hosted athttps://github.com/scy/php-fhz.

About

Library to access the ELV FHZ series of devices.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp